Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4cbf100b
authored
Mar 24, 2026
by
chenwq1
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 冲突处理
1 parent
d03e2e6e
Pipeline
#84
for
4cbf100b
failed
in 0 seconds
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
129 additions
and
70 deletions
.vscode/settings.json
apps/web/venus-usedcar-quality/src/api/modules/user.ts
apps/web/venus-usedcar-quality/src/assets/styles/reset.scss
apps/web/venus-usedcar-quality/src/components/WorkOrderStatusTags.vue
apps/web/venus-usedcar-quality/src/utils/flexible.ts
apps/web/venus-usedcar-quality/src/views/home/index.vue
apps/web/venus-usedcar-quality/src/views/login/LoginMobile.vue
apps/web/venus-usedcar-quality/src/views/login/index.vue
apps/web/venus-usedcar-quality/src/views/mine/index.vue
.vscode/settings.json
View file @
4cbf100
{
{
"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
v
9
+
必需)
//
使用
flat
config(ESLint
v
9
+
必需)
"eslint.useFlatConfig"
:
true
,
"eslint.useFlatConfig"
:
true
,
"eslint.useESLintClass"
:
true
,
"eslint.useESLintClass"
:
true
,
...
...
apps/web/venus-usedcar-quality/src/api/modules/user.ts
View file @
4cbf100
/*
* @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"
;
export
interface
LoginParams
{
export
interface
LoginParams
{
phone
:
string
;
phone
:
string
;
verifyCode
:
string
;
verifyCode
:
string
;
}
}
...
@@ -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
;
...
...
apps/web/venus-usedcar-quality/src/assets/styles/reset.scss
View file @
4cbf100
...
@@ -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
;
...
...
apps/web/venus-usedcar-quality/src/components/WorkOrderStatusTags.vue
View file @
4cbf100
...
@@ -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>
...
...
apps/web/venus-usedcar-quality/src/utils/flexible.ts
View file @
4cbf100
// 简易版 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
.
m
in
(
Math
.
max
(
width
,
minWidth
),
max
Width
);
const
clampedWidth
=
Math
.
m
ax
(
effectiveWidth
,
min
Width
);
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`
;
...
...
apps/web/venus-usedcar-quality/src/views/home/index.vue
View file @
4cbf100
...
@@ -28,13 +28,14 @@ interface WorkOrderItem {
...
@@ -28,13 +28,14 @@ interface WorkOrderItem {
id
:
string
;
id
:
string
;
status
:
WorkOrderStatus
;
status
:
WorkOrderStatus
;
auditStatus
?:
AuditStatus
;
auditStatus
?:
AuditStatus
;
orderNo
:
string
;
orderNo
:
string
;
carTitle
:
string
;
carTitle
:
string
;
plateNo
:
string
;
plateNo
:
string
;
vin
:
string
;
vin
:
string
;
address
:
string
;
address
:
string
;
dispatchTime
:
string
;
dispatchTime
:
string
;
coverImage
:
string
;
coverImage
:
string
;
auditContent
?:
string
;
}
}
const
keyword
=
ref
(
""
);
const
keyword
=
ref
(
""
);
...
@@ -159,17 +160,14 @@ function onStatusChange(status: WorkOrderStatus) {
...
@@ -159,17 +160,14 @@ 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
}
});
}
}
...
@@ -179,12 +177,11 @@ function viewWorkOrder(item: WorkOrderItem) :void{
...
@@ -179,12 +177,11 @@ function viewWorkOrder(item: WorkOrderItem) :void{
}
}
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
[];
...
...
apps/web/venus-usedcar-quality/src/views/login/LoginMobile.vue
View file @
4cbf100
...
@@ -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=
"text-center text-[24px] font-semibold text-[#111]"
>
<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>
<div
class=
"text-center text-[24px] font-semibold text-[#111]"
>
<div
class=
"mt-[6px] text-center text-[12px] text-[#999]"
>
检测端登录
专业的车辆检测工具
</div>
<div
class=
"mt-[6px] text-center text-[12px] text-[#999]"
>
专业的车辆检测工具
</div>
</div>
</div>
<div
class=
"mt-8 space-y-4"
>
<div
class=
"mt-8 s
hrink-0 s
pace-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,24 +59,26 @@ const {
...
@@ -56,24 +59,26 @@ 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
class=
"absolute bottom-[70px] left-1/2 flex -translate-x-1/2 items-center justify-center text-[12px] text-[#999]"
>
<div
aria-hidden=
"true"
class=
"min-h-6 flex-1"
/>
<van-checkbox
v-model=
"agreed"
checked-color=
"#4f8cff"
<div
class=
"flex shrink-0 justify-center pt-10 text-center text-[12px] text-[#999]"
>
icon-size=
"14px"
>
<van-checkbox
v-model=
"agreed"
<span
class=
"whitespace-nowrap"
>
checked-color=
"#4f8cff"
我已阅读并同意
icon-size=
"14px"
>
<a
class=
"mx-0.5 text-[#4f8cff] no-underline"
href=
"javascript:;"
>
《用户协议》
</a>
<span
class=
"whitespace-nowrap"
>
<a
class=
"mx-0.5 text-[#4f8cff] no-underline"
href=
"javascript:;"
>
《隐私协议》
</a>
我已阅读并同意
</span>
<a
class=
"mx-0.5 text-[#4f8cff] no-underline"
href=
"javascript:;"
>
《用户协议》
</a>
</van-checkbox>
<a
class=
"mx-0.5 text-[#4f8cff] no-underline"
href=
"javascript:;"
>
《隐私协议》
</a>
</div>
</span>
</van-checkbox>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -81,26 +86,48 @@ const {
...
@@ -81,26 +86,48 @@ const {
<
style
scoped
lang=
"scss"
>
<
style
scoped
lang=
"scss"
>
.mobile
{
.mobile
{
min-height
:
100vh
;
min-height
:
100
dvh
;
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
>
...
...
apps/web/venus-usedcar-quality/src/views/login/index.vue
View file @
4cbf100
<
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
>
apps/web/venus-usedcar-quality/src/views/mine/index.vue
View file @
4cbf100
<
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.usern
ame }}
{{
displayN
ame }}
</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>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment