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. 60
      pages/pay/success/success.vue
  6. 11
      pages/tabBar/user/user.vue
  7. 6
      pages/user/mineCoupons/mineCoupons.vue

@ -3,12 +3,12 @@
globalData: { globalData: {
// url: 'http://192.168.3.4:9301/crest', // url: 'http://192.168.3.4:9301/crest',
// url: 'http://192.168.12.53.21:9301/crest', // url: 'http://192.168.12.53.21:9301/crest',
url: 'https://hsg.dctpay.com/crest', // url: 'https://hsg.dctpay.com/crest',
imgUrl: 'https://hsg.dctpay.com/filesystem/', // imgUrl: 'https://hsg.dctpay.com/filesystem/',
brestUrl : 'https://hsg.dctpay.com/brest', // brestUrl : 'https://hsg.dctpay.com/brest',
// url: 'https://hsgcs.dctpay.com/crest', url: 'https://hsgcs.dctpay.com/crest',
// brestUrl : 'https://hsgcs.dctpay.com/brest', brestUrl : 'https://hsgcs.dctpay.com/brest',
// imgUrl: 'https://hsgcs.dctpay.com/filesystem/', imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
userInfo: "", userInfo: "",
brestUserInfo : '', brestUserInfo : '',

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

@ -67,11 +67,13 @@
storeList: [], storeList: [],
oneTime: '', oneTime: '',
twoTime: '', twoTime: '',
threeTime: '' threeTime: '',
menddesId: ''
} }
}, },
onLoad(option) { onLoad(option) {
this.couDesId = option.id; this.couDesId = option.id;
this.menddesId = option.mendId;
this.getUserCouponDetail(); this.getUserCouponDetail();
this.getStoreListByCoupon(); this.getStoreListByCoupon();
}, },
@ -103,14 +105,14 @@
title: '加载中...' title: '加载中...'
}) })
let params = { let params = {
couponId: this.couDesId userCouponId: this.couDesId
} }
getUserCouponDetail(params).then(res => { getUserCouponDetail(params).then(res => {
if (res.return_code == '000000') { if (res.return_code == '000000') {
this.couponDesInfo = res.return_data; this.couponDesInfo = res.return_data;
this.oneTime = res.return_data.couponCodeInfo.receiveTime; this.oneTime = res.return_data.highUserCoupon.createTime;
this.twoTime = res.return_data.couponCodeInfo.salesEndTime; this.twoTime = res.return_data.highUserCoupon.useEndTime;
this.threeTime = res.return_data.couponCodeInfo.consumeTime; this.threeTime = res.return_data.highUserCoupon.consumeTime;
uni.hideLoading() uni.hideLoading()
} else { } else {
uni.hideLoading() uni.hideLoading()
@ -136,7 +138,7 @@
}) })
let params = { let params = {
couponId: this.couDesId, couponId: this.menddesId,
longitude: app.globalData.longitude, longitude: app.globalData.longitude,
latitude: app.globalData.latitude latitude: app.globalData.latitude
} }
@ -167,9 +169,9 @@
duration: 2000 duration: 2000
}) })
this.couponDesInfo = res.return_data; this.couponDesInfo = res.return_data;
this.oneTime = res.return_data.couponCodeInfo.receiveTime; this.oneTime = res.return_data.highUserCoupon.createTime;
this.twoTime = res.return_data.couponCodeInfo.salesEndTime; this.twoTime = res.return_data.highUserCoupon.useEndTime;
this.threeTime = res.return_data.couponCodeInfo.consumeTime; this.threeTime = res.return_data.highUserCoupon.consumeTime;
} else { } else {
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({

@ -34,12 +34,12 @@
<view class="flleft width70"> <view class="flleft width70">
<view class="width90 fcor333 font15 mart5">{{mers.highCouponModel.couponName}}</view> <view class="width90 fcor333 font15 mart5">{{mers.highCouponModel.couponName}}</view>
<view class="width90 fcorred font14 mart5"> <view class="width90 fcorred font14 mart5">
过期时间:{{mers.highCouponModel.salesEndTime | formatDate('-')}}</view> 过期时间:{{mers.useEndTime | formatDate('-')}}</view>
</view> </view>
</view> </view>
<view class="width90"> <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>
</view> </view>
@ -200,9 +200,9 @@
}) })
}, },
// //
jumpCoupondes(e) { jumpCoupondes(e,item) {
uni.navigateTo({ uni.navigateTo({
url: '../coupon-details/coupon-details?id='+e url: '../coupon-details/coupon-details?id='+e +'&mendId='+item
}) })
}, },
// //

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

@ -154,12 +154,13 @@
url: '../../login/login', url: '../../login/login',
text: '商户入口', text: '商户入口',
img: '/static/img/user/point.png' 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-list mart20">
<view class="product" v-for="product in productList" :key="product.id" <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> <image mode="widthFix" :src="imageUrl+product.highCouponModel.couponImg"></image>
<view class="name">{{ product.highCouponModel.couponName }}</view> <view class="name">{{ product.highCouponModel.couponName }}</view>
<view class="info" v-if="product.highCouponModel.payType == 1"> <view class="info" v-if="product.highCouponModel.payType == 1">
@ -93,9 +93,9 @@
this.getUserCouponList(0); this.getUserCouponList(0);
} }
}, },
jumpMineCou(item) { jumpMineCou(item,items) {
uni.navigateTo({ uni.navigateTo({
url: '../../goods/coupon-details/coupon-details?id=' + item url: '../../goods/coupon-details/coupon-details?id=' + item+'&mendId='+ items
}) })
}, },
// //

Loading…
Cancel
Save