刘翔宇-旅管家 3 years ago
parent bef386aa35
commit d0c0aa4905

@ -6,8 +6,8 @@
预约的活动 预约的活动
</view> </view>
<view class="box-card-content activityBox-content"> <view class="box-card-content activityBox-content">
<view class="activityBox-row flex-row justify-between"> <view class="activityBox-row ">
<text class="activityBox-title">{{list.name}}</text> <view class="activityBox-title">{{list.name}}</view>
<view class="tag tag_green activityBox_btn"> <view class="tag tag_green activityBox_btn">
<text>{{numberlist.name}}</text> <text>{{numberlist.name}}</text>
</view> </view>
@ -31,7 +31,7 @@
<view class="activityBox-row"> <view class="activityBox-row">
<text class="icon-renshu iconfont"></text> <text class="icon-renshu iconfont"></text>
<text>人数限制{{numberlist.total==0?'不限':numberlist.total}}</text> <text>人数限制{{(list.form==2?10 : (numberlist.total==0?'不限':numberlist.total))}}</text>
</view> </view>
<view class="activityBox-row flex-row align-center" @click="tothere"> <view class="activityBox-row flex-row align-center" @click="tothere">
<text class="icon-ditu-dibiao iconfont"></text> <text class="icon-ditu-dibiao iconfont"></text>
@ -62,7 +62,7 @@
<text class="box-tips-txt" <text class="box-tips-txt"
v-if="type=='user'">每单限购{{list.person_max_count}}同一身份证当天限购1张</text> v-if="type=='user'">每单限购{{list.person_max_count}}同一身份证当天限购1张</text>
<text class="box-tips-txt" <text class="box-tips-txt"
v-if="type=='team'">{{list.team_min_count}}人以上可团体预约<!-- 一个团体最多{{list.team_max_count}} --></text> v-if="type=='team'">{{list.form==2?10:list.team_min_count}}人以上可团体预约<!-- 一个团体最多{{list.team_max_count}} --></text>
</view> </view>
<view> <view>
<view class="box-card-content"> <view class="box-card-content">
@ -222,8 +222,8 @@
{{currentNotice.title}} {{currentNotice.title}}
</view> </view>
<view class="mpopup-content" style="margin-top: 60rpx;"> <view class="mpopup-content" style="margin-top: 60rpx;">
<rich-text :nodes="currentNotice.content"></rich-text> <rich-text :nodes="currentNotice.content"></rich-text>
<view @click="downLoad" style="color:#EF9525 ;" v-if="currentNotice.isTemplate"></view> <view @click="downLoad" style="color:#EF9525 ;" v-if="currentNotice.isTemplate"></view>
<view style="margin-top: 80px;"></view> <view style="margin-top: 80px;"></view>
<u-button type="primary" @click="closeInfo"></u-button> <u-button type="primary" @click="closeInfo"></u-button>
@ -352,43 +352,43 @@
this.form.type = (options.type == 'user' ? 2 : 1); this.form.type = (options.type == 'user' ? 2 : 1);
this.form.activity_id = parseInt(options.activity_id); this.form.activity_id = parseInt(options.activity_id);
this.form.activity_number_id = parseInt(options.activity_number_id); this.form.activity_number_id = parseInt(options.activity_number_id);
}, },
onShow(){ onShow() {
var that = this; var that = this;
that.numberlist={}; that.numberlist = {};
wx.getStorage({ wx.getStorage({
key: 'activityinfo', key: 'activityinfo',
success(res) { success(res) {
that.list = res.data; that.list = res.data;
for (var m of that.list.numbers) { for (var m of that.list.numbers) {
if (that.form.activity_number_id == m.id) { if (that.form.activity_number_id == m.id) {
that.numberlist = m that.numberlist = m
} }
} }
if (that.form.type == 2) { if (that.form.type == 2) {
that.form.total = 1 that.form.total = 1
} else if (that.form.type == 1) { } else if (that.form.type == 1) {
that.form.total = 1;//res.data.team_min_count; that.form.total = 1; //res.data.team_min_count;
} }
} }
}) })
// //
that.util.getOpenidInfo(function(res) { that.util.getOpenidInfo(function(res) {
// //
that.util.getUserInfo(function(r) { that.util.getUserInfo(function(r) {
// //
if (that.util.isNull(r.mobile)) { if (that.util.isNull(r.mobile)) {
that.showAuthorization = true; that.showAuthorization = true;
} else { } else {
that.showAuthorization = false; that.showAuthorization = false;
that.form.mobile = r.mobile; that.form.mobile = r.mobile;
} }
}, true); }, true);
that.loadCommonUser() that.loadCommonUser()
}, true); }, true);
}, },
onHide() { onHide() {
clearInterval(this.t) clearInterval(this.t)
@ -399,31 +399,31 @@
clearInterval(this.t) clearInterval(this.t)
clearTimeout(this.timer) clearTimeout(this.timer)
}, },
methods: { methods: {
downLoad() { downLoad() {
const downloadTask = uni.downloadFile({ const downloadTask = uni.downloadFile({
url: 'https://leyitest.ali251.langye.net/Template.xlsx', // url: 'https://leyitest.ali251.langye.net/Template.xlsx', //
success: (res) => { success: (res) => {
var filePath = res.tempFilePath var filePath = res.tempFilePath
if (res.statusCode === 200) { if (res.statusCode === 200) {
uni.openDocument({ uni.openDocument({
filePath: filePath, filePath: filePath,
showMenu: true, showMenu: true,
success: function(res) { success: function(res) {
console.log('打开文档成功') console.log('打开文档成功')
} }
}) })
} }
} }
}); });
downloadTask.onProgressUpdate((res) => { downloadTask.onProgressUpdate((res) => {
console.log('下载进度' + res.progress); console.log('下载进度' + res.progress);
console.log('已经下载的数据长度' + res.totalBytesWritten); console.log('已经下载的数据长度' + res.totalBytesWritten);
console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite); console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite);
}); });
}, },
closePhone() { closePhone() {
this.showAuthorization = false this.showAuthorization = false

@ -68,10 +68,13 @@
</text> </text>
</view> </view>
<view style="padding-left:50rpx;margin-bottom:10rpx"> <view style="padding-left:50rpx;margin-bottom:10rpx">
<text style="margin-right:20rpx"> <text v-if="list.form!=2">
限制人数{{item.total==0?'不限':item.total}} 限制人数{{item.total==0?'不限':item.total}}
</text> </text>
<text> <text v-else>
{{item.has_total>0?"预约已满":""}}
</text>
<text style="margin-left:20rpx">
已报名数{{item.has_total}} 已报名数{{item.has_total}}
</text> </text>
@ -141,21 +144,21 @@
}, },
onLoad(options) { onLoad(options) {
var that = this; var that = this;
that.id = options.id; that.id = options.id;
}, },
onShow(){ onShow() {
var that = this; var that = this;
that.numbers=[]; that.numbers = [];
wx.getLocation({ wx.getLocation({
success(res) { success(res) {
console.log(res) console.log(res)
that.latitude = res.latitude; that.latitude = res.latitude;
that.longitude = res.longitude; that.longitude = res.longitude;
that.loadActiveInfo() that.loadActiveInfo()
} }
}) })
}, },
onShareAppMessage() { onShareAppMessage() {
return { return {
@ -226,25 +229,28 @@
that.list = res; that.list = res;
let numberArr = [] let numberArr = []
let nowTime = that.getNowTime(); let nowTime = that.getNowTime();
var i = 0; var i = 0;
var chkMod=null var chkMod = null
for (var m of res.numbers) { for (var m of res.numbers) {
m.label = m.name; m.label = m.name;
m.time = that.timeFormat(m.start_time, "yyyy年MM月DD日") + " " + that m.time = that.timeFormat(m.start_time, "yyyy年MM月DD日") + " " + that
.getHm(m.start_time) + "-" + that.getHm(m.end_time); .getHm(m.start_time) + "-" + that.getHm(m.end_time);
if (that.compareDate(nowTime, m if (that.compareDate(nowTime, m.end_plan)) {
.end_plan)) {
m.disabled = true m.disabled = true
} }
if (m.has_total == m.total && m.total != 0) { if (m.has_total == m.total && m.total != 0) {
m.disabled = true m.disabled = true
}
//
if (res.form == 2 && m.has_total > 0) {
m.disabled = true
} }
numberArr.push(m); numberArr.push(m);
if (!m.disabled) { if (!m.disabled) {
m.checked = i == 0; m.checked = i == 0;
chkMod=m; if (chkMod == null)
chkMod = m;
i++; i++;
} }
} }

@ -1,6 +1,6 @@
import md5 from "./md5.min"; import md5 from "./md5.min";
const HOSTARR = { const HOSTARR = {
'development':'https://leyiyuyue.szgmbwg.org.cn',//'https://leyitest.ali251.langye.net',// 'development':'https://leyiyuyue.szgmbwg.org.cn',
'production': 'https://leyiyuyue.szgmbwg.org.cn' 'production': 'https://leyiyuyue.szgmbwg.org.cn'
}; // 审核状态 }; // 审核状态

Loading…
Cancel
Save