迁移轮播图片管理
This commit is contained in:
		| @@ -28,14 +28,15 @@ | ||||
|           </el-table-column> | ||||
|  | ||||
|           <!-- 操作 --> | ||||
|           <el-table-column label="操作" align="center" width="220" slot="option" fixed="right"> | ||||
|             <div class="table-options" slot-scope="{ row }"> | ||||
|           <el-table-column label="操作" align="center" width="300" slot="option"> | ||||
|             <template slot-scope="{ row }"> | ||||
|               <el-button type="text" @click="release(row)" v-if="row.status == 1">取消发布</el-button> | ||||
|               <el-button type="text" @click="release(row)" v-else>发布</el-button> | ||||
|  | ||||
|               <el-button type="text" @click="detail(row)">详情</el-button> | ||||
|               <el-button type="text" @click="edit(row)">编辑</el-button> | ||||
|               <el-button type="text" @click="remove(row.id)">删除</el-button> | ||||
|             </div> | ||||
|             </template> | ||||
|           </el-table-column> | ||||
|         </ai-table> | ||||
|       </template> | ||||
| @@ -135,8 +136,8 @@ export default { | ||||
|       formRules: { | ||||
|         imgUrl: [{required: true, message: '请添加图片', trigger: 'blur'}], | ||||
|         title: [{required: true, message: '请输入活动名称', trigger: 'blur'}], | ||||
|         type: [{required: true, message: '请选择链接类型', trigger: 'blur'}], | ||||
|         linkUrl: [{ required: true, message: '请输入链接', trigger: 'blur' }] | ||||
|         type: [{required: true, trigger: 'blur'}], | ||||
|         // linkUrl: [{ required: true, message: '请输入链接', trigger: 'blur' }] | ||||
|       }, | ||||
|       colConfigs: [ | ||||
|         {prop: 'imgUrl', label: '首页封面', slot: 'imgUrl'}, | ||||
| @@ -221,27 +222,23 @@ export default { | ||||
|     }, | ||||
|     // 确定新增 | ||||
|     addConfirm() { | ||||
|       this.$refs.ruleForm.validate((valid) => { | ||||
|         if (valid) { | ||||
|           this.instance.post(`/app/appbanner/addOrUpdate`, { | ||||
|             imgUrl: this.dialogInfo.imgUrl[0].url, | ||||
|             linkUrl: this.dialogInfo.linkUrl, | ||||
|             status: this.status, | ||||
|             title: this.dialogInfo.title, | ||||
|             type: this.dialogInfo.type, | ||||
|             id: this.dialogInfo.id, | ||||
|           }) | ||||
|           .then(res => { | ||||
|             if (res?.code == 0) { | ||||
|               this.$message.success(this.dialogInfo.id ? '编辑成功' : '新增成功') | ||||
|               this.visible = false | ||||
|               this.getList() | ||||
|             } | ||||
|           }) | ||||
|         } | ||||
|       }); | ||||
|       // console.log('确定') | ||||
|        | ||||
|       this.instance | ||||
|       .post(`/app/appbanner/addOrUpdate`, { | ||||
|         imgUrl: this.dialogInfo.imgUrl[0].url, | ||||
|         linkUrl: this.dialogInfo.linkUrl, | ||||
|         status: this.status, | ||||
|         title: this.dialogInfo.title, | ||||
|         type: this.dialogInfo.type, | ||||
|         id: this.dialogInfo.id, | ||||
|       }) | ||||
|       .then(res => { | ||||
|         if (res?.code == 0) { | ||||
|           this.$message.success('新增成功') | ||||
|           this.visible = false | ||||
|           this.getList() | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     // 发布/取消发布 | ||||
|     release(row) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user