Commit 6e27b325 by yancanhua

fix: 自测问题修改

1 parent dfce3813
......@@ -6,7 +6,7 @@
<link rel="icon" href="/favicon/favicon.ico" type="image/x-icon">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>专电优拍</title>
<script type="module" crossorigin src="https://aus.test.glsx.com.cn/assets/index-BxuA5MCC.js"></script>
<script type="module" crossorigin src="https://aus.test.glsx.com.cn/assets/index-qFPl4dcX.js"></script>
<link rel="stylesheet" crossorigin href="https://aus.test.glsx.com.cn/assets/index-CAAxcolk.css">
<!-- <script type="module" crossorigin src="https://aus.glsx.com.cn/assets/index-CxEhTUxo.js"></script>
<link rel="stylesheet" crossorigin href="https://aus.glsx.com.cn/assets/index-CAAxcolk.css"> -->
......
......@@ -320,9 +320,8 @@
</view>
</uni-popup>
<!-- <van-dialog id="van-dialog"/>-->
<van-dialog use-slot :show="showBidSuccessDialog" :show-cancel-button="false" :show-confirm-button="false">
<bid-success-dialog :order-id="orderId" :auctionVehicle="auctionVehicle" @close="closeBidSuccessDialog"></bid-success-dialog>
<bid-success-dialog :order-id="orderId" ref="bidSuccessDialogRef" :auctionVehicle="auctionVehicle" @close="closeBidSuccessDialog"></bid-success-dialog>
</van-dialog>
</view>
</template>
......@@ -408,6 +407,12 @@ export default class AuctionVehiclePage extends Vue {
* 显示中标弹窗
*/
showBidSuccessDialog = false;
/**
* 中标弹窗是否手动关闭
*/
isHandleClose = false;
/**
* 中标订单id
*/
......@@ -633,7 +638,13 @@ export default class AuctionVehiclePage extends Vue {
AuctionOrderController.getAuctionOrderByVehicleId(this.axios, this.vehicle.vehicleId).then(res => {
if (res.data > 0) {
this.orderId = res.data;
this.showBidSuccessDialog = true;
this.stopFetchOrderState();
if (!this.isHandleClose) {
AuctionOrderController.getNextAucVeh(this.axios, { aucvehId: this.auctionVehicle.aucvehId }).then(res => {
this.$refs.bidSuccessDialogRef.initData(res.data?.data || {});
this.showBidSuccessDialog = true;
});
}
}
});
}, 4000);
......@@ -642,6 +653,7 @@ export default class AuctionVehiclePage extends Vue {
closeBidSuccessDialog() {
this.showBidSuccessDialog = false;
this.isHandleClose = true;
this.stopFetchOrderState();
}
......
<template>
<view class="dialog-container">
<view class="bg-image" :style="{ backgroundImage:`url(${backgroundImageUrl})` }"></view>
<view class="bg-image" :style="{ backgroundImage: `url(${backgroundImageUrl})` }"></view>
<view class="dialog-body">
<view class="dialog-icon">
<van-image width="100" height="100" fit="cover" src="https://img02.glsx.com.cn/aus/images/order/payment.png"></van-image>
<van-image width="100" height="100" fit="cover"
src="https://img02.glsx.com.cn/aus/images/order/payment.png"></van-image>
</view>
<view class="dialog-header">
恭喜你中拍成功!
</view>
<view v-if="auctionVehicle.auction.auctionMode != 2" class="dialog-content">
<view v-if="auctionVehicle.auction.auctionMode != 2" class="dialog-content">
<text>请尽快签署购车协议,并支付款项以锁定车辆</text>
</view>
<view v-if="auctionVehicle.auction.auctionMode == 2" class="dialog-auctionMode" >
<view v-if="auctionVehicle.auction.auctionMode == 2 && isNextAucVeh" class="nextTip">
是否前往参拍下一辆车?
</view>
<view v-if="auctionVehicle.auction.auctionMode == 2" class="dialog-auctionMode">
<view class="auctionMode-img">
<van-image width="28" height="28" style="margin: 6px;float: left;" fit="cover" src="https://img02.glsx.com.cn/aus/images/roundBid/title_icon.png"></van-image>
<van-image width="28" height="28" style="margin: 6px;float: left;" fit="cover"
src="https://img02.glsx.com.cn/aus/images/roundBid/title_icon.png"></van-image>
</view>
<view class="auctionMode-text">
已中拍车辆可在【我的-购车订单】中进行付款与确认购车 <text style="color: #185EFE;" @click="signContract" >前往购车确认</text>
已中拍车辆可在【我的-购车订单】中进行付款与确认购车
<text style="color: #185EFE;" @click="signContract()">前往购车确认</text>
</view>
</view>
<view class="dialog-footer">
<van-button class="dialog-footer_but" type="default" round block @click="$emit('close')">知道了</van-button>
<van-button class="dialog-footer_but" type="primary" style="margin-left: 12px;" hairline round block @click="signContract">去签署购车协议</van-button>
</view>
<view v-if="!isNextAucVeh" class="dialog-footer">
<van-button class="dialog-footer_but" type="default" round block @click="handleClose()">取消</van-button>
<van-button class="dialog-footer_but" type="primary" style="margin-left: 12px;" hairline round block
@click="signContract()">去签署购车协议</van-button>
</view>
<view v-if="isNextAucVeh" class="dialog-footer">
<van-button class="dialog-footer_but" type="default" round block @click="handleClose()">取消</van-button>
<van-button class="dialog-footer_but" type="primary" style="margin-left: 12px;" hairline round block>
继续参拍
<text v-if="nextAucVehData.remainSecond">({{ nextAucVehData.remainSecond || 0 }}s)</text>
</van-button>
</view>
</view>
</view>
</template>
<script lang="ts">
import {Component, Prop, Vue} from "vue-facing-decorator";
import {BACKGROUND_IMAGE_2} from "@/static/ResourceConstants";
import { Component, Prop, Vue } from "vue-facing-decorator";
import { BACKGROUND_IMAGE_2 } from "@/static/ResourceConstants";
@Component({
components: {}
......@@ -40,17 +57,62 @@ import {BACKGROUND_IMAGE_2} from "@/static/ResourceConstants";
export default class BidSuccessDialog extends Vue {
backgroundImageUrl = BACKGROUND_IMAGE_2;
@Prop({type: Number, required: true})
@Prop({ type: Number, required: true })
orderId: number;
@Prop({ type: Object, required: true })
auctionVehicle: any;
signContract(): void {
nextAucVehData = {
aucvehId: '',
remainSecond: 0,
};
isNextAucVeh = false;
isHandleClose = false;
initData(data: any) {
if (this.nextAucVehData.remainSecond) {
return;
}
this.isHandleClose = false;
const { aucvehId, remainSecond } = data || {};
this.nextAucVehData.aucvehId = aucvehId || '';
this.nextAucVehData.remainSecond = remainSecond || 0;
this.isNextAucVeh = aucvehId ? true : false;
this.setTimeoutSecond();
}
setTimeoutSecond() {
if (this.nextAucVehData.aucvehId) {
if (this.nextAucVehData.remainSecond && Number(this.nextAucVehData.remainSecond) > 0) {
setTimeout(() => {
this.nextAucVehData.remainSecond = Math.floor(Number(this.nextAucVehData.remainSecond)) - 1;
this.setTimeoutSecond();
}, 1000);
} else {
this.nextAucVehData.remainSecond = 0;
if (!this.isHandleClose) {
this.toNextAucVeh();
}
}
}
}
handleClose() {
this.isHandleClose = true;
this.$emit('close');
}
//跳转到下一辆车
toNextAucVeh() {
this.$emit('close');
uni.navigateTo({ url: '/module/auction/AuctionVehiclePage?aucvehId=' + this.nextAucVehData.aucvehId });
}
signContract() {
uni.navigateTo({ url: '/module/order/contract/ContractPage?orderId=' + this.orderId });
this.$emit('close');
uni.navigateTo({
url: '/module/order/contract/ContractPage?orderId=' + this.orderId
});
}
}
</script>
......@@ -65,7 +127,8 @@ export default class BidSuccessDialog extends Vue {
}
.bg-image {
background-attachment: inherit; /* 将背景图固定不动 */
background-attachment: inherit;
/* 将背景图固定不动 */
}
.dialog-body {
......@@ -102,7 +165,7 @@ export default class BidSuccessDialog extends Vue {
float: left;
}
.dialog-footer_but{
.dialog-footer_but {
width: -webkit-calc(50% - 6px);
width: -moz-calc(50% - 6px);
width: calc(50% - 6px);
......@@ -127,15 +190,27 @@ export default class BidSuccessDialog extends Vue {
float: left;
}
.auctionMode-text{
.auctionMode-text {
width: -webkit-calc(100% - 64px);
width: -webkit-calc(100% - 64px);
width: -webkit-calc(100% - 64px);
width: -webkit-calc(100% - 64px);
width: -webkit-calc(100% - 64px);
float: left;
color: #676d7d;
font-size: 12px;
font-family: "苹方-简";
line-height: 20px;
margin: 8px 0;
}
.nextTip {
width: 100%;
height: 22px;
float: left;
margin-top: 8px;
text-align: center;
color: #676d7d;
font-size: 14px;
font-weight: 常规体;
font-family: "苹方-简";
line-height: 22px;
}
</style>
......@@ -110,7 +110,7 @@
<view class="listButton">
<view v-for="(item, index) in operationButList" :key="index" @click="handleOperationBut(item.value)"
class="listButton_item"
:class="{ 'listButton_active': item.value == addPrice || (item.value == '自定义' && isShowCustom) }">
:class="{ 'listButton_active': (item.value == addPrice && !isShowCustom) || (item.value == '自定义' && isShowCustom) }">
+{{ item.value }}
</view>
</view>
......@@ -299,9 +299,13 @@ export default class roundBidBottom extends Vue {
const data = res.data || {};
if (data.auctionState == 'PREVIEW') { //预展中
this.pageState = 'PREVIEW';
setTimeout(() => {
that.getAuctionVehicleDetail();
}, 1600);
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
if (currentPage.route == 'module/auction/AuctionVehiclePage') {
setTimeout(() => {
that.getAuctionVehicleDetail();
}, 1600);
}
} else if (data.auctionState == 'AUCTIONING') { //竞拍中
this.pageState = 'AUCTIONING';
this.getBidRemainSecData();
......@@ -318,18 +322,14 @@ export default class roundBidBottom extends Vue {
getBidRemainSecData() {
AuctionOrderController.getBidRemainSec(this.axios, { aucvehId: this.auctionVehicle.aucvehId }).then(res => {
const data = res.data?.data || {};
//价格改变重新获取佣金
if (this.pageData.price != data.price) {
this.realCalcCommissionPriceData();
this.handleAudio();
}
this.pageData = { ...this.pageData, ...data, remainSecond: Math.floor(data.remainSecond || 0) };
// 计算最终成交价
this.resultPrice = (Number(this.pageData.price || 0) + Number(this.pageData.commissionPrice || 0)) / 10000;
//拍卖结束后获取下一辆车及拍卖状态
if (this.pageData.over) {
this.pageState = 'END';
......@@ -337,10 +337,10 @@ export default class roundBidBottom extends Vue {
this.getAccountBidResultData();
}, 1100);
}
// 获取当前路由地址
if (data.significantPriceIncrease) {
uni.showToast({ title: '有用户大幅度加价!最新价升至' + this.resultPrice + '万', icon: 'none' });
}
const pages = getCurrentPages();
// 数组的最后一个元素就是当前正在显示的页面实例
const currentPage = pages[pages.length - 1];
if (currentPage.route == 'module/auction/AuctionVehiclePage' && !this.pageData.over) {
setTimeout(() => {
......@@ -423,7 +423,6 @@ export default class roundBidBottom extends Vue {
if (value != '自定义') {
this.addPrice = value;
this.isShowCustom = false;
this.handleAddBid();
} else {
this.customBid = '';
this.isShowCustom = this.isShowCustom ? false : true;
......@@ -716,9 +715,9 @@ export default class roundBidBottom extends Vue {
}
.downBox_left {
width: -webkit-calc(46% - 16px);
width: -moz-calc(46% - 16px);
width: calc(46% - 16px);
width: -webkit-calc(48% - 16px);
width: -moz-calc(48% - 16px);
width: calc(48% - 16px);
float: left;
margin-left: 16px;
margin-top: 12px;
......@@ -774,11 +773,11 @@ export default class roundBidBottom extends Vue {
width: calc(100% - 32px);
height: 30px;
float: left;
margin: 0 16px;
margin: 0 8px;
}
.listButton_item {
width: 60.4px;
padding: 0 10px;
height: 28px;
float: left;
margin-left: 8px;
......@@ -786,7 +785,7 @@ export default class roundBidBottom extends Vue {
border-radius: 4px;
background: #f8f9fc;
color: #333333;
font-size: 14px;
font-size: 12px;
font-family: "D DIN PRO";
text-align: center;
border: 1px solid #f8f9fc;
......@@ -935,7 +934,7 @@ export default class roundBidBottom extends Vue {
justify-content: center;
position: relative;
float: left;
margin-right: 40px;
margin-right: 16px;
margin-top: 16px;
}
......@@ -960,9 +959,9 @@ export default class roundBidBottom extends Vue {
justify-content: center;
position: relative;
float: left;
margin-top: 8px;
margin-top: 11px;
margin-left: 8px;
margin-bottom: 8px;
margin-bottom: 11px;
}
.progress-inner-up {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!