| | |
| | | scope: 'all', |
| | | type, |
| | | }, |
| | | }) |
| | | |
| | | export const logout = () => |
| | | request({ |
| | | url: '/blade-auth/oauth/logout', |
| | | method: 'get', |
| | | authorization: false, |
| | | }) |
| | |
| | | // src/stores/useUserStore.js |
| | | import { |
| | | loginByUsername, |
| | | logout |
| | | } from '@/api/user' |
| | | import { defineStore } from 'pinia' |
| | | import md5 from 'js-md5' |
| | |
| | | userInfo.code |
| | | ) |
| | | .then(res => { |
| | | console.log(res, 122222) |
| | | const data = res.data |
| | | if (data.error_description) { |
| | | ElMessage({ |
| | |
| | | |
| | | SET_USER_INFO (userInfo) { |
| | | this.userInfo = userInfo |
| | | } |
| | | }, |
| | | |
| | | // 登出 |
| | | LogOut () { |
| | | return new Promise((resolve, reject) => { |
| | | logout() |
| | | .then(() => { |
| | | this.SET_TOKEN('') |
| | | this.SET_REFRESH_TOKEN('') |
| | | this.SET_TENANT_ID('') |
| | | this.SET_USER_INFO('') |
| | | resolve() |
| | | }) |
| | | .catch((error) => { |
| | | reject(error) |
| | | }) |
| | | }) |
| | | }, |
| | | }, |
| | | |
| | | persist: { |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:24 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-11-01 10:37:23 |
| | | * @LastEditTime: 2024-11-01 20:00:52 |
| | | * @FilePath: \bigScreen\src\views\layout\index.vue |
| | | * @Description: |
| | | * |
| | |
| | | <div v-if="showContent" class="main-content" id="MainContent"> |
| | | <div class="main-header"> |
| | | <div class="title">吉水化工园区“一园一策一图”VR平台</div> |
| | | |
| | | <div class="login-out" @click="signOut"> |
| | | <img :src="loginOutBg" class="img" /> |
| | | <span>退出</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="main-container"> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { useRouter, useRoute } from 'vue-router' |
| | | let router = useRouter() |
| | | import { getAssetsFile } from 'utils/utils' |
| | | const loginOutBg = getAssetsFile('login.png', '/images') |
| | | import mainSearch from './components/mainSearch.vue' |
| | | import mainTool from './components/mainTool.vue' |
| | | import mainMenu from './components/mainMenu.vue' |
| | | |
| | | import { useLogin } from 'store/login' |
| | | const loginStore = useLogin() |
| | | import { useMap } from 'store/map' |
| | | const store = useMap() |
| | | const showContent = ref(false) |
| | |
| | | }, |
| | | { immediate: true } // 设置immediate为true以便在组件挂载时立即检查createB的值 |
| | | ) |
| | | |
| | | const signOut = () => { |
| | | loginStore.LogOut().then(res => { |
| | | router.push('/login') |
| | | }) |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | |
| | | // -webkit-background-clip: text; |
| | | // -webkit-text-fill-color: transparent; |
| | | } |
| | | |
| | | |
| | | .login-out { |
| | | position: absolute; |
| | | top: 10px; |
| | | right: 40px; |
| | | height: 36px; |
| | | color: #fff; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | cursor: pointer; |
| | | |
| | | .img { |
| | | width: 16px; |
| | | height: 16px; |
| | | } |
| | | |
| | | span { |
| | | font-size: 13px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .main-container { |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2023-03-10 15:27:59 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-11-01 10:42:13 |
| | | * @LastEditTime: 2024-11-01 11:22:02 |
| | | * @FilePath: \bigScreen\src\views\survey\components\rightContainer.vue |
| | | * @Description: |
| | | * |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="mt-10 w100 h100 flex f-d-c a-i-c j-c-s-p"></div> |
| | | |
| | | <div class="right-container"> |
| | | <div class="h0 fire-source box"> |
| | | <title-box> |