需要修改BUG
This commit is contained in:
12
pages.json
12
pages.json
@@ -1,6 +1,12 @@
|
||||
{
|
||||
"pages": [
|
||||
//pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
|
||||
{
|
||||
"path": "TUIKit/components/TUIConversation/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/index/index",
|
||||
"style": {
|
||||
@@ -14,12 +20,6 @@
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "TUIKit/components/TUIConversation/index",
|
||||
"style": {
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "TUIKit/components/TUIChat/index",
|
||||
"style": {
|
||||
|
||||
@@ -37,6 +37,48 @@
|
||||
id: '10',
|
||||
state: '-',
|
||||
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'
|
||||
}
|
||||
]
|
||||
: [
|
||||
|
||||
@@ -101,8 +101,6 @@ export const useUserStore = defineStore('user', () => {
|
||||
const clearUserInfo = async () => {
|
||||
const show = await showDialog('提示', '确定要退出登录吗?')
|
||||
if (show) {
|
||||
showToast('退出登录成功', 'success')
|
||||
await userLogout()
|
||||
await logout()
|
||||
}
|
||||
}
|
||||
@@ -111,18 +109,28 @@ export const useUserStore = defineStore('user', () => {
|
||||
* 退出登录(不带提示)
|
||||
*/
|
||||
const logout = async () => {
|
||||
userInfo.value = null
|
||||
clearToken()
|
||||
removeUserInfoData()
|
||||
removeSig()
|
||||
removeFontSize()
|
||||
await TUILogin.logout().then(() => {
|
||||
try {
|
||||
userInfo.value = null
|
||||
await userLogout()
|
||||
await TUILogin.logout()
|
||||
await TUIChatEngine.logout()
|
||||
// #ifdef APP-PLUS
|
||||
await useLoginState().logout()
|
||||
// #endif
|
||||
clearToken()
|
||||
removeUserInfoData()
|
||||
removeSig()
|
||||
removeFontSize()
|
||||
await showToast('退出登录成功', 'success')
|
||||
reLaunch('/pages/login/login')
|
||||
})
|
||||
await TUIChatEngine.logout()
|
||||
// #ifdef APP-PLUS
|
||||
await useLoginState().logout()
|
||||
// #endif
|
||||
} catch (error) {
|
||||
clearToken()
|
||||
removeUserInfoData()
|
||||
removeSig()
|
||||
removeFontSize()
|
||||
await showToast('退出登录成功', 'success')
|
||||
reLaunch('/pages/login/login')
|
||||
}
|
||||
}
|
||||
/** 刷新用户信息(如用户信息被修改) */
|
||||
const refreshUserInfo = async () => {
|
||||
|
||||
@@ -107,7 +107,7 @@ const handleError = (statusCode, data) => {
|
||||
success: async () => {
|
||||
await useUserStore().logout()
|
||||
// 可选:跳转登录页
|
||||
uni.redirectTo({ url: '/pages/login/index' })
|
||||
// uni.redirectTo({ url: '/pages/login/index' })
|
||||
console.log('登录已过期,====')
|
||||
},
|
||||
complete: () => {
|
||||
|
||||
Reference in New Issue
Block a user