From 3b35d7bd71bb8bc9da2bdbd37678532809d9aff6 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Tue, 2 Sep 2025 14:21:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=99=AF=E7=82=B9=E8=AF=A6=E6=83=85=E8=AF=84?= =?UTF-8?q?=E4=BB=B7=E3=80=81=E8=B4=AD=E7=89=A9=E8=BD=A6=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/info/sceneProductInfo/index.js | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/pages/info/sceneProductInfo/index.js b/pages/info/sceneProductInfo/index.js index b0071cc..3384f5b 100644 --- a/pages/info/sceneProductInfo/index.js +++ b/pages/info/sceneProductInfo/index.js @@ -224,7 +224,9 @@ Page({ }) // 获取评价列表 commonApi._post("scene/get_comment", { - scene_id: options.id + scene_id: options.id, + offset:0, + limit:5, }).then(res => { res.data.list.map(item => { item.rate = Number(item.rate) @@ -1080,14 +1082,15 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { - commonApi.user_post('cart/get_list', {noLogin: true}).then(res => { + if (!wx.getStorageSync('jstrip_token')) { + return; + } + commonApi.user_post('cart/get_count', {noLogin: true}).then(res => { this.setData({ - cartCount: res.data.length //1 + cartCount: res.data //1 }) }) - if (!wx.getStorageSync('jstrip_token')) { - return; - } + if (this.data.info && this.data.info.id) { this.drawImg() //// 获取补贴 @@ -1122,11 +1125,6 @@ Page({ // } //// 获取补贴结束 - } else { - console.log(2222); - setTimeout(() => { - // this.onShow() - }, 200) } },