Commit c445af20ed1e7e48d113469a8e258808f1f7925a
1 parent
14741ff5
底部按钮,显示购物车数量,
Showing
6 changed files
with
17 additions
and
4 deletions
pages/cart/cart/cart.js
pages/goods/categoryList/categoryList.js
... | ... | @@ -85,6 +85,7 @@ Page({ |
85 | 85 | onShow:function(){ |
86 | 86 | var that=this; |
87 | 87 | this.requestFirstCategoris(); |
88 | + if(getApp().globalData.user_id) getApp().requestCardNum(); | |
88 | 89 | |
89 | 90 | getApp().getConfig2(function (e) { |
90 | 91 | |
... | ... | @@ -521,7 +522,10 @@ Page({ |
521 | 522 | // 允许从相机和相册扫码 |
522 | 523 | wx.scanCode({ |
523 | 524 | success: (res) => { |
524 | - | |
525 | + var result = res.result; | |
526 | + wx.navigateTo({ | |
527 | + url: "/pages/goods/search/search?s_key="+result, | |
528 | + }); | |
525 | 529 | } |
526 | 530 | }) |
527 | 531 | }, | ... | ... |
pages/goods/categoryList/categoryList.wxml
... | ... | @@ -174,9 +174,11 @@ |
174 | 174 | <image class="country_img" src="{{iurl}}{{bitem.logo}}"></image> |
175 | 175 | <view class='nation_box abs box'> |
176 | 176 | <view class='nt_1 t-c line-height'> |
177 | - <text class="nt_1_t height fs24">{{bitem.name}}</text> | |
177 | + <text class="nation_z_name ellipsis-1 nt_1_t height fs24">{{bitem.name}}</text> | |
178 | 178 | </view> |
179 | - <view class='nt_2 t-c line-height fs24'>{{bitem.enname}}</view> | |
179 | + <view class='nt_2 t-c line-height fs24'> | |
180 | + <text class="nation_y_name ellipsis-1">{{bitem.enname}}</text> | |
181 | + </view> | |
180 | 182 | </view> |
181 | 183 | </view> |
182 | 184 | </view> | ... | ... |
pages/goods/categoryList/categoryList.wxss
pages/index/index/index.js
... | ... | @@ -46,8 +46,10 @@ Page({ |
46 | 46 | onLoad: function () { |
47 | 47 | var th = this; |
48 | 48 | n.init(th, "", "recommend"); |
49 | + | |
49 | 50 | }, |
50 | 51 | async onShow() { |
52 | + if(getApp().globalData.user_id) getApp().requestCardNum(); | |
51 | 53 | await this.init_load(); |
52 | 54 | //显示的时候要开启计时器 |
53 | 55 | this.data.is_timer=1; | ... | ... |
pages/user/index/index.js
... | ... | @@ -44,6 +44,7 @@ Page({ |
44 | 44 | var stoid = app_d.setting.stoid; |
45 | 45 | var s = this,th=s,need_money=0,cur_g_num=0; |
46 | 46 | getApp().get_isbuy(th.setappdata); |
47 | + if(getApp().globalData.user_id) getApp().requestCardNum(); | |
47 | 48 | |
48 | 49 | /*------会员登录------*/ |
49 | 50 | app.getUserFir(async function(e){ | ... | ... |