Commit ea49e3bde1549a0ba19162f07e6cde72281fe622
1 parent
a27273ed
OA单提交
Showing
3 changed files
with
21 additions
and
10 deletions
packageD/pages/user/coupons/filter.wxs
pages/user/index/index.js
| ... | ... | @@ -43,8 +43,8 @@ Page({ |
| 43 | 43 | actImg: "", |
| 44 | 44 | is_assistance: 0, //助力活动 |
| 45 | 45 | ad_img: "", |
| 46 | - add_card_data: '', //等级卡的内容 | |
| 47 | - | |
| 46 | + add_card_data: '', //等级卡的内容 | |
| 47 | + getusercode_vailtime:10,//会员二维码时效 | |
| 48 | 48 | hiddenCS: true, |
| 49 | 49 | }, |
| 50 | 50 | goto_nav: function (e) { |
| ... | ... | @@ -395,8 +395,13 @@ Page({ |
| 395 | 395 | th.setData({ sys_switch: t_swi }); |
| 396 | 396 | var user_tool = []; |
| 397 | 397 | if (t_swi.usertool) user_tool = JSON.parse(t_swi.usertool); |
| 398 | - th.setData({ c_list: user_tool }) | |
| 399 | - } | |
| 398 | + th.setData({ c_list: user_tool }); | |
| 399 | + if (t_swi.usercode_vailtime!=null && parseInt(t_swi.usercode_vailtime)>0) | |
| 400 | + { | |
| 401 | + th.setData({ getusercode_vailtime: t_swi.usercode_vailtime }); | |
| 402 | + } | |
| 403 | + } | |
| 404 | + | |
| 400 | 405 | if (parseInt(t_swi.rank_switch) == 2) { |
| 401 | 406 | var userInfo = th.data.userInfo; |
| 402 | 407 | if (userInfo.card_field != null && userInfo.card_field != undefined && userInfo.card_field != "") { |
| ... | ... | @@ -483,9 +488,10 @@ Page({ |
| 483 | 488 | |
| 484 | 489 | //------卡片的显示和关闭-------- |
| 485 | 490 | show_tc: function () { |
| 486 | - if (!this.data.userInfo) return false; | |
| 491 | + if (!this.data.userInfo) return false; | |
| 492 | + | |
| 487 | 493 | //base64_encode($user.mobile.'|'.date('Y-m-d H:i:s') |
| 488 | - var val = this.data.userInfo.mobile + "|" + ut.formatTime(); | |
| 494 | + var val = this.data.userInfo.mobile + "|" + ut.formatTime()+"|"+this.data.getusercode_vailtime; | |
| 489 | 495 | val = "^" + ut.base64_encode(val); |
| 490 | 496 | |
| 491 | 497 | qrcode('qrcode', val, 480, 480, this); | ... | ... |
pages/user/userinfo/userinfo.js
| ... | ... | @@ -73,6 +73,7 @@ Page({ |
| 73 | 73 | userInfo: {}, |
| 74 | 74 | hasUserInfo: false, |
| 75 | 75 | canIUseGetUserProfile: false, |
| 76 | + getusercode_vailtime:10,//会员二维码时效 | |
| 76 | 77 | |
| 77 | 78 | }, |
| 78 | 79 | //通过路径跳转到其他页面 |
| ... | ... | @@ -91,8 +92,12 @@ Page({ |
| 91 | 92 | rank_switch:sms_conf.rank_switch, |
| 92 | 93 | is_lable_set: sms_conf.user_label_set, //是不是会员标签设置 |
| 93 | 94 | guide_title:sms_conf.guide_consultant, //系统参数 导购标题 |
| 94 | - guide_change_time:sms_conf.guide_change_time //每月能修改几次 | |
| 95 | + guide_change_time:sms_conf.guide_change_time, //每月能修改几次 | |
| 95 | 96 | }) |
| 97 | + if (sms_conf.usercode_vailtime!=null && parseInt(sms_conf.usercode_vailtime)>0) | |
| 98 | + { | |
| 99 | + th.setData({ getusercode_vailtime: sms_conf.usercode_vailtime }); | |
| 100 | + } | |
| 96 | 101 | if (sms_conf.user_label_set) { |
| 97 | 102 | th.query_checklabels(); |
| 98 | 103 | } |
| ... | ... | @@ -858,7 +863,7 @@ Page({ |
| 858 | 863 | show_tc: function() { |
| 859 | 864 | if (!getApp().globalData.userInfo) return false; |
| 860 | 865 | //base64_encode($user.mobile.'|'.date('Y-m-d H:i:s') |
| 861 | - var val=getApp().globalData.userInfo.mobile+"|"+ut.formatTime(); | |
| 866 | + var val=getApp().globalData.userInfo.mobile+"|"+ut.formatTime()+"|"+this.data.getusercode_vailtime; | |
| 862 | 867 | val="^"+ut.base64_encode(val); |
| 863 | 868 | |
| 864 | 869 | qrcode('qrcode', val, 480, 480, this); | ... | ... |