diff --git a/App.vue b/App.vue index 0dd7d34..465865b 100644 --- a/App.vue +++ b/App.vue @@ -76,19 +76,19 @@ onShow: function() { - console.log('App Show') - console.log('11111') - console.log(this.$store.state.hasNet); + // console.log('App Show') + // console.log('11111') + // console.log(this.$store.state.hasNet); const that = this; uni.onNetworkStatusChange(function(res) { - console.log(res); + // console.log(res); if (res.isConnected) { that.$store.commit("changeNetStatus", true); // uni.showToast({ // title: "Please connect to the network", // icon: "none", // }) - console.log('有网络'); + // console.log('有网络'); } else { that.$store.commit("changeNetStatus", false); uni.showToast({ @@ -96,7 +96,7 @@ icon: "none", duration: 2000 }) - console.log('无网络'); + // console.log('无网络'); } }) }, diff --git a/pages/index/index.vue b/pages/index/index.vue index 25f52c8..afe7d68 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -1161,7 +1161,6 @@ let goodid if (item.goodid) { - uni.navigateTo({ url: '../productDetails/index?goodid=' + item.goodid }) diff --git a/pages/index/index2.vue b/pages/index/index2.vue index 8a15582..5badd04 100644 --- a/pages/index/index2.vue +++ b/pages/index/index2.vue @@ -85,8 +85,53 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{item1.block_title}} + {{item1.block_title2}} + + + + + @@ -158,7 +203,7 @@ --> - + - @@ -193,9 +238,9 @@ - + --> - + @@ -269,6 +314,7 @@ export default { data() { return { + mycurrent: 0, isScrollShow: false, scroll_active: 0, scrollList: [ @@ -566,7 +612,7 @@ } defaultRequest(data).then(res => { - + console.log(res); if (res.error == 0) { this.indexDate = res.data res.data.zones.map(item => { @@ -575,7 +621,16 @@ this.info.push(item) console.log(item, 'info') } - + if (item.zone_code == 'HONLIST2') { + item.blocks.map(item1 => { + // console.log('HONLIST2',item1) + }) + } + if (item.zone_code == 'HONLIST3') { + item.blocks.map(item1 => { + // console.log('HONLIST3',item1) + }) + } }) } }) @@ -587,18 +642,26 @@ //轮播图跳转 // 热卖跳转 imgTo(item) { console.log(item, 'item') - let goodid = item.block_link.substring(12); - console.log(item.block_link) + let goodid = item.block_link; + // let goodid = item.block_link.substring(12); if (goodid.includes('goodslist')) { uni.navigateTo({ - url: 'http://localhost:8080/#/pages/index/pickUpCentre' - // url: '../category/productList' + goodid + url: '../category/productList'+goodid }) console.log(11111) - } else { + } else if (goodid.includes('youhui')) { + uni.navigateTo({ + url: '../index/pickUpCentre' + }) + console.log(33333); + } else if (item.block_link.includes('goodid')) { uni.navigateTo({ url: '../productDetails/index' + goodid + '&img=1' }) + } else { + uni.navigateTo({ + url: '../productDetails/index'+goodid+'&img=1' + }) console.log(22222) } @@ -1257,4 +1320,152 @@ } } } + + .spike1 { + white-space: nowrap; + width: 100%; + padding-right: 16rpx; + padding-left: 16rpx; + margin-bottom: 47.67rpx; + + ::-webkit-scrollbar { + width: 0; + height: 0; + background-color: transparent; + } + + .spike1_item { + // color: #191919; + color: #fff; + font-size: 26.67rpx; + // margin-right: 16.67rpx; + // width: 200rpx; + // margin-left: 16rpx; + padding-right: 20rpx; + display: inline-block; + font-weight: 500; + + &:last-child { + margin-right: 37rpx; + } + + .spike1_item_img { + width: 180rpx; + height: 180rpx; + background-color: #999999; + + padding-right: 16rpx; + + image { + width: 100%; + height: 100%; + + } + } + + // .padding_honlist2{ + // margin-right: 280rpx !important; + // } + .spike1_item_bottom { + padding-left: 9.33rpx; + margin-top: 7.67rpx; + + .spike1_item_text { + // color: #9D9D9D; + color: #fff; + font-size: 21.33rpx; + text-decoration: line-through; + } + + .spike1_item_text1 { + // color: #9D9D9D; + color: #fff; + font-size: 21.33rpx; + } + } + + .spike1_item_bottom1 { + padding-left: 9.33rpx; + margin-top: 19.33rpx; + font-weight: bold; + + .spike1_item_text { + // color: #000000; + color: #fff; + font-size: 16rpx; + font-weight: 400; + margin-bottom: 20.67rpx; + white-space: break-spaces; + + } + } + + } + + .spike1_item:last-child { + margin-right: 0; + } + } + .swiper-items { + border-radius: 30rpx; + overflow: hidden; + // 像这种多张轮播图同时出现在一屏的情况下就不要指定width了,不然你会发现previous-margin和 next-margin会出现想不到的效果 + // 如果想要设置宽每一张轮播图的宽度,只需要设置previous-margin和next-margin就可以了,想要设置高度直接改下面的height就可以了 + // width: 450rpx; + height: 100%; + transform: scale(0.8); + transition: all 0.5s ease; + text-align: center; + transition: all 0.5s ease-in-out; + + &.active { + transform: scale(1); + } + + /deep/ .uni-swiper-dots { + display: none !important; + } + uni-swiper .uni-swiper-dots { + display: none !important; + z-index: -1 !important; + } + /deep/ .uni-swiper .uni-swiper-dots-horizontal { + display: none !important; + } + uni-swiper .uni-swiper-dot { + z-index: -1 !important; + display: none !important; + } + + } + @keyframes scaleDraw { + /*定义关键帧、scaleDrew是需要绑定到选择器的关键帧名称*/ + + 0% { + + transform: scale(1); + /*开始为原始大小*/ + + } + + 25% { + + transform: scale(1.1); + /*放大1.1倍*/ + + } + + 50% { + + transform: scale(1); + + } + + 75% { + + transform: scale(1.1); + + } + + } diff --git a/pages/productDetails/index.vue b/pages/productDetails/index.vue index cd88238..8a4c8c7 100644 --- a/pages/productDetails/index.vue +++ b/pages/productDetails/index.vue @@ -397,7 +397,7 @@ :class="goods_attr_list[index].goods_attr_id==item1.goods_attr_id?'active_color':''" @click="selectAttr(item.attr_id,item1.goods_attr_id,index1,item1.attr_price)"> - @@ -761,7 +761,7 @@ }) } else { wx.previewImage({ - urls: this.goods_attr_list, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了 + urls: this.info, //需要预览的图片http链接列表,多张的时候,url直接写在后面就行了 current: index, // 当前显示图片的http链接,默认是第一个 indicator: 'number', success: function(res) {}, @@ -771,7 +771,6 @@ } }, - // 其他商品详情 goDetails(id) { uni.navigateTo({ @@ -1175,6 +1174,8 @@ this.isCart = true } console.info(this.shipping_list) + + this.isVideo() }, onShow() { this.getCartNum();