From 3d2739cad8f7bccc9864e031177f412088b0d898 Mon Sep 17 00:00:00 2001 From: jia <1451658316@qq.com> Date: Mon, 4 Sep 2023 15:01:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E6=8E=A5=E5=8F=A3=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/supply_chains/supply_chains.vue | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/pages/supply_chains/supply_chains.vue b/pages/supply_chains/supply_chains.vue index 22d7c56..2aa8485 100644 --- a/pages/supply_chains/supply_chains.vue +++ b/pages/supply_chains/supply_chains.vue @@ -280,7 +280,7 @@ this.list() onReachBottom() { if (this.status == 'nomore') return; this.status = 'loading'; - t + this.where.page = ++this.where.page; this.list() }, @@ -325,15 +325,20 @@ this.list() // #endif methods: { - list() { - getProductHot(1,10).then(res => { - // console.log(res) - this.cateGoods = res.data.list - }) - // spuInfo('510502106', this.where1).then(res => { - // // console.log(res) - // this.cateGoods = res.data.list - // }) + list(id) { + if(id){ + spuInfo(id, this.where1).then(res => { + // console.log(res) + this.cateGoods = res.data.list + }) + }else{ + getProductHot(1,10).then(res => { + // console.log(res) + this.cateGoods = res.data.list + }) + } + + }, scrolling() { // 滚动条距文档顶部的距离 @@ -508,7 +513,7 @@ this.list() uni.$emit('add', this.street + ',' + this.street_id) // uni.setStorageSync('ADRESS_LOCATION', // this.town + ',' + this.street_id) - // this.list() + this.list(this.street_id) }).catch(err => { uni.showToast({ title: err,