diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js index bec63e0..db77217 100644 --- a/pages/cart/cart/cart.js +++ b/pages/cart/cart/cart.js @@ -38,6 +38,7 @@ Page({ onShow: function() { var th = this; this.getCardList(); + if(getApp().globalData.user_id) getApp().requestCardNum(); //--获取是否又秒杀活动-- getApp().request.promiseGet("/api/ms/flash_sale/spikepage", { data: { diff --git a/pages/goods/categoryList/categoryList.js b/pages/goods/categoryList/categoryList.js index d5a26f1..499af8d 100644 --- a/pages/goods/categoryList/categoryList.js +++ b/pages/goods/categoryList/categoryList.js @@ -85,6 +85,7 @@ Page({ onShow:function(){ var that=this; this.requestFirstCategoris(); + if(getApp().globalData.user_id) getApp().requestCardNum(); getApp().getConfig2(function (e) { @@ -521,7 +522,10 @@ Page({ // 允许从相机和相册扫码 wx.scanCode({ success: (res) => { - + var result = res.result; + wx.navigateTo({ + url: "/pages/goods/search/search?s_key="+result, + }); } }) }, diff --git a/pages/goods/categoryList/categoryList.wxml b/pages/goods/categoryList/categoryList.wxml index a0722ee..096519b 100644 --- a/pages/goods/categoryList/categoryList.wxml +++ b/pages/goods/categoryList/categoryList.wxml @@ -174,9 +174,11 @@ - {{bitem.name}} + {{bitem.name}} - {{bitem.enname}} + + {{bitem.enname}} + diff --git a/pages/goods/categoryList/categoryList.wxss b/pages/goods/categoryList/categoryList.wxss index bb630d1..0736c06 100644 --- a/pages/goods/categoryList/categoryList.wxss +++ b/pages/goods/categoryList/categoryList.wxss @@ -366,4 +366,7 @@ margin-top: 24rpx; overflow: hidden; margin: auto; -} \ No newline at end of file +} + +.nation_z_name{ max-width: 130rpx} +.nation_y_name{ max-width: 130rpx} \ No newline at end of file diff --git a/pages/index/index/index.js b/pages/index/index/index.js index 948c5b6..3579364 100644 --- a/pages/index/index/index.js +++ b/pages/index/index/index.js @@ -46,8 +46,10 @@ Page({ onLoad: function () { var th = this; n.init(th, "", "recommend"); + }, async onShow() { + if(getApp().globalData.user_id) getApp().requestCardNum(); await this.init_load(); //显示的时候要开启计时器 this.data.is_timer=1; diff --git a/pages/user/index/index.js b/pages/user/index/index.js index 10bef1e..dce61a6 100644 --- a/pages/user/index/index.js +++ b/pages/user/index/index.js @@ -44,6 +44,7 @@ Page({ var stoid = app_d.setting.stoid; var s = this,th=s,need_money=0,cur_g_num=0; getApp().get_isbuy(th.setappdata); + if(getApp().globalData.user_id) getApp().requestCardNum(); /*------会员登录------*/ app.getUserFir(async function(e){