zx 3 years ago
parent bd1fe2ad7a
commit bbcaac1f9b

@ -51,13 +51,16 @@ export default defineComponent({
maxValue
}
},
activated() {
this.getApi();
},
mounted() {
this.getApi()
},
methods: {
getApi() {
if(this.$route.params.id) {
this.proxy.$post("/rewardRuleTemplate/detail", {id: this.$route.params.id}).then(res => {
if(this.$route.query.id) {
this.proxy.$post("/rewardRuleTemplate/detail", {id: this.$route.query.id}).then(res => {
this.form.title = res.data.title;
let arr = [];
res.data.ruleList.forEach(ele => {
@ -75,8 +78,8 @@ export default defineComponent({
this.form.rewardRuleList = [{limitNum: 0, reward: 0}]
},
confirm() {
if(this.$route.params.id) {
let obj = Object.assign(this.form, {id: this.$route.params.id})
if(this.$route.query.id) {
let obj = Object.assign(this.form, {id: this.$route.query.id})
this.proxy.$post("/rewardRuleTemplate/upd", obj).then(res => {
this.$message.success(res.data)
this.$router.go(-1);

@ -103,7 +103,7 @@ export default defineComponent({
},
handlerEdit(value) {
this.$router.push({name: 'AddReward', params:{id:value}})
this.$router.push({name: 'AddReward', query:{id:value}})
},
goAdd() {
this.$router.push({name: 'AddReward'})

@ -84,6 +84,9 @@ export default defineComponent({
activeId
}
},
activated() {
this.getApi();
},
mounted() {
this.getApi()
},

@ -83,6 +83,9 @@ export default defineComponent({
activeId
}
},
activated() {
this.getApi();
},
mounted() {
this.getApi()
},
@ -113,12 +116,14 @@ export default defineComponent({
if(this.$route.params.id) {
let obj = Object.assign(this.form, {id: this.$route.params.id})
this.proxy.$post("/reference/upd", obj).then(res => {
this.$message.success(res.data)
this.$message.success(res.data);
this.form.fileUrlList = [];
this.$router.go(-1);
}).catch(() => {});
} else {
this.proxy.$post("/reference/add", this.form).then(res => {
this.$message.success(res.data)
this.$message.success(res.data);
this.form.fileUrlList = [];
this.$router.go(-1);
}).catch(() => {});
}

@ -174,6 +174,9 @@ export default defineComponent({
activeId
}
},
activated() {
this.getApi();
},
mounted() {
this.getApi();
},

@ -204,6 +204,9 @@ export default defineComponent({
activeId
}
},
activated() {
this.getApi();
},
mounted() {
this.getApi();
},

@ -73,6 +73,9 @@ export default defineComponent({
activeId
}
},
activated() {
this.getApi();
},
created() {
this.getApi();
},

@ -91,6 +91,9 @@ export default defineComponent({
editorRef, mode: 'simple', toolbarConfig, editorConfig, handleCreated
}
},
activated() {
this.getApi();
},
mounted() {
this.getApi();
},

@ -123,6 +123,9 @@ export default defineComponent({
editorRef, mode: 'simple', toolbarConfig, editorConfig, handleCreated
}
},
activated() {
this.getApi();
},
mounted() {
this.getApi();
},

@ -116,6 +116,9 @@ export default defineComponent({
editorRef, mode: 'simple', toolbarConfig, editorConfig, handleCreated
}
},
activated() {
this.getApi();
},
mounted() {
this.getApi();
},

Loading…
Cancel
Save