diff --git a/apis/interfaces/coupons.js b/apis/interfaces/coupons.js new file mode 100644 index 0000000..2af18d7 --- /dev/null +++ b/apis/interfaces/coupons.js @@ -0,0 +1,66 @@ + +/** + * Web唐明明 + * 匆匆数载恍如梦,岁月迢迢华发增。 + * 碌碌无为枉半生,一朝惊醒万事空。 + * moduleName: 优惠券 + */ + +import { request } from '../index' + +// 优惠券管理 +const toolsCoupons = (data) => { + return request({ + url: 'coupons/tools/coupons', + data + }) +} + +// 发布优惠券 +const pushCoupons = (data) => { + return request({ + url: 'coupons/tools/coupons', + method: 'POST', + data + }) +} + +// 关联券产品 +const couponsGoods = id => { + return request({ + url: 'coupons/tools/coupons/' + id + '/goods' + }) +} + +// 设置关联商品 +const couponsAddgoods = (id, data) => { + return request({ + url: 'coupons/tools/coupons/' + id + '/addgoods', + method: 'POST', + data + }) +} + +// 管理优惠券详情 +const magCouponsInfo = (id) => { + return request({ + url: 'coupons/tools/coupons/' + id + }) +} + +// 上下架 +const magCouponsStatus = (id) => { + return request({ + url: 'coupons/tools/coupons/' + id + '/status', + method: 'POST' + }) +} + +export { + toolsCoupons, + pushCoupons, + couponsGoods, + couponsAddgoods, + magCouponsInfo, + magCouponsStatus +} diff --git a/components/tn-datepicker/tn-datepicker.vue b/components/tn-datepicker/tn-datepicker.vue new file mode 100644 index 0000000..457f90d --- /dev/null +++ b/components/tn-datepicker/tn-datepicker.vue @@ -0,0 +1,904 @@ + + + + + diff --git a/pages.json b/pages.json index e38f362..df7d5b1 100644 --- a/pages.json +++ b/pages.json @@ -194,7 +194,7 @@ "buttons": [ { "text": "添加", - "fontSize": "16", + "fontSize": "14", "width": "80", "color": "#c82626" } @@ -230,9 +230,40 @@ },{ "path" : "pages/coupons/management", "name" : "CouponsMag", - "style":{ - "navigationBarTitleText": "优惠券管理" + "style": { + "navigationBarTitleText":"优惠券管理", + "titleNView": { + "backgroundColor": "#FFFFFF", + "buttons": [ + { + "text": "发布", + "fontSize": "14", + "width": "80", + "color": "#c82626" + } + ] + } } + },{ + "path" : "pages/coupons/add", + "name" : "couponsAdd", + "style":{ + "navigationBarTitleText": "添加优惠券", + "navigationBarBackgroundColor":"#FFFFFF" + } + },{ + "path" : "pages/coupons/selectGoods", + "name" : "selectGoods", + "style":{ + "navigationBarTitleText": "选择产品", + "navigationBarBackgroundColor":"#FFFFFF" + } + },{ + "path" : "pages/coupons/magDetails", + "name" : "magDetails", + "style": { + "navigationBarTitleText": "优惠券详情" + } },{ "path" : "pages/verification/index", "name" : "Verification", diff --git a/pages/coupons/add.vue b/pages/coupons/add.vue new file mode 100644 index 0000000..03b3b7b --- /dev/null +++ b/pages/coupons/add.vue @@ -0,0 +1,356 @@ +