diff --git a/pages/nongKe/cloud_entrepot/index.vue b/pages/nongKe/cloud_entrepot/index.vue index a04503e..b9f542b 100644 --- a/pages/nongKe/cloud_entrepot/index.vue +++ b/pages/nongKe/cloud_entrepot/index.vue @@ -20,53 +20,55 @@ - - - - - - {{town}}里海云仓 + + + + + + {{town}}里海云仓 + + + + + 全部 + + + + + + + + + + + + + 供销综合云市场 - + + + + + + - 全部 - - - - - - - - - - - - - 供销综合云市场 - - + 全部 + - - - - - - - 全部 - - - - + + - + {{item.tit}} @@ -318,6 +320,9 @@ this.getCloundShop() // console.log(this.appInfo, "手机信息") }, + onShow() { + this.cartFn() + }, // 分页 // onReachBottom() { // if (this.flag) return @@ -343,7 +348,7 @@ .in(this) .select('.content') .boundingClientRect(rect => { - if (rect.top <= (this.headtop + 16)) { + if (rect.top <= (this.headtop)) { this.pocls = 'fixed' this.act_swiper = 'act_swiper' this.act_img = 'act_img' @@ -374,10 +379,10 @@ }, onPullDownRefresh() { - uni.stopPullDownRefresh() this.getCloundShop() this.getList() this.cartFn() + uni.stopPullDownRefresh() }, // onReachBottom() { // console.log("daidi") @@ -390,13 +395,13 @@ this.totalMoney = 0 this.cartList = res.data.list this.cartList.forEach(e => { - this.totalMoney += e.list[0].cart_num * e.list[0].productAttr.price - // console.log(e.list[0].cart_num, e.list[0].productAttr.price) - // return - // console.log(e.list[0].cart_num, e.productAttr[0].price) - // this.totalMoney = this.totalMoney + Number(e.productAttr.price) * e.cart_num - // console.log(e.productAttr.price, e.cart_num) + + e.list.forEach(item => { + this.totalMoney += item.cart_num * item.productAttr.price + }) + }) + this.totalMoney = this.totalMoney.toFixed(2) }) getCartCounts().then(res => { this.goodsNum = res.data[0].count @@ -710,7 +715,7 @@ } .head { - position: absolute; + position: fixed; z-index: 100; color: white; display: flex; @@ -718,6 +723,7 @@ width: 100%; padding: 0 20rpx; align-items: center; + transition: .3s; @@ -729,22 +735,23 @@ color: white; width: 100%; padding: 0 20rpx; - // background-color: white; - - - - + transition: .3s; + opacity: 0; + } + .show { + opacity: 1; } .menu { position: absolute; top: 748rpx; width: 750rpx; - background-color: rgba(255, 255, 255, 0.5); + background-color: rgba(255, 255, 255, 0.7); + height: 250rpx; // height: 175.23rpx; // box-shadow: 0 0 100px 100px rgba(255, 255, 255, 0.5); - box-shadow: 0 0 100rpx 30rpx rgba(255, 255, 255, 0.9); + // box-shadow: 0 0 100rpx 30rpx rgba(255, 255, 255, 0.9); } @@ -819,7 +826,7 @@ } .act_swiper { - height: 150rpx; + // height: 500rpx; position: fixed; z-index: 99; overflow: hidden; @@ -827,7 +834,7 @@ .act_img { // transition:t; - transform: translateY(-848rpx); + transform: translateY(-800rpx); } diff --git a/pages/nongKe/cloud_entrepot/indexa.vue b/pages/nongKe/cloud_entrepot/indexa.vue index 7b9facc..13670e3 100644 --- a/pages/nongKe/cloud_entrepot/indexa.vue +++ b/pages/nongKe/cloud_entrepot/indexa.vue @@ -140,11 +140,16 @@ width="49.07rpx" height="49.07rpx"> --> -
-
+
+ + + +
+ :style="`transform:translateX(${trnList[index].left})`" + src="/static/images/LHYC/J.png" width="49.07rpx" + height="49.07rpx">
@@ -467,11 +472,9 @@ }) }, - addcart(i) { + addcarts(i) { let that = this - console.log((this.$refs.jia[i])) - this.a = this.$refs.jia[i] - return + // return uni.createSelectorQuery().in(this).select(`.act_class${i}`).boundingClientRect(data1 => { that.trnList[i].left = this.cartTagInfo.left - data1.left + 'px'; that.trnList[i].bottom = this.cartTagInfo.top - data1.top + 'px'; @@ -480,8 +483,8 @@ // console.log(this.$refs.jia1[i]) // return // this.$refs.jia[i].style.transition = "0.5s" - this.$refs.jia[i].style.transform = `translateX(${this.trnList[i].left})` - this.$refs.jia1[i].style.transform = `translateY(${this.trnList[i].bottom})` + // this.$refs.jia[i].style.transform = `translateX(${this.trnList[i].left})` + // this.$refs.jia1[i].style.transform = `translateY(${this.trnList[i].bottom})` // this.$refs.jia[i].style.transform = `translateY(${this.trnList[i].bottom})` // this.trnList[i].left @@ -563,8 +566,61 @@ } } +