feat:app嵌套h5
This commit is contained in:
@@ -3,6 +3,36 @@
|
||||
import LastSurvey from './components/LastSurvey/Index.vue';
|
||||
import Market from './components/Market/Index.vue';
|
||||
import CreateSurvey from './components/CreateSurvey/Index.vue';
|
||||
import { onMounted } from 'vue';
|
||||
import utils from '@/assets/js/common';
|
||||
import { getUserInfo } from '@/api/common/index.js';
|
||||
import { showFailToast } from 'vant';
|
||||
|
||||
onMounted(async() => {
|
||||
if (utils.getParameter('digitalYiliToken')) {
|
||||
const query = {
|
||||
xToken: utils.getParameter('digitalYiliToken')
|
||||
};
|
||||
getUserInfo(query).then((res) => {
|
||||
// res = {
|
||||
// code: 200,
|
||||
// message: null,
|
||||
// data: {
|
||||
// deptName: '总部数字科技中心',
|
||||
// userName: '黄静',
|
||||
// userCode: '10046899',
|
||||
// deptCode: '10001892',
|
||||
// buName: '总部'
|
||||
// }
|
||||
// };
|
||||
if (res.data) {
|
||||
utils.setSessionStorage('userInfo', res.data);
|
||||
} else {
|
||||
showFailToast(error.data?.message || error.message || '服务器错误');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
Reference in New Issue
Block a user