Commit 08e5bf9dfcd10cc909e3668606a4bf8d95d8df33
1 parent
f9ae7fc3
分类列表的pid正确调用, 商品列表的类别查找,app getconfig2函数
Showing
4 changed files
with
10 additions
and
9 deletions
app.js
@@ -9,11 +9,11 @@ App({ | @@ -9,11 +9,11 @@ App({ | ||
9 | setting: t, | 9 | setting: t, |
10 | wechatUser: null, | 10 | wechatUser: null, |
11 | userInfo: null, | 11 | userInfo: null, |
12 | - config: null, | ||
13 | - config2: null, | 12 | + config: null, //门店参数 |
13 | + config2: null, //门店配置 | ||
14 | code: null, | 14 | code: null, |
15 | heigth:0, | 15 | heigth:0, |
16 | - user_id: 5682068,// 4379287,// null,// 5682068, | 16 | + user_id: null,// 4379287,// null,// 5682068, |
17 | buy_now:null, | 17 | buy_now:null, |
18 | picklist:null, //门店列表 | 18 | picklist:null, //门店列表 |
19 | wuliuprice: null, //物流价格表 | 19 | wuliuprice: null, //物流价格表 |
@@ -109,7 +109,7 @@ App({ | @@ -109,7 +109,7 @@ App({ | ||
109 | success: function (o) { | 109 | success: function (o) { |
110 | console.log('getConfig2'); | 110 | console.log('getConfig2'); |
111 | if (o.data.code == 0) { | 111 | if (o.data.code == 0) { |
112 | - e.globalData.config = o.data.data, "function" == typeof t && t(e.globalData.config); | 112 | + e.globalData.config2 = o.data.data, "function" == typeof t && t(e.globalData.config); |
113 | } | 113 | } |
114 | } | 114 | } |
115 | }); | 115 | }); |
pages/goods/categoryList/categoryList.js
@@ -296,8 +296,7 @@ Page({ | @@ -296,8 +296,7 @@ Page({ | ||
296 | var cid= t.currentTarget.dataset.cid; | 296 | var cid= t.currentTarget.dataset.cid; |
297 | var pid = t.currentTarget.dataset.pid; | 297 | var pid = t.currentTarget.dataset.pid; |
298 | var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid; | 298 | var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid; |
299 | - if(pid!=undefined) lurl+="&pid="+pid; | ||
300 | - | 299 | + lurl+="&pid="+pid; |
301 | wx.navigateTo({ url: lurl}); | 300 | wx.navigateTo({ url: lurl}); |
302 | }, | 301 | }, |
303 | 302 |
pages/goods/categoryList/categoryList.wxml
@@ -233,7 +233,7 @@ | @@ -233,7 +233,7 @@ | ||
233 | <view> | 233 | <view> |
234 | 234 | ||
235 | 235 | ||
236 | -<view class="classify_name fs32 flex-space-between"data-pid="goods.items.parent_id" data-cid="{{goods.items.id}}" bindtap='select_more'> | 236 | +<view class="classify_name fs32 flex-space-between"data-pid="{{goods.items.parent_id}}" data-cid="{{goods.items.id}}" bindtap='select_more'> |
237 | <view>{{goods.items.name}}</view> | 237 | <view>{{goods.items.name}}</view> |
238 | <view class="flex select_more" > | 238 | <view class="flex select_more" > |
239 | <view class="red-co fs24" >更多</view> | 239 | <view class="red-co fs24" >更多</view> |
@@ -244,7 +244,7 @@ | @@ -244,7 +244,7 @@ | ||
244 | 244 | ||
245 | <block wx:if="{{goods.arrays.length>0}}"> | 245 | <block wx:if="{{goods.arrays.length>0}}"> |
246 | <view class="classify_content-frame flex-wrap"> | 246 | <view class="classify_content-frame flex-wrap"> |
247 | - <view class="brand_img_frame t-c ib" data-cid="{{item.id}}" wx:for="{{goods.arrays}}" wx:for-index="index" wx:for-item="item" bindtap="go_cate"> | 247 | + <view class="brand_img_frame t-c ib" data-cid="{{item.id}}" data-pid="three" wx:for="{{goods.arrays}}" wx:for-index="index" wx:for-item="item" bindtap="go_cate"> |
248 | <image class="brand_img"src="{{item.icoimg==null||item.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':item.icoimg}}"binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image> | 248 | <image class="brand_img"src="{{item.icoimg==null||item.icoimg==''?iurl+'/miniapp/images/no_cate_def.png':item.icoimg}}"binderror="goods_bnerr" data-err="goodslist[{{index}}].logo"></image> |
249 | <view class="brand_img_name fs24">{{item.name}}</view> | 249 | <view class="brand_img_name fs24">{{item.name}}</view> |
250 | </view> | 250 | </view> |
pages/goods/goodsList/goodsList.js
@@ -31,7 +31,9 @@ Page({ | @@ -31,7 +31,9 @@ Page({ | ||
31 | if (t.pid == undefined || t.pid == null){ | 31 | if (t.pid == undefined || t.pid == null){ |
32 | url += "&parent_id=0"; | 32 | url += "&parent_id=0"; |
33 | }else{ | 33 | }else{ |
34 | - url += "&parent_id="+t.pid; | 34 | + if(t.pid!="three"){ |
35 | + url += "&parent_id="+t.pid; | ||
36 | + } | ||
35 | } | 37 | } |
36 | } | 38 | } |
37 | 39 |