From 4435e8b98a6dcefdceed8d66191e179f4312c753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=BF=94=E5=AE=87-=E6=97=85=E7=AE=A1=E5=AE=B6?= <153298343@qq.com> Date: Fri, 7 Jul 2023 10:16:14 +0800 Subject: [PATCH] up --- pages/activity/book.vue | 31 +++++++++++++++++++++++++++++-- pages/activity/info.vue | 12 +++++++----- pages/park/book.vue | 5 +++-- pages/visit/book.vue | 31 +++++++++++++++++++++++++++++-- utils/util.js | 2 +- 5 files changed, 69 insertions(+), 12 deletions(-) diff --git a/pages/activity/book.vue b/pages/activity/book.vue index 9c6a24d..598fa2f 100644 --- a/pages/activity/book.vue +++ b/pages/activity/book.vue @@ -222,7 +222,9 @@ {{currentNotice.title}} - + + + 下载模版 知道了 @@ -397,7 +399,32 @@ clearInterval(this.t) clearTimeout(this.timer) }, - methods: { + methods: { + + downLoad() { + const downloadTask = uni.downloadFile({ + url: 'https://leyitest.ali251.langye.net/Template.xlsx', //仅为示例,并非真实的资源 + success: (res) => { + var filePath = res.tempFilePath + if (res.statusCode === 200) { + uni.openDocument({ + filePath: filePath, + showMenu: true, + success: function(res) { + console.log('打开文档成功') + } + }) + } + } + }); + + downloadTask.onProgressUpdate((res) => { + console.log('下载进度' + res.progress); + console.log('已经下载的数据长度' + res.totalBytesWritten); + console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite); + + }); + }, closePhone() { this.showAuthorization = false }, diff --git a/pages/activity/info.vue b/pages/activity/info.vue index 8a50644..fd123f0 100644 --- a/pages/activity/info.vue +++ b/pages/activity/info.vue @@ -226,7 +226,8 @@ that.list = res; let numberArr = [] let nowTime = that.getNowTime(); - var i = 0; + var i = 0; + var chkMod=null for (var m of res.numbers) { m.label = m.name; m.time = that.timeFormat(m.start_time, "yyyy年MM月DD日") + " " + that @@ -242,13 +243,14 @@ } numberArr.push(m); if (!m.disabled) { - m.checked = i == 0; + m.checked = i == 0; + chkMod=m; i++; } } - console.log("numberArr[0].id", numberArr[0].id); - if (numberArr.length > 0) - that.activity_number_id = numberArr[0].id + //console.log("numberArr[0].id", numberArr[0].id); + if (chkMod) + that.activity_number_id = chkMod.id that.numbers = numberArr wx.setStorage({ key: 'activityinfo', diff --git a/pages/park/book.vue b/pages/park/book.vue index 88e0eb0..047db96 100644 --- a/pages/park/book.vue +++ b/pages/park/book.vue @@ -8,8 +8,9 @@ - - {{(form.time?timeFormat(_formTime, 'yyyy年MM月DD日 HH:mm'):'请选择入场时间>')}} + + {{selectInfo}} + diff --git a/pages/visit/book.vue b/pages/visit/book.vue index 8489c00..b1dcc3d 100644 --- a/pages/visit/book.vue +++ b/pages/visit/book.vue @@ -290,6 +290,7 @@ + 下载模版 @@ -352,10 +353,12 @@ scrollheight: "", notice: [{ title: "预约须知", - content: "预约须知的内容" + content: "预约须知的内容", + isTemplate:false }, { title: "批量上传帮助", - content: "

1.批量上传EXCEL的以xlsx结尾

2.第一行为标题行 姓名 手机号 证件号 行动不便者

3.文件是从微信聊天记录中选取或者微信文件传输助手

" + content: "

1.批量上传EXCEL的以xlsx结尾

2.第一行为标题行 姓名 手机号 证件号 行动不便者

3.文件是从微信聊天记录中选取或者微信文件传输助手

", + isTemplate:true }], specialtype: false, specialid: 0, @@ -610,6 +613,30 @@ this.form.total = this.form.details_list.length; + }, + downLoad() { + const downloadTask = uni.downloadFile({ + url: 'https://leyitest.ali251.langye.net/Template.xlsx', //仅为示例,并非真实的资源 + success: (res) => { + var filePath = res.tempFilePath + if (res.statusCode === 200) { + uni.openDocument({ + filePath: filePath, + showMenu: true, + success: function(res) { + console.log('打开文档成功') + } + }) + } + } + }); + + downloadTask.onProgressUpdate((res) => { + console.log('下载进度' + res.progress); + console.log('已经下载的数据长度' + res.totalBytesWritten); + console.log('预期需要下载的数据总长度' + res.totalBytesExpectedToWrite); + + }); }, loadConfig() { diff --git a/utils/util.js b/utils/util.js index 36c8f53..1b1303a 100755 --- a/utils/util.js +++ b/utils/util.js @@ -1,6 +1,6 @@ import md5 from "./md5.min"; const HOSTARR = { - 'development':'https://leyitest.ali251.langye.net',//'https://leyiyuyue.szgmbwg.org.cn',// + 'development':'https://leyiyuyue.szgmbwg.org.cn',//'https://leyitest.ali251.langye.net',// 'production': 'https://leyiyuyue.szgmbwg.org.cn' }; // 审核状态