Commit 98fe4d1a by lixiaomin

修改优惠券

parent cdeafc6d
...@@ -20,10 +20,10 @@ export function addCoupon(data) { ...@@ -20,10 +20,10 @@ export function addCoupon(data) {
} }
// 修改 // 修改
export function updateClass(data) { export function updateCoupon(data) {
return request({ return request({
url: "/system/category", url: "/coupon",
method: "put", method: "post",
data: data, data: data,
}); });
} }
......
...@@ -199,7 +199,7 @@ ...@@ -199,7 +199,7 @@
</template> </template>
<script> <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 {getCouCategoryList} from "@/api/coupon/couponType";
import GiveCoupon from './giveCoupon.vue'; import GiveCoupon from './giveCoupon.vue';
import {listClass} from "@/api/system/category"; import {listClass} from "@/api/system/category";
...@@ -566,11 +566,13 @@ export default { ...@@ -566,11 +566,13 @@ export default {
} }
console.log("this.form",this.form); console.log("this.form",this.form);
if (this.form.id != null) { if (this.form.id != null) {
// updateClass(this.form).then((response) => { updateCoupon(this.form).then((response) => {
// this.$modal.msgSuccess("修改成功"); if(response.code==200){
// this.open = false; this.$modal.msgSuccess("修改成功");
// this.getList(); this.open = false;
// }); this.getList();
}
});
} else { } else {
addCoupon(this.form).then((response) => { addCoupon(this.form).then((response) => {
if(response.code==200){ 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