|
|
|
@ -157,21 +157,50 @@ |
|
|
|
}, 2000) |
|
|
|
}, |
|
|
|
onReady() { |
|
|
|
|
|
|
|
// 轮询判断 |
|
|
|
// typee = 2 有网络 |
|
|
|
//判断是否有网络(尝试解决IOS白屏) |
|
|
|
uni.getNetworkType({ |
|
|
|
success: function (res) { |
|
|
|
console.log(res.networkType);//网络类型 wifi、2g、3g、4g、ethernet、unknown、none |
|
|
|
if(res.networkType === "none"){ |
|
|
|
|
|
|
|
this.typee = 1; |
|
|
|
console.log("当前无网络",this.typee); |
|
|
|
}else{ |
|
|
|
this.typee = 2 |
|
|
|
console.log("有网络",this.typee); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
let that = this; |
|
|
|
let s = 0; |
|
|
|
let time = setInterval(()=>{ |
|
|
|
console.log('6666') |
|
|
|
uni.getNetworkType({ |
|
|
|
success:(res)=>{ |
|
|
|
console.log(res.networkType,s); |
|
|
|
if(res.networkType !== 'none'){ |
|
|
|
that.typee = 2; |
|
|
|
clearInterval(time); |
|
|
|
console.log('清楚网络..') |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
s++; |
|
|
|
},1000); |
|
|
|
/* uni.getNetworkType({ |
|
|
|
success: function(res) { |
|
|
|
console.log(res.networkType); |
|
|
|
//网络类型 wifi、2g、3g、4g、ethernet、unknown、none |
|
|
|
setTimeout(function() { |
|
|
|
if (res.networkType === "none") { |
|
|
|
that.typee = 1; |
|
|
|
console.log("当前无网络", that.typee); |
|
|
|
uni.showToast({ |
|
|
|
title: '网络不佳,请重新打开........', |
|
|
|
duration: 20000 |
|
|
|
}); |
|
|
|
|
|
|
|
} else { |
|
|
|
that.typee = 2 |
|
|
|
console.log("有网络", that.typee); |
|
|
|
uni.showToast({ |
|
|
|
title: '网络不佳,请重新打开........', |
|
|
|
duration: 2000 |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
}, 3000) |
|
|
|
} |
|
|
|
}); */ |
|
|
|
}, |
|
|
|
onLoad() { |
|
|
|
let home = 'HOME' |
|
|
|
@ -1134,7 +1163,7 @@ |
|
|
|
</script> |
|
|
|
<template> |
|
|
|
|
|
|
|
<view class="body" :class="isScrollShow?'body_pad':''"> |
|
|
|
<view v-if="typee == 2" class="body" :class="isScrollShow?'body_pad':''"> |
|
|
|
<!-- 进入页面部分 --> |
|
|
|
<view v-show="!open_img || countdownTime2==0"> |
|
|
|
|
|
|
|
@ -1344,20 +1373,19 @@ |
|
|
|
|
|
|
|
|
|
|
|
<!-- HOT SELLS 2 --> |
|
|
|
<scroll-view class="spike1 page_padding" scroll-x="true" @change="handlechange" :show-scrollbar="false" |
|
|
|
:indicator-dots="true" :circular="true" :interval="3000" :duration="1000" |
|
|
|
<scroll-view class="spike1 page_padding" scroll-x="true" @change="handlechange" :show-scrollbar="false" |
|
|
|
:indicator-dots="true" :circular="true" :interval="3000" :duration="1000" |
|
|
|
v-if="item.zone_code=='HONLIST2' && item.zone_status=='NORMAL'" :current="mycurrent"> |
|
|
|
<view class="spike1_item padding_honlist2" v-for="(item1,index1) in item.blocks" |
|
|
|
:key="item1.block_id"> |
|
|
|
<view :class="['swiper-item',index1==mycurrent ? 'active' : '']" > |
|
|
|
<!-- class="item_img"> --> |
|
|
|
<view :class="['swiper-item',index1==mycurrent ? 'active' : '']"> |
|
|
|
<!-- class="item_img"> --> |
|
|
|
<image :src="item1.block_pic" mode="" |
|
|
|
:style="{width:(item.zone_code=='HONLIST2')?420+'rpx':'',height:item.zone_column+'rpx'}" |
|
|
|
@click="imgTo(itesm1)"></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 轮播图 --> |
|
|
|
<<<<<<< HEAD |
|
|
|
<!-- <view v-if="item.zone_code=='HONLIST2' && item.zone_status=='NORMAL'" :current="mycurrent"> |
|
|
|
<swiper v-for="(item1,index1) in item.blocks" :key="item1.block_id" style="height: 600rpx;" previous-margin="140rpx" next-margin="140rpx" @change="handlechange" :current="mycurrent" :indicator-dots="true" :circular="true" :interval="3000" :duration="1000"> |
|
|
|
<swiper-item v-for="i,index in 10" :key="i"> |
|
|
|
@ -1365,21 +1393,19 @@ |
|
|
|
<image :src="item1.block_pic" mode="" |
|
|
|
:style="{width:(item.zone_code=='HONLIST2')?420+'rpx':'',height:item.zone_column+'rpx'}" |
|
|
|
@click="imgTo(itesm1)"></image> |
|
|
|
======= |
|
|
|
<!-- <view> --> |
|
|
|
<!-- previous-margin指的是当前图片的左边框距离屏幕最左边的距离 --> |
|
|
|
<!-- <swiper class="spike1 page_padding" scroll-x="true" :show-scrollbar="false" |
|
|
|
<!-- previous-margin指的是当前图片的左边框距离屏幕最左边的距离 --> |
|
|
|
<!-- <swiper class="spike1 page_padding" scroll-x="true" :show-scrollbar="false" |
|
|
|
v-if="item.zone_code=='HONLIST2' && item.zone_status=='NORMAL'" style="height: 600rpx;" |
|
|
|
previous-margin="140rpx" next-margin="140rpx" @change="handlechange" :current="mycurrent" |
|
|
|
:indicator-dots="true" :circular="true" :interval="3000" :duration="1000"> |
|
|
|
<swiper-item v-for="(item1,index1) in item.blocks" :key="item1.block_id"> --> |
|
|
|
<!-- v-for="(item1,index1) in item.blocks" :key="item1.block_id"> --> |
|
|
|
<!-- v-for="i,index in 10" :key="i" --> |
|
|
|
<!-- <view :class="['swiper-items',index==mycurrent ? 'active' : '']"> |
|
|
|
<!-- v-for="(item1,index1) in item.blocks" :key="item1.block_id"> --> |
|
|
|
<!-- v-for="i,index in 10" :key="i" --> |
|
|
|
<!-- <view :class="['swiper-items',index==mycurrent ? 'active' : '']"> |
|
|
|
<img :src="item1.block_pic" mode="" |
|
|
|
:style="{width:(item.zone_code=='HONLIST2')?420+'rpx':'',height:item.zone_column+'rpx'}" |
|
|
|
@click="imgTo(item1)"> |
|
|
|
>>>>>>> parent of 3509ff0 (样式修改) |
|
|
|
</view> |
|
|
|
</swiper-item> |
|
|
|
</swiper> |
|
|
|
|