|
|
|
|
@ -84,15 +84,20 @@
|
|
|
|
|
添加观众
|
|
|
|
|
</view>
|
|
|
|
|
<view class="box-card-content">
|
|
|
|
|
<u-form-item label="参观人数" labelWidth="120" prop="total" ref="total">
|
|
|
|
|
<u-form-item label="参观人数" v-if="type=='user'" labelWidth="120" prop="total" ref="total">
|
|
|
|
|
<u-number-box slot="right" v-model="form.total" inputWidth="44" color="#EF9525"
|
|
|
|
|
bgColor="#FCF6E3" :min="minCount" :max="maxCount" class="plus">
|
|
|
|
|
</u-number-box>
|
|
|
|
|
|
|
|
|
|
</u-form-item>
|
|
|
|
|
|
|
|
|
|
<u-form-item v-else label="人数" labelWidth="120" prop="total" ref="total">
|
|
|
|
|
{{form.total}} 请添加参与名单
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<view class="box-tips" v-if="type=='team'">
|
|
|
|
|
<text class="box-tips-txt" v-if="type=='user'">每单限购{{maxCount}}张,同一身份证当天限购1张</text>
|
|
|
|
|
<text class="box-tips-txt"
|
|
|
|
|
v-if="type=='team'">{{minCount}}人以上可团体预约,一个团体最多{{maxCount}}人</text>
|
|
|
|
|
v-if="type=='team'">{{minCount}}人以上可团体预约<!-- ,一个团体最多{{maxCount}}人 --></text>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="commonuser">
|
|
|
|
|
<view class="box-card-content">
|
|
|
|
|
@ -304,23 +309,23 @@
|
|
|
|
|
</view>
|
|
|
|
|
<view class="pinkBtn" @click="goHome">返回首页</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<u-popup :show="showAuthorization" closeable mode="bottom" @close="closePhone" :round="10">
|
|
|
|
|
<view class="box">
|
|
|
|
|
<view class="box-title" style="text-align: center;padding: 20rpx 0;font-size: 32rpx;">
|
|
|
|
|
请授权您的手机号
|
|
|
|
|
</view>
|
|
|
|
|
<view class="box-content" style="padding: 20px;">
|
|
|
|
|
<u-button type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">授权手机号
|
|
|
|
|
</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<u-popup :show="showAuthorization" closeable mode="bottom" @close="closePhone" :round="10">
|
|
|
|
|
<view class="box">
|
|
|
|
|
<view class="box-title" style="text-align: center;padding: 20rpx 0;font-size: 32rpx;">
|
|
|
|
|
请授权您的手机号
|
|
|
|
|
</view>
|
|
|
|
|
<view class="box-content" style="padding: 20px;">
|
|
|
|
|
<u-button type="primary" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">授权手机号
|
|
|
|
|
</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<u-calendar ref="calendar" :show-confirm="false" :show="showCalendar" :minDate="minDate" :maxDate="maxDate"
|
|
|
|
|
color="#EF9525" round="20" defaultDate="2022-02-15" @confirm="handleSelectDate" @close="closecalendar">
|
|
|
|
|
@ -481,23 +486,23 @@
|
|
|
|
|
|
|
|
|
|
//this.maxCount = (type == 'user' ? 5 : 50);
|
|
|
|
|
var that = this;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//先登录
|
|
|
|
|
that.util.getOpenidInfo(function(res) {
|
|
|
|
|
//手机号
|
|
|
|
|
that.util.getUserInfo(function(r) {
|
|
|
|
|
that.user = r;
|
|
|
|
|
//如果手机号为空 需要先授权手机号
|
|
|
|
|
if (that.util.isNull(r.mobile)) {
|
|
|
|
|
that.showAuthorization = true;
|
|
|
|
|
} else {
|
|
|
|
|
that.showAuthorization = false;
|
|
|
|
|
that.form.mobile = r.mobile;
|
|
|
|
|
}
|
|
|
|
|
}, true);
|
|
|
|
|
that.loadCommonUser()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//先登录
|
|
|
|
|
that.util.getOpenidInfo(function(res) {
|
|
|
|
|
//手机号
|
|
|
|
|
that.util.getUserInfo(function(r) {
|
|
|
|
|
that.user = r;
|
|
|
|
|
//如果手机号为空 需要先授权手机号
|
|
|
|
|
if (that.util.isNull(r.mobile)) {
|
|
|
|
|
that.showAuthorization = true;
|
|
|
|
|
} else {
|
|
|
|
|
that.showAuthorization = false;
|
|
|
|
|
that.form.mobile = r.mobile;
|
|
|
|
|
}
|
|
|
|
|
}, true);
|
|
|
|
|
that.loadCommonUser()
|
|
|
|
|
|
|
|
|
|
}, true);
|
|
|
|
|
|
|
|
|
|
that.maxheight = wx.getSystemInfoSync().windowHeight * 0.6 + "px"
|
|
|
|
|
@ -512,10 +517,12 @@
|
|
|
|
|
clearInterval(this.t)
|
|
|
|
|
clearTimeout(this.timer)
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
methods: {
|
|
|
|
|
//关闭手机授授权
|
|
|
|
|
closePhone() {
|
|
|
|
|
this.showAuthorization = false
|
|
|
|
|
},
|
|
|
|
|
//获取手机授权
|
|
|
|
|
getPhoneNumber(e) {
|
|
|
|
|
var that = this;
|
|
|
|
|
this.util.request({
|
|
|
|
|
@ -524,7 +531,7 @@
|
|
|
|
|
code: e.detail.code
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: function(res) {
|
|
|
|
|
that.form.mobile = res.mobile;
|
|
|
|
|
that.form.mobile = res.mobile;
|
|
|
|
|
that.showAuthorization = false
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
@ -600,6 +607,7 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
this.form.total = this.form.details_list.length;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
@ -614,12 +622,13 @@
|
|
|
|
|
if (that.type == "user") {
|
|
|
|
|
that.maxCount = res.person_max_count;
|
|
|
|
|
that.minCount = 1;
|
|
|
|
|
that.form.total = that.minCount;
|
|
|
|
|
} else {
|
|
|
|
|
that.maxCount = res.team_max_count;
|
|
|
|
|
that.minCount = res.team_min_count;
|
|
|
|
|
that.form.total = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
that.form.total = that.minCount;
|
|
|
|
|
},
|
|
|
|
|
utilFail: function(res) {
|
|
|
|
|
|
|
|
|
|
@ -867,6 +876,7 @@
|
|
|
|
|
that.form.details_list.push(that.formUser);
|
|
|
|
|
// that.addUserAfter();
|
|
|
|
|
that.showAdd = false;
|
|
|
|
|
that.form.total = that.form.details_list.length;
|
|
|
|
|
}).catch(errors => {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
@ -1097,7 +1107,8 @@
|
|
|
|
|
let r = Object.assign(this.formUser, this.form.details_list[index]);
|
|
|
|
|
} else
|
|
|
|
|
this.editIndex = -1;
|
|
|
|
|
this.showAdd = true
|
|
|
|
|
this.formUser.card_type = 1;
|
|
|
|
|
this.showAdd = true;
|
|
|
|
|
},
|
|
|
|
|
delUser(index) {
|
|
|
|
|
for (var i = 0; i < this.common_user.length; i++) {
|
|
|
|
|
@ -1106,6 +1117,9 @@
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.form.details_list.splice(index, 1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.form.total = this.form.details_list.length;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@ -1285,4 +1299,4 @@
|
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
|
margin-right: 10rpx
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
</style>
|