diff --git a/lang/zh-Hans.js b/lang/zh-Hans.js index 9fe289e..25e3c27 100644 --- a/lang/zh-Hans.js +++ b/lang/zh-Hans.js @@ -53,13 +53,13 @@ export default { }, mine:{ showText: "文字", - signIn: "普通签到", + signIn: "接待", signInByAd:"看广告签到", toEvaluate: "去评分", - readArticles: "阅读过的文章", - myScore: "我的积分", + readArticles: "客户", + myScore: "团队", invite: "分销推荐", - feedback: "问题与反馈", + feedback: "销冠", settings: "设置", checkUpdate: "检查更新", about: "关于", diff --git a/pages/reception/reception.vue b/pages/reception/reception.vue index 22f436d..bc8d238 100644 --- a/pages/reception/reception.vue +++ b/pages/reception/reception.vue @@ -632,7 +632,6 @@ import { getApiUrl } from "@/common/config.js"; }, buildServiceStatusItem(record = {}) { if (!record || typeof record !== 'object') { - console.warn('[buildServiceStatusItem] 记录数据无效:', record); return null; } @@ -648,7 +647,7 @@ import { getApiUrl } from "@/common/config.js"; tags.push({ text: `项目:${record.projectName}`, color: 'blue' }); } - const item = { + return { id: record.id || '', staffName: record.salesName || '未分配销售', status: record.syncStatus || '服务中', @@ -657,9 +656,6 @@ import { getApiUrl } from "@/common/config.js"; tags, durationText: formattedUpdateTime ? `最近更新时间:${formattedUpdateTime}` : '最近暂无更新时间' }; - - console.log('[buildServiceStatusItem] 构建的列表项:', item); - return item; }, formatDateTime(value) { if (!value) { diff --git a/pages/ucenter/ucenter.vue b/pages/ucenter/ucenter.vue index e7709f7..5f25ec4 100644 --- a/pages/ucenter/ucenter.vue +++ b/pages/ucenter/ucenter.vue @@ -13,6 +13,25 @@ {{$t('mine.notLogged')}} + + + + 租户ID: + {{tenantId || '未设置'}} + + + 用户名: + {{loginUserInfo.userName || '未设置'}} + + + 手机号: + {{loginUserInfo.phone}} + + + 邮箱: + {{loginUserInfo.email}} + + @@ -59,6 +78,8 @@ // #endif data() { return { + tenantId: '', + loginUserInfo: {}, gridList: [{ "text": this.$t('mine.showText'), "icon": "chat" @@ -87,7 +108,7 @@ // #endif { "title": this.$t('mine.signIn'), - "event": 'signIn', + "to": '/pages/reception/reception', "icon": "compose" }, // #ifdef APP-PLUS @@ -99,13 +120,12 @@ //#endif { "title":this.$t('mine.readArticles'), - "to": '/pages/ucenter/read-news-log/read-news-log', + "to": '/pages/customer/customer', "icon": "flag" }, { "title": this.$t('mine.myScore'), - "to": '', - "event": 'getScore', + "to": '/pages/team/team', "icon": "paperplane" } // #ifdef APP @@ -118,7 +138,7 @@ ], [{ "title": this.$t('mine.feedback'), - "to": '/uni_modules/uni-feedback/pages/opendb-feedback/opendb-feedback', + "to": '/pages/champion/champion', "icon": "help" }, { "title": this.$t('mine.settings'), @@ -146,6 +166,8 @@ } }, onLoad() { + // 加载用户信息 + this.loadUserInfo() //#ifdef APP-PLUS this.ucenterList[this.ucenterList.length - 2].unshift({ title:this.$t('mine.checkUpdate'),// this.this.$t('mine.checkUpdate')"检查更新" @@ -156,7 +178,10 @@ }) //#endif }, - onShow() {}, + onShow() { + // 每次显示页面时更新租户信息和登录人信息 + this.loadUserInfo() + }, computed: { userInfo() { return store.userInfo @@ -174,6 +199,26 @@ } }, methods: { + /** + * 加载用户信息(租户ID和登录人信息) + */ + loadUserInfo() { + try { + // 获取租户ID + this.tenantId = uni.getStorageSync('backend-tenant-id') || '' + + // 获取登录人信息 + const loginResponse = uni.getStorageSync('backend-login-response') || {} + this.loginUserInfo = { + userName: loginResponse.userName || '', + phone: loginResponse.phone || '', + email: loginResponse.email || '', + userId: loginResponse.userId || '' + } + } catch (e) { + console.error('加载用户信息失败:', e) + } + }, toSettings() { uni.navigateTo({ url: "/pages/ucenter/settings/settings" @@ -191,6 +236,19 @@ ucenterListClick(item) { if (!item.to && item.event) { this[item.event](); + } else if (item.to) { + // 如果是 tabBar 页面,使用 switchTab + const tabBarPages = ['/pages/reception/reception', '/pages/customer/customer', '/pages/team/team', '/pages/champion/champion'] + if (tabBarPages.includes(item.to)) { + uni.switchTab({ + url: item.to + }) + } else { + // 其他页面使用 navigateTo(uni-list-item 会自动处理,但这里显式处理以确保正确) + uni.navigateTo({ + url: item.to + }) + } } }, async checkVersion() { @@ -407,6 +465,39 @@ height: 40rpx; } + .user-info-panel { + background-color: #FFFFFF; + margin: 20rpx 30rpx; + padding: 30rpx; + border-radius: 12rpx; + box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1); + } + + .info-row { + display: flex; + flex-direction: row; + align-items: center; + margin-bottom: 20rpx; + } + + .info-row:last-child { + margin-bottom: 0; + } + + .info-label { + font-size: 28rpx; + color: #666666; + width: 140rpx; + flex-shrink: 0; + } + + .info-value { + font-size: 28rpx; + color: #333333; + flex: 1; + word-break: break-all; + } + .grid { background-color: #FFFFFF; margin-bottom: 6px;