Commit 8bf0550dfe607924024b0e2589cc4555bbfd554b

Authored by WXD-SEASON\season
2 parents 4ed1baf5 12166e3d

合并

packageG/pages/user/userinfo/userinfo.js
... ... @@ -5,7 +5,7 @@ function e(e, a, r) {
5 5 configurable: !0,
6 6 writable: !0
7 7 }) : e[a] = r, e;
8   -}
  8 +}
9 9  
10 10 var a = getApp(),
11 11 r = a.globalData.setting,
... ... @@ -76,7 +76,9 @@ Page({
76 76 getusercode_vailtime:10,//会员二维码时效
77 77  
78 78 sele_ing:0,
79   - set_isstcsp:0
  79 + set_isstcsp:0,
  80 + brcode:'',
  81 + showtext1:'点击可查看条形数据'
80 82  
81 83 },
82 84 //通过路径跳转到其他页面
... ... @@ -85,6 +87,11 @@ Page({
85 87 var url = e.currentTarget.dataset.url;
86 88 getApp().goto(url);
87 89 },
  90 + showtext:function(){
  91 + this.setData({
  92 + showtext1:this.data.brcode
  93 + })
  94 + },
88 95 //获取配置信息
89 96 get_config: function() {
90 97 var th = this;
... ... @@ -922,10 +929,12 @@ Page({
922 929 //base64_encode($user.mobile.'|'.date('Y-m-d H:i:s')
923 930 var val = that.data.userInfo.mobile + "|" +getnowtime+"|"+that.data.getusercode_vailtime;
924 931 val = "^" + ut.base64_encode(val);
925   -
926   - qrcode('qrcode', val, 480, 480, that);
  932 + let userInfo = getApp().globalData.userInfo;
  933 + qrcode('qrcode', val, 350, 350, that);
  934 + barcode('barcode', userInfo.userQrcode, 480,140);
927 935 that.setData({
928 936 tc_hide: false,
  937 + brcode:userInfo.userQrcode
929 938 });
930 939 }
931 940 }
... ...
packageG/pages/user/userinfo/userinfo.wxml
1 1 <wxs module="filters" src="../../../../utils/filter.wxs"></wxs>
2 2 <view class="container">
3 3  
4   - <!-- 头像,昵称,多个卡 -->
  4 + <!-- 头像,昵称,多个卡 -->
5 5 <view class="head flex-space-between">
6 6 <view class="flex-center">
7 7  
... ... @@ -310,10 +310,15 @@
310 310 <view class='txt2' wx:if="{{user.address}}">{{user.address}}</view>
311 311 </view>
312 312 </view>
313   - <view class="m_ta">
  313 + <view class="canvas_box">
314 314 <canvas class="g_img" canvas-id="qrcode" />
315 315 </view>
316   - <view class="s_sao">扫一扫上面的二维码图案,即可消费</view>
  316 + <view style="width: 100%;display: flex;justify-content: center;">
  317 + <canvas class="barcode" style="width: 100%;height: 140rpx;" canvas-id="barcode" />
  318 + </view>
  319 + <view catchtap="showtext" class="fs24" style="width: 100%;color: #898989;display: flex;text-align: center;align-content: center;justify-content: center;">
  320 + {{showtext1}}
  321 + </view>
317 322 </view>
318 323 </view>
319 324 </view>
... ...
packageG/pages/user/userinfo/userinfo.wxss
... ... @@ -271,8 +271,8 @@ input {
271 271 }
272 272  
273 273 .g_img {
274   - width: 480rpx;
275   - height: 480rpx;
  274 + width: 350rpx;
  275 + height: 350rpx;
276 276 }
277 277  
278 278 .s_sao {
... ... @@ -666,3 +666,9 @@ input {
666 666 .lb_txt{
667 667 color: red; font-size: 24rpx;
668 668 }
  669 +.canvas_box{
  670 + display: flex;
  671 + align-items: center;
  672 + justify-content: center;
  673 + /* margin-top: 20rpx; */
  674 +}
669 675 \ No newline at end of file
... ...
pages/user/index/index.js
... ... @@ -47,13 +47,12 @@ Page({
47 47 add_card_data: '', //等级卡的内容
48 48 getusercode_vailtime:10,//会员二维码时效
49 49 hiddenCS: true,
50   -
51 50 is_show_recommend:false,
52   -
53 51 has_rj:0,
54 52 rfmName:'成长值',
55 53 is_close_chuzhi:0,
56   -
  54 + brcode:'',
  55 + showtext1:'点击可查看条形数据',
57 56 pshow:0
58 57  
59 58 },
... ... @@ -604,7 +603,11 @@ Page({
604 603 url: "/packageD/pages/error/error?msg=还未购买小程序",
605 604 });
606 605 },
607   -
  606 + showtext:function(){
  607 + this.setData({
  608 + showtext1:this.data.brcode
  609 + })
  610 + },
608 611 /**
609 612 * 页面上拉触底事件的处理函数
610 613 */
... ... @@ -663,9 +666,11 @@ Page({
663 666 var val = that.data.userInfo.mobile + "|" +getnowtime+"|"+that.data.getusercode_vailtime;
664 667 val = "^" + ut.base64_encode(val);
665 668  
666   - qrcode('qrcode', val, 480, 480, that);
  669 + qrcode('qrcode', val, 350, 350, that);
  670 + barcode('barcode', that.data.userInfo.userQrcode, 480,140);
667 671 that.setData({
668 672 tc_hide: false,
  673 + brcode:that.data.userInfo.userQrcode
669 674 });
670 675 }
671 676 }
... ...
pages/user/index/index.wxml
... ... @@ -450,11 +450,17 @@
450 450 <view wx:if="{{userInfo.address}}" class='txt2'>{{userInfo.address}}</view>
451 451 </view>
452 452 </view>
453   - <view class="m_ta">
454   - <!--<image class='g_img' src='https://mshop.yolipai.net//index.php?m=Home&c=Index&a=qr_code&data={{userInfo.mobile}}'></image>-->
455   - <canvas class="g_img" canvas-id="qrcode" />
456   - </view>
457   - <view class="s_sao">前台收银扫此二维码,即可享受优惠!</view>
  453 +
  454 + <view class=" canvas_box" >
  455 + <!--<image class='g_img' src='https://mshop.yolipai.net//index.php?m=Home&c=Index&a=qr_code&data={{userInfo.mobile}}'></image>-->
  456 + <canvas class="g_img" canvas-id="qrcode" />
  457 + </view>
  458 + <view style="width: 100%;display: flex;justify-content: center;">
  459 + <canvas class="barcode" style="width: 100%;height: 140rpx;" canvas-id="barcode" />
  460 + </view>
  461 + <view catchtap="showtext" class="fs24" style="width: 100%;color: #898989;display: flex;text-align: center;align-content: center;justify-content: center;">
  462 + {{showtext1}}
  463 + </view>
458 464 </view>
459 465 </view>
460 466 </view>
... ...
pages/user/index/index.wxss
... ... @@ -600,8 +600,8 @@
600 600 }
601 601  
602 602 .g_img {
603   - width: 480rpx;
604   - height: 480rpx;
  603 + width: 350rpx;
  604 + height: 350rpx;
605 605 }
606 606  
607 607 .s_sao {
... ... @@ -778,4 +778,10 @@ button::after {
778 778 width: 25rpx;
779 779 height: 25rpx;
780 780 margin-right: 5rpx;
  781 +}
  782 +.canvas_box{
  783 + display: flex;
  784 + align-items: center;
  785 + justify-content: center;
  786 + /* margin-top: 20rpx; */
781 787 }
782 788 \ No newline at end of file
... ...