需要修改BUG

This commit is contained in:
cbb
2026-01-15 17:57:32 +08:00
parent cfdc2ea7b0
commit d2ba0df2b5
4 changed files with 70 additions and 20 deletions

View File

@@ -1,6 +1,12 @@
{ {
"pages": [ "pages": [
//pages数组中第一项表示应用启动页参考https://uniapp.dcloud.io/collocation/pages //pages数组中第一项表示应用启动页参考https://uniapp.dcloud.io/collocation/pages
{
"path": "TUIKit/components/TUIConversation/index",
"style": {
"navigationStyle": "custom"
}
},
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
@@ -14,12 +20,6 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "TUIKit/components/TUIConversation/index",
"style": {
"navigationStyle": "custom"
}
},
{ {
"path": "TUIKit/components/TUIChat/index", "path": "TUIKit/components/TUIChat/index",
"style": { "style": {

View File

@@ -37,6 +37,48 @@
id: '10', id: '10',
state: '-', state: '-',
color: '#e74c3c' color: '#e74c3c'
},
{
name: '发红包支出',
id: '11',
state: '-',
color: '#e74c3c'
},
{
name: '抢红包收入',
id: '12',
state: '+',
color: '#2ecc71'
},
{
name: '红包退回收入',
id: '13',
state: '+',
color: '#2ecc71'
},
{
name: '直播活动冻结',
id: '14',
state: '-',
color: '#f39c12'
},
{
name: '直播活动成功扣除',
id: '15',
state: '-',
color: '#e74c3c'
},
{
name: '直播活动冻结退回',
id: '16',
state: '+',
color: '#2ecc71'
},
{
name: '参与直播活动',
id: '17',
state: '-',
color: '#e74c3c'
} }
] ]
: [ : [

View File

@@ -101,8 +101,6 @@ export const useUserStore = defineStore('user', () => {
const clearUserInfo = async () => { const clearUserInfo = async () => {
const show = await showDialog('提示', '确定要退出登录吗?') const show = await showDialog('提示', '确定要退出登录吗?')
if (show) { if (show) {
showToast('退出登录成功', 'success')
await userLogout()
await logout() await logout()
} }
} }
@@ -111,18 +109,28 @@ export const useUserStore = defineStore('user', () => {
* 退出登录(不带提示) * 退出登录(不带提示)
*/ */
const logout = async () => { const logout = async () => {
try {
userInfo.value = null userInfo.value = null
clearToken() await userLogout()
removeUserInfoData() await TUILogin.logout()
removeSig()
removeFontSize()
await TUILogin.logout().then(() => {
reLaunch('/pages/login/login')
})
await TUIChatEngine.logout() await TUIChatEngine.logout()
// #ifdef APP-PLUS // #ifdef APP-PLUS
await useLoginState().logout() await useLoginState().logout()
// #endif // #endif
clearToken()
removeUserInfoData()
removeSig()
removeFontSize()
await showToast('退出登录成功', 'success')
reLaunch('/pages/login/login')
} catch (error) {
clearToken()
removeUserInfoData()
removeSig()
removeFontSize()
await showToast('退出登录成功', 'success')
reLaunch('/pages/login/login')
}
} }
/** 刷新用户信息(如用户信息被修改) */ /** 刷新用户信息(如用户信息被修改) */
const refreshUserInfo = async () => { const refreshUserInfo = async () => {

View File

@@ -107,7 +107,7 @@ const handleError = (statusCode, data) => {
success: async () => { success: async () => {
await useUserStore().logout() await useUserStore().logout()
// 可选:跳转登录页 // 可选:跳转登录页
uni.redirectTo({ url: '/pages/login/index' }) // uni.redirectTo({ url: '/pages/login/index' })
console.log('登录已过期,====') console.log('登录已过期,====')
}, },
complete: () => { complete: () => {