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