1.修改查看卡券详情

yj-dev
杨杰 4 years ago
parent d73ee42bd8
commit 477eec4489
  1. 12
      App.vue
  2. 4
      Utils/Api.js
  3. 20
      pages/goods/coupon-details/coupon-details.vue
  4. 8
      pages/goods/store-list/store-details.vue
  5. 24
      pages/pay/success/success.vue
  6. 11
      pages/tabBar/user/user.vue
  7. 6
      pages/user/mineCoupons/mineCoupons.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 : '',

@ -75,6 +75,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 => {
return POST('GET', `${base}/highOrder/getUserOrderList`, params).then(res => res.data);

@ -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({

@ -34,12 +34,12 @@
<view class="flleft width70">
<view class="width90 fcor333 font15 mart5">{{mers.highCouponModel.couponName}}</view>
<view class="width90 fcorred font14 mart5">
过期时间:{{mers.highCouponModel.salesEndTime | formatDate('-')}}</view>
过期时间:{{mers.useEndTime | formatDate('-')}}</view>
</view>
</view>
<view class="width90">
<button class="store-jdes flleft mart5" @click="jumpCoupondes(mers.highCouponModel.id)">查看详情</button>
<button class="store-jdes flleft mart5" @click="jumpCoupondes(mers.id,mers.highCouponModel.id)">查看详情</button>
</view>
</view>
@ -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
})
},
//

@ -1,8 +1,11 @@
<template>
<view>
<view class="width100 fotct coupon-status font20 fcorred" v-if="couponDesInfo.couponCodeInfo.status == 3">已使用
<view class="width100" v-if="couponDesInfo">
<view class="width100 fotct coupon-status font20 fcorred" v-if="couponDesInfo.couponCodeInfo.status == 3">
已使用
</view>
<view class="width100 fotct coupon-status font20 fcor41c" v-if="couponDesInfo.couponCodeInfo.status == 2">未使用
<view class="width100 fotct coupon-status font20 fcor41c" v-if="couponDesInfo.couponCodeInfo.status == 2">
未使用
</view>
<view class="line1"></view>
<view class="coupon-cont width90">
@ -22,9 +25,10 @@
<view class="line1 mart15"></view>
<view class="width90 mart10 fcor666">核销码(商户扫客户)</view>
<view class="width90 mart20 fotct">
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.couponCodeInfo.ext1"></image>
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.highUserCoupon.qrCodeImg"></image>
</view>
</view>
<view class="width90 mart30 font20 fcor333 fotct marb40" v-if="!couponDesInfo">二维码生效中,前往个人中心查看</view>
<view class="width90 mart20" style="height: 80px;" v-for="(store,i) in storeList" :key="i">
<view class="coupon-des flleft">
立即<br>前往
@ -49,7 +53,10 @@
</template>
<script>
import {getUserCouponDetail,getStoreListByCoupon} from "../../../Utils/Api.js"
import {
getUserNewCouponDetail,
getStoreListByCoupon
} from "../../../Utils/Api.js"
let app = getApp()
export default {
data() {
@ -65,7 +72,7 @@
},
onLoad(option) {
this.couDesId = option.id;
this.getUserCouponDetail();
this.getUserNewCouponDetail();
this.getStoreListByCoupon();
},
filters: {
@ -91,14 +98,14 @@
},
methods: {
//
getUserCouponDetail() {
getUserNewCouponDetail() {
uni.showLoading({
title: '加载中...'
})
let params = {
couponId: this.couDesId
}
getUserCouponDetail(params).then(res => {
getUserNewCouponDetail(params).then(res => {
if (res.return_code == '000000') {
this.couponDesInfo = res.return_data;
this.oneTime = res.return_data.couponCodeInfo.receiveTime;
@ -227,6 +234,7 @@
background-color: red;
color: #FFFFFF;
}
.coupne-btn {
position: fixed;
bottom: 0px;

@ -154,12 +154,13 @@
url: '../../login/login',
text: '商户入口',
img: '/static/img/user/point.png'
},
{
url: '../../login/login',
text: '我的推广',
img: '/static/img/user/renw.png'
}
// ,
// {
// url: '../../login/login',
// text: '广',
// img: '/static/img/user/renw.png'
// }
]
}

@ -16,7 +16,7 @@
<view class="product-list mart20">
<view class="product" v-for="product in productList" :key="product.id"
@click="jumpMineCou(product.highCouponModel.id)">
@click="jumpMineCou(product.id,product.highCouponModel.id)">
<image mode="widthFix" :src="imageUrl+product.highCouponModel.couponImg"></image>
<view class="name">{{ product.highCouponModel.couponName }}</view>
<view class="info" v-if="product.highCouponModel.payType == 1">
@ -93,9 +93,9 @@
this.getUserCouponList(0);
}
},
jumpMineCou(item) {
jumpMineCou(item,items) {
uni.navigateTo({
url: '../../goods/coupon-details/coupon-details?id=' + item
url: '../../goods/coupon-details/coupon-details?id=' + item+'&mendId='+ items
})
},
//

Loading…
Cancel
Save