|
@@ -7,18 +7,21 @@
|
|
|
</div>
|
|
|
<div class="content">
|
|
|
<div class="product-img" @click="toDetail">
|
|
|
- <img class="img" :src="bundle.icon2" alt="">
|
|
|
+ <img v-if="bundle.icon2" class="img" :src="bundle.icon2" alt="">
|
|
|
+ <div v-else class="center-con">
|
|
|
+ <img class="img" src="/static/img/ic_shop_title_06.png" alt="">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="product-info">
|
|
|
<div @click="toDetail">
|
|
|
- <div class="title">{{bundle.name}}</div>
|
|
|
- <div class="desc">{{bundle.tag}}</div>
|
|
|
+ <div class="title">{{detailData ? detailData.bundleName : ''}}</div>
|
|
|
+ <div class="desc">{{bundle.tag ? bundle.tag : ''}}</div>
|
|
|
</div>
|
|
|
- <div>
|
|
|
+ <!-- <div>
|
|
|
<div class="price">
|
|
|
- ¥{{bundle.price}}
|
|
|
+ ¥{{bundle.price ? bundle.price : 0}}
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="package-info" v-if="orderBundle.orderFlag === 'PAED'">
|
|
@@ -26,7 +29,7 @@
|
|
|
<!-- <form @submit="formSubmit" class="formId" report-submit="true">
|
|
|
<button form-type="submit"></button>
|
|
|
</form> -->
|
|
|
- <van-cell :title="item.itemName" :label="expiryDate?'过期时间:'+expiryDate:''" v-for="item in customerBundleItemList" :key="item.id" :id='item.id' is-link @click="subscribeMessage">
|
|
|
+ <van-cell :title="item.itemName" :label="item.expiryDate?'过期时间:'+item.expiryDate:''" v-for="item in customerBundleItemList" :key="item.id" :id='item.id' is-link @click="subscribeMessage">
|
|
|
<div class="package-qr">
|
|
|
<span>剩余{{item.remainTimes}}次</span>
|
|
|
<van-icon class="icon-qr" size="1.5em" name="qr" color="#ff5500" />
|
|
@@ -89,18 +92,22 @@ import { subscribePayMessage, subscribeHxMessage } from '@/utils/index.js';
|
|
|
export default {
|
|
|
components: {},
|
|
|
name: 'package',
|
|
|
-
|
|
|
data() {
|
|
|
return {
|
|
|
payLoading: false,
|
|
|
finished: false,
|
|
|
showQRcodePopup: false,
|
|
|
- bundle: {},
|
|
|
+ bundle: {
|
|
|
+ icon2: null,
|
|
|
+ name: '',
|
|
|
+ tag: null,
|
|
|
+ price: 0
|
|
|
+ },
|
|
|
coupon: undefined,
|
|
|
orderBundle: {},
|
|
|
customerBundleItemList: [],
|
|
|
formId:null,
|
|
|
- expiryDate: null
|
|
|
+ detailData: null
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -193,11 +200,11 @@ export default {
|
|
|
const _this = this;
|
|
|
orderDetail({ id: id}).then(res => {
|
|
|
if (res.status === '200') {
|
|
|
- _this.bundle = res.data.bundle;
|
|
|
+ _this.detailData = res.data || null
|
|
|
+ _this.bundle = res.data.bundle || {icon2: null, name: '', tag: null, price: 0};
|
|
|
_this.coupon = res.data.coupon;
|
|
|
_this.orderBundle = res.data.orderBundle;
|
|
|
_this.customerBundleItemList = res.data.customerBundleItemList;
|
|
|
- _this.expiryDate = res.data.expiryDate ? res.data.expiryDate.substr(0,10) : null
|
|
|
} else {
|
|
|
wx.showToast({
|
|
|
title: res.message,
|
|
@@ -262,7 +269,6 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
onShow() {
|
|
|
wx.showLoading({
|
|
|
mask: true,
|
|
@@ -275,10 +281,16 @@ export default {
|
|
|
wx.hideLoading();
|
|
|
this.finished = false;
|
|
|
this.showQRcodePopup = false;
|
|
|
- this.bundle = {};
|
|
|
+ this.bundle = {
|
|
|
+ icon2: null,
|
|
|
+ name: '',
|
|
|
+ tag: null,
|
|
|
+ price: 0
|
|
|
+ };
|
|
|
this.coupon = undefined;
|
|
|
this.orderBundle = {};
|
|
|
this.customerBundleItemList = [];
|
|
|
+ this.detailData = null
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
@@ -334,6 +346,15 @@ export default {
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
}
|
|
|
+ .center-con{
|
|
|
+ text-align: center;
|
|
|
+ height: 100%;
|
|
|
+ img{
|
|
|
+ display: inline-block;
|
|
|
+ width: 204rpx;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.product-info {
|