Commit 5d477458 by yancanhua

Merge branch 'release/venus-usedcar-h5/1.0.0' of http://192.168.3.233:8090/monor…

…epo/venus into release/venus-usedcar-h5/1.0.0
2 parents e4801039 4cbf100b
Pipeline #85 for 5d477458 failed in 0 seconds
export default { export default {
"*.{js,jsx,ts,tsx,vue,uvue,uts,md}": "pnpm eslint --cache --fix", "*.{js,jsx,ts,tsx,vue,uvue,uts,md}": "pnpm eslint --cache --fix",
"package.json": "pnpm eslint --cache --fix", "package.json": "pnpm eslint --cache --fix",
......
{ {
"tailwindCSS.experimental.configFile": "internal/tailwind-config/src/index.ts", "tailwindCSS.experimental.configFile": "internal/tailwind-config/src/index.ts",
"eslint.nodePath": "./node_modules", "eslint.nodePath": "./node_modules",
// 告诉 ESLint:这是一个 monorepo // 单份 flat config 在仓库根目录;若用 mode:auto,子包目录下没有 eslint.config.* 会报 Could not find config file
"eslint.workingDirectories": [{ "mode": "auto" }], "eslint.workingDirectories": [{ "directory": ".", "changeProcessCWD": true }],
// 使用 flat config(ESLint v9+ 必需) // 使用 flat config(ESLint v9+ 必需)
"eslint.useFlatConfig": true, "eslint.useFlatConfig": true,
"eslint.useESLintClass": true, "eslint.useESLintClass": true,
......
/*
* @Author: cen
* @Date: 2026-03-16 15:09:35
* @Description:
* @FilePath: /venus-usedcar-h5/apps/web/venus-usedcar-quality/src/api/modules/user.ts
* @LastEditTime: 2026-03-24 17:21:07
* @LastEditors: cenchengwei@foreverht.com
* 可以输入预定的版权声明、个性签名、空行等
*/
import type { UserInfo } from "@stores/modules/user.ts"; import type { UserInfo } from "@stores/modules/user.ts";
import { get, post } from "@utils/request"; import { get, post } from "@utils/request";
...@@ -17,6 +26,7 @@ export interface InspectDetailAccount { ...@@ -17,6 +26,7 @@ export interface InspectDetailAccount {
id: number; id: number;
name: string; name: string;
phone: string; phone: string;
avatar?: string;
status: number; status: number;
region?: string; region?: string;
regionName?: string; regionName?: string;
......
...@@ -25,6 +25,7 @@ body { ...@@ -25,6 +25,7 @@ body {
} }
// ===== 最大宽度限制(超过 430px 居中显示,手机端正常自适应)===== // ===== 最大宽度限制(超过 430px 居中显示,手机端正常自适应)=====
// rem 根字号上限与 utils/flexible.ts 中 LAYOUT_MAX_WIDTH 保持一致
// #app 已加入 postcss-pxtorem selectorBlackList,px 不会被转 rem // #app 已加入 postcss-pxtorem selectorBlackList,px 不会被转 rem
#app { #app {
max-width: 430px; max-width: 430px;
......
...@@ -8,6 +8,7 @@ export {} ...@@ -8,6 +8,7 @@ export {}
declare module 'vue' { declare module 'vue' {
export interface GlobalComponents { export interface GlobalComponents {
ButtonSelect: typeof import('./components/CustomizeForm/buttonSelect.vue')['default'] ButtonSelect: typeof import('./components/CustomizeForm/buttonSelect.vue')['default']
CustomizeUploadFile: typeof import('./components/CustomizeForm/customizeUploadFile.vue')['default']
Index: typeof import('./components/CustomizeForm/Index.vue')['default'] Index: typeof import('./components/CustomizeForm/Index.vue')['default']
Layouts: typeof import('./layouts/index.vue')['default'] Layouts: typeof import('./layouts/index.vue')['default']
PageTitle: typeof import('./components/PageTitle.vue')['default'] PageTitle: typeof import('./components/PageTitle.vue')['default']
......
...@@ -30,8 +30,16 @@ const checkTag = computed(() => { ...@@ -30,8 +30,16 @@ const checkTag = computed(() => {
const auditTag = computed(() => { const auditTag = computed(() => {
if (props.auditStatus === undefined) return null; if (props.auditStatus === undefined) return null;
if (props.status !== 2 && props.status !== 3) return null; if (props.status !== 2 && props.status !== 3) return null;
if (props.auditStatus === 3) return { text: "审核通过", bg: "#e9f9f1", color: "#2cca74", icon: "passed" }; // auditStatus: 1待审批;2审批中;3审批通过;4审批驳回
if (props.auditStatus === 4) return { text: "审核失败", bg: "#fdeded", color: "#eb4e4e", icon: "close" }; if (props.auditStatus === 1 || props.auditStatus === 2) {
return { text: "待审核", bg: "#f0eefd", color: "#6A56F0", icon: "clock" as const };
}
if (props.auditStatus === 3) {
return { text: "审核通过", bg: "#e9f9f1", color: "#27CD5A", icon: "checked" as const };
}
if (props.auditStatus === 4) {
return { text: "审核失败", bg: "#fdeded", color: "#EE3140", icon: "warning" as const };
}
return null; return null;
}); });
</script> </script>
...@@ -46,7 +54,7 @@ const auditTag = computed(() => { ...@@ -46,7 +54,7 @@ const auditTag = computed(() => {
<van-tag v-if="auditTag" <van-tag v-if="auditTag"
class="wo-tag" class="wo-tag"
:style="{ background: auditTag.bg, color: auditTag.color }"> :style="{ background: auditTag.bg, color: auditTag.color }">
<van-icon class="wo-tag__icon" :name="auditTag.icon" /> <van-icon class="wo-tag__icon" :color="auditTag.color" :name="auditTag.icon" />
{{ auditTag.text }} {{ auditTag.text }}
</van-tag> </van-tag>
</div> </div>
......
...@@ -70,6 +70,15 @@ const routes: RouteRecordRaw[] = [ ...@@ -70,6 +70,15 @@ const routes: RouteRecordRaw[] = [
}, },
}, },
{ {
path: "/word-order-detail/:id",
name: "WorkOrderDetail",
component: () => import("@views/word-order-detail/index.vue"),
meta: {
title: "工单详情",
showTabBar: false,
},
},
{
path: "/:pathMatch(.*)*", path: "/:pathMatch(.*)*",
name: "NotFound", name: "NotFound",
component: () => import("@views/404/index.vue"), component: () => import("@views/404/index.vue"),
......
// 简易版 rem 适配: // 简易版 rem 适配:
// 以设计稿 375 宽为基准,希望设计稿下 html 字体为 14px。 // 以设计稿 375 宽为基准,希望设计稿下 html 字体为 14px。
// 不同屏幕下:html.fontSize = (当前宽度 / 375) * 14px。 // 不同屏幕下:html.fontSize = (有效宽度 / 375) * 14px。
// 有效宽度不超过 LAYOUT_MAX_WIDTH,与 reset.scss 中 #app 的 max-width 一致,避免 Pad 等大屏整屏算 rem 导致字体偏大。
const DESIGN_WIDTH = 375; const DESIGN_WIDTH = 375;
const BASE_FONT_SIZE = 14; // 设计稿宽度下的根字体大小 const BASE_FONT_SIZE = 14; // 设计稿宽度下的根字体大小
/** 与 #app max-width 保持一致,大屏 rem 按此宽度折算 */
const LAYOUT_MAX_WIDTH = 430;
function setRootFontSize() { function setRootFontSize() {
const docEl = document.documentElement; const docEl = document.documentElement;
const width = docEl.clientWidth || window.innerWidth; const width = docEl.clientWidth || window.innerWidth;
// 限制最大/最小宽度,防止在大屏或非常小的屏幕上过大/过小
const minWidth = 320; const minWidth = 320;
const maxWidth = 540; const effectiveWidth = Math.min(width, LAYOUT_MAX_WIDTH);
const clampedWidth = Math.min(Math.max(width, minWidth), maxWidth); const clampedWidth = Math.max(effectiveWidth, minWidth);
const fontSize = (clampedWidth / DESIGN_WIDTH) * BASE_FONT_SIZE; const fontSize = (clampedWidth / DESIGN_WIDTH) * BASE_FONT_SIZE;
docEl.style.fontSize = `${fontSize}px`; docEl.style.fontSize = `${fontSize}px`;
......
...@@ -164,6 +164,7 @@ import { showToast } from "vant"; ...@@ -164,6 +164,7 @@ import { showToast } from "vant";
import InspectSubModuleContent from "./components/InspectSubModuleContent.vue"; import InspectSubModuleContent from "./components/InspectSubModuleContent.vue";
import ScoreForm from "./components/ScoreForm.vue"; import ScoreForm from "./components/ScoreForm.vue";
import customizeForm from "@/components/customizeForm/Index.vue"; import customizeForm from "@/components/customizeForm/Index.vue";
// ===== 常量 ===== // ===== 常量 =====
...@@ -527,22 +528,22 @@ onMounted(() => { ...@@ -527,22 +528,22 @@ onMounted(() => {
.inspect-nav { .inspect-nav {
display: flex; display: flex;
align-items: center;
gap: $spacing-sm; gap: $spacing-sm;
align-items: center;
margin-bottom: 10px; margin-bottom: 10px;
.nav-back { .nav-back {
flex-shrink: 0; flex-shrink: 0;
cursor: pointer;
color: $color-text-primary; color: $color-text-primary;
cursor: pointer;
} }
.nav-module { .nav-module {
display: flex; display: flex;
flex: 1; flex: 1;
gap: 4px;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 4px;
cursor: pointer; cursor: pointer;
.nav-module-name { .nav-module-name {
...@@ -560,8 +561,8 @@ onMounted(() => { ...@@ -560,8 +561,8 @@ onMounted(() => {
.inspect-progress-bar { .inspect-progress-bar {
display: flex; display: flex;
align-items: center;
gap: 10px; gap: 10px;
align-items: center;
.progress-track { .progress-track {
flex: 1; flex: 1;
...@@ -598,8 +599,8 @@ onMounted(() => { ...@@ -598,8 +599,8 @@ onMounted(() => {
// ===== 内容区(高度跟随内容,超出最大高度才滚动) ===== // ===== 内容区(高度跟随内容,超出最大高度才滚动) =====
.inspect-body { .inspect-body {
display: flex; display: flex;
flex-direction: column;
flex: 1; flex: 1;
flex-direction: column;
min-height: 0; min-height: 0;
overflow-y: auto; overflow-y: auto;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
...@@ -621,8 +622,9 @@ onMounted(() => { ...@@ -621,8 +622,9 @@ onMounted(() => {
gap: 10px; gap: 10px;
padding: 10px $spacing-base; padding: 10px $spacing-base;
overflow-x: auto; overflow-x: auto;
border-radius: 12px 12px 0 0;
background: linear-gradient(180deg, #185efe1a 0%, #185efe00 100%); background: linear-gradient(180deg, #185efe1a 0%, #185efe00 100%);
border-radius: 12px 12px 0 0;
&::-webkit-scrollbar { &::-webkit-scrollbar {
display: none; display: none;
} }
...@@ -632,9 +634,9 @@ onMounted(() => { ...@@ -632,9 +634,9 @@ onMounted(() => {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
line-height: 1.4; line-height: 1.4;
color: #666;
white-space: nowrap; white-space: nowrap;
cursor: pointer; cursor: pointer;
color: #666;
background: #f9f9f9; background: #f9f9f9;
border: 1px solid rgb(255 255 255 / 80%); border: 1px solid rgb(255 255 255 / 80%);
border-radius: 6px; border-radius: 6px;
...@@ -650,8 +652,8 @@ onMounted(() => { ...@@ -650,8 +652,8 @@ onMounted(() => {
.subtab-done-icon { .subtab-done-icon {
margin-left: 4px; margin-left: 4px;
vertical-align: middle;
font-size: 14px; font-size: 14px;
vertical-align: middle;
} }
} }
} }
...@@ -665,10 +667,10 @@ onMounted(() => { ...@@ -665,10 +667,10 @@ onMounted(() => {
.loading-card { .loading-card {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: $spacing-md;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
min-height: 300px; min-height: 300px;
gap: $spacing-md;
.loading-text { .loading-text {
font-size: $font-size-base; font-size: $font-size-base;
...@@ -680,10 +682,10 @@ onMounted(() => { ...@@ -680,10 +682,10 @@ onMounted(() => {
.empty-card { .empty-card {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: $spacing-sm;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
min-height: 300px; min-height: 300px;
gap: $spacing-sm;
.empty-title { .empty-title {
font-size: $font-size-base; font-size: $font-size-base;
...@@ -694,8 +696,8 @@ onMounted(() => { ...@@ -694,8 +696,8 @@ onMounted(() => {
// ===== 底部固定区 ===== // ===== 底部固定区 =====
.inspect-footer { .inspect-footer {
flex-shrink: 0;
display: flex; display: flex;
flex-shrink: 0;
gap: $spacing-md; gap: $spacing-md;
align-items: center; align-items: center;
padding: 10px $spacing-base calc(10px + env(safe-area-inset-bottom)); padding: 10px $spacing-base calc(10px + env(safe-area-inset-bottom));
......
...@@ -35,6 +35,7 @@ interface WorkOrderItem { ...@@ -35,6 +35,7 @@ interface WorkOrderItem {
address: string; address: string;
dispatchTime: string; dispatchTime: string;
coverImage: string; coverImage: string;
auditContent?: string;
} }
const keyword = ref(""); const keyword = ref("");
...@@ -159,32 +160,28 @@ function onStatusChange(status: WorkOrderStatus) { ...@@ -159,32 +160,28 @@ function onStatusChange(status: WorkOrderStatus) {
function startCheck(item: WorkOrderItem) { function startCheck(item: WorkOrderItem) {
item.status = 2; item.status = 2;
showToast("已开始检测");
void router.push({ name: "CarDetail", params: { id: item.id } }); void router.push({ name: "CarDetail", params: { id: item.id } });
} }
function continueCheck(item: WorkOrderItem) { function continueCheck(item: WorkOrderItem) {
showToast("继续检测");
void router.push({ name: "CarDetail", params: { taskId: item.id } }); void router.push({ name: "CarDetail", params: { taskId: item.id } });
} }
function editCheck(item: WorkOrderItem) { function editCheck(item: WorkOrderItem) {
showToast("修改检测项");
void router.push({ name: "CarDetail", params: { id: item.id } }); void router.push({ name: "CarDetail", params: { id: item.id } });
} }
function viewWorkOrder(item: WorkOrderItem) { function viewWorkOrder(item: WorkOrderItem) :void{
showToast("查看工单");
void router.push({ name: "CarDetail", params: { id: item.id } }); router.push({ name: "WorkOrderDetail", params: { id: item.id } });
} }
function viewReport(_item: WorkOrderItem) { function viewReport(_item: WorkOrderItem) {
showToast("查看报告");
void router.push({ name: "CarList" }); void router.push({ name: "CarList" });
} }
function showRejectReason(_item: WorkOrderItem) { function showRejectReason(_item: WorkOrderItem) {
showToast(`驳回原因(示例):请补充图片与里程数`); showToast(_item.auditContent ?? "");
} }
function getCardActions(item: WorkOrderItem): CardAction[] { function getCardActions(item: WorkOrderItem): CardAction[] {
...@@ -230,18 +227,7 @@ function getCardActions(item: WorkOrderItem): CardAction[] { ...@@ -230,18 +227,7 @@ function getCardActions(item: WorkOrderItem): CardAction[] {
} }
if (item.status === 3) { if (item.status === 3) {
if (item.auditStatus === 3) { const actions: CardAction[] = [
return [
{
key: "viewReport",
label: "查看报告",
variant: "secondary",
onClick: () => viewReport(item),
},
];
}
// 待审批/审批中(或无值) => 查看工单(只读)
return [
{ {
key: "viewWorkOrder", key: "viewWorkOrder",
label: "查看工单", label: "查看工单",
...@@ -249,6 +235,16 @@ function getCardActions(item: WorkOrderItem): CardAction[] { ...@@ -249,6 +235,16 @@ function getCardActions(item: WorkOrderItem): CardAction[] {
onClick: () => viewWorkOrder(item), onClick: () => viewWorkOrder(item),
}, },
]; ];
// 审批通过时可额外查看报告
if (item.auditStatus === 3) {
actions.push({
key: "viewReport",
label: "查看报告",
variant: "secondary",
onClick: () => viewReport(item),
});
}
return actions;
} }
return []; return [];
...@@ -293,7 +289,8 @@ void onRefresh(); ...@@ -293,7 +289,8 @@ void onRefresh();
@load="onLoad"> @load="onLoad">
<div v-for="item in displayList" <div v-for="item in displayList"
:key="item.id" :key="item.id"
class="order-card card"> class="order-card card"
@click="viewWorkOrder(item)">
<div class="card-top"> <div class="card-top">
<div class="order-no"> <div class="order-no">
工单号 <span class="order-no-value">{{ item.orderNo }}</span> 工单号 <span class="order-no-value">{{ item.orderNo }}</span>
......
...@@ -14,18 +14,21 @@ const { ...@@ -14,18 +14,21 @@ const {
</script> </script>
<template> <template>
<div class="relative flex min-h-screen flex-col box-border bg-gradient-to-b from-[#f4f7ff] via-[#f7f9ff] to-white px-[32px] pb-6 mobile"> <div class="relative flex min-h-screen flex-col box-border bg-gradient-to-b from-[#f4f7ff] via-[#f7f9ff] to-white mobile">
<div class="pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_0_0,#e4f0ff_0,transparent_50%),radial-gradient(circle_at_100%_0,#e1e8ff_0,transparent_50%)]" /> <div class="pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_0_0,#e4f0ff_0,transparent_50%),radial-gradient(circle_at_100%_0,#e1e8ff_0,transparent_50%)]" />
<div class="relative flex flex-1 flex-col mt-[160px]"> <!-- 键盘弹起时随文档流滚动,避免 absolute 贴屏底被顶到输入区上方 -->
<div class="relative z-[1] flex flex-1 flex-col px-[32px] pb-[max(1.5rem,env(safe-area-inset-bottom,0px))]">
<div class="mt-[160px] shrink-0">
<div class="text-center text-[24px] font-semibold text-[#111]"> <div class="text-center text-[24px] font-semibold text-[#111]">
检测端登录 检测端登录
</div> </div>
<div class="mt-[6px] text-center text-[12px] text-[#999]"> <div class="mt-[6px] text-center text-[12px] text-[#999]">
专业的车辆检测工具 专业的车辆检测工具
</div> </div>
</div>
<div class="mt-8 space-y-4"> <div class="mt-8 shrink-0 space-y-4">
<van-field v-model="phone" <van-field v-model="phone"
class="rounded-full login-input" class="rounded-full login-input"
clearable clearable
...@@ -42,11 +45,11 @@ const { ...@@ -42,11 +45,11 @@ const {
placeholder="请输入验证码" placeholder="请输入验证码"
type="tel"> type="tel">
<template #button> <template #button>
<van-button class="p-0 text-[13px]" <van-button class="login-send-code-btn p-0 text-[13px] leading-[1.25]"
:class="countdown > 0 ? '!text-[#CCCCCC]' : '!text-[#185EFE]'" :class="countdown > 0 ? '!text-[#CCCCCC]' : '!text-[#185EFE]'"
:disabled="sending || countdown > 0" :disabled="sending || countdown > 0"
:loading="sending" :loading="sending"
size="small" plain
@click="handleSendCode"> @click="handleSendCode">
<span v-if="!hasSent">获取验证码</span> <span v-if="!hasSent">获取验证码</span>
<span v-else-if="countdown > 0">重新发送({{ countdown }}s)</span> <span v-else-if="countdown > 0">重新发送({{ countdown }}s)</span>
...@@ -56,14 +59,17 @@ const { ...@@ -56,14 +59,17 @@ const {
</van-field> </van-field>
<van-button block <van-button block
class="mt-6 !h-[52px] border-0 bg-gradient-to-r from-[#84a9ff] to-[#90b5ff] text-[16px] font-medium" class="mt-6 !h-[52px] border-0 !bg-[#185EFE] !text-[#ffffff] text-[16px] font-medium"
:disabled="!phone || !code"
round round
type="primary"
@click="handleLogin"> @click="handleLogin">
登录 登录
</van-button> </van-button>
</div>
<div aria-hidden="true" class="min-h-6 flex-1" />
<div class="absolute bottom-[70px] left-1/2 flex -translate-x-1/2 items-center justify-center text-[12px] text-[#999]"> <div class="flex shrink-0 justify-center pt-10 text-center text-[12px] text-[#999]">
<van-checkbox v-model="agreed" <van-checkbox v-model="agreed"
checked-color="#4f8cff" checked-color="#4f8cff"
icon-size="14px"> icon-size="14px">
...@@ -76,31 +82,52 @@ const { ...@@ -76,31 +82,52 @@ const {
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
.mobile { .mobile {
min-height: 100vh;
min-height: 100dvh;
background: url('@assets/image/bg.png') no-repeat center center; background: url('@assets/image/bg.png') no-repeat center center;
background-size: 100% 100%; background-size: 100% 100%;
} }
.login-input { .login-input {
box-sizing: border-box;
display: flex;
align-items: center;
min-height: 56px;
padding: 16px !important; padding: 16px !important;
background: #f2f4f7; background: #f2f4f7;
&:deep(.van-field__body) {
align-items: center;
}
&:deep(.van-field__button) {
display: flex;
align-items: center;
margin-left: 8px;
}
&:deep(.van-field__label) { &:deep(.van-field__label) {
font-size: 14px; font-size: 14px;
font-weight: 500; font-weight: 500;
color: #333; color: #333;
} }
&:deep(.van-button--default) { &:deep(.login-send-code-btn.van-button) {
padding: 0; height: auto !important;
font-size: 13px; min-height: 0 !important;
color: transparent; padding: 0 !important;
background: transparent; line-height: 1.25 !important;
border: none; border: none !important;
background: transparent !important;
}
&:deep(.login-send-code-btn.van-button--disabled) {
opacity: 1;
background: transparent !important;
} }
} }
</style> </style>
......
<script setup lang="ts"> <script setup lang="ts">
import { useDeviceLayout } from "@/composables/useDeviceLayout"; // Pad 与手机共用同一套 UI,由全局 #app max-width + margin 居中;避免 LoginPad 单独放大字号(如 text-[40px])
import LoginMobile from "./LoginMobile.vue"; import LoginMobile from "./LoginMobile.vue";
import LoginPad from "./LoginPad.vue";
const { isPad } = useDeviceLayout();
</script> </script>
<template> <template>
<LoginPad v-if="isPad" /> <LoginMobile />
<LoginMobile v-else />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { computed, onActivated, onMounted, ref, watch } from "vue"; import { computed, onActivated, onMounted, ref, watch } from "vue";
import type { InspectDetailAccount } from "@/api/modules/user";
import { getInspectDetail } from "@/api/modules/user"; import { getInspectDetail } from "@/api/modules/user";
import PageTop from "@/components/PageTop.vue"; import PageTop from "@/components/PageTop.vue";
import { useUserStore } from "@/stores"; import { useUserStore } from "@/stores";
...@@ -9,21 +10,39 @@ import { showToast } from "vant"; ...@@ -9,21 +10,39 @@ import { showToast } from "vant";
const userStore = useUserStore(); const userStore = useUserStore();
const avgInspectCost = ref<number>(0); const avgInspectCost = ref<number>(0);
const inspectAccount = ref<InspectDetailAccount | null>(null);
const avgInspectCostText = computed(() => `${avgInspectCost.value || 0}秒`); const avgInspectCostText = computed(() => `${avgInspectCost.value || 0}秒`);
const displayName = computed(() =>
userStore.isLoggedIn ? inspectAccount.value?.name || userStore.username : ""
);
const displayPhone = computed(() =>
userStore.isLoggedIn ? inspectAccount.value?.phone || userStore.userInfo?.phone || "" : ""
);
const displayAvatar = computed(() =>
userStore.isLoggedIn
? inspectAccount.value?.avatar || userStore.userInfo?.avatar || ""
: ""
);
async function fetchInspectDetail() { async function fetchInspectDetail() {
if (!userStore.isLoggedIn) { if (!userStore.isLoggedIn) {
avgInspectCost.value = 0; avgInspectCost.value = 0;
inspectAccount.value = null;
return; return;
} }
try { try {
const detail = await getInspectDetail(); const detail = await getInspectDetail();
inspectAccount.value = detail.account ?? null;
avgInspectCost.value = Number(detail.inspectorSimpleSummary?.avgInspectCost || 0); avgInspectCost.value = Number(detail.inspectorSimpleSummary?.avgInspectCost || 0);
} catch (error) { } catch (error) {
console.error("getInspectDetail error", error); console.error("getInspectDetail error", error);
avgInspectCost.value = 0; avgInspectCost.value = 0;
inspectAccount.value = null;
} }
} }
...@@ -34,6 +53,7 @@ function onLogin() { ...@@ -34,6 +53,7 @@ function onLogin() {
async function onLogout() { async function onLogout() {
userStore.logout(); userStore.logout();
avgInspectCost.value = 0; avgInspectCost.value = 0;
inspectAccount.value = null;
showToast("已退出登录"); showToast("已退出登录");
} }
...@@ -58,7 +78,7 @@ watch( ...@@ -58,7 +78,7 @@ watch(
fit="cover" fit="cover"
height="44" height="44"
round round
:src="userStore.userInfo?.avatar || ''" :src="displayAvatar"
width="44" width="44"
@click="!userStore.isLoggedIn && onLogin()"> @click="!userStore.isLoggedIn && onLogin()">
<template #error> <template #error>
...@@ -70,7 +90,7 @@ watch( ...@@ -70,7 +90,7 @@ watch(
<div class="user-text"> <div class="user-text">
<div v-if="userStore.isLoggedIn" class="name"> <div v-if="userStore.isLoggedIn" class="name">
{{ userStore.username }} {{ displayName }}
</div> </div>
<div v-else <div v-else
class="name" class="name"
...@@ -78,7 +98,7 @@ watch( ...@@ -78,7 +98,7 @@ watch(
点击登录 点击登录
</div> </div>
<div class="phone"> <div class="phone">
{{ userStore.isLoggedIn ? userStore.userInfo?.phone : "" }} {{ displayPhone }}
</div> </div>
</div> </div>
</div> </div>
......
...@@ -5,12 +5,8 @@ ...@@ -5,12 +5,8 @@
"path": "apps/uniappX/uniapp-x-shop", "path": "apps/uniappX/uniapp-x-shop",
}, },
{ {
"name": "cool-unix", "name": "uniapp-x-tape",
"path": "apps/uniappX/uniapp-x-shop/uni_modules/cool-unix", "path": "apps/uniappX/uniapp-x-tape",
},
{
"name": "cool-unix-demo",
"path": "apps/uniappX/uniapp-x-shop/uni_modules/cool-unix/配置文件",
}, },
{ {
"name": "@venus/venus-agentic-assisant", "name": "@venus/venus-agentic-assisant",
...@@ -21,8 +17,8 @@ ...@@ -21,8 +17,8 @@
"path": "apps/web/venus-agentic/venus-agentic-base", "path": "apps/web/venus-agentic/venus-agentic-base",
}, },
{ {
"name": "@venus/car-life-system", "name": "venus-usedcar-h5",
"path": "apps/web/vue2/dj-car-life-system", "path": "apps/web/venus-usedcar-quality",
}, },
{ {
"name": "@venus/docs", "name": "@venus/docs",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!