|
|
@@ -76,7 +76,7 @@
|
|
|
<div class="box-buttom">
|
|
|
<div class="box-buttom-con">
|
|
|
<p>商品价格</p>
|
|
|
- <p class="box-buttom-p">¥{{ total }}</p>
|
|
|
+ <p class="box-buttom-p">¥{{ allPrice }}</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="box-buttom">
|
|
|
@@ -174,7 +174,7 @@
|
|
|
<img src="/native/imgs/btn_04@3x.png" alt="" />
|
|
|
<span>取消订单</span>
|
|
|
</div>
|
|
|
- <div v-if="status.orderStatus === 'CREATED'" class="box-btn-right" @click="pay">
|
|
|
+ <div v-if="status.orderStatus === 'CREATED'" class="box-btn-right" @click="newShow = true">
|
|
|
<img src="/native/imgs/btn_01@3x.png" alt="" />
|
|
|
<span>立即支付</span>
|
|
|
</div>
|
|
|
@@ -211,6 +211,16 @@
|
|
|
alt=""
|
|
|
/>
|
|
|
</van-popup>
|
|
|
+ <van-action-sheet
|
|
|
+ :show="newShow"
|
|
|
+ description="支付方式"
|
|
|
+ cancel-text="取消"
|
|
|
+ :actions="actions"
|
|
|
+ @close="newShow = false"
|
|
|
+ @select="select"
|
|
|
+ @cancel="newShow = false"
|
|
|
+ >
|
|
|
+ </van-action-sheet>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -218,6 +228,7 @@
|
|
|
import store from '../mixins/store';
|
|
|
export default {
|
|
|
mixins: [store],
|
|
|
+ newShow: false,
|
|
|
name: '',
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -234,14 +245,27 @@ export default {
|
|
|
logisTics: [],
|
|
|
stepsList: [],
|
|
|
stepsShow: [],
|
|
|
+ allPrice: 0,
|
|
|
caseId: '',
|
|
|
minters: 0,
|
|
|
seconds: 0,
|
|
|
allTime: 5 * 60 - 1,
|
|
|
closeTime: '',
|
|
|
- store: {}
|
|
|
+ store: {},
|
|
|
+ payOptions: [{ label: '微信支付', value: 'WECHAT' }, { label: '余额支付', value: 'BALANCE' }]
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ actions() {
|
|
|
+ let list = [...this.payOptions];
|
|
|
+ return list.map(item => {
|
|
|
+ return {
|
|
|
+ name: item.label,
|
|
|
+ value: item.value
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
logisticShow() {
|
|
|
this.show = false;
|
|
|
@@ -302,18 +326,24 @@ export default {
|
|
|
this.$http
|
|
|
.get('/orderInfo/get/' + this.$mp.query.id)
|
|
|
.then(res => {
|
|
|
- console.log(res);
|
|
|
this.hideLoading();
|
|
|
this.caseId = res.caseId;
|
|
|
this.status = res;
|
|
|
this.store = res.store;
|
|
|
- // console.log(this.store);
|
|
|
this.addressList = res.address;
|
|
|
this.total = res.total;
|
|
|
this.Boxes = res.cardBoxList;
|
|
|
this.orderInfoId = res.id;
|
|
|
this.postage = res.cardCase.postage;
|
|
|
- // this.cardCaseInfo = res.cardCase;
|
|
|
+ let countArr = [];
|
|
|
+ countArr = res.cardBoxList.map(item => {
|
|
|
+ return item.boxPrice;
|
|
|
+ });
|
|
|
+ if (countArr.length > 0) {
|
|
|
+ this.allPrice = countArr.reduce((total, item) => {
|
|
|
+ return total + item;
|
|
|
+ }, 0);
|
|
|
+ }
|
|
|
if (res.cardCase.customName) {
|
|
|
this.cardCaseInfo = res.cardCase;
|
|
|
this.cardCaseInfo.name = res.cardCase.customName;
|
|
|
@@ -347,7 +377,6 @@ export default {
|
|
|
this.showTimeTab = true;
|
|
|
}
|
|
|
if (this.status.orderStatus == 'COMPETED' || this.status.orderStatus == 'SEND') {
|
|
|
- // console.log(this.status.orderStatus);
|
|
|
this.$http.get('/orderInfo/checkLogistic', { orderInfoId: this.$mp.query.id }).then(res => {
|
|
|
this.hideLoading();
|
|
|
this.logisTics = res.logistic.result;
|
|
|
@@ -435,14 +464,13 @@ export default {
|
|
|
},
|
|
|
Apply() {
|
|
|
this.navigateTo('/pages/Apply?id=' + this.orderInfoId);
|
|
|
- // if (this.status.orderStatus == 'PAYED') {
|
|
|
- // this.navigateTo('/pages/Apply?id=' + this.orderInfoId);
|
|
|
- // } else {
|
|
|
- // wx.showToast({
|
|
|
- // icon: 'none',
|
|
|
- // title: '卡包已开箱,无法申请退款'
|
|
|
- // });
|
|
|
- // }
|
|
|
+ },
|
|
|
+ select(e) {
|
|
|
+ if (e.detail.value == 'WECHAT') {
|
|
|
+ this.pay();
|
|
|
+ } else {
|
|
|
+ console.log('余额支付');
|
|
|
+ }
|
|
|
},
|
|
|
pay() {
|
|
|
wx.showLoading({
|