Commit c442304e743bf12f21b3d506213c40995302bd85

Authored by 前端开发-罗建龙
1 parent df6da6c2

优化

components/diy_user_info/diy_user_info.js
... ... @@ -44,7 +44,8 @@ Component({
44 44 sys_switch:null,
45 45 tc_hide:true, //会员卡的弹出层隐藏
46 46 brcode:'',
47   - showtext1:'点击可查看条形数据'
  47 + showvipcode:false,
  48 +
48 49 },
49 50  
50 51 ready: function() {
... ... @@ -114,7 +115,7 @@ Component({
114 115 },
115 116 showtext:function(){
116 117 this.setData({
117   - showtext1:this.data.brcode
  118 + showvipcode:true
118 119 })
119 120 },
120 121 //隐藏会员卡
... ...
components/diy_user_info/diy_user_info.wxml
... ... @@ -80,9 +80,12 @@
80 80 <view style="width: 100%;display: flex;justify-content: center;">
81 81 <canvas class="barcode" style="width: 100%;height: 140rpx;" canvas-id="barcode" />
82 82 </view>
83   - <view catchtap="showtext" class="fs24" style="width: 100%;color: #898989;display: flex;text-align: center;align-content: center;justify-content: center;">
84   - {{showtext1}}
85   - </view>
  83 + <view wx:if="{{showvipcode}}" class="fs24" style="width: 100%;color: #898989;display: flex;text-align: center;align-content: center;justify-content: center;">
  84 + {{brcode}}
  85 + </view>
  86 + <view wx:else catchtap="showtext" class="fs24" style="width: 100%;color: #898989;display: flex;text-align: center;align-content: center;justify-content: center;">
  87 + 点击可查看条形数据
  88 + </view>
86 89 </view>
87 90 </view>
88 91 </view>
89 92 \ No newline at end of file
... ...
packageG/pages/user/userinfo/userinfo.js
... ... @@ -78,7 +78,8 @@ Page({
78 78 sele_ing:0,
79 79 set_isstcsp:0,
80 80 brcode:'',
81   - showtext1:'点击可查看条形数据'
  81 +
  82 + showvipcode:false,
82 83  
83 84 },
84 85 //通过路径跳转到其他页面
... ... @@ -89,7 +90,7 @@ Page({
89 90 },
90 91 showtext:function(){
91 92 this.setData({
92   - showtext1:this.data.brcode
  93 + showvipcode:true
93 94 })
94 95 },
95 96 //获取配置信息
... ...
packageG/pages/user/userinfo/userinfo.wxml
... ... @@ -316,9 +316,12 @@
316 316 <view style="width: 100%;display: flex;justify-content: center;">
317 317 <canvas class="barcode" style="width: 100%;height: 140rpx;" canvas-id="barcode" />
318 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>
  319 + <view wx:if="{{showvipcode}}" class="fs24" style="width: 100%;color: #898989;display: flex;text-align: center;align-content: center;justify-content: center;">
  320 + {{brcode}}
  321 + </view>
  322 + <view wx:else catchtap="showtext" class="fs24" style="width: 100%;color: #898989;display: flex;text-align: center;align-content: center;justify-content: center;">
  323 + 点击可查看条形数据
  324 + </view>
322 325 </view>
323 326 </view>
324 327 </view>
... ...
pages/user/index/index.js
... ... @@ -52,7 +52,7 @@ Page({
52 52 rfmName:'成长值',
53 53 is_close_chuzhi:0,
54 54 brcode:'',
55   - showtext1:'点击可查看条形数据',
  55 + showvipcode:false,
56 56 pshow:0
57 57  
58 58 },
... ... @@ -609,7 +609,7 @@ Page({
609 609 },
610 610 showtext:function(){
611 611 this.setData({
612   - showtext1:this.data.brcode
  612 + showvipcode:true
613 613 })
614 614 },
615 615 /**
... ... @@ -676,7 +676,7 @@ Page({
676 676 tc_hide: false,
677 677 brcode:that.data.userInfo.userQrcode
678 678 });
679   - }
  679 + }
680 680 }
681 681 })
682 682  
... ...
pages/user/index/index.wxml
... ... @@ -455,8 +455,11 @@
455 455 <view style="width: 100%;display: flex;justify-content: center;">
456 456 <canvas class="barcode" style="width: 100%;height: 140rpx;" canvas-id="barcode" />
457 457 </view>
458   - <view catchtap="showtext" class="fs24" style="width: 100%;color: #898989;display: flex;text-align: center;align-content: center;justify-content: center;">
459   - {{showtext1}}
  458 + <view wx:if="{{showvipcode}}" class="fs24" style="width: 100%;color: #898989;display: flex;text-align: center;align-content: center;justify-content: center;">
  459 + {{brcode}}
  460 + </view>
  461 + <view wx:else catchtap="showtext" class="fs24" style="width: 100%;color: #898989;display: flex;text-align: center;align-content: center;justify-content: center;">
  462 + 点击可查看条形数据
460 463 </view>
461 464 </view>
462 465 </view>
... ...