H5环境登录改造
This commit is contained in:
@@ -19,10 +19,20 @@ import IndexOne from './components/index-one.vue';
|
||||
// import IndexTwo from './components/index-two.vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useReadMsg } from '@/stores/useReadMsg';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
import { tabbarManager } from '@/utils/tabbarManager';
|
||||
const { unreadCount } = storeToRefs(useReadMsg());
|
||||
const userStore = useUserStore();
|
||||
|
||||
onLoad(() => {
|
||||
onLoad((options) => {
|
||||
// H5环境下从URL获取token并自动登录
|
||||
// #ifdef H5
|
||||
const token = options.token || '';
|
||||
alert(token)
|
||||
if (token) {
|
||||
userStore.loginSetToken(token);
|
||||
}
|
||||
// #endif
|
||||
// useReadMsg().fetchMessages();
|
||||
});
|
||||
|
||||
|
||||
@@ -194,7 +194,7 @@ const handleLogin = async () => {
|
||||
icon: 'success'
|
||||
})
|
||||
// window.location.assign('http://222.80.110.161:11111/mechine-dual-vue/login')
|
||||
window.location.assign('https://www.xjksly.cn/mechine-single-vue/login')
|
||||
// window.location.assign('https://www.xjksly.cn/mechine-single-vue/login')
|
||||
// // 跳转到首页
|
||||
// uni.reLaunch({
|
||||
// url: '/pages/index/index'
|
||||
|
||||
Reference in New Issue
Block a user