From 477eec4489730eb8caa68e4f0dc0ffaf1cf79220 Mon Sep 17 00:00:00 2001 From: yangsanTT <812952667@qq.com> Date: Tue, 20 Apr 2021 21:27:58 +0800 Subject: [PATCH] =?UTF-8?q?1.=E4=BF=AE=E6=94=B9=E6=9F=A5=E7=9C=8B=E5=8D=A1?= =?UTF-8?q?=E5=88=B8=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 12 +-- Utils/Api.js | 4 + pages/goods/coupon-details/coupon-details.vue | 20 ++--- pages/goods/store-list/store-details.vue | 8 +- pages/pay/success/success.vue | 80 ++++++++++--------- pages/tabBar/user/user.vue | 11 +-- pages/user/mineCoupons/mineCoupons.vue | 6 +- 7 files changed, 78 insertions(+), 63 deletions(-) diff --git a/App.vue b/App.vue index c9da682..0b362d0 100644 --- a/App.vue +++ b/App.vue @@ -3,12 +3,12 @@ globalData: { // url: 'http://192.168.3.4:9301/crest', // url: 'http://192.168.12.53.21:9301/crest', - url: 'https://hsg.dctpay.com/crest', - imgUrl: 'https://hsg.dctpay.com/filesystem/', - brestUrl : 'https://hsg.dctpay.com/brest', - // url: 'https://hsgcs.dctpay.com/crest', - // brestUrl : 'https://hsgcs.dctpay.com/brest', - // imgUrl: 'https://hsgcs.dctpay.com/filesystem/', + // url: 'https://hsg.dctpay.com/crest', + // imgUrl: 'https://hsg.dctpay.com/filesystem/', + // brestUrl : 'https://hsg.dctpay.com/brest', + url: 'https://hsgcs.dctpay.com/crest', + brestUrl : 'https://hsgcs.dctpay.com/brest', + imgUrl: 'https://hsgcs.dctpay.com/filesystem/', userInfo: "", brestUserInfo : '', diff --git a/Utils/Api.js b/Utils/Api.js index 3d17699..3b70a52 100644 --- a/Utils/Api.js +++ b/Utils/Api.js @@ -74,6 +74,10 @@ export const getUserCouponList = params => { //获取用户卡券详情 export const getUserCouponDetail = params => { return POST('GET', `${base}/coupon/getUserCouponDetail`, params).then(res => res.data); +} +//获取用户最新卡券详情 +export const getUserNewCouponDetail = params => { + return POST('GET', `${base}/coupon/getUserNewCouponDetail`, params).then(res => res.data); } //获取订单信息 export const getUserOrderList = params => { diff --git a/pages/goods/coupon-details/coupon-details.vue b/pages/goods/coupon-details/coupon-details.vue index 2133125..b6b4059 100644 --- a/pages/goods/coupon-details/coupon-details.vue +++ b/pages/goods/coupon-details/coupon-details.vue @@ -67,11 +67,13 @@ storeList: [], oneTime: '', twoTime: '', - threeTime: '' + threeTime: '', + menddesId: '' } }, onLoad(option) { this.couDesId = option.id; + this.menddesId = option.mendId; this.getUserCouponDetail(); this.getStoreListByCoupon(); }, @@ -103,14 +105,14 @@ title: '加载中...' }) let params = { - couponId: this.couDesId + userCouponId: this.couDesId } getUserCouponDetail(params).then(res => { if (res.return_code == '000000') { this.couponDesInfo = res.return_data; - this.oneTime = res.return_data.couponCodeInfo.receiveTime; - this.twoTime = res.return_data.couponCodeInfo.salesEndTime; - this.threeTime = res.return_data.couponCodeInfo.consumeTime; + this.oneTime = res.return_data.highUserCoupon.createTime; + this.twoTime = res.return_data.highUserCoupon.useEndTime; + this.threeTime = res.return_data.highUserCoupon.consumeTime; uni.hideLoading() } else { uni.hideLoading() @@ -136,7 +138,7 @@ }) let params = { - couponId: this.couDesId, + couponId: this.menddesId, longitude: app.globalData.longitude, latitude: app.globalData.latitude } @@ -167,9 +169,9 @@ duration: 2000 }) this.couponDesInfo = res.return_data; - this.oneTime = res.return_data.couponCodeInfo.receiveTime; - this.twoTime = res.return_data.couponCodeInfo.salesEndTime; - this.threeTime = res.return_data.couponCodeInfo.consumeTime; + this.oneTime = res.return_data.highUserCoupon.createTime; + this.twoTime = res.return_data.highUserCoupon.useEndTime; + this.threeTime = res.return_data.highUserCoupon.consumeTime; } else { uni.hideLoading(); uni.showToast({ diff --git a/pages/goods/store-list/store-details.vue b/pages/goods/store-list/store-details.vue index 5d721f9..4c5585c 100644 --- a/pages/goods/store-list/store-details.vue +++ b/pages/goods/store-list/store-details.vue @@ -34,12 +34,12 @@ {{mers.highCouponModel.couponName}} - 过期时间:{{mers.highCouponModel.salesEndTime | formatDate('-')}} + 过期时间:{{mers.useEndTime | formatDate('-')}} - + @@ -200,9 +200,9 @@ }) }, // 跳转卡券详情 - jumpCoupondes(e) { + jumpCoupondes(e,item) { uni.navigateTo({ - url: '../coupon-details/coupon-details?id='+e + url: '../coupon-details/coupon-details?id='+e +'&mendId='+item }) }, //前往导航 diff --git a/pages/pay/success/success.vue b/pages/pay/success/success.vue index ef45de7..bf1b5ee 100644 --- a/pages/pay/success/success.vue +++ b/pages/pay/success/success.vue @@ -1,30 +1,34 @@ - + + } +