diff --git a/App.vue b/App.vue
index 189a16c..9aace08 100644
--- a/App.vue
+++ b/App.vue
@@ -181,7 +181,7 @@ onLaunch(() => {
margin-top: 12upx;
}
.title {
- width: 200upx;
+ width: 180upx;
font-size: 28upx;
color: #666;
}
@@ -194,4 +194,12 @@ onLaunch(() => {
}
}
}
+
+// u-form card专用样式
+.u-form-card {
+ background-color: #fff;
+ border-radius: 20upx;
+ padding: 0 28upx 14upx;
+ margin-bottom: 28upx;
+}
diff --git a/components/my-components/my-coupon-item.vue b/components/my-components/my-coupon-item.vue
index 6921e8f..6fdec2c 100644
--- a/components/my-components/my-coupon-item.vue
+++ b/components/my-components/my-coupon-item.vue
@@ -10,7 +10,10 @@
- {{ item.giveNum }}
+
+ 无限
+ {{ item.giveNum }}
+
总发放
@@ -31,10 +34,10 @@
@@ -47,6 +50,8 @@ const props = defineProps({
default: {}
}
});
+
+const emits = defineEmits(['delete', 'editor']);
diff --git a/http/api/market/index.js b/http/api/market/index.js
index d23757c..8ba2e6b 100644
--- a/http/api/market/index.js
+++ b/http/api/market/index.js
@@ -38,7 +38,7 @@ export function limitTimeDiscount(data) {
}
/**
- * 限时折扣-分页
+ * 优惠券-分页
* @param {Object} params
*/
export function couponPage(params) {
@@ -47,4 +47,38 @@ export function couponPage(params) {
method: "GET",
params
});
+}
+
+/**
+ * 优惠券-添加/编辑
+ * @param {Object} params
+ */
+export function couponAdd(data) {
+ return request({
+ url: `${urlType}/admin/coupon`,
+ method: data.id ? 'put' : 'post',
+ data
+ });
+}
+
+/**
+ * 优惠券-删除
+ * @param {Object} params
+ */
+export function couponDel(id) {
+ return request({
+ url: `${urlType}/admin/coupon?id=${id}&type=0`,
+ method: 'delete'
+ });
+}
+
+/**
+ * 优惠券-详情
+ * @param {Object} params
+ */
+export function couponDetail(id) {
+ return request({
+ url: `${urlType}/admin/coupon/${id}`,
+ method: "GET"
+ });
}
\ No newline at end of file
diff --git a/pageMarket/addCoupon/addConsumeCoupon.vue b/pageMarket/addCoupon/addConsumeCoupon.vue
new file mode 100644
index 0000000..7ee27f9
--- /dev/null
+++ b/pageMarket/addCoupon/addConsumeCoupon.vue
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+ 满
+ 可用
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pageMarket/addCoupon/index.vue b/pageMarket/addCoupon/index.vue
index ffe5c56..f729b87 100644
--- a/pageMarket/addCoupon/index.vue
+++ b/pageMarket/addCoupon/index.vue
@@ -1,7 +1,756 @@
- 添加优惠券
+
+
+
+
+
+
+
+
+
+
+
+ 满
+ 元
+
+
+
+
+ 减
+ 元
+
+
+
+
+
+
+
+
+ 满
+ 可用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ %
+
+
+
+
+ 满
+ 可用
+
+
+
+
+ 可用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 天
+
+
+
+
+
+
+
+
+
+
+ 隔
+ 天生效
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 关闭则为无限制
+
+
+
+
+ 张
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 张
+
+
+
+
+
+
+
+
+
+
+ 张/每人1天
+
+
+
+
+
+
+
+
+
+ 开启后,计算门槛时将会计入已折扣的商品
+
+
+
+
+
+
+
+ 开启后,计算门槛时将会计入已享受会员价的商品
+
+
+
+
+
+
+
+ 开启后,可与其他优惠券同时使用
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
diff --git a/pageMarket/exchangeCoupon/index.vue b/pageMarket/exchangeCoupon/index.vue
index 7585594..368d47a 100644
--- a/pageMarket/exchangeCoupon/index.vue
+++ b/pageMarket/exchangeCoupon/index.vue
@@ -31,7 +31,7 @@
-
+
@@ -74,7 +74,9 @@
有效期
领券后{{ item.validDays }}天过期
- {{ item.validStartTime }}至{{ item.validEndTime }}
+
+ {{ dayjs(item.validStartTime).format('YYYY-MM-DD') }} 至 {{ dayjs(item.validEndTime).format('YYYY-MM-DD') }}
+
@@ -87,14 +89,15 @@
-
+