| | |
| | | <script> |
| | | import { useSessionStore } from '@/stores/session.js' |
| | | import { storeToRefs } from 'pinia'; |
| | | import { tokenUtils } from '@/utils/axios.js' |
| | | export default { |
| | | setup() { |
| | | const { setUserInfo } = useSessionStore() |
| | |
| | | data() { |
| | | return {} |
| | | }, |
| | | computed: { |
| | | |
| | | }, |
| | | created() { |
| | | if (this.$route.path == '/h5/verify' && this.$route.query.appId) { |
| | | localStorage.setItem('verify_url', this.$route.fullPath) |
| | | const path = this.$route.path |
| | | const regionCode = this.$route.query.regionCode |
| | | const fullPath = this.$route.fullPath |
| | | let personType = null |
| | | if (path == '/h5/addrVer') { //0==工作人员 2==考点核验员 |
| | | personType = '2' |
| | | } else if (path == '/h5/staffSignIn') { |
| | | personType = '0' |
| | | } |
| | | localStorage.setItem('_personType', personType) |
| | | localStorage.setItem('_regionCode', regionCode) |
| | | localStorage.setItem('_enterUrl', fullPath) |
| | | // const lastPersonType = localStorage.getItem('_personType') |
| | | // if (lastPersonType && lastPersonType !== personType) { |
| | | // tokenUtils.clearTokens() |
| | | // } |
| | | this.getUserInfo() |
| | | }, |
| | | methods: { |