作者 wumengyu

优化弹框背景图,优化个人资料填写

@@ -42,16 +42,17 @@ Page({ @@ -42,16 +42,17 @@ Page({
42 }else { 42 }else {
43 this.setData({ 43 this.setData({
44 phone_number_params: this.data.phone_number, 44 phone_number_params: this.data.phone_number,
  45 + 'user.tel':this.data.phone_number,
45 is_wrong_phone:false, 46 is_wrong_phone:false,
46 }); 47 });
47 console.log('params', this.data.phone_number_params); 48 console.log('params', this.data.phone_number_params);
48 } 49 }
49 } 50 }
50 if(e.detail.value === '') { 51 if(e.detail.value === '') {
51 - console.log('手机号为空',this.data.is_wrong_phone,this.data.phone_number,this.data.is_choose_phone); 52 + console.log('手机号为空',this.data.is_wrong_phone,this.data.phone_number_params,this.data.is_choose_phone);
52 this.setData({is_change:false});//按钮置灰 53 this.setData({is_change:false});//按钮置灰
53 } 54 }
54 - if((this.data.is_choose_phone&&this.data.phone_number !== '') && 55 + if((this.data.is_choose_phone&&this.data.phone_number_params !== '') &&
55 this.data.user.country !== null && 56 this.data.user.country !== null &&
56 this.data.user.city !== null && 57 this.data.user.city !== null &&
57 this.data.user.introduce !== null 58 this.data.user.introduce !== null
@@ -193,7 +194,7 @@ Page({ @@ -193,7 +194,7 @@ Page({
193 wx.showToast({title:'请填写国家',icon:'none'}) 194 wx.showToast({title:'请填写国家',icon:'none'})
194 }else if(this.data.city === '' && this.data.user.city === null) { 195 }else if(this.data.city === '' && this.data.user.city === null) {
195 wx.showToast({title:'请填写城市',icon:'none'}) 196 wx.showToast({title:'请填写城市',icon:'none'})
196 - }else if (this.data.user.tel === null) { 197 + }else if (this.data.user.tel === null && this.data.phone_number === '') {
197 wx.showToast({title:'请获取手机号',icon:'none'}) 198 wx.showToast({title:'请获取手机号',icon:'none'})
198 }else if(this.data.is_wrong_phone){ 199 }else if(this.data.is_wrong_phone){
199 wx.showToast({title:'手机号格式错误',icon:'none'}) 200 wx.showToast({title:'手机号格式错误',icon:'none'})
@@ -207,7 +208,7 @@ Page({ @@ -207,7 +208,7 @@ Page({
207 let sex = this.data.userInfo.gender; 208 let sex = this.data.userInfo.gender;
208 let params = { 209 let params = {
209 token: wx.getStorageSync('token'), 210 token: wx.getStorageSync('token'),
210 - sex: choose_sex || (this.data.is_sex_change === undefined?sex:''), 211 + sex: choose_sex || (this.data.is_sex_change === undefined&&this.data.user.sex?this.data.user.sex:sex),
211 country:this.data.is_choose_country?this.data.country:this.data.user.country, 212 country:this.data.is_choose_country?this.data.country:this.data.user.country,
212 city:this.data.is_choose_city?this.data.city:this.data.user.city, 213 city:this.data.is_choose_city?this.data.city:this.data.user.city,
213 // tel:(this.data.is_choose_phone&&this.data.phone_number !== '')?this.data.phone_number:this.data.user.tel, 214 // tel:(this.data.is_choose_phone&&this.data.phone_number !== '')?this.data.phone_number:this.data.user.tel,
@@ -248,6 +249,9 @@ Page({ @@ -248,6 +249,9 @@ Page({
248 }else { 249 }else {
249 this.setData({is_change:true}); 250 this.setData({is_change:true});
250 } 251 }
  252 + if(this.data.user.tel !== null) {
  253 + // this.setData({phone_number:this.data.user.tel});
  254 + }
251 } 255 }
252 }); 256 });
253 }, 257 },
@@ -259,7 +263,7 @@ Page({ @@ -259,7 +263,7 @@ Page({
259 if(this.data.userInfo.tel !== null) { 263 if(this.data.userInfo.tel !== null) {
260 this.setData({is_wrong_phone:false}) 264 this.setData({is_wrong_phone:false})
261 } 265 }
262 - // console.log('userInfo', this.data.userInfo); 266 + console.log('userInfo', this.data.userInfo);
263 this.getDetail(); 267 this.getDetail();
264 268
265 }, 269 },
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 <!--{{userInfo.gender === 1?'男':userInfo.gender === 2?'女':'未知'}}--> 6 <!--{{userInfo.gender === 1?'男':userInfo.gender === 2?'女':'未知'}}-->
7 <picker bindchange="sexPickerChange" value="{{current_sex}}" range="{{sexList}}" class="picker"> 7 <picker bindchange="sexPickerChange" value="{{current_sex}}" range="{{sexList}}" class="picker">
8 <view class="sex-picker"> 8 <view class="sex-picker">
9 - <text class="variety-text">{{sexList[current_sex] || userInfo.gender === 1?'男':userInfo.gender === 2?'女':''}}</text> 9 + <text class="variety-text">{{current_sex!==undefined?sexList[current_sex]:(user.sex===1?'男':user.sex===2?'女':(userInfo.gender === 1?'男':userInfo.gender === 2?'女':''))}}</text>
10 <!--<text class="variety-text" wx:else>{{pet_info.sex===2?'MM':'GG'}}</text>--> 10 <!--<text class="variety-text" wx:else>{{pet_info.sex===2?'MM':'GG'}}</text>-->
11 <!--<view class="iconfont icon-arrow-down"></view>--> 11 <!--<view class="iconfont icon-arrow-down"></view>-->
12 </view> 12 </view>
@@ -25,6 +25,7 @@ @@ -25,6 +25,7 @@
25 justify-content: space-between; 25 justify-content: space-between;
26 } 26 }
27 .variety-text { 27 .variety-text {
  28 + width:40%;
28 font-size: 26rpx; 29 font-size: 26rpx;
29 color: #666666; 30 color: #666666;
30 } 31 }
@@ -340,7 +340,7 @@ @@ -340,7 +340,7 @@
340 } 340 }
341 .normal-box { 341 .normal-box {
342 height: 540rpx; 342 height: 540rpx;
343 - background-image: url('http://pk86rwhci.bkt.clouddn.com/safsfdsghk@2x.png'); 343 + background-image: url('http://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
344 } 344 }
345 .normal-box .close-btn { 345 .normal-box .close-btn {
346 margin-top: 52rpx; 346 margin-top: 52rpx;
@@ -61,7 +61,7 @@ @@ -61,7 +61,7 @@
61 <text class="cancel-btn gray" wx:if="{{detail.status === 3}}">未拼成</text> 61 <text class="cancel-btn gray" wx:if="{{detail.status === 3}}">未拼成</text>
62 <block wx:if="{{detail.is_canCheck === 1}}"> 62 <block wx:if="{{detail.is_canCheck === 1}}">
63 <!--1是可以点--> 63 <!--1是可以点-->
64 - <text class="confirm-btn light" wx:if="{{detail.status === 4}}" bindtap="confirm">完成</text><!--待完成时并且活动时间已开始,发布人可点击完成--> 64 + <text class="confirm-btn light add-width" wx:if="{{detail.status === 4}}" bindtap="confirm">完成</text><!--待完成时并且活动时间已开始,发布人可点击完成-->
65 </block> 65 </block>
66 <block wx:if="{{detail.is_canCheck === 2}}"> 66 <block wx:if="{{detail.is_canCheck === 2}}">
67 <!--2是不可以点,且灰色--> 67 <!--2是不可以点,且灰色-->
@@ -76,6 +76,5 @@ @@ -76,6 +76,5 @@
76 <text class="confirm-btn gray add-width" wx:if="{{detail.status === 4}}">待完成</text> 76 <text class="confirm-btn gray add-width" wx:if="{{detail.status === 4}}">待完成</text>
77 <text class="confirm-btn add-width gray" wx:if="{{detail.status === 6}}">已完成</text> 77 <text class="confirm-btn add-width gray" wx:if="{{detail.status === 6}}">已完成</text>
78 </block> 78 </block>
79 -  
80 </view> 79 </view>
81 </view> 80 </view>
@@ -259,7 +259,7 @@ @@ -259,7 +259,7 @@
259 } 259 }
260 .normal-box { 260 .normal-box {
261 height: 540rpx; 261 height: 540rpx;
262 - background-image: url('http://pk86rwhci.bkt.clouddn.com/safsfdsghk@2x.png'); 262 + background-image: url('http://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
263 } 263 }
264 .normal-box .close-btn { 264 .normal-box .close-btn {
265 margin-top: 52rpx; 265 margin-top: 52rpx;
@@ -387,7 +387,7 @@ @@ -387,7 +387,7 @@
387 } 387 }
388 .normal-box { 388 .normal-box {
389 height: 540rpx; 389 height: 540rpx;
390 - background-image: url('http://pk86rwhci.bkt.clouddn.com/safsfdsghk@2x.png'); 390 + background-image: url('http://qiniuyun.wmatchrd.com/safsfdsghk@2x.png');
391 } 391 }
392 .normal-box .close-btn { 392 .normal-box .close-btn {
393 margin-top: 52rpx; 393 margin-top: 52rpx;