|
|
@@ -28,7 +28,8 @@
|
|
|
<view style="padding: 0px 30rpx">
|
|
|
<view style="margin-top: 66rpx; background: #fff7f6">
|
|
|
<u-cell-group :border="false">
|
|
|
- <u-cell title="代金券折扣" value="可使用4个" :border="false" isLink @click="voucher"></u-cell>
|
|
|
+ <u-cell title="代金券折扣" :value="couponList.length + '个券可使用'" :border="false" isLink
|
|
|
+ @click="voucher"></u-cell>
|
|
|
</u-cell-group>
|
|
|
</view>
|
|
|
|
|
|
@@ -108,25 +109,25 @@ export default {
|
|
|
this.getShopInfo();
|
|
|
} else {
|
|
|
this.getInfo();
|
|
|
+ this.getVoucher();
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ getVoucher() {
|
|
|
+ api
|
|
|
+ .byStore({
|
|
|
+ storeId: '2018881434293329922',
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.couponList = res.data;
|
|
|
+ } else {
|
|
|
+ uni.$u.toast(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
voucher() {
|
|
|
this.showPopup = true;
|
|
|
- console.log(this.showPopup);
|
|
|
- // api
|
|
|
- // .byStore({
|
|
|
- // currPage: 1,
|
|
|
- // pageSize: 999,
|
|
|
- // storeId: this.shopId,
|
|
|
- // })
|
|
|
- // .then((res) => {
|
|
|
- // if (res.code == 200) {
|
|
|
- // this.couponList = res.data;
|
|
|
- // } else {
|
|
|
- // uni.$u.toast(res.msg);
|
|
|
- // }
|
|
|
- // });
|
|
|
},
|
|
|
getInfo() {
|
|
|
let code = this.GetQueryString("code");
|