feat: 添加下拉远程搜索并完善登录会话

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-04 15:57:46 +08:00
co-authored by Cursor
parent e785a99b7d
commit 55f13bb47b
41 changed files with 1734 additions and 330 deletions
+7 -16
View File
@@ -21,6 +21,7 @@
import app_upgrade from '@/uni_modules/app-upgrade/js_sdk/index.js'
import util from '@/common/util.js';
import config from '../../../common/config';
import { clearUserSession } from '@/common/userSession.js';
export default {
data() {
@@ -84,27 +85,17 @@ export default {
// #endif
},
logout() {
this.$u.api.pdaLogout().then(res => {
console.log('res',res)
if (res.code != 0) {
// this.$u.toast('退出登录失败');
uni.reLaunch({
url: '/pages/sys/login/index'
});
return
}
// 清除token和用户信息
uni.removeStorageSync('token');
this.$store.dispatch('updateUserInfo', null);
const goLogin = () => {
clearUserSession();
uni.reLaunch({
url: '/pages/sys/login/index'
});
};
this.$u.api.pdaLogout().then(() => {
goLogin();
}).catch(error => {
console.log('error',error)
// 即使退出登录失败,也要清除本地token和用户信息
uni.removeStorageSync('token');
this.$store.dispatch('updateUserInfo', null);
// this.$u.toast('退出登录失败');
goLogin();
});
}
}