update
init
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<div class="outer">
|
||||
<specialized :imProps="imProps" v-if="isSpecialized === '6'" />
|
||||
<opearate :imProps="imProps" v-if="isSpecialized === '5'" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import specialized from './components/specialized.vue';
|
||||
import opearate from './components/operate.vue';
|
||||
import { userSigAndroidApi } from '/@/views/emergency/communication/components/commApi';
|
||||
import { getToken } from '/@/utils/auth';
|
||||
import { useGlobSetting } from '/@/hooks/setting';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
||||
const isSpecialized = ref<String>('');
|
||||
const imProps = ref<Object>({
|
||||
sdkAppId: '',
|
||||
userSig: '',
|
||||
tokenF: getToken(),
|
||||
userId: '',
|
||||
urlF: '',
|
||||
});
|
||||
const userStore = useUserStore();
|
||||
|
||||
isSpecialized.value = userStore.getUserInfo.personType;
|
||||
|
||||
const globSetting = useGlobSetting();
|
||||
const apiUrl = globSetting.apiUrl;
|
||||
imProps.value.urlF = apiUrl.replace('://', 'lol');
|
||||
|
||||
const getSig = () => {
|
||||
userSigAndroidApi({})
|
||||
.then((res) => {
|
||||
imProps.value.userSig = res.userSig;
|
||||
imProps.value.sdkAppId = res.sdkAppId;
|
||||
imProps.value.userId = res.userId;
|
||||
})
|
||||
.catch((e) => {
|
||||
console.log(e);
|
||||
});
|
||||
};
|
||||
|
||||
getSig();
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.outer {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user