From 08e5bf9dfcd10cc909e3668606a4bf8d95d8df33 Mon Sep 17 00:00:00 2001 From: yvan.ni <765199919@qq.com> Date: Fri, 11 Oct 2019 11:40:14 +0800 Subject: [PATCH] 分类列表的pid正确调用, 商品列表的类别查找,app getconfig2函数 --- app.js | 8 ++++---- pages/goods/categoryList/categoryList.js | 3 +-- pages/goods/categoryList/categoryList.wxml | 4 ++-- pages/goods/goodsList/goodsList.js | 4 +++- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app.js b/app.js index 95fab52..08cdbb1 100644 --- a/app.js +++ b/app.js @@ -9,11 +9,11 @@ App({ setting: t, wechatUser: null, userInfo: null, - config: null, - config2: null, + config: null, //门店参数 + config2: null, //门店配置 code: null, heigth:0, - user_id: 5682068,// 4379287,// null,// 5682068, + user_id: null,// 4379287,// null,// 5682068, buy_now:null, picklist:null, //门店列表 wuliuprice: null, //物流价格表 @@ -109,7 +109,7 @@ App({ success: function (o) { console.log('getConfig2'); if (o.data.code == 0) { - e.globalData.config = o.data.data, "function" == typeof t && t(e.globalData.config); + e.globalData.config2 = o.data.data, "function" == typeof t && t(e.globalData.config); } } }); diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js index 3449f74..de5d5ea 100644 --- a/pages/goods/categoryList/categoryList.js +++ b/pages/goods/categoryList/categoryList.js @@ -296,8 +296,7 @@ Page({ var cid= t.currentTarget.dataset.cid; var pid = t.currentTarget.dataset.pid; var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid; - if(pid!=undefined) lurl+="&pid="+pid; - + lurl+="&pid="+pid; wx.navigateTo({ url: lurl}); }, diff --git a/pages/goods/categoryList/categoryList.wxml b/pages/goods/categoryList/categoryList.wxml index 53fe04c..0f95f6f 100644 --- a/pages/goods/categoryList/categoryList.wxml +++ b/pages/goods/categoryList/categoryList.wxml @@ -233,7 +233,7 @@ - + {{goods.items.name}} 更多 @@ -244,7 +244,7 @@ - + {{item.name}} diff --git a/pages/goods/goodsList/goodsList.js b/pages/goods/goodsList/goodsList.js index 1e77a48..f78d43a 100644 --- a/pages/goods/goodsList/goodsList.js +++ b/pages/goods/goodsList/goodsList.js @@ -31,7 +31,9 @@ Page({ if (t.pid == undefined || t.pid == null){ url += "&parent_id=0"; }else{ - url += "&parent_id="+t.pid; + if(t.pid!="three"){ + url += "&parent_id="+t.pid; + } } } -- libgit2 0.21.4