调整一下
This commit is contained in:
		| @@ -61,25 +61,15 @@ | |||||||
|                   placeholder="选择日期时间"> |                   placeholder="选择日期时间"> | ||||||
|                 </el-date-picker> |                 </el-date-picker> | ||||||
|               </el-form-item> |               </el-form-item> | ||||||
|               <!-- <el-form-item label="其他类型"  style="width: 100%"> |  | ||||||
|                 <el-radio-group v-model="form.contentType" @change="onTypeChange"> |  | ||||||
|                   <el-radio label="image">图片</el-radio> |  | ||||||
|                   <el-radio label="video">视频</el-radio> |  | ||||||
|                   <el-radio label="file">附件</el-radio> |  | ||||||
|                 </el-radio-group> |  | ||||||
|               </el-form-item> --> |  | ||||||
|               <!-- 图片 --> |               <!-- 图片 --> | ||||||
|                <!-- v-if="form.contentType === 'image'" --> |  | ||||||
|               <el-form-item label="图片" style="width: 100%"> |               <el-form-item label="图片" style="width: 100%"> | ||||||
|                 <ai-uploader :instance="instance" isWechat v-model="imgList" acceptType=".jpg,.png,.jpeg" :limit="1" url="/app/wxcp/upload/uploadFile?type=image"></ai-uploader> |                 <ai-uploader :instance="instance" isWechat v-model="imgList" acceptType=".jpg,.png,.jpeg" :limit="1" url="/app/wxcp/upload/uploadFile?type=image"></ai-uploader> | ||||||
|               </el-form-item> |               </el-form-item> | ||||||
|               <!-- 视频 --> |               <!-- 视频 --> | ||||||
|               <!--  v-if="form.contentType === 'video'" --> |  | ||||||
|               <el-form-item label="视频" style="width: 100%"> |               <el-form-item label="视频" style="width: 100%"> | ||||||
|                 <ai-uploader :instance="instance" fileType="file" isWechat acceptType=".mp4" v-model="videoList" :limit="1" url="/app/wxcp/upload/uploadFile?type=video"></ai-uploader> |                 <ai-uploader :instance="instance" fileType="file" isWechat acceptType=".mp4" v-model="videoList" :limit="1" url="/app/wxcp/upload/uploadFile?type=video"></ai-uploader> | ||||||
|               </el-form-item> |               </el-form-item> | ||||||
|               <!-- 附件 --> |               <!-- 附件 --> | ||||||
|               <!--  v-if="form.contentType === 'file'" --> |  | ||||||
|               <el-form-item label="附件" style="width: 100%"> |               <el-form-item label="附件" style="width: 100%"> | ||||||
|                 <ai-uploader :instance="instance" fileType="file" isWechat v-model="filesList" :limit="1" url="/app/wxcp/upload/uploadFile?type=file"></ai-uploader> |                 <ai-uploader :instance="instance" fileType="file" isWechat v-model="filesList" :limit="1" url="/app/wxcp/upload/uploadFile?type=file"></ai-uploader> | ||||||
|               </el-form-item> |               </el-form-item> | ||||||
| @@ -117,7 +107,7 @@ | |||||||
|                       style="width: 100%; height:100%; object-fit: fill;" muted controls="controls"></video> |                       style="width: 100%; height:100%; object-fit: fill;" muted controls="controls"></video> | ||||||
|                 </ai-info-item> |                 </ai-info-item> | ||||||
|                 <ai-info-item label="附件" isLine v-if="item.contentType == 'file'"> |                 <ai-info-item label="附件" isLine v-if="item.contentType == 'file'"> | ||||||
|                   <ai-file-list :fileList="accessUrlAll" ></ai-file-list> |                   <ai-file-list :fileList="item.accessUrl" ></ai-file-list> | ||||||
|                 </ai-info-item> |                 </ai-info-item> | ||||||
|               </div> |               </div> | ||||||
|                |                | ||||||
| @@ -160,20 +150,12 @@ | |||||||
|               accessImgurl: "", |               accessImgurl: "", | ||||||
|               accessTitle: "", |               accessTitle: "", | ||||||
|               accessUrl: "", |               accessUrl: "", | ||||||
|               // content: "", |               content: "", | ||||||
|               contentType: "", |               contentType: "", | ||||||
|               createdA: 0, |               createdA: 0, | ||||||
|               mediaId: "" |               mediaId: "" | ||||||
|             } |             } | ||||||
|           ], |           ], | ||||||
|           // file: {}, |  | ||||||
|           // accessUrl: '', |  | ||||||
|           // accessDesc: '', |  | ||||||
|           // accessTitle: '', |  | ||||||
|           // accessImgurl: '', |  | ||||||
|           // accessAppid: '', |  | ||||||
|           // mediaId: '', |  | ||||||
|           // name: '', |  | ||||||
|         }, |         }, | ||||||
|         tags: [], |         tags: [], | ||||||
|         subTags: {}, |         subTags: {}, | ||||||
| @@ -182,16 +164,13 @@ | |||||||
|         imgList: [], |         imgList: [], | ||||||
|         videoList: [], |         videoList: [], | ||||||
|         filesList: [], |         filesList: [], | ||||||
|         files: [], |  | ||||||
|         areaRootId: '', |         areaRootId: '', | ||||||
|         accessUrlAll: [], |  | ||||||
|         users: [], |         users: [], | ||||||
|         rules: { |         rules: { | ||||||
|           content: [{ required: true, message: '请输入群发内容'}], |           content: [{ required: true, message: '请输入群发内容'}], | ||||||
|           sendType: [{ required: true, message: '请选择群发方式' }], |           sendType: [{ required: true, message: '请选择群发方式' }], | ||||||
|           sendTime: [{ required: true, message: '请选择群发时间' }], |           sendTime: [{ required: true, message: '请选择群发时间' }], | ||||||
|         }, |         }, | ||||||
|  |  | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  |  | ||||||
| @@ -252,28 +231,16 @@ | |||||||
|         this.instance.post(`/app/pushmessage/detail?id=${this.params.id}`).then(res => { |         this.instance.post(`/app/pushmessage/detail?id=${this.params.id}`).then(res => { | ||||||
|           if (res?.data) { |           if (res?.data) { | ||||||
|             this.data = res.data |             this.data = res.data | ||||||
|             this.accessUrlAll = [{url: res.data.accessUrl}] |  | ||||||
|           } |           } | ||||||
|         }) |         }) | ||||||
|       }, |       }, | ||||||
|  |  | ||||||
|       onTypeChange () { |  | ||||||
|         this.files = [] |  | ||||||
|         this.form.file.url = '' |  | ||||||
|         this.form.accessUrl = '' |  | ||||||
|         this.form.accessDesc = '' |  | ||||||
|         this.form.accessTitle = '' |  | ||||||
|         this.form.accessImgurl = '' |  | ||||||
|         this.form.accessAppid = '' |  | ||||||
|         this.$forceUpdate() |  | ||||||
|       }, |  | ||||||
|  |  | ||||||
|       confirm () { |       confirm () { | ||||||
|         this.$refs.form.validate((valid) => { |         this.$refs.form.validate((valid) => { | ||||||
|           if (valid) { |           if (valid) { | ||||||
|  |  | ||||||
|             this.form.fileList = [] |             this.form.fileList = [] | ||||||
|             var contentList = { |             let contentList = { | ||||||
|               content: this.form.content, |               content: this.form.content, | ||||||
|               contentType: 'text' |               contentType: 'text' | ||||||
|             } |             } | ||||||
| @@ -281,30 +248,30 @@ | |||||||
|             this.form.fileList.push(contentList) |             this.form.fileList.push(contentList) | ||||||
|  |  | ||||||
|             if(this.imgList.length) { |             if(this.imgList.length) { | ||||||
|               var info = { |               let item = { | ||||||
|                 contentType: 'image', |                 contentType: 'image', | ||||||
|                 mediaId: this.imgList[0].media.mediaId, |                 mediaId: this.imgList[0].media.mediaId, | ||||||
|                 accessUrl: this.imgList[0].url |                 accessUrl: this.imgList[0].url | ||||||
|               } |               } | ||||||
|               this.form.fileList.push(info) |               this.form.fileList.push(item) | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             if(this.videoList.length) { |             if(this.videoList.length) { | ||||||
|               var info = { |               let item = { | ||||||
|                 contentType: 'video', |                 contentType: 'video', | ||||||
|                 mediaId: this.videoList[0].media.mediaId, |                 mediaId: this.videoList[0].media.mediaId, | ||||||
|                 accessUrl: this.videoList[0].url |                 accessUrl: this.videoList[0].url | ||||||
|               } |               } | ||||||
|               this.form.fileList.push(info) |               this.form.fileList.push(item) | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             if(this.filesList.length) { |             if(this.filesList.length) { | ||||||
|               var info = { |               let item = { | ||||||
|                 contentType: 'file', |                 contentType: 'file', | ||||||
|                 mediaId: this.filesList[0].media.mediaId, |                 mediaId: this.filesList[0].media.mediaId, | ||||||
|                 accessUrl: this.filesList[0].url |                 accessUrl: this.filesList[0].url | ||||||
|               } |               } | ||||||
|               this.form.fileList.push(info) |               this.form.fileList.push(item) | ||||||
|             } |             } | ||||||
|  |  | ||||||
|             this.instance.post(`/app/pushmessage/addOrUpdate`, { |             this.instance.post(`/app/pushmessage/addOrUpdate`, { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user