刘翔宇-旅管家 3 years ago
parent 3d0f7865ab
commit 4450511858

@ -52,14 +52,15 @@
this.util.toast("请填写正确的手机号!");
return false;
}
}
if (this.util.isNull(that.form.content)) {
this.util.toast("请填写内容!");
return false;
}
if (this.util.isNull(that.form.content)) {
this.util.toast("请填写内容!");
return false;
}
this.util.request({
api: '/api/mobile/other/tip-store',
data: this.form,
method: "POST",
utilSuccess: function(res) {
console.log(res)
uni.showToast({

@ -42,7 +42,14 @@
}
},
onLoad() {
this.loadActivity();
var that = this;
wx.getLocation({
success(res) {
that.latitude = res.latitude;
that.longitude = res.longitude;
that.loadActivity()
}
})
},
methods: {
tolist(type) {
@ -63,6 +70,10 @@
var that = this;
this.util.request({
api: '/api/mobile/activity/index',
data: {
latitude: that.latitude,
longitude: that.longitude
},
utilSuccess: function(res) {
for (var m of res.data) {
m.img = m.cover_upload.url;

@ -17,8 +17,9 @@
tips: "参观预约"
}
},
onLoad(options) {
if (options.from && options.id) {
onLoad(options) {
let that = this;
if (options.from) {
var url = "";
if (options.from == "visit") {
this.tips = "参观预约";
@ -36,7 +37,9 @@
if (url == "") {
this.goHome();
setTimeout(function() {
that.goHome();
}, 5000)
} else {
setTimeout(function() {
uni.navigateTo({

@ -78,8 +78,9 @@
</u-number-box>
</u-form-item>
<view class="box-tips">
<text class="box-tips-txt" v-if="type=='user'">51</text>
<text class="box-tips-txt" v-if="type=='team'">850</text>
<text class="box-tips-txt" v-if="type=='user'">{{maxCount}}1</text>
<text class="box-tips-txt"
v-if="type=='team'">{{minCount}}人以上可团体预约一个团体最多{{maxCount}}</text>
</view>
<view class="box-visitor">
<block v-for="(item,index) in form.details_list" :key="index">
@ -279,6 +280,8 @@
user: {},
minCount: 1,
maxCount: 1,
config: {},
info: {},
cardList: [{
idx: 1,
name: '身份证'
@ -296,6 +299,8 @@
this.$refs.formUser.setRules(this.rules);
},
onLoad(options) {
this.loadConfig();
this.loadInfo();
if (options.currentDate) {
this.bcurrentDate = JSON.parse(options.currentDate);
this.currentDate = this.bcurrentDate;
@ -311,16 +316,53 @@
title: (options.from == 'user' ? "个人预约" : "团队预约")
})
this.form.total = this.minCount = (type == 'user' ? 1 : 8);
this.maxCount = (type == 'user' ? 5 : 50);
this.form.total = this.minCount; //= (type == 'user' ? 1 : 8);
//this.maxCount = (type == 'user' ? 5 : 50);
var that = this;
that.util.getUserInfo(function(r) {
that.user = r;
that.form.mobile = r.mobile;
}, true);
},
methods: {
loadConfig() {
var that = this;
this.util.request({
api: '/api/mobile/visit/visit-defualt-config',
utilSuccess: function(res) {
that.config = res;
if (that.type == "user") {
that.maxCount = res.person_max_count;
that.minCount = 1;
} else {
that.maxCount = res.team_max_count;
that.minCount = res.team_min_count;
}
},
utilFail: function(res) {
}
})
},
loadInfo() {
var that = this;
this.util.request({
api: '/api/mobile/visit/introduce',
utilSuccess: function(res) {
console.log(res);
that.info = res;
that.notice[0].content = (that.type == 'user' ? res.person_notice : res.team_notice)
},
utilFail: function(res) {
}
})
},
closeInfo() {
this.showInfo = false;
},
@ -331,6 +373,15 @@
submitOrder() {
this.form.date = this.currentDate.date;
this.form.rule_id = this.currentTime.id;
if (this.form.details_list.length != this.form.total) {
uni.showToast({
icon: "none",
title: "请正确添加观众数量"
})
return false;
}
if (this.util.isNull(this.form.leader)) {
if (this.type == "user") {
uni.showToast({
@ -390,14 +441,6 @@
})
return false;
}
if (this.form.details_list.length != this.form.total) {
uni.showToast({
icon: "none",
title: "请正确添加观众数量"
})
return false;
}
var that = this;
this.util.request({
api: '/api/mobile/visit/order',

Loading…
Cancel
Save