Commit 2eaafe08 by baihong

删除奖励

parent 1297898a
...@@ -16,7 +16,7 @@ export const getActivityConfigByPay = (data) => { ...@@ -16,7 +16,7 @@ export const getActivityConfigByPay = (data) => {
return $http.putObj('/cms/configs/configAwards/editConfigAward', data) return $http.putObj('/cms/configs/configAwards/editConfigAward', data)
} }
export const deleteConfigAward = (data) => { export const deleteConfigAward = (data) => {
return $http.delete('/cms/configs/configAwards/deleteConfigAward', data) return $http.delete('/cms/configs/configAwards/deleteConfigAward?awardId='+data)
} }
//活动规则 //活动规则
export const getActivityConfigRule = (data) => { export const getActivityConfigRule = (data) => {
......
...@@ -331,9 +331,7 @@ export default { ...@@ -331,9 +331,7 @@ export default {
} }
}, },
del(p) { del(p) {
deleteConfigAward({ deleteConfigAward(p.id).then(res => {
awardId: p.id
}).then(res => {
this.$Message.success("删除成功!"); this.$Message.success("删除成功!");
this.modalVisible = false; this.modalVisible = false;
let type = this.tab === "3" ? 1 : 2; let type = this.tab === "3" ? 1 : 2;
......
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
</template> </template>
</Table> </Table>
<div class="editor" v-if="tab === '6'"> <div class="editor" v-if="tab === '6'">
<editor /> <editor v-model="content"/>
<div class="topSearch" style="margin-top: 20px;"> <div class="topSearch" style="margin-top: 20px;">
<div class="left"> <div class="left">
<Button type="primary" @click="goDetail">取消</Button> <Button type="primary" @click="goDetail">取消</Button>
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
<FormItem label="奖品名称" prop="award_name"> <FormItem label="奖品名称" prop="award_name">
<Input v-model="formValidate.award_name" placeholder="请输入"></Input> <Input v-model="formValidate.award_name" placeholder="请输入"></Input>
</FormItem> </FormItem>
<FormItem label="优惠卷类型" > <FormItem label="优惠卷类型">
<Select v-model="formValidate.award_type" placeholder="请选择"> <Select v-model="formValidate.award_type" placeholder="请选择">
<Option :value="1">优惠券</Option> <Option :value="1">优惠券</Option>
<Option :value="2">真我币</Option> <Option :value="2">真我币</Option>
...@@ -176,6 +176,8 @@ export default { ...@@ -176,6 +176,8 @@ export default {
}, },
data() { data() {
return { return {
gzId: null,
content: "",
modalVisible: true, modalVisible: true,
add: true, add: true,
modalVisible: false, modalVisible: false,
...@@ -319,7 +321,7 @@ export default { ...@@ -319,7 +321,7 @@ export default {
updateRule({ updateRule({
id: this.gzId, id: this.gzId,
content: this.content, content: this.content,
rule_type: 1 rule_type: 2
}).then(res => { }).then(res => {
this.$Message.success("保存成功!"); this.$Message.success("保存成功!");
}); });
...@@ -345,9 +347,7 @@ export default { ...@@ -345,9 +347,7 @@ export default {
} }
}, },
del(p) { del(p) {
deleteConfigAward({ deleteConfigAward(p.id).then(res => {
awardId: p.id
}).then(res => {
this.$Message.success("删除成功!"); this.$Message.success("删除成功!");
this.modalVisible = false; this.modalVisible = false;
let type = this.tab === "3" ? 3 : 4; let type = this.tab === "3" ? 3 : 4;
...@@ -371,7 +371,7 @@ export default { ...@@ -371,7 +371,7 @@ export default {
getRu() { getRu() {
getActivityConfigRule({ getActivityConfigRule({
language: "cn", language: "cn",
ruleType: 1 ruleType: 2
}).then(res => { }).then(res => {
this.content = res.content; this.content = res.content;
this.gzId = res.id; this.gzId = res.id;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment