diff --git a/pages/nongKe/cloud_entrepot/index.vue b/pages/nongKe/cloud_entrepot/index.vue
index b9f542b..2fdff6a 100644
--- a/pages/nongKe/cloud_entrepot/index.vue
+++ b/pages/nongKe/cloud_entrepot/index.vue
@@ -22,7 +22,7 @@
+ v-if="showtit">
@@ -39,8 +39,7 @@
-
+
@@ -86,12 +85,11 @@
-
@@ -162,6 +169,10 @@
+
+ 暂无商品
+
+
@@ -230,6 +241,10 @@
+
+ 暂无商家
+
+
@@ -389,6 +404,10 @@
// },
methods: {
+ clickSwiperFn(i) {
+ // console.log(i)
+ this.current = i
+ },
cartFn() {
getCartList().then(res => {
console.log(res)
@@ -464,19 +483,38 @@
}).then(res => {
this.goodsList = res.data.list
this.showLoading = false
+ this.goodsList.forEach(item => {
+ this.trnList.push({
+ left: 0,
+ bottom: 0
+ })
+ })
})
},
- addcart(i) {
+ addcart(item, i) {
+
let data = {
cart_num: 1,
is_new: 0,
- product_attr_unique: i.sku[''].unique,
- product_id: i.product_id,
- product_type: i.product_type,
+ product_attr_unique: item.sku[''].unique,
+ product_id: item.product_id,
+ product_type: item.product_type,
spread_id: "",
}
+
let that = this
+ // return
+
+ uni.createSelectorQuery().in(this).select(`.act_class${i}`).boundingClientRect(data1 => {
+ that.trnList[i].left = this.cartTagInfo.left - data1.left;
+ that.trnList[i].bottom = this.cartTagInfo.top - data1.top;
+ console.log(that.trnList[i])
+ let timer = setTimeout(() => {
+ that.trnList[i].left = 0
+ that.trnList[i].bottom = 0
+ }, 1000)
+ }).exec();
let res = postCartAdd({
...data
}).then((res, err) => {
@@ -547,6 +585,18 @@
\ No newline at end of file
diff --git a/pages/nongKe/cloud_entrepot/indexa.vue b/pages/nongKe/cloud_entrepot/indexa.vue
index 13670e3..8b8bce0 100644
--- a/pages/nongKe/cloud_entrepot/indexa.vue
+++ b/pages/nongKe/cloud_entrepot/indexa.vue
@@ -133,27 +133,17 @@
¥30.00
-
-
-
+
@@ -275,6 +265,9 @@
import {
postCartAdd,
} from '@/api/store.js';
+ import {
+ times
+ } from '../../../uni_modules/uview-ui/libs/function/digit';
export default {
data() {
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
@@ -286,7 +279,7 @@
pocls: "",
type: "",
act_swiper: "",
- current: 1,
+ current: 3,
goodsNum: 0,
goodsList: [],
winHeight: 0,
@@ -472,13 +465,18 @@
})
},
- addcarts(i) {
+ addcart(i) {
let that = this
// return
+ console.log(i)
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';
+ that.trnList[i].left = this.cartTagInfo.left - data1.left;
+ that.trnList[i].bottom = this.cartTagInfo.top - data1.top;
console.log(that.trnList[i])
+ timer = setTimeout(() => {
+ that.trnList[i].left = 0
+ that.trnList[i].bottom = 0
+ }, 1000)
}).exec();
// console.log(this.$refs.jia1[i])
// return
@@ -560,52 +558,17 @@
})
})
})
- // console.log(this.cloudList)
+ console.log("sad", this.trnList)
data.length < 1 ? Toast("暂无云仓") : '';
}
}
}
-