优化接口
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "wxc2bb94c0ddda1032",
|
||||
"appid" : "wxd88fffa983758a30",
|
||||
"setting" : {
|
||||
"urlCheck" : false,
|
||||
"minified" : true,
|
||||
|
||||
@@ -155,12 +155,12 @@
|
||||
uni.getStorage({
|
||||
key: 'itemData',
|
||||
success: function(res) {
|
||||
console.log(res.data,'数据');
|
||||
_this.type = res.data.value
|
||||
_this.distiricttopCommon()
|
||||
setTimeout(() => {
|
||||
// setTimeout(() => {
|
||||
_this.GetTop()
|
||||
}, 1000)
|
||||
// _this.init_fn()
|
||||
// }, 1000)
|
||||
}
|
||||
});
|
||||
// this.type = e.value
|
||||
@@ -170,7 +170,19 @@
|
||||
// }, 1000)
|
||||
},
|
||||
onShow() {
|
||||
this.init_fn()
|
||||
let _this = this
|
||||
uni.getStorage({
|
||||
key: 'itemData',
|
||||
success: function(res) {
|
||||
_this.type = res.data.value
|
||||
_this.distiricttopCommon()
|
||||
// setTimeout(() => {
|
||||
// _this.GetTop()
|
||||
_this.init_fn()
|
||||
// }, 1000)
|
||||
}
|
||||
});
|
||||
// this.init_fn()
|
||||
},
|
||||
computed: {
|
||||
HeighT() { //手机类型的尺寸
|
||||
|
||||
@@ -40,8 +40,13 @@
|
||||
size: 10, //页容量
|
||||
status: 'loadmore',
|
||||
},
|
||||
userId:null
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
this.userId = uni.cache.get('userInfo').id
|
||||
// this.paygetShopByMember()
|
||||
},
|
||||
onShow() {
|
||||
this.paygetShopByMember()
|
||||
},
|
||||
|
||||
@@ -388,15 +388,16 @@
|
||||
case 'addcart':
|
||||
this.cartLists = msg
|
||||
if (msg.data.length != 0) {
|
||||
let nums = 0
|
||||
msg.data.forEach((item, index, arr) => { //初始化skuidname的数据 选择第一个
|
||||
console.log(this.skuidsearch,'调试1')
|
||||
console.log(item.skuId,'调试2')
|
||||
if (item.skuId == this.skuidsearch) {
|
||||
this.$set(this, 'amountcartNumber', item.number)
|
||||
} else {
|
||||
this.$set(this, 'amountcartNumber', 0)
|
||||
}
|
||||
nums = item.number
|
||||
}
|
||||
// else {
|
||||
// this.$set(this, 'amountcartNumber', 0)
|
||||
// }
|
||||
})
|
||||
this.$set(this, 'amountcartNumber', nums)
|
||||
} else {
|
||||
this.$set(this, 'amountcartNumber', 0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user