公众号设置
This commit is contained in:
		| @@ -38,6 +38,42 @@ | ||||
|           </template> | ||||
|         </el-table-column> | ||||
|       </ai-table> | ||||
|       <ai-dialog | ||||
|         :visible.sync="isShow" | ||||
|         width="890px" | ||||
|         :title="id ? '编辑公众号设置' : '添加公众号设置'" | ||||
|         @close="onClose" | ||||
|         @onConfirm="onConfirm"> | ||||
|         <el-form ref="form" class="ai-form" :model="form" label-width="110px" label-position="right"> | ||||
|           <el-form-item label="公众号名称" style="width: 100%" prop="name" :rules="[{required: true, message: '请输入公众号名称', trigger: 'blur'}]"> | ||||
|             <el-input v-model="form.name" size="small" placeholder="请输入公众号名称"></el-input> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="appid" style="width: 100%" prop="appid" :rules="[{required: true, message: '请输入appid', trigger: 'blur'}]"> | ||||
|             <el-input v-model="form.appid" size="small" placeholder="请输入appid"></el-input> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="secret" style="width: 100%" prop="secret" :rules="[{required: true, message: '请输入公众号密钥', trigger: 'blur'}]"> | ||||
|             <el-input v-model="form.secret" size="small" placeholder="请输入公众号密钥"></el-input> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="收益率" style="width: 100%" prop="rate" :rules="[{required: true, message: '请输入收益率', trigger: 'blur'}]"> | ||||
|             <el-input v-model="form.rate" size="small" placeholder="请输入收益率"></el-input> | ||||
|           </el-form-item> | ||||
|           <el-form-item label="备注" style="width: 100%" prop="remarks" :rules="[{required: true, message: '请输入备注', trigger: 'blur'}]"> | ||||
|             <el-input v-model="form.remarks" size="small" placeholder="请输入备注"></el-input> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|       </ai-dialog> | ||||
|       <ai-dialog | ||||
|         :visible.sync="isShowAmount" | ||||
|         width="690px" | ||||
|         :title="id ? '结算金额' : '结算金额'" | ||||
|         @close="onClose" | ||||
|         @onConfirm="onAmountConfirm"> | ||||
|         <el-form ref="amountForm" class="ai-form" :model="amountForm" label-width="90px" label-position="right"> | ||||
|           <el-form-item label="结算金额" style="width: 100%" prop="amount" :rules="[{required: true, message: '请输入结算金额', trigger: 'blur'}]"> | ||||
|             <el-input-number v-model="amountForm.amount" :precision="2" :step="0.1" :max="10"></el-input-number> | ||||
|           </el-form-item> | ||||
|         </el-form> | ||||
|       </ai-dialog> | ||||
|     </template> | ||||
|   </ai-list> | ||||
| </template> | ||||
| @@ -55,6 +91,17 @@ | ||||
|       return { | ||||
|         tableData: [], | ||||
|         isShow: false, | ||||
|         form: { | ||||
|           name: '', | ||||
|           appid: '', | ||||
|           secret: '', | ||||
|           rate: '', | ||||
|           remarks: '' | ||||
|         }, | ||||
|         amountForm: { | ||||
|           amount: '' | ||||
|         }, | ||||
|         isShowAmount: false, | ||||
|         colConfigs: [ | ||||
|           { prop: 'content', label: '公众号名称' }, | ||||
|           { prop: 'createUserName', label: 'appid', align: 'center' }, | ||||
| @@ -67,7 +114,8 @@ | ||||
|           size: 10, | ||||
|           current: 1 | ||||
|         }, | ||||
|         total: 0 | ||||
|         total: 0, | ||||
|         id: '' | ||||
|       } | ||||
|     }, | ||||
|  | ||||
| @@ -89,6 +137,54 @@ | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onClose () { | ||||
|         this.id = '' | ||||
|         this.form.files = [] | ||||
|         this.form.videoName = '' | ||||
|         this.form.videoIntroduction = '' | ||||
|         this.form.videoFileUrl = '' | ||||
|         this.form.videoFileId = '' | ||||
|         this.form.imageFileUrl = '' | ||||
|         this.form.imageFileId = '' | ||||
|         this.isShow = false | ||||
|       }, | ||||
|  | ||||
|       onAmountConfirm () { | ||||
|         this.$refs.amountForm.validate((valid) => { | ||||
|           if (valid) { | ||||
|             this.instance.post(`/app/appvideoinfo/addOrUpdate`, { | ||||
|               ...this.amountForm, | ||||
|               id: this.id | ||||
|             }).then(res => { | ||||
|               if (res.code == 0) { | ||||
|                 this.$message.success('提交成功!') | ||||
|                 this.isShowAmount = false | ||||
|  | ||||
|                 this.getList() | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       onConfirm () { | ||||
|         this.$refs.form.validate((valid) => { | ||||
|           if (valid) { | ||||
|             this.instance.post(`/app/appvideoinfo/addOrUpdate`, { | ||||
|               ...this.form, | ||||
|               id: this.id || '' | ||||
|             }).then(res => { | ||||
|               if (res.code == 0) { | ||||
|                 this.$message.success('提交成功!') | ||||
|                 this.isShow = false | ||||
|  | ||||
|                 this.getList() | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|  | ||||
|       remove (id) { | ||||
|         this.$confirm('删除后不可恢复,确定删除该数据?').then(() => { | ||||
|           this.instance.post(`/app/applearningquestion/deleteQuestion?id=${id}`).then(res => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user