diff --git a/pages/coupon/coupon-detail/index.js b/pages/coupon/coupon-detail/index.js index 71ff5d6..342e94d 100644 --- a/pages/coupon/coupon-detail/index.js +++ b/pages/coupon/coupon-detail/index.js @@ -13,13 +13,13 @@ Page({ onLoad(query) { const id = parseInt(query.id); this.id = id; - this.getGoodsList(id); + this.getCouponDetail(id); }, - getGoodsList(id) { - fetchCouponDetail(id).then(({ detail }) => { + getCouponDetail(id) { + fetchCouponDetail(id).then((res) => { this.setData({ - detail, + detail: res }); }); }, diff --git a/pages/coupon/coupon-detail/index.wxml b/pages/coupon/coupon-detail/index.wxml index 8c447c2..721de18 100644 --- a/pages/coupon/coupon-detail/index.wxml +++ b/pages/coupon/coupon-detail/index.wxml @@ -40,6 +40,6 @@ - 查看可用商品 + 查看可用商品 diff --git a/pages/coupon/coupon-list/index.wxss b/pages/coupon/coupon-list/index.wxss index b731613..7310524 100644 --- a/pages/coupon/coupon-list/index.wxss +++ b/pages/coupon/coupon-list/index.wxss @@ -18,16 +18,16 @@ page { } .tabs-external__inner .tabs-external__track { - background: #fa4126 !important; + /* background: #fa4126 !important; */ } .tabs-external__inner .tabs-external__item { - color: #666; + /* color: #666; */ } .tabs-external__inner .tabs-external__active { font-size: 28rpx; - color: #fa4126 !important; + /* color: #fa4126 !important; */ } .tabs-external__inner.order-nav .order-nav-item .bottom-line { diff --git a/services/coupon/index.js b/services/coupon/index.js index 53c5ebe..7d3d3b6 100644 --- a/services/coupon/index.js +++ b/services/coupon/index.js @@ -19,4 +19,23 @@ export function fetchCouponList(parm) { } }); }); +} + +/** 优惠券详情 */ +export function fetchCouponDetail(id) { + return new Promise((resolve, reject) => { + request({ + url: `CustomerCouponApi/getCustomerCouponDetails`, + data: {CustomerCouponId: id}, + method: 'GET', + success: function (res) { + let data = res.data; + + resolve(data); + }, + fail: function (error) { + reject(error); + } + }); + }); } \ No newline at end of file diff --git a/style/theme.wxss b/style/theme.wxss index 8383f30..d3e606e 100644 --- a/style/theme.wxss +++ b/style/theme.wxss @@ -1,5 +1,5 @@ /* 主题定制 */ -.root-bg-color{ +.root-bg-color { background-color: #1989fa; } @@ -42,6 +42,11 @@ --td-checkbox-icon-checked-color: #1989fa; } +.t-tabs { + --td-tab-item-active-color: #1989fa; + --td-tab-track-color: #1989fa; +} + .dialog__button-confirm { color: #1989fa !important; } @@ -50,14 +55,14 @@ color: #aeb3b7 !important; } -.mt-25{ +.mt-25 { margin-top: 25rpx; } -.mb-25{ +.mb-25 { margin-bottom: 25rpx; } -.mb-30{ +.mb-30 { margin-bottom: 30rpx; } \ No newline at end of file