Commit c442304e743bf12f21b3d506213c40995302bd85

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

优化

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