协同宣发
This commit is contained in:
		| @@ -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 => { | ||||
|   | ||||
| @@ -272,6 +272,29 @@ | ||||
|                   v-model="miniAppForm.mpTitle"> | ||||
|                 </el-input> | ||||
|               </el-form-item> | ||||
|               <el-form-item label="封面图" prop="media" style="width: 100%;" :rules="[{ required: true, message: '请上传封面图', trigger: 'change' }]"> | ||||
|                 <ai-uploader url="/app/wxcp/upload/uploadFile?type=image" :instance="instance" isWechat v-model="miniAppForm.media" :limit="1"></ai-uploader> | ||||
|               </el-form-item> | ||||
|             </div> | ||||
|           </el-form> | ||||
|         </ai-dialog> | ||||
|         <ai-dialog | ||||
|           :visible.sync="isShowDate" | ||||
|           width="590px" | ||||
|           title="定时发送" | ||||
|           @close="onClose" | ||||
|           @onConfirm="onDateForm"> | ||||
|           <el-form ref="dateForm" :model="dateForm" label-width="130px" label-position="right"> | ||||
|             <div class="ai-form"> | ||||
|               <el-form-item label="定时发送时间" style="width: 100%;" prop="choiceTime" :rules="[{ required: true, message: '请选择定时发送时间', trigger: 'change' }]"> | ||||
|                 <el-date-picker | ||||
|                   style="width: 100%;" | ||||
|                   v-model="dateForm.choiceTime" | ||||
|                   type="datetime" | ||||
|                   size="small" | ||||
|                   placeholder="请选择定时发送时间"> | ||||
|                 </el-date-picker> | ||||
|               </el-form-item> | ||||
|             </div> | ||||
|           </el-form> | ||||
|         </ai-dialog> | ||||
| @@ -279,7 +302,7 @@ | ||||
|     </template> | ||||
|     <template #footer> | ||||
|       <el-button @click="cancel">取消</el-button> | ||||
|       <el-button type="primary" @click="confirm(0)" style="width: 120px;">通知成员发送</el-button> | ||||
|       <el-button type="primary" @click="confirm(0)" style="width: 120px;" v-loading="isLoading">通知成员发送</el-button> | ||||
|       <el-button type="primary" @click="confirm(1)">定时发送</el-button> | ||||
|     </template> | ||||
|   </ai-detail> | ||||
| @@ -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 | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user