Commit c445af20ed1e7e48d113469a8e258808f1f7925a

Authored by yvan.ni
1 parent 14741ff5

底部按钮,显示购物车数量,

pages/cart/cart/cart.js
@@ -38,6 +38,7 @@ Page({ @@ -38,6 +38,7 @@ Page({
38 onShow: function() { 38 onShow: function() {
39 var th = this; 39 var th = this;
40 this.getCardList(); 40 this.getCardList();
  41 + if(getApp().globalData.user_id) getApp().requestCardNum();
41 //--获取是否又秒杀活动-- 42 //--获取是否又秒杀活动--
42 getApp().request.promiseGet("/api/ms/flash_sale/spikepage", { 43 getApp().request.promiseGet("/api/ms/flash_sale/spikepage", {
43 data: { 44 data: {
pages/goods/categoryList/categoryList.js
@@ -85,6 +85,7 @@ Page({ @@ -85,6 +85,7 @@ Page({
85 onShow:function(){ 85 onShow:function(){
86 var that=this; 86 var that=this;
87 this.requestFirstCategoris(); 87 this.requestFirstCategoris();
  88 + if(getApp().globalData.user_id) getApp().requestCardNum();
88 89
89 getApp().getConfig2(function (e) { 90 getApp().getConfig2(function (e) {
90 91
@@ -521,7 +522,10 @@ Page({ @@ -521,7 +522,10 @@ Page({
521 // 允许从相机和相册扫码 522 // 允许从相机和相册扫码
522 wx.scanCode({ 523 wx.scanCode({
523 success: (res) => { 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,9 +174,11 @@
174 <image class="country_img" src="{{iurl}}{{bitem.logo}}"></image> 174 <image class="country_img" src="{{iurl}}{{bitem.logo}}"></image>
175 <view class='nation_box abs box'> 175 <view class='nation_box abs box'>
176 <view class='nt_1 t-c line-height'> 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 </view> 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 </view> 182 </view>
181 </view> 183 </view>
182 </view> 184 </view>
pages/goods/categoryList/categoryList.wxss
@@ -366,4 +366,7 @@ margin-top: 24rpx; @@ -366,4 +366,7 @@ margin-top: 24rpx;
366 overflow: hidden; 366 overflow: hidden;
367 margin: auto; 367 margin: auto;
368 368
369 -}  
370 \ No newline at end of file 369 \ No newline at end of file
  370 +}
  371 +
  372 +.nation_z_name{ max-width: 130rpx}
  373 +.nation_y_name{ max-width: 130rpx}
371 \ No newline at end of file 374 \ No newline at end of file
pages/index/index/index.js
@@ -46,8 +46,10 @@ Page({ @@ -46,8 +46,10 @@ Page({
46 onLoad: function () { 46 onLoad: function () {
47 var th = this; 47 var th = this;
48 n.init(th, "", "recommend"); 48 n.init(th, "", "recommend");
  49 +
49 }, 50 },
50 async onShow() { 51 async onShow() {
  52 + if(getApp().globalData.user_id) getApp().requestCardNum();
51 await this.init_load(); 53 await this.init_load();
52 //显示的时候要开启计时器 54 //显示的时候要开启计时器
53 this.data.is_timer=1; 55 this.data.is_timer=1;
pages/user/index/index.js
@@ -44,6 +44,7 @@ Page({ @@ -44,6 +44,7 @@ Page({
44 var stoid = app_d.setting.stoid; 44 var stoid = app_d.setting.stoid;
45 var s = this,th=s,need_money=0,cur_g_num=0; 45 var s = this,th=s,need_money=0,cur_g_num=0;
46 getApp().get_isbuy(th.setappdata); 46 getApp().get_isbuy(th.setappdata);
  47 + if(getApp().globalData.user_id) getApp().requestCardNum();
47 48
48 /*------会员登录------*/ 49 /*------会员登录------*/
49 app.getUserFir(async function(e){ 50 app.getUserFir(async function(e){