新增优惠券
This commit is contained in:
58
http/yskApi/coupon.js
Normal file
58
http/yskApi/coupon.js
Normal file
@@ -0,0 +1,58 @@
|
||||
import http from './http.js'
|
||||
const request=http.request
|
||||
|
||||
|
||||
/**
|
||||
* 获取优惠券列表
|
||||
* @returns
|
||||
*/
|
||||
export function getTbShopCoupon(data) {
|
||||
return request({
|
||||
url: `/api/tbShopCoupon`,
|
||||
method: 'get',
|
||||
params: {
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取优惠券详情
|
||||
* @returns
|
||||
*/
|
||||
export function getTbShopCouponInfo(id) {
|
||||
return request({
|
||||
url: `/api/tbShopCoupon/${id}`,
|
||||
method: 'get',
|
||||
params: {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 增加优惠券
|
||||
* @returns
|
||||
*/
|
||||
export function addTbShopCoupon(data) {
|
||||
return request({
|
||||
url: `/api/tbShopCoupon`,
|
||||
method: 'post',
|
||||
params: {
|
||||
shopId: uni.getStorageSync('shopId'),
|
||||
...data
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除优惠券
|
||||
* @returns
|
||||
*/
|
||||
export function delTbShopCoupon(data) {
|
||||
return request({
|
||||
url: `/api/tbShopCoupon`,
|
||||
method: 'delete',
|
||||
params: data
|
||||
})
|
||||
}
|
||||
@@ -16,10 +16,10 @@ import {
|
||||
import infoBox from "@/commons/utils/infoBox.js"
|
||||
import go from '@/commons/utils/go.js';
|
||||
// 测试服
|
||||
// let baseUrl = 'https://admintestpapi.sxczgkj.cn'
|
||||
let baseUrl = 'https://admintestpapi.sxczgkj.cn'
|
||||
|
||||
//预发布
|
||||
let baseUrl = 'https://pre-cashieradmin.sxczgkj.cn'
|
||||
// let baseUrl = 'https://pre-cashieradmin.sxczgkj.cn'
|
||||
|
||||
// 王伟本地测
|
||||
// let baseUrl = '/ww'
|
||||
|
||||
Reference in New Issue
Block a user