Commit 9d19d180 by yancanhua

fix: 测试问题修改

1 parent 526dd6ca
......@@ -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-CLCaDTBV.js"></script>
<script type="module" crossorigin src="https://aus.test.glsx.com.cn/assets/index-DQdzhQEn.js"></script>
<link rel="stylesheet" crossorigin href="https://aus.test.glsx.com.cn/assets/index-WADY07lV.css">
<!-- <script type="module" crossorigin src="https://aus.glsx.com.cn/assets/index-pxQEYXWe.js"></script>
<link rel="stylesheet" crossorigin href="https://aus.glsx.com.cn/assets/index-CAAxcolk.css"> -->
......
......@@ -8,6 +8,8 @@
import { Component, Hook, Vue } from "vue-facing-decorator";
import { onLoad } from "@dcloudio/uni-app";
import { AuctionController } from "@/api/AuctionController";
import { AuthService } from "@/common/AuthService";
@Component({ components: {} })
......@@ -20,13 +22,30 @@ export default class InspectionPreview extends Vue {
created(): void {
onLoad((option) => {
this.vehicleId = option.vehicleId;
this.aucvehId = option.aucvehId;
this.getReportVehicleData(option.vehicleId);
this.getVehicleDetail(option.aucvehId);
const that = this;
that.vehicleId = option.vehicleId;
that.aucvehId = option.aucvehId;
that.getReportVehicleData(option.vehicleId);
that.getVehicleDetail(option.aucvehId);
setTimeout(() => {
that.toLoginPage();
}, 1600);
});
}
toLoginPage() {
const authService: AuthService = this.$auth;
if (!authService.isLogin()) {
uni.showToast({
title: '请先登录', icon: 'none', duration: 2000, complete: function () {
setTimeout(() => {
uni.navigateTo({ url: '/pages/LoginPage?vehicleId=' + this.vehicleId + '&aucvehId=' + this.aucvehId });
}, 2200);
}
});
}
}
getVehicleDetail(aucvehId: string) {
AuctionController.getAuctionVehicleDetailById(this.axios, aucvehId).then(res => {
const data = res.data || {};
......
......@@ -52,9 +52,11 @@ import {AuthService} from "@/common/AuthService";
export default class LoginPage extends Vue {
isAgreed = false;
optionData: any = {};
created(): void {
onLoad((query) => {
onLoad((option) => {
this.optionData = option || {};
const authService: AuthService = this.$auth;
console.log(authService.getAuthentication())
console.log(authService.isLogin());
......@@ -106,8 +108,14 @@ export default class LoginPage extends Vue {
const authService: AuthService = this.$auth;
authService.updateToken(accountInfo.token);
authService.saveAuthentication(accountInfo);
if (this.optionData?.vehicleId && this.optionData?.aucvehId) {
uni.navigateTo({ url: '/module/auction/InspectionPreview?vehicleId=' + this.optionData.vehicleId + '&aucvehId=' + this.optionData.aucvehId });
} else {
uni.switchTab({url: '/pages/tabbar/HomePage'});
}
// 登录跳转到首页
uni.switchTab({url: '/pages/tabbar/HomePage'});
// uni.switchTab({url: '/pages/tabbar/HomePage'});
} else {
uni.showToast({title: accountInfo.message, icon: 'error'});
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!