Commit 07ad70685126e21abc4f1786aaa397e3e8bb4cdd

Authored by yvan.ni
1 parent 776e03ed

分享的的前端显示调整

packageA/pages/profile/profile.js
@@ -571,14 +571,6 @@ Page({ @@ -571,14 +571,6 @@ Page({
571 if(data.birthday){ 571 if(data.birthday){
572 data.birthday= ut.formar_no_full(data.birthday); 572 data.birthday= ut.formar_no_full(data.birthday);
573 } 573 }
574 -  
575 - if(user['sex'] && !data.sex){  
576 - data.sex=user['sex'];  
577 - }  
578 - if(user['birthday'] && !data.birthday){  
579 - data.birthday= ut.formar_no_full(user['birthday']);  
580 - }  
581 -  
582 if(!data.pickup_name){ 574 if(!data.pickup_name){
583 data.pickup_name=""; 575 data.pickup_name="";
584 } 576 }
@@ -586,39 +578,15 @@ Page({ @@ -586,39 +578,15 @@ Page({
586 data.pickup_id=0; 578 data.pickup_id=0;
587 } 579 }
588 //-- 获取门店 -- 580 //-- 获取门店 --
589 - if(user['pickup_id'] && !data.pickup_id){  
590 - getApp().promiseGet("/api/weshop/pickup/get/"+r.stoid+"/"+user['pickup_id']).then(res=>{  
591 - if(res.data.code==0 && res.data.data){  
592 - data.pickup_name=res.data.data.pickup_name;  
593 - data.pickup_id=res.data.data.pickup_id;  
594 -  
595 - self.setData({  
596 - isGender: data.sex,  
597 - isLunar: data.islunar,  
598 - datet: data.birthday,  
599 - stoname: data.pickup_name,  
600 - sto_sele_id: data.pickup_id,  
601 - });  
602 - }  
603 - else{  
604 - self.setData({  
605 - isGender: data.sex,  
606 - isLunar: data.islunar,  
607 - datet: data.birthday,  
608 - stoname: data.pickup_name,  
609 - sto_sele_id: data.pickup_id,  
610 - });  
611 - }  
612 - })  
613 - }else{  
614 - self.setData({  
615 - isGender: data.sex,  
616 - isLunar: data.islunar,  
617 - datet: data.birthday,  
618 - stoname: data.pickup_name,  
619 - sto_sele_id: data.pickup_id,  
620 - });  
621 - } 581 + self.setData({
  582 + isGender: data.sex,
  583 + isLunar: data.islunar,
  584 + datet: data.birthday,
  585 + stoname: data.pickup_name,
  586 + sto_sele_id: data.pickup_id,
  587 + vip_user:data
  588 + });
  589 +
622 }; 590 };
623 } 591 }
624 }); 592 });
packageA/pages/profile/profile.wxml
@@ -28,9 +28,9 @@ @@ -28,9 +28,9 @@
28 <!-- 如果需要接骚人信息 --> 28 <!-- 如果需要接骚人信息 -->
29 <view class="user-name flex-vertical" data-type="nickname" wx:if="{{reg_info.introducer_state}}"> 29 <view class="user-name flex-vertical" data-type="nickname" wx:if="{{reg_info.introducer_state}}">
30 <view class="user-name-txt">推荐人:</view> 30 <view class="user-name-txt">推荐人:</view>
31 - <input bindinput="getReferee" bindblur="" value="{{user['fromuser_id']?user['fromuser_id']:''}}" data-name="推荐人" class="user-txt-right f1 pdl20 t-r" placeholder="请输入推荐人手机号码或卡号"/> 31 + <input bindinput="getReferee" bindblur="" value="{{vip_user['fromuser_id']?vip_user['fromuser_id']:''}}" data-name="推荐人" class="user-txt-right f1 pdl20 t-r" placeholder="请输入推荐人手机号码或卡号"/>
32 32
33 - <block wx:if="{{!user['fromuser_id']}}"> 33 + <block wx:if="{{!vip_user['fromuser_id']}}">
34 <view class="c-red pdl20 fs24" wx:if="{{reg_info.introducer && (reg_info.introducer_type == 0)}}">+{{reg_info.introducer}}积分</view> 34 <view class="c-red pdl20 fs24" wx:if="{{reg_info.introducer && (reg_info.introducer_type == 0)}}">+{{reg_info.introducer}}积分</view>
35 <view class="c-red pdl20 fs24" wx:elif="{{reg_info.introducer && (reg_info.introducer_type == 1)}}">+{{reg_info.introducer}}成长值</view> 35 <view class="c-red pdl20 fs24" wx:elif="{{reg_info.introducer && (reg_info.introducer_type == 1)}}">+{{reg_info.introducer}}成长值</view>
36 </block> 36 </block>
@@ -39,8 +39,8 @@ @@ -39,8 +39,8 @@
39 <!-- 如果需要接姓名信息 --> 39 <!-- 如果需要接姓名信息 -->
40 <view class="user-name flex-vertical" data-type="nickname" wx:if="{{reg_info.name_state}}"> 40 <view class="user-name flex-vertical" data-type="nickname" wx:if="{{reg_info.name_state}}">
41 <view class="user-name-txt">姓名:</view> 41 <view class="user-name-txt">姓名:</view>
42 - <input bindinput="getName" bindblur="" value="{{user['vipname']?user['vipname']:''}}" data-name="姓名" class="user-txt-right f1 pdl20 t-r" placeholder="请输入您的真实姓名"/>  
43 - <block wx:if="{{!user['vipname']}}"> 42 + <input bindinput="getName" bindblur="" value="{{vip_user['vipname']?vip_user['vipname']:''}}" data-name="姓名" class="user-txt-right f1 pdl20 t-r" placeholder="请输入您的真实姓名"/>
  43 + <block wx:if="{{!vip_user['vipname']}}">
44 <view class="c-red pdl20 fs24" wx:if="{{reg_info.name && (reg_info.name_val_type == 0)}}">+{{reg_info.name}}积分</view> 44 <view class="c-red pdl20 fs24" wx:if="{{reg_info.name && (reg_info.name_val_type == 0)}}">+{{reg_info.name}}积分</view>
45 <view class="c-red pdl20 fs24" wx:elif="{{reg_info.name && (reg_info.name_val_type == 1)}}">+{{reg_info.name}}成长值</view> 45 <view class="c-red pdl20 fs24" wx:elif="{{reg_info.name && (reg_info.name_val_type == 1)}}">+{{reg_info.name}}成长值</view>
46 </block> 46 </block>
@@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
69 </view> 69 </view>
70 </view> 70 </view>
71 71
72 - <block wx:if="{{!user['sex']}}"> 72 + <block wx:if="{{!vip_user['sex']}}">
73 <view class="c-red pdl20 fs24" wx:if="{{reg_info.sex && (reg_info.sex_state_type == 0)}}">+{{reg_info.sex}}积分</view> 73 <view class="c-red pdl20 fs24" wx:if="{{reg_info.sex && (reg_info.sex_state_type == 0)}}">+{{reg_info.sex}}积分</view>
74 <view class="c-red pdl20 fs24" wx:elif="{{reg_info.sex && (reg_info.sex_state_type == 1)}}">+{{reg_info.sex}}成长值</view> 74 <view class="c-red pdl20 fs24" wx:elif="{{reg_info.sex && (reg_info.sex_state_type == 1)}}">+{{reg_info.sex}}成长值</view>
75 </block> 75 </block>
@@ -92,7 +92,7 @@ @@ -92,7 +92,7 @@
92 </view> 92 </view>
93 </view> 93 </view>
94 94
95 - <block wx:if="{{!user['birthday']}}"> 95 + <block wx:if="{{!vip_user['birthday']}}">
96 <view class="c-red pdl20 fs24 shrink0" wx:if="{{reg_info.birthday && (reg_info.birthday_type == 0)}}">+{{reg_info.birthday}}积分</view> 96 <view class="c-red pdl20 fs24 shrink0" wx:if="{{reg_info.birthday && (reg_info.birthday_type == 0)}}">+{{reg_info.birthday}}积分</view>
97 <view class="c-red pdl20 fs24 shrink0" wx:elif="{{reg_info.birthday && (reg_info.birthday_type == 1)}}">+{{reg_info.birthday}}成长值</view> 97 <view class="c-red pdl20 fs24 shrink0" wx:elif="{{reg_info.birthday && (reg_info.birthday_type == 1)}}">+{{reg_info.birthday}}成长值</view>
98 </block> 98 </block>
@@ -101,8 +101,8 @@ @@ -101,8 +101,8 @@
101 101
102 <view class="user-name flex-vertical" data-type="nickname" wx:if="{{reg_info.idcard_state}}"> 102 <view class="user-name flex-vertical" data-type="nickname" wx:if="{{reg_info.idcard_state}}">
103 <view class="user-name-txt shrink0">身份证:</view> 103 <view class="user-name-txt shrink0">身份证:</view>
104 - <input bindinput="getId" bindblur="IdentityIDCard" value="{{user.idcard}}" class="user-txt-right pdl20 f1 t-r" placeholder="请输入身份证号码"></input>  
105 - <block wx:if="{{!user.idcard}}"> 104 + <input bindinput="getId" bindblur="IdentityIDCard" value="{{vip_user.idcard}}" class="user-txt-right pdl20 f1 t-r" placeholder="请输入身份证号码"></input>
  105 + <block wx:if="{{!vip_user.idcard}}">
106 <view class="c-red pdl20 fs24" wx:if="{{reg_info.idcard && (reg_info.idcard_type == 0)}}">+{{reg_info.idcard}}积分</view> 106 <view class="c-red pdl20 fs24" wx:if="{{reg_info.idcard && (reg_info.idcard_type == 0)}}">+{{reg_info.idcard}}积分</view>
107 <view class="c-red pdl20 fs24" wx:elif="{{reg_info.idcard && (reg_info.idcard_type == 1)}}">+{{reg_info.idcard}}成长值</view> 107 <view class="c-red pdl20 fs24" wx:elif="{{reg_info.idcard && (reg_info.idcard_type == 1)}}">+{{reg_info.idcard}}成长值</view>
108 </block> 108 </block>
@@ -111,8 +111,8 @@ @@ -111,8 +111,8 @@
111 111
112 <view class="user-name flex-vertical" data-type="mobile" wx:if="{{reg_info.address_state}}"> 112 <view class="user-name flex-vertical" data-type="mobile" wx:if="{{reg_info.address_state}}">
113 <view class="user-name-txt">地址:</view> 113 <view class="user-name-txt">地址:</view>
114 - <input bindinput="getAddress" bindblur="" value="{{user.address?user.address:''}}" data-name="姓名" class="user-txt-right f1" placeholder="请输入详细地址" style="text-align:right" />  
115 - <block wx:if="{{!user.address}}"> 114 + <input bindinput="getAddress" bindblur="" value="{{vip_user.address?vip_user.address:''}}" data-name="姓名" class="user-txt-right f1" placeholder="请输入详细地址" style="text-align:right" />
  115 + <block wx:if="{{!vip_user.address}}">
116 <view class="c-red pdl20 fs24" wx:if="{{reg_info.address && (reg_info.address_type == 0)}}">+{{reg_info.address}}积分</view> 116 <view class="c-red pdl20 fs24" wx:if="{{reg_info.address && (reg_info.address_type == 0)}}">+{{reg_info.address}}积分</view>
117 <view class="c-red pdl20 fs24" wx:elif="{{reg_info.address && (reg_info.address_type == 1)}}">+{{reg_info.address}}成长值</view> 117 <view class="c-red pdl20 fs24" wx:elif="{{reg_info.address && (reg_info.address_type == 1)}}">+{{reg_info.address}}成长值</view>
118 </block> 118 </block>
@@ -127,7 +127,7 @@ @@ -127,7 +127,7 @@
127 <view class="angle">∟</view> 127 <view class="angle">∟</view>
128 </view> 128 </view>
129 129
130 - <block wx:if="{{!user.pickup_id}}"> 130 + <block wx:if="{{!vip_user.pickup_id}}">
131 <view class="c-red pdl20 fs24" wx:if="{{reg_info.pick && (reg_info.pick_type == 0)}}">+{{reg_info.pick}}积分</view> 131 <view class="c-red pdl20 fs24" wx:if="{{reg_info.pick && (reg_info.pick_type == 0)}}">+{{reg_info.pick}}积分</view>
132 <view class="c-red pdl20 fs24" wx:elif="{{reg_info.pick && (reg_info.pick_type == 1)}}">+{{reg_info.pick}}成长值</view> 132 <view class="c-red pdl20 fs24" wx:elif="{{reg_info.pick && (reg_info.pick_type == 1)}}">+{{reg_info.pick}}成长值</view>
133 </block> 133 </block>