作者 wumengyu

优化置灰按钮

... ... @@ -202,8 +202,8 @@
<button class="confirm-join-btn {{is_send === 1 && detail.status !== 8?'gray':''}}" form-type="submit">
<text wx:if="{{is_send === 1 && detail.status === 2}}">待拼成</text>
<text wx:if="{{is_send === 1 && detail.status === 8}}">待完成</text>
<text wx:if="{{is_send === 2 && detail.status === 8 }}">确认拼活动</text>
<text wx:if="{{is_send === 2 && detail.status === 2 }}">确认拼活动</text>
<text wx:if="{{is_send === 2 && detail.status === 8 }}">确认拼餐</text>
<text wx:if="{{is_send === 2 && detail.status === 2 }}">确认拼餐</text>
<text wx:if="{{detail.status === 3}}">未拼成</text>
<text wx:if="{{detail.status === 4}}">已拼成</text>
<text wx:if="{{detail.status === 5}}">已取消</text>
... ...
... ... @@ -15,6 +15,7 @@ Page({
city:'',
phone_number:'',
phone_number_params:'',
wx_num:'',
introduce:'',
is_change:false,
is_choose_phone:false
... ... @@ -123,6 +124,24 @@ Page({
this.setData({is_change:true});
}
},
//输入微信号
inputWx(e) {
this.setData({
wx_num: e.detail.value,
is_choose_wx: true
});
if(e.detail.value === '') {
this.setData({is_change:false});
}
if((this.data.is_choose_wx&&this.data.wx_num !== '') &&
this.data.user.country !== null &&
this.data.user.tel !== null &&
this.data.user.introduce !== null
){
console.log(2);
this.setData({is_change:true});
}
},
//简介
inputContent(e) {
var textcontent = e.detail.value;
... ... @@ -148,7 +167,8 @@ Page({
if((this.data.is_choose_introduce&&this.data.introduce !== '') &&
this.data.user.city !== null &&
this.data.user.tel !== null &&
this.data.user.country !== null
this.data.user.country !== null &&
this.data.user.wx !== null
){
console.log(2);
this.setData({is_change:true});
... ... @@ -156,7 +176,8 @@ Page({
if((this.data.is_choose_country&&this.data.country !== '')&&
(this.data.is_choose_city&&this.data.city !== '') &&
(this.data.user.tel!==null&&this.data.user.tel !== '') &&
(this.data.is_choose_introduce&&this.data.introduce !== '')
(this.data.is_choose_introduce&&this.data.introduce !== '') &&
(this.data.is_choose_wx&&this.data.wx_num !== '')
) {
console.log(1);
this.setData({is_change:true});
... ... @@ -174,6 +195,8 @@ Page({
wx.showToast({title:'请获取手机号',icon:'none'})
}else if(this.data.is_wrong_phone){
wx.showToast({title:'手机号格式错误',icon:'none'})
}else if(this.data.wx_num === '' && this.data.user.wx === null) {
wx.showToast({title:'请填写微信号',icon:'none'})
}else if(this.data.introduce === '' && this.data.user.introduce === null) {
wx.showToast({title:'请填写简介',icon:'none'})
}else {
... ... @@ -186,6 +209,7 @@ Page({
city:this.data.is_choose_city?this.data.city:this.data.user.city,
// tel:(this.data.is_choose_phone&&this.data.phone_number !== '')?this.data.phone_number:this.data.user.tel,
tel:this.data.user.tel,
wx: this.data.is_choose_wx?this.data.wx_num:this.data.user.wx,
introduce:this.data.is_choose_introduce?this.data.introduce:this.data.user.introduce
};
app.post(url, params, {}).then((res) => {
... ... @@ -214,7 +238,8 @@ Page({
if(this.data.user.country === null ||
this.data.user.city === null ||
this.data.user.tel === null ||
this.data.user.introduce === null
this.data.user.introduce === null ||
this.data.user.wx === null
) {
this.setData({is_change:false});//完成按钮不能点
}else {
... ...
... ... @@ -33,6 +33,12 @@
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="phone-btn">自动填写</button>
</view>
</view>
<view class="flex-box">
<view class="title">微信号:</view>
<view class="text">
<input type="text" bindinput="inputWx" value="{{is_choose_wx?wx_num:user.wx}}"/>
</view>
</view>
<view class="content-box">
<view class="title">个人简介:</view>
<view class="text">
... ...
... ... @@ -7,13 +7,13 @@
<!--<image src="../../../../images/avatar@2x.png"></image>-->
<image src="{{detail.userPic}}"></image>
<text class="name">{{detail.userName}}</text>
<text class="phone">手机号: 13026256485</text>
<!--<text class="phone">手机号: 13026256485</text>-->
<text class="num">{{detail.number}}人</text>
</view>
<view class="area">
<text class="title">{{detail.title}}</text>
<text class="restaurant-name">{{detail.address}}</text>
<text class="restaurant-name">{{detail.addr}}</text>
<text class="date">{{detail.time}}</text>
<!--<text class="time">15:30</text>-->
<view class="address" bindtap="getNavigate">
... ... @@ -28,7 +28,8 @@
<view wx:for="{{join}}" wx:key="index" class="list">
<image src="{{item.pic}}"></image>
<view class="people-name">{{item.name}}</view>
<view class="people-phone">手机号: {{item.tel}}</view>
<text class="people-phone" selectable="true">手机号: {{item.tel}}</text>
<text class="people-phone" selectable="true">微信号: {{item.wx}}</text>
</view>
</scroll-view>
</view>
... ...
... ... @@ -118,12 +118,16 @@
width: 40rpx;
height: 40rpx;
border-radius: 50%;
margin-right: 30rpx;
margin-right: 12rpx;
}
.people-name {
color: #666666;
font-size: 22rpx;
margin-right: 42rpx;
margin-right: 12rpx;
overflow : hidden;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
.people-phone {
color: #666666;
... ...
... ... @@ -23,7 +23,7 @@
<view class="code">
<image src="../../../images/wallet-icon.png"></image>
</view>
<view class="name">{{item.type === 1?'活动票':'票'}}</view>
<view class="name">{{item.type === 1?'活动票':'票'}}</view>
</view>
</view>
</view>
... ...