hejianhao
2026-08-20 9bd85759e9abcaab08d15d8db98db92cdc99f6b1
feat0806: 直播统计跳转代理中心
1个文件已修改
30 ■■■■■ 已修改文件
traditionalApp/pages/mine/mine.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
traditionalApp/pages/mine/mine.vue
@@ -55,7 +55,6 @@
import { onLoad, onShow } from '@dcloudio/uni-app'
import { getNoticeList } from '../notice/service'
import { getUserCenter } from './service'
import { createLiveRoomEntry } from '../home/service'
import { getRuntimeVersionName } from '@/utils/app-version.js'
import { hasStoredSession } from '@/utils/auth-session.js'
import manifestConfig from '../../manifest.json'
@@ -96,7 +95,6 @@
    url: string
    iconClass?: string
    requiresLogin?: boolean
    dynamicVzan?: boolean
}
interface NoticeSummaryItem {
@@ -154,7 +152,7 @@
    ]
})
const WEIZAN_LIVE_STATS_URL = 'https://www.vzan.com'
const WEIZAN_LIVE_STATS_URL = 'https://wzzhibo.haizhentong.com/live/m/agent/index?zbid=1247381477&v=1787212616638'
const WEIZAN_LIVE_ORDER_URL = 'https://wzzhibo.haizhentong.com/live/m/order/myorder?zbid=1247381477&tpid=0&state=0&v=1787212292181'
const bottomMenuList = computed<MenuItem[]>(() => {
@@ -165,7 +163,7 @@
    ]
    const liveOrderItem = { title: '直播订单', icon: '/static/image/mine/dingdan.png', url: buildWebviewUrl(WEIZAN_LIVE_ORDER_URL, '直播订单'), iconClass: 'icon-live-order', requiresLogin: true }
    const liveStatsList = Number(userCenter.value.type) === 1
        ? [{ title: '直播统计', icon: '/static/image/mine/list.png', url: '', iconClass: 'icon-live-stats', requiresLogin: true, dynamicVzan: true }]
        ? [{ title: '直播统计', icon: '/static/image/mine/list.png', url: buildWebviewUrl(WEIZAN_LIVE_STATS_URL, '直播统计'), iconClass: 'icon-live-stats', requiresLogin: true }]
        : []
    const agreementList = [
        { title: '用户协议', icon: '/static/image/mine/coustom.png', url: '/pages/protocol/protocol?type=user', iconClass: 'icon-user-agree' },
@@ -388,29 +386,7 @@
/**
 * 统一跳转个人中心相关页面。
 */
async function goPage(target: string | MenuItem) {
    if (typeof target !== 'string' && target.dynamicVzan) {
        try {
            uni.showLoading({ title: '正在进入', mask: true })
            const userId = userCenter.value.id
            if (!userId) {
                uni.showToast({ title: '请先登录', icon: 'none' })
                return
            }
            const response = await createLiveRoomEntry(userId)
            const targetUrl = response?.code === 0 ? response.data?.url : ''
            if (!targetUrl) {
                uni.showToast({ title: response?.msg || '获取跳转地址失败', icon: 'none' })
                return
            }
            uni.navigateTo({ url: buildWebviewUrl(targetUrl, target.title) })
        } catch {
            uni.showToast({ title: '获取跳转地址失败', icon: 'none' })
        } finally {
            uni.hideLoading()
        }
        return
    }
function goPage(target: string | MenuItem) {
    const url = typeof target === 'string' ? target : target.url
    if (!url) {
        return