引导页设置
This commit is contained in:
		| @@ -5,7 +5,7 @@ | ||||
|       <template slot="content"> | ||||
|         <ai-search-bar bottomBorder> | ||||
|           <template #left> | ||||
|             <el-button type="primary" @click="isShow = true">添加</el-button> | ||||
|             <el-button type="primary" @click="isShow = true" icon="iconfont iconAdd">添加</el-button> | ||||
|           </template> | ||||
|           <template #right> | ||||
|             <span class="text">是否开启引导页</span> <el-switch v-model="isStart" @change="changeStatus"></el-switch> | ||||
| @@ -99,6 +99,7 @@ | ||||
|         tableData: [], | ||||
|         total: 0, | ||||
|         isStart: true, | ||||
|         isFlag: false, | ||||
|         isShow: false, | ||||
|         form: { | ||||
|           urlList: [], | ||||
| @@ -110,6 +111,7 @@ | ||||
|  | ||||
|     created () { | ||||
|       this.getList() | ||||
|       this.getStatus() | ||||
|     }, | ||||
|  | ||||
|     methods: { | ||||
| @@ -160,17 +162,29 @@ | ||||
|             }).then(res => { | ||||
|               if (res.code == 0) { | ||||
|                 this.$message.success('提交成功!') | ||||
|                 this.isShow = false | ||||
|                 this.onClose() | ||||
|                 this.getList() | ||||
|               } | ||||
|             }) | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|       changeStatus(status) { | ||||
|       getStatus() { | ||||
|  | ||||
|         this.instance.post(`/app/appwechatguidepage/enableStatus`).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.isStart = res.data | ||||
|             this.isFlag = false | ||||
|           } | ||||
|         }) | ||||
|       }, | ||||
|       changeStatus() { | ||||
|         if(this.isFlag = true) return | ||||
|         this.isFlag = true | ||||
|         this.instance.post(`/app/appwechatguidepage/enable`).then(res => { | ||||
|           if (res.code == 0) { | ||||
|             this.$message.success('操作成功!') | ||||
|             this.$message.success(this.isStart == 1 ? '引导页已开启' : '引导页已关闭') | ||||
|             this.getStatus() | ||||
|           } | ||||
|         }) | ||||
|       } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user