Commit 98fe4d1a by lixiaomin

修改优惠券

parent cdeafc6d
......@@ -20,10 +20,10 @@ export function addCoupon(data) {
}
// 修改
export function updateClass(data) {
export function updateCoupon(data) {
return request({
url: "/system/category",
method: "put",
url: "/coupon",
method: "post",
data: data,
});
}
......
......@@ -199,7 +199,7 @@
</template>
<script>
import {addCoupon,listCoupon,offlineCoupon,onlineCoupon,delCoupon} from "@/api/coupon/coupon";
import {addCoupon,updateCoupon,listCoupon,offlineCoupon,onlineCoupon,delCoupon,getCouponDetail} from "@/api/coupon/coupon";
import {getCouCategoryList} from "@/api/coupon/couponType";
import GiveCoupon from './giveCoupon.vue';
import {listClass} from "@/api/system/category";
......@@ -250,41 +250,41 @@ export default {
},
couCategoryList: [],
weekList:[{
value: 2,
label: '星期一'
value: 2,
label: '星期一'
}, {
value: 3,
label: '星期二'
value: 3,
label: '星期二'
}, {
value: 4,
label: '星期三'
value: 4,
label: '星期三'
}, {
value: 5,
label: '星期四'
value: 5,
label: '星期四'
}, {
value: 6,
label: '星期五'
value: 6,
label: '星期五'
}, {
value: 7,
label: '星期六'
value: 7,
label: '星期六'
}, {
value: 1,
label: '星期日'
}],
type:"",
liJian:"",
firstRadioValue:"",
twoRadioValue:"",
priceLimit:"",
jiZhe:"",
shopRangeList:[],
categoryList:[],
shopList:[],
shopRange:[],
cityList:[],
storesRange:[],
selectMess:true,
shopAreaTreeList:[]
value: 1,
label: '星期日'
}],
type:"",
liJian:"",
firstRadioValue:"",
twoRadioValue:"",
priceLimit:"",
jiZhe:"",
shopRangeList:[],
categoryList:[],
shopList:[],
shopRange:[],
cityList:[],
storesRange:[],
selectMess:true,
shopAreaTreeList:[]
};
},
created() {
......@@ -566,11 +566,13 @@ export default {
}
console.log("this.form",this.form);
if (this.form.id != null) {
// updateClass(this.form).then((response) => {
// this.$modal.msgSuccess("修改成功");
// this.open = false;
// this.getList();
// });
updateCoupon(this.form).then((response) => {
if(response.code==200){
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addCoupon(this.form).then((response) => {
if(response.code==200){
......
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