|
|
@@ -1,6 +1,10 @@
|
|
|
<template>
|
|
|
<div class="submit">
|
|
|
- <van-notice-bar :text="getLabelName(paymentType, paymentTypeOptions)" background="#FF7F1F" color="#fff" />
|
|
|
+ <van-notice-bar
|
|
|
+ :text="getLabelName(paymentType, paymentTypeOptions, 'text')"
|
|
|
+ background="#FF7F1F"
|
|
|
+ color="#fff"
|
|
|
+ />
|
|
|
<div class="address" v-if="!isNFT">
|
|
|
<div class="van-address-item van-contact-card" @click="onAdd">
|
|
|
<div class="van-cell van-cell--borderless">
|
|
|
@@ -18,17 +22,18 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="assets">
|
|
|
- <div class="assets-product">
|
|
|
+ <div class="assets-product" :class="{ isEnd: isEnd }">
|
|
|
<van-image width="80" height="80" radius="6" :src="getImg(changeImgs(info.pic))" fit="cover" />
|
|
|
<div class="assets-info">
|
|
|
<div class="text1">{{ info.name }}</div>
|
|
|
<div class="flex1"></div>
|
|
|
|
|
|
<div class="text2">
|
|
|
- <div class="time">
|
|
|
+ <div class="time" v-if="!isEnd">
|
|
|
<img src="../../assets/info_icon_time.png" alt="" />
|
|
|
- <span>距结束:<van-count-down :time="time" format="HH 小时 mm 分 ss 秒" /></span>
|
|
|
+ <span>{{ timeText }}:<van-count-down :time="time" format="HH 小时 mm 分 ss 秒" /></span>
|
|
|
</div>
|
|
|
+ <div class="time" v-else>{{ timeText }}</div>
|
|
|
</div>
|
|
|
<!-- <div class="text2" v-if="info.category">类型:{{ info.category }}</div>
|
|
|
<div class="text2" v-if="info.number">编号:{{ info.number }}</div> -->
|
|
|
@@ -38,8 +43,8 @@
|
|
|
|
|
|
<div class="text-list">
|
|
|
<div class="text-info">
|
|
|
- <span class="text1">一口价</span>
|
|
|
- <span class="text2">¥{{ info.fixedPrice }}</span>
|
|
|
+ <span class="text1">{{ getLabelName(paymentType, paymentTypeOptions) }}</span>
|
|
|
+ <span class="text2">¥{{ preMoney }}</span>
|
|
|
</div>
|
|
|
|
|
|
<div class="text-info">
|
|
|
@@ -50,6 +55,20 @@
|
|
|
<span class="text1">实际支付</span>
|
|
|
<span class="text2 prim">¥{{ money }}</span>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div class="text-cell">
|
|
|
+ <div class="text-top">
|
|
|
+ <span class="text1">保证金</span>
|
|
|
+ <span class="text2 warn">¥{{ info.deposit }}</span>
|
|
|
+ </div>
|
|
|
+ <div class="sub">
|
|
|
+ 竞拍成功支付后,送拍机构主动关闭交易,系统会在72小时内释放保证金;若竞拍成功未支付,保证金将不会释放
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="text-info">
|
|
|
+ <span class="text1">保证金状态</span>
|
|
|
+ <span class="text2">正常</span>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
<div class="pay" v-if="!$store.state.review">
|
|
|
@@ -89,10 +108,11 @@ let inWeixin = /micromessenger/i.test(navigator.userAgent);
|
|
|
let inApp = /#cordova#/i.test(navigator.userAgent);
|
|
|
let inIos = /iPhone|iPad|iPod/i.test(navigator.userAgent);
|
|
|
import auctionOrder from '../../mixins/auctionOrder';
|
|
|
+import auction from '../../mixins/auction';
|
|
|
export default {
|
|
|
name: 'activitySubmit',
|
|
|
inject: ['setKeeps'],
|
|
|
- mixins: [asset, imgInfo, auctionOrder],
|
|
|
+ mixins: [asset, imgInfo, auctionOrder, auction],
|
|
|
data() {
|
|
|
return {
|
|
|
addressInfo: {},
|
|
|
@@ -129,14 +149,22 @@ export default {
|
|
|
timer: null,
|
|
|
info: {},
|
|
|
time: '',
|
|
|
- payMentType: 'FIXED_PRICE'
|
|
|
+ paymentType: 'FIXED_PRICE',
|
|
|
+ recordInfo: {}
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
+ preMoney() {
|
|
|
+ if (this.paymentType === 'PURCHASE_PRICE') {
|
|
|
+ return this.info.purchasePrice || 0;
|
|
|
+ } else {
|
|
|
+ return this.info.fixedPrice || 0;
|
|
|
+ }
|
|
|
+ },
|
|
|
money() {
|
|
|
let money = 0;
|
|
|
- if (this.info.fixedPrice) {
|
|
|
- money = this.accAdd(this.info.fixedPrice, money);
|
|
|
+ if (this.preMoney) {
|
|
|
+ money = this.accAdd(this.preMoney, money);
|
|
|
}
|
|
|
if (this.gas) {
|
|
|
money = this.accAdd(money, this.gas);
|
|
|
@@ -162,8 +190,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- if (this.$route.query.payMentType) {
|
|
|
- this.payMentType = this.$route.query.payMentType;
|
|
|
+ console.log(this.$route.query.paymentType);
|
|
|
+ if (this.$route.query.paymentType) {
|
|
|
+ this.paymentType = this.$route.query.paymentType;
|
|
|
}
|
|
|
this.emitter.on('updateChoose', info => {
|
|
|
// console.log(id);
|
|
|
@@ -177,6 +206,9 @@ export default {
|
|
|
});
|
|
|
if (this.$route.query.auctionId) {
|
|
|
this.auctionId = this.$route.query.auctionId;
|
|
|
+ this.$http.get('/auctionRecord/hasPayDeposit?auctionId=' + this.auctionId).then(res => {
|
|
|
+ this.recordInfo = res;
|
|
|
+ });
|
|
|
this.$http.get('/auctionActivity/get/' + this.auctionId).then(res => {
|
|
|
this.info = res;
|
|
|
this.time = this.getTime(res.endTime);
|
|
|
@@ -292,21 +324,33 @@ export default {
|
|
|
let form = {
|
|
|
userId: this.$store.state.userInfo.id,
|
|
|
auctionId: this.auctionId,
|
|
|
- type: this.payMentType
|
|
|
+ type: this.paymentType
|
|
|
};
|
|
|
|
|
|
if (!this.isNFT) {
|
|
|
form.addressId = this.addressInfo.id;
|
|
|
}
|
|
|
|
|
|
- return this.$http
|
|
|
- .post('/auctionOrder/createFixPrice', form)
|
|
|
- .then(res => {
|
|
|
- return Promise.resolve(res);
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- return Promise.reject(e);
|
|
|
- });
|
|
|
+ if (this.paymentType === 'PURCHASE_PRICE') {
|
|
|
+ form.auctionRecordId = this.recordInfo.id;
|
|
|
+ return this.$http
|
|
|
+ .post('/auctionOrder/create', form)
|
|
|
+ .then(res => {
|
|
|
+ return Promise.resolve(res);
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ return Promise.reject(e);
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ return this.$http
|
|
|
+ .post('/auctionOrder/createFixPrice', form)
|
|
|
+ .then(res => {
|
|
|
+ return Promise.resolve(res);
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ return Promise.reject(e);
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
submit() {
|
|
|
if (!this.payType) {
|
|
|
@@ -519,6 +563,16 @@ export default {
|
|
|
&:last-child {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
+
|
|
|
+ &.isEnd {
|
|
|
+ .text2 {
|
|
|
+ .time {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #939599;
|
|
|
+ background-color: #f2f4f5;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.pay-item {
|
|
|
@@ -576,6 +630,7 @@ export default {
|
|
|
font-size: 14px;
|
|
|
color: @text3;
|
|
|
line-height: 20px;
|
|
|
+ margin-bottom: 2px;
|
|
|
word-break: keep-all;
|
|
|
}
|
|
|
|
|
|
@@ -625,6 +680,30 @@ export default {
|
|
|
border-top: 1px solid #f5f7fa;
|
|
|
}
|
|
|
|
|
|
+.text-cell {
|
|
|
+ padding: 12px 0 10px;
|
|
|
+ border-top: 1px solid #f5f7fa;
|
|
|
+ .text-top {
|
|
|
+ .flex();
|
|
|
+ font-size: 14px;
|
|
|
+ color: #000000;
|
|
|
+ line-height: 24px;
|
|
|
+ justify-content: space-between;
|
|
|
+ .text2 {
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ .warn {
|
|
|
+ color: #ff7f1f;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .sub {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #ff7f1f;
|
|
|
+ line-height: 17px;
|
|
|
+ margin-top: 4px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
.van-notice-bar {
|
|
|
height: 28px;
|
|
|
/deep/.van-notice-bar__wrap {
|