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 | 9 | setting: t, |
10 | 10 | wechatUser: null, |
11 | 11 | userInfo: null, |
12 | - config: null, | |
13 | - config2: null, | |
12 | + config: null, //门店参数 | |
13 | + config2: null, //门店配置 | |
14 | 14 | code: null, |
15 | 15 | heigth:0, |
16 | - user_id: 5682068,// 4379287,// null,// 5682068, | |
16 | + user_id: null,// 4379287,// null,// 5682068, | |
17 | 17 | buy_now:null, |
18 | 18 | picklist:null, //门店列表 |
19 | 19 | wuliuprice: null, //物流价格表 |
... | ... | @@ -109,7 +109,7 @@ App({ |
109 | 109 | success: function (o) { |
110 | 110 | console.log('getConfig2'); |
111 | 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 | 296 | var cid= t.currentTarget.dataset.cid; |
297 | 297 | var pid = t.currentTarget.dataset.pid; |
298 | 298 | var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid; |
299 | - if(pid!=undefined) lurl+="&pid="+pid; | |
300 | - | |
299 | + lurl+="&pid="+pid; | |
301 | 300 | wx.navigateTo({ url: lurl}); |
302 | 301 | }, |
303 | 302 | ... | ... |
pages/goods/categoryList/categoryList.wxml
... | ... | @@ -233,7 +233,7 @@ |
233 | 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 | 237 | <view>{{goods.items.name}}</view> |
238 | 238 | <view class="flex select_more" > |
239 | 239 | <view class="red-co fs24" >更多</view> |
... | ... | @@ -244,7 +244,7 @@ |
244 | 244 | |
245 | 245 | <block wx:if="{{goods.arrays.length>0}}"> |
246 | 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 | 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 | 249 | <view class="brand_img_name fs24">{{item.name}}</view> |
250 | 250 | </view> | ... | ... |
pages/goods/goodsList/goodsList.js