From e051460e3171ca0aae84e326c8cf1df57a1ca87e Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Mon, 25 Jul 2022 10:39:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=8F=E5=90=8C=E5=AE=A3=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/router/axios.js | 2 +- .../Announce/AppAnnounce/components/Add.vue | 57 +++++++++++++++++-- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/examples/router/axios.js b/examples/router/axios.js index 0b51e530..5e39299f 100644 --- a/examples/router/axios.js +++ b/examples/router/axios.js @@ -3,7 +3,7 @@ import {Message} from 'element-ui' let baseURLs = { production: "/", - development: '/lan' + development: '/saas' } instance.defaults.baseURL = baseURLs[process.env.NODE_ENV] instance.interceptors.request.use(config => { diff --git a/project/sass/apps/Announce/AppAnnounce/components/Add.vue b/project/sass/apps/Announce/AppAnnounce/components/Add.vue index fe48c1c6..aa7dc89e 100644 --- a/project/sass/apps/Announce/AppAnnounce/components/Add.vue +++ b/project/sass/apps/Announce/AppAnnounce/components/Add.vue @@ -272,6 +272,29 @@ v-model="miniAppForm.mpTitle"> + + + + + + + + +
+ + + +
@@ -279,7 +302,7 @@ @@ -303,16 +326,22 @@ fileList: [], isShowAddLink: false, isShowAddMiniapp: false, + isShowDate: false, + isLoading: false, linkForm: { linkPicUrl: [], linkDesc: '', linkTitle: '', linkUrl: '' }, + dateForm: { + choiceTime: '' + }, miniAppForm: { mpAppid: '', mpPage: '', - mpTitle: '' + mpTitle: '', + media: [] }, form: { content: '', @@ -370,6 +399,8 @@ filterCriteria: res.data.filterCriteria.split(',') } + this.dateForm.choiceTime = res.data.choiceTime + if (res.data.examines && res.data.examines.length) { this.form.examines = res.data.examines.map(v => { return { @@ -457,7 +488,9 @@ if (valid) { this.fileList.push({ ...this.miniAppForm, - msgType: '5' + msgType: '5', + ...this.miniAppForm.media[0], + mediaId: this.miniAppForm.media[0].media.mediaId }) this.isShowAddMiniapp = false @@ -473,6 +506,7 @@ this.miniAppForm.mpAppid = '' this.miniAppForm.mpPage = '' this.miniAppForm.mpTitle = '' + this.dateForm.choiceTime = '' }, removeFile (index) { @@ -542,10 +576,19 @@ }) }, + onDateForm () { + this.$refs.dateForm.validate((valid) => { + if (valid) { + this.confirm(1) + } + }) + }, + confirm (sendType) { this.$refs.form.validate((valid) => { if (valid) { - if (sendType === 1) { + if (sendType === 1 && !this.dateForm.choiceTime) { + this.isShowDate = true return false } @@ -557,11 +600,13 @@ ...this.fileList ] + this.isLoading = true this.instance.post(`/app/appmasssendingtask/addOrUpdate`, { ...this.form, id: this.params.id, wxGroups: this.form.wxGroups, contents, + choiceTime: this.dateForm.choiceTime, filterCriteria: this.form.filterCriteria.join(','), examines: this.form.examines.length ? this.form.examines.map(v => { return { @@ -576,6 +621,10 @@ this.cancel(true) }, 600) } + + this.isLoading = false + }).catch(() => { + this.isLoading = false }) } })