增加设备绑定
This commit is contained in:
@@ -9,11 +9,19 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { useUserStore } from '@/stores/user';
|
||||
const userStore = useUserStore()
|
||||
const userStore = useUserStore();
|
||||
|
||||
const version="1.0.0"
|
||||
let version = ref("1.0.0");
|
||||
const systemInfo = uni.getSystemInfoSync();
|
||||
// #ifdef APP-PLUS
|
||||
version = systemInfo.appWgtVersion,//当前版本号
|
||||
// #endif
|
||||
// #ifdef H5
|
||||
version = systemInfo.appVersion,
|
||||
// #endif
|
||||
|
||||
onLoad((opt) => {
|
||||
console.log("onLoad");
|
||||
@@ -21,33 +29,13 @@ onLoad((opt) => {
|
||||
if (userStore.isLogin) {
|
||||
// userStore.getUser()
|
||||
// TODO 未登录会在拦截器中处理跳转登录页, 请在 xxx 配置登录页路径
|
||||
// #ifdef H5
|
||||
window.setTimeout(()=>{
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home',
|
||||
});
|
||||
},1000)
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
uni.reLaunch({
|
||||
url: '/pages/home/home',
|
||||
url: '/pages/deviceAuth/deviceAuth',
|
||||
});
|
||||
// #endif
|
||||
}else{
|
||||
// #ifdef H5
|
||||
window.setTimeout(()=>{
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
},1000)
|
||||
// #endif
|
||||
|
||||
// #ifdef APP-PLUS
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
// #endif
|
||||
uni.reLaunch({
|
||||
url: '/pages/login/login',
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user