| | |
| | | |
| | | <script> |
| | | import { loginH5, getByLogin, getUserInfo } from '@/apis/index.js' |
| | | |
| | | import { getAnchorHomePath, normalizeAnchorPageVersion } from '@/utils/anchorHome.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | let user = await getUserInfo() |
| | | this.$store.commit('setUser', user.data) |
| | | let result = await getByLogin() |
| | | this.$store.commit('setConfig', result.data) |
| | | const config = result.data || result |
| | | this.$store.commit('setConfig', config) |
| | | uni.showToast({ title: '登录成功', icon: 'success', duration: 2000 }); |
| | | uni.redirectTo({ url: '/pages/index_2/index' }); |
| | | const homePath = getAnchorHomePath(normalizeAnchorPageVersion(config.anchorPageVersion)) |
| | | uni.redirectTo({ url: homePath }); |
| | | }) |
| | | } |
| | | } |