feat: 新增需求
This commit is contained in:
@@ -4,8 +4,8 @@
|
||||
<view class="u-m-r-10">
|
||||
<u-avatar size="127" @click='chooseAvatar' :src='avatarSrc'></u-avatar>
|
||||
</view>
|
||||
<view class="u-flex-1 f-right" @click="personalPage('/pages/my/personalData/index')">
|
||||
<view class="u-font-36 u-m-l-16">{{baseInfo.realName}}</view>
|
||||
<view class="u-flex-1 f-right" @click="personalPage('/pages/my/personalData/index','个人中心')">
|
||||
<view class="u-font-36 u-m-l-16">{{baseInfo.nickname}}</view>
|
||||
<view class="u-m-l-10 u-p-10">
|
||||
<u-icon name="arrow-right" color="#969799" size="28"></u-icon>
|
||||
</view>
|
||||
@@ -15,7 +15,7 @@
|
||||
<view class="my-group-box-inner">
|
||||
<u-cell-group :border="false" class="cell-group">
|
||||
<view v-for="(item, idx) in group.items" :key="idx">
|
||||
<u-cell-item :title="$t(item.title)" @click="openPage(item.page, item.param)"
|
||||
<u-cell-item :title="$t(item.title)" @click="personalPage(item.page,item.name)"
|
||||
:title-style="titleStyle" :border-bottom="item.borderBottom"
|
||||
v-if="item.title!='app.my.scanCode'">
|
||||
<template #icon>
|
||||
@@ -46,7 +46,8 @@
|
||||
import {
|
||||
UpdateAvatar,
|
||||
UserSettingInfo,
|
||||
setMajor
|
||||
setMajor,
|
||||
getUserProfile,
|
||||
} from '@/api/common'
|
||||
import chat from '@/libs/chat.js'
|
||||
import {
|
||||
@@ -67,61 +68,63 @@
|
||||
avatarSrc: '',
|
||||
baseInfo: {},
|
||||
loading: false,
|
||||
cellGroups: [{
|
||||
items: [{
|
||||
title: 'app.my.organization',
|
||||
page: '/pages/my/organization/index',
|
||||
param: 'position',
|
||||
icon: 'icon-ym-zuzhi',
|
||||
color: '#6071F5',
|
||||
borderBottom: true
|
||||
},
|
||||
{
|
||||
title: 'app.my.switchIdentity',
|
||||
page: '/pages/my/identity/index',
|
||||
param: 'standing',
|
||||
icon: 'icon-ym-position1',
|
||||
color: '#F4A02F',
|
||||
borderBottom: true
|
||||
},
|
||||
{
|
||||
title: 'app.my.changeSystem',
|
||||
page: '/pages/my/changeSystem/index',
|
||||
icon: 'icon-ym-header-sys-toggle',
|
||||
color: '#3686F2',
|
||||
borderBottom: false
|
||||
},
|
||||
],
|
||||
},
|
||||
cellGroups: [
|
||||
// {
|
||||
// items: [{
|
||||
// title: 'app.my.organization',
|
||||
// page: '/pages/my/organization/index',
|
||||
// param: 'position',
|
||||
// icon: 'icon-ym-zuzhi',
|
||||
// color: '#6071F5',
|
||||
// borderBottom: true
|
||||
// },
|
||||
// {
|
||||
// title: 'app.my.switchIdentity',
|
||||
// page: '/pages/my/identity/index',
|
||||
// param: 'standing',
|
||||
// icon: 'icon-ym-position1',
|
||||
// color: '#F4A02F',
|
||||
// borderBottom: true
|
||||
// },
|
||||
// {
|
||||
// title: 'app.my.changeSystem',
|
||||
// page: '/pages/my/changeSystem/index',
|
||||
// icon: 'icon-ym-header-sys-toggle',
|
||||
// color: '#3686F2',
|
||||
// borderBottom: false
|
||||
// },
|
||||
// ],
|
||||
// },
|
||||
{
|
||||
items: [{
|
||||
title: 'app.my.personalSetting',
|
||||
page: '/pages/my/personalSetting/index',
|
||||
page: '/pages/my/personalData/index',
|
||||
icon: 'icon-ym-shezhi',
|
||||
color: '#F46E1B',
|
||||
name: '个人设置',
|
||||
borderBottom: true
|
||||
},
|
||||
{
|
||||
title: 'app.my.accountSecurity',
|
||||
page: '/pages/my/accountSecurity/index',
|
||||
icon: 'icon-ym-secure',
|
||||
color: '#26C6A1',
|
||||
borderBottom: true
|
||||
},
|
||||
{
|
||||
title: 'app.my.contacts',
|
||||
page: '/pages/my/contacts/index',
|
||||
icon: 'icon-ym-contacts',
|
||||
color: '#6071F5',
|
||||
borderBottom: true
|
||||
},
|
||||
{
|
||||
title: 'app.my.chat',
|
||||
page: '/pages/message/chat/index',
|
||||
icon: 'icon-ym-chat',
|
||||
color: '#4CBF2A',
|
||||
borderBottom: false
|
||||
},
|
||||
// {
|
||||
// title: 'app.my.accountSecurity',
|
||||
// page: '/pages/my/accountSecurity/index',
|
||||
// icon: 'icon-ym-secure',
|
||||
// color: '#26C6A1',
|
||||
// borderBottom: true
|
||||
// },
|
||||
// {
|
||||
// title: 'app.my.contacts',
|
||||
// page: '/pages/my/contacts/index',
|
||||
// icon: 'icon-ym-contacts',
|
||||
// color: '#6071F5',
|
||||
// borderBottom: true
|
||||
// },
|
||||
// {
|
||||
// title: 'app.my.chat',
|
||||
// page: '/pages/message/chat/index',
|
||||
// icon: 'icon-ym-chat',
|
||||
// color: '#4CBF2A',
|
||||
// borderBottom: false
|
||||
// },
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -161,7 +164,7 @@
|
||||
},
|
||||
onLoad() {
|
||||
const chatStore = useChatStore()
|
||||
if (!chatStore.getSocket) chat.initSocket()
|
||||
// if (!chatStore.getSocket) chat.initSocket()
|
||||
},
|
||||
onShow() {
|
||||
// UserSettingInfo().then(res => {
|
||||
@@ -169,76 +172,12 @@
|
||||
// this.avatarSrc = this.baseURL2 + this.baseInfo.avatar
|
||||
// this.loading = true
|
||||
// })
|
||||
this.baseInfo = {
|
||||
"id": "777911634713641349",
|
||||
"account": "chenl",
|
||||
"realName": "默认",
|
||||
"organize": "引迈信息技术有限公司/总裁办",
|
||||
"company": null,
|
||||
"position": "总裁",
|
||||
"manager": null,
|
||||
"roleId": "",
|
||||
"creatorTime": 1767604989000,
|
||||
"prevLogTime": 1768896697000,
|
||||
"signature": null,
|
||||
"gender": "1",
|
||||
"nation": null,
|
||||
"nativePlace": null,
|
||||
"entryDate": null,
|
||||
"certificatesType": null,
|
||||
"certificatesNumber": null,
|
||||
"education": null,
|
||||
"birthday": null,
|
||||
"telePhone": null,
|
||||
"landline": null,
|
||||
"mobilePhone": null,
|
||||
"email": null,
|
||||
"urgentContacts": null,
|
||||
"urgentTelePhone": null,
|
||||
"postalAddress": null,
|
||||
"avatar": "/api/file/Image/userAvatar/001.png",
|
||||
"theme": "W-001",
|
||||
"language": "zh-CN",
|
||||
"ranks": null,
|
||||
"isTenant": false,
|
||||
"currentTenantInfo": null,
|
||||
"preferenceJson": null,
|
||||
"propertyJson": null,
|
||||
"pcOnlineModelList": [],
|
||||
"appOnlineModelList": [
|
||||
{
|
||||
"userId": "777911634713641349",
|
||||
"userAccount": null,
|
||||
"userName": "陈力/chenl",
|
||||
"loginTime": "2026-01-20 16:11",
|
||||
"loginIPAddress": "61.183.89.14",
|
||||
"loginSystem": "iPhone 18_5",
|
||||
"tenantId": "",
|
||||
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiI3Nzc5MTE2MzQ3MTM2NDEzNDkiLCJyblN0ciI6IkdWczEzRTRBNWRkQU4zMEVIanM3d0JXOFlSQ1h5ZUs5IiwidXNlcl9pZCI6Ijc3NzkxMTYzNDcxMzY0MTM0OSIsInVzZXJfbmFtZSI6ImNoZW5sIiwic2luZ2xlTG9naW4iOjIsImV4cCI6MTc2ODk1MDY5NjYyNywidG9rZW4iOiJsb2dpbl90b2tlbl83ODMzMjk0NTA3OTUyMDQ2NzcifQ.85PXC7GbqgLEuoEcmgeuBBXyFCfgLJX-mq8_5a-cr8Y",
|
||||
"device": "APP",
|
||||
"organize": null,
|
||||
"loginBrowser": "Safari 18.5",
|
||||
"loginAddress": "湖北省武汉市 电信",
|
||||
"isCurrent": true
|
||||
},
|
||||
{
|
||||
"userId": "777911634713641349",
|
||||
"userAccount": null,
|
||||
"userName": "陈力/chenl",
|
||||
"loginTime": "2026-01-20 09:59",
|
||||
"loginIPAddress": "61.183.89.14",
|
||||
"loginSystem": "iPhone 18_5",
|
||||
"tenantId": "",
|
||||
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJsb2dpblR5cGUiOiJsb2dpbiIsImxvZ2luSWQiOiI3Nzc5MTE2MzQ3MTM2NDEzNDkiLCJyblN0ciI6Ik0yVDI5T2o3cEd0bTZiZkN1aXBYUklrR3BUaTZrT0FxIiwidXNlcl9pZCI6Ijc3NzkxMTYzNDcxMzY0MTM0OSIsInVzZXJfbmFtZSI6ImNoZW5sIiwic2luZ2xlTG9naW4iOjIsImV4cCI6MTc2ODkyODM5NDcyNywidG9rZW4iOiJsb2dpbl90b2tlbl83ODMyMzU5MDk4NDY4MjcwNzcifQ.wRKZT-ZEYc4Tao8k7LI9OPlPvnBhLFrzWdQsAljQIRA",
|
||||
"device": "APP",
|
||||
"organize": null,
|
||||
"loginBrowser": "Safari 18.5",
|
||||
"loginAddress": "湖北省武汉市 电信",
|
||||
"isCurrent": false
|
||||
}
|
||||
]
|
||||
}
|
||||
this.loading = true
|
||||
getUserProfile().then(res=>{
|
||||
if(res.code == 0) {
|
||||
this.baseInfo = res.data || {}
|
||||
}
|
||||
this.loading = true
|
||||
})
|
||||
uni.setNavigationBarTitle({
|
||||
title: "我的"
|
||||
})
|
||||
@@ -286,19 +225,17 @@ this.loading = true
|
||||
url: url
|
||||
})
|
||||
},
|
||||
personalPage(path) {
|
||||
personalPage(path,name) {
|
||||
if (!path) return;
|
||||
const neededFields = [
|
||||
'realName', 'nation', 'gender', 'nativePlace', 'certificatesType',
|
||||
'certificatesNumber', 'education', 'birthday', 'telePhone', 'landline',
|
||||
'urgentContacts', 'urgentTelePhone', 'postalAddress', 'signature'
|
||||
];
|
||||
const baseInfo = neededFields.reduce((obj, key) => {
|
||||
if (this.baseInfo[key] !== undefined) {
|
||||
obj[key] = this.baseInfo[key];
|
||||
}
|
||||
return obj;
|
||||
}, {});
|
||||
const baseInfo = {
|
||||
...this.baseInfo,
|
||||
title:name,
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: `${path}?baseInfo=${JSON.stringify(baseInfo)}`
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user