|
|
@@ -28,11 +28,35 @@
|
|
|
<div style="font-size: 13px">{{ item1.order_no.substring(0, 4) + '****' + item1.order_no.substring(item1.order_no.length - 5, item1.order_no.length) }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="plus f-r" v-if="item.type_id == 1 && JSON.parse(item.details).length < 3" @click="showAddStoring(item)">
|
|
|
+ <svg t="1749447443783" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="27760" width="50" height="50">
|
|
|
+ <path
|
|
|
+ d="M544.83 557.536l374.19 0.973c17.694 0.046 32.039-14.21 32.085-31.904 0.045-17.74-14.21-32.04-31.904-32.086l-374.258-0.995 0.566-372.561c0.022-17.627-14.256-31.995-31.95-32.041-17.672-0.022-32.018 14.278-32.064 31.973l-0.564 372.47-373.986-0.996c-17.695-0.045-32.04 14.21-32.086 31.904-0.022 8.849 3.552 16.903 9.368 22.719 5.769 5.77 13.734 9.345 22.537 9.367l374.076 0.996-0.565 375.955c-0.023 8.846 3.553 16.856 9.368 22.671 5.793 5.793 13.78 9.346 22.583 9.369 17.672 0.022 31.995-14.256 32.04-31.95L544.83 557.536 544.83 557.536z"
|
|
|
+ fill="#29b286"
|
|
|
+ p-id="27761"
|
|
|
+ ></path>
|
|
|
+ </svg>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="btn_box">
|
|
|
+ <div class="btn_box f-sb-n">
|
|
|
+ <div>
|
|
|
+ <div class="count f-r" v-if="item.end_time * 1000 - new Date().getTime() <= 604800000">
|
|
|
+ <van-count-down
|
|
|
+ class="count"
|
|
|
+ :time="item.end_time * 1000 - new Date().getTime()"
|
|
|
+ :format="`DD${$t('lang9')}HH${$t('lang10')}mm${$t('lang11')}ss${$t('lang12')}`"
|
|
|
+ v-if="item.end_time * 1000 - new Date().getTime() > 0"
|
|
|
+ ></van-count-down>
|
|
|
+ <span class="count end" v-else>{{ $t('lang475') }}</span>
|
|
|
+ <div class="rnew" v-if="item.is_renew == 1" @click="showPayTypeFn(item)">{{ $t('lang472') }} <van-icon name="arrow" color="#29b286" /></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
<!-- 按钮 -->
|
|
|
- <div class="buy" @click="removePledge(item.id)">
|
|
|
+ <div class="buy" @click="showChoose(item)" v-if="item.type_id == 1">
|
|
|
+ <van-button class="buy_btn btn1" type="primary">{{ $t('lang322') }}</van-button>
|
|
|
+ </div>
|
|
|
+ <div class="buy" @click="removePledge(item)" v-else-if="item.type_id == 2">
|
|
|
<van-button class="buy_btn btn1" type="primary">{{ $t('lang322') }}</van-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -42,6 +66,57 @@
|
|
|
<span>{{ $t('lang82') }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <van-popup v-model="showOrders" round closeable>
|
|
|
+ <div class="orderpopup">
|
|
|
+ <div class="orderpopup_title">{{ $t('lang473') }}</div>
|
|
|
+ <van-checkbox-group v-model="checkbox" class="orderpopup_list" v-if="JSON.parse(detail.details).length > 0">
|
|
|
+ <div v-for="(item, index) in JSON.parse(detail.details)" :key="index" class="orderpopup_item f-sb">
|
|
|
+ <span :class="[checkbox.indexOf(item.order_no) >= 0 ? 'radio-active' : '']">
|
|
|
+ {{ item.order_no }}
|
|
|
+ </span>
|
|
|
+ <van-checkbox :name="item.id" icon-size="18px" checked-color="#21926f"></van-checkbox>
|
|
|
+ </div>
|
|
|
+ </van-checkbox-group>
|
|
|
+ <div class="nodata" v-else>
|
|
|
+ <span>{{ $t('lang60') }} </span>
|
|
|
+ </div>
|
|
|
+ <van-button type="default" class="btn" @click="removePledge(detail)">{{ $t('lang474') }}</van-button>
|
|
|
+ </div>
|
|
|
+ </van-popup>
|
|
|
+
|
|
|
+ <van-popup v-model="showAddOrders" round closeable>
|
|
|
+ <div class="orderpopup">
|
|
|
+ <div class="orderpopup_title">{{ $t('lang334') }}</div>
|
|
|
+ <van-checkbox-group v-model="addCheckbox" class="orderpopup_list" v-if="orderlist.length > 0">
|
|
|
+ <div v-for="(item, index) in orderlist" :key="index" class="orderpopup_item f-sb">
|
|
|
+ <span :class="[checkbox.indexOf(item.order_no) >= 0 ? 'radio-active' : '']">
|
|
|
+ {{ item.order_no }}
|
|
|
+ </span>
|
|
|
+ <van-checkbox :name="item.order_no" icon-size="18px" checked-color="#21926f"></van-checkbox>
|
|
|
+ </div>
|
|
|
+ </van-checkbox-group>
|
|
|
+ <div class="nodata" v-else>
|
|
|
+ <span>{{ $t('lang60') }} </span>
|
|
|
+ </div>
|
|
|
+ <van-button type="default" class="btn" @click="addPledgeProduct">{{ $t('lang111') }}</van-button>
|
|
|
+ </div>
|
|
|
+ </van-popup>
|
|
|
+ <van-popup v-model="showPayType" round closeable>
|
|
|
+ <div class="orderpopup">
|
|
|
+ <div class="orderpopup_title">{{ $t('lang470') }}</div>
|
|
|
+ <van-radio-group v-model="pay_type" icon-size="17px" checked-color="#21926f" class="f-c payRadio-box">
|
|
|
+ <div class="payRadio f-sb">
|
|
|
+ <span> {{ $t('lang174') }}:{{ detail.token }} </span>
|
|
|
+ <van-radio name="1"></van-radio>
|
|
|
+ </div>
|
|
|
+ <div class="payRadio f-sb">
|
|
|
+ <span>TeaC:{{ detail.teac }}</span>
|
|
|
+ <van-radio name="2"></van-radio>
|
|
|
+ </div>
|
|
|
+ </van-radio-group>
|
|
|
+ <van-button type="default" class="btn" @click="setRenew">{{ $t('lang111') }}</van-button>
|
|
|
+ </div>
|
|
|
+ </van-popup>
|
|
|
<van-overlay :show="show">
|
|
|
<div class="wrapper" @click.stop>
|
|
|
<van-loading type="spinner" class="loading" color="#29b286" />
|
|
|
@@ -65,6 +140,16 @@ export default {
|
|
|
nft_list: [],
|
|
|
timer: null,
|
|
|
show: false,
|
|
|
+ showOrders: false, //控制显示需要解除的订单号
|
|
|
+ checkbox: [], //存储解除的订单号
|
|
|
+ detail: {
|
|
|
+ details: '[]',
|
|
|
+ },
|
|
|
+ orderlist: [], //持有订单号列表
|
|
|
+ addCheckbox: [], //存储添加的订单号
|
|
|
+ showAddOrders: false, //控制显示持有订单号
|
|
|
+ showPayType: false, //控制显示支付方式
|
|
|
+ pay_type: -1, // 服务费支付方式 1token 2teac
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
|
@@ -94,7 +179,115 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- removePledge(pledge_id) {
|
|
|
+ showChoose(item) {
|
|
|
+ this.detail = item;
|
|
|
+ this.showOrders = true;
|
|
|
+ },
|
|
|
+ showAddStoring(item) {
|
|
|
+ this.showAddOrders = true;
|
|
|
+ this.detail = item;
|
|
|
+ this.holdProductList(item.product_id);
|
|
|
+ },
|
|
|
+ showPayTypeFn(item) {
|
|
|
+ this.detail = item;
|
|
|
+ this.showPayType = true;
|
|
|
+ },
|
|
|
+ setRenew() {
|
|
|
+ if (this.pay_type == -1) {
|
|
|
+ return this.$toast(this.$t('lang470'));
|
|
|
+ }
|
|
|
+ let _this = this;
|
|
|
+ Dialog.confirm({
|
|
|
+ title: _this.$t('lang136'),
|
|
|
+ message: _this.$t('lang476'),
|
|
|
+ confirmButtonText: _this.$t('lang111'),
|
|
|
+ cancelButtonText: _this.$t('lang135'),
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ _this.show = true;
|
|
|
+
|
|
|
+ homeApi.setRenew({ pledge_id: _this.detail.id, pay_type: _this.pay_type }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ _this.show = false;
|
|
|
+ _this.showPayType = false;
|
|
|
+ _this.detail = {
|
|
|
+ details: '[]',
|
|
|
+ };
|
|
|
+ _this.addCheckbox = [];
|
|
|
+ _this.nft_list = [];
|
|
|
+ clearInterval(this.timer);
|
|
|
+ _this.timer = null;
|
|
|
+ _this.teamine();
|
|
|
+ Notify({ type: 'success', message: _this.$t('lang152') });
|
|
|
+ } else {
|
|
|
+ _this.show = false;
|
|
|
+ this.$toast(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ // on cancel
|
|
|
+ });
|
|
|
+ },
|
|
|
+ addPledgeProduct() {
|
|
|
+ let _this = this;
|
|
|
+ Dialog.confirm({
|
|
|
+ title: _this.$t('lang136'),
|
|
|
+ message: _this.$t('lang327'),
|
|
|
+ confirmButtonText: _this.$t('lang111'),
|
|
|
+ cancelButtonText: _this.$t('lang135'),
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ _this.show = true;
|
|
|
+
|
|
|
+ homeApi.addPledgeProduct({ pledge_id: _this.detail.id, order_no: _this.addCheckbox.join(',') }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ _this.show = false;
|
|
|
+ _this.showAddOrders = false;
|
|
|
+ _this.detail = {
|
|
|
+ details: '[]',
|
|
|
+ };
|
|
|
+ _this.addCheckbox = [];
|
|
|
+ _this.nft_list = [];
|
|
|
+ clearInterval(this.timer);
|
|
|
+ _this.timer = null;
|
|
|
+ _this.teamine();
|
|
|
+ Notify({ type: 'success', message: _this.$t('lang152') });
|
|
|
+ } else {
|
|
|
+ _this.show = false;
|
|
|
+ this.$toast(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ // on cancel
|
|
|
+ });
|
|
|
+ },
|
|
|
+ holdProductList(product_id) {
|
|
|
+ homeApi.holdProductList({ product_id }).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.orderlist = res.data;
|
|
|
+ } else {
|
|
|
+ this.$toast(res.msg);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ removePledge(item) {
|
|
|
+ if (this.detail.type_id == 1 && this.checkbox.length <= 0) {
|
|
|
+ return this.$toast(this.$t('lang473'));
|
|
|
+ }
|
|
|
+
|
|
|
+ let order_id =
|
|
|
+ item.type_id == 1
|
|
|
+ ? this.checkbox.join(',')
|
|
|
+ : JSON.parse(item.details)
|
|
|
+ .map(it => {
|
|
|
+ return it.id;
|
|
|
+ })
|
|
|
+ .join(',');
|
|
|
+
|
|
|
+ console.log(order_id);
|
|
|
+
|
|
|
let _this = this;
|
|
|
Dialog.confirm({
|
|
|
title: _this.$t('lang136'),
|
|
|
@@ -104,12 +297,17 @@ export default {
|
|
|
})
|
|
|
.then(() => {
|
|
|
_this.show = true;
|
|
|
- homeApi.removePledge({ pledge_id }).then(res => {
|
|
|
+ homeApi.removePledge({ pledge_id: item.id, order_id: order_id }).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
_this.show = false;
|
|
|
+ _this.showOrders = false;
|
|
|
+ _this.detail = {
|
|
|
+ details: '[]',
|
|
|
+ };
|
|
|
_this.nft_list = [];
|
|
|
+ _this.checkbox = [];
|
|
|
clearInterval(this.timer);
|
|
|
- this.timer = null;
|
|
|
+ _this.timer = null;
|
|
|
_this.teamine();
|
|
|
Notify({ type: 'success', message: _this.$t('lang152') });
|
|
|
} else {
|
|
|
@@ -196,6 +394,10 @@ export default {
|
|
|
display: flex;
|
|
|
align-items: flex-start;
|
|
|
}
|
|
|
+.f-c {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
.btn_box {
|
|
|
padding-top: 14px;
|
|
|
}
|
|
|
@@ -437,6 +639,31 @@ export default {
|
|
|
.item {
|
|
|
margin-right: 6px;
|
|
|
}
|
|
|
+
|
|
|
+ .plus {
|
|
|
+ width: 60px;
|
|
|
+ height: 60px;
|
|
|
+ justify-content: center;
|
|
|
+ border: 2px solid #5e5e5e;
|
|
|
+ border-radius: 10px;
|
|
|
+ margin: -12px 0 0 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .count {
|
|
|
+ color: #29b286;
|
|
|
+ font-size: 12px;
|
|
|
+ }
|
|
|
+ .end {
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
+ .rnew {
|
|
|
+ color: #29b286;
|
|
|
+ font-size: 11px;
|
|
|
+ padding: 2px 4px 2px 8px;
|
|
|
+ border-radius: 20px;
|
|
|
+ border: 1px solid #29b286;
|
|
|
+ margin-left: 6px;
|
|
|
}
|
|
|
|
|
|
.buy {
|
|
|
@@ -465,6 +692,49 @@ export default {
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
}
|
|
|
+ .orderpopup {
|
|
|
+ width: 300px;
|
|
|
+ height: fit-content;
|
|
|
+ color: #000;
|
|
|
+ padding: 16px 30px 0;
|
|
|
+ &_title {
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ &_list {
|
|
|
+ margin: 28px 0 10px;
|
|
|
+ }
|
|
|
+ &_item {
|
|
|
+ color: #9b9b9b;
|
|
|
+ font-size: 15px;
|
|
|
+ padding-bottom: 12px;
|
|
|
+ .radio-active {
|
|
|
+ color: #000;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .btn {
|
|
|
+ width: 100%;
|
|
|
+ color: #21926f;
|
|
|
+ letter-spacing: 2px;
|
|
|
+ border: 0;
|
|
|
+ border-top: 1px solid rgba(#cccccc, 0.8);
|
|
|
+ border-radius: 0;
|
|
|
+ background-color: #fff;
|
|
|
+ }
|
|
|
+ .payRadio-box {
|
|
|
+ padding: 20px 0;
|
|
|
+ .payRadio {
|
|
|
+ font-size: 13px;
|
|
|
+ padding: 15px 0 8px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ .nodata {
|
|
|
+ font-size: 13px;
|
|
|
+ padding: 60px;
|
|
|
+ color: #4b4b4b;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
}
|
|
|
::v-deep .van-cell {
|
|
|
padding: 10px 0 !important;
|