This commit is contained in:
Zy
2026-05-21 11:06:03 +08:00
parent af98d07d7d
commit 5909be9a15
4 changed files with 255 additions and 212 deletions

View File

@@ -46,15 +46,17 @@ const avatar = ref('')
const statusBarHeight = ref(uni.getSystemInfoSync().statusBarHeight || 0)
const fetchUserInfo = () => {
getSettingInfo().then(res => {
if (res.code === 200 && res.data) {
loginName.value = res.data.nickName || ''
phoneNum.value = res.data.phonenumber || ''
avatar.value = res.data.avatar || ''
}
}).catch(err => {
uni.showToast({ title: err.msg || '获取失败', icon: 'none' })
})
getSettingInfo()
.then(res => {
if (res.code === 200 && res.data) {
loginName.value = res.data.nickName || ''
phoneNum.value = res.data.phonenumber || ''
avatar.value = res.data.avatar || ''
}
})
.catch(err => {
uni.showToast({ title: err.msg || '获取失败', icon: 'none' })
})
}
onShow(() => {
@@ -63,10 +65,10 @@ onShow(() => {
const onItemClick = item => {
const routes = {
'上报记录': '/pageSubPack/report-record/report-record',
'巡检记录': '/pageSubPack/inspection/inspection_record',
'仪表换新': '/pageSubPack/instrument/replacement_record',
'设置': '/pageSubPack/setting/setting'
上报记录: '/pageSubPack/report-record/report-record',
巡检记录: '/pageSubPack/inspection/inspection_record',
仪表换新: '/pageSubPack/instrument/replacement_record',
设置: '/pageSubPack/setting/setting'
}
const url = routes[item.title]
if (!url) return