多次请求处理
This commit is contained in:
@@ -382,7 +382,6 @@
|
||||
return `left-${this.leftIndex? this.leftIndex:0}`;
|
||||
},
|
||||
HeighT() { //手机类型的尺寸 导航栏高度
|
||||
console.log(this.$store.getters.is_BarHeight)
|
||||
return this.$store.getters.is_BarHeight.heightBar + this.$store.getters.is_BarHeight.customBar
|
||||
},
|
||||
scrollHeight() {
|
||||
@@ -510,9 +509,6 @@
|
||||
* 图片加载
|
||||
*/
|
||||
imageLoaded(item, index, index1) {
|
||||
console.log(index)
|
||||
console.log(index1)
|
||||
console.log(this.shopProductList.productInfo[index])
|
||||
this.shopProductList.productInfo[index].products[index1]['imgLoad'] = true;
|
||||
// e.currentTarget.src
|
||||
},
|
||||
@@ -552,7 +548,6 @@
|
||||
} else {
|
||||
|
||||
if (this.amountcartNumber > 0) {
|
||||
console.log(item)
|
||||
if (this.skuNumber < this.skuSuit && this.amountcartNumber <= this.skuSuit) {
|
||||
this.amountcartNumber = this.amountcartNumber - (this.skuSuit == 0 ? 1 : this.skuSuit);
|
||||
} else {
|
||||
@@ -727,11 +722,8 @@
|
||||
isSkuidname = JSON.parse(JSON.stringify(this.skuidname));
|
||||
isSkuidname.push(this.specifications.tagSnap[0].children[o].name)
|
||||
//筛选符合条件的规格列表
|
||||
console.log(isSkuidname);
|
||||
filteredJson = this.querySpecList.filter(obj => obj.specSnap.indexOf(isSkuidname) == 0);
|
||||
console.log(filteredJson);
|
||||
for (let i = 0; i < filteredJson.length; i++) {
|
||||
console.log(filteredJson[i].isGrounding)
|
||||
if (filteredJson[i].isGrounding) {
|
||||
this.specifications.tagSnap[0].children[o].isGrounding = true
|
||||
break; // 终止循环
|
||||
@@ -746,7 +738,6 @@
|
||||
// console.log(val)
|
||||
// this.skuidname.push(val.children[0].info)
|
||||
// })
|
||||
console.log(this.specifications.tagSnap)
|
||||
this.hodgepodge(this.specifications.tagSnap[0], 2) //获取skuid /2查找价格和数量
|
||||
}
|
||||
|
||||
@@ -806,11 +797,8 @@
|
||||
isSkuidname = JSON.parse(JSON.stringify(this.skuidname));
|
||||
isSkuidname.push(this.specifications.tagSnap[index + 1].children[o].name)
|
||||
//筛选符合条件的规格列表
|
||||
console.log(isSkuidname);
|
||||
filteredJson = this.querySpecList.filter(obj => obj.specSnap.indexOf(isSkuidname) == 0);
|
||||
console.log(filteredJson);
|
||||
for (let i = 0; i < filteredJson.length; i++) {
|
||||
console.log(filteredJson[i].isGrounding)
|
||||
if (filteredJson[i].isGrounding) {
|
||||
this.specifications.tagSnap[index + 1].children[o].isGrounding = true
|
||||
break; // 终止循环
|
||||
@@ -824,7 +812,6 @@
|
||||
// res.data.forEach((v,e)=>{
|
||||
// // this.$set(this.specifications.tagSnap[e], 'children', v.value)
|
||||
// })
|
||||
console.log(this.specifications.tagSnap)
|
||||
|
||||
this.$forceUpdate();
|
||||
this.hodgepodge(item, 2)
|
||||
@@ -839,7 +826,7 @@
|
||||
*/
|
||||
async hodgepodge(item, a, c, num) { //此接口去获取商品id !!!赋值库存 数量 价格等
|
||||
try {
|
||||
console.log(this.skuidname.join(","))
|
||||
// console.log(this.skuidname.join(","))
|
||||
let res = await this.api.productqueryProductSku({
|
||||
code: uni.cache.get('tableCode'),
|
||||
shopId: uni.cache.get('shopUser'),
|
||||
@@ -1035,14 +1022,11 @@
|
||||
break;
|
||||
}
|
||||
}
|
||||
console.log(index)
|
||||
/* 查找当前滚动距离 */
|
||||
if (index >= this.lastbottom) { //
|
||||
console.log(index, this.leftIndex)
|
||||
this.leftIndex = index > this.leftIndex ? index : this.leftIndex
|
||||
// this.leftIndex = this.leftIndex
|
||||
} else {
|
||||
console.log(22918)
|
||||
this.leftIndex = (index < 0 ? 0 : index);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user