flat: 登陆

This commit is contained in:
Apcallover
2024-03-20 20:21:25 +08:00
parent 0e959356c3
commit e1726ca03a
6 changed files with 99 additions and 29 deletions

30
App.vue
View File

@@ -15,33 +15,11 @@
export default {
onLaunch: function(options) {
console.log(options.query)
if(options.query.token) {
const { token } = options
this.$store.dispatch("LoginByUsername", {
username: 'admin',
password: "admin",
key: '',
code: '1111',
type: "account",
token: options.query.token,
tenantId: website.tenantId
}).then((resp) => {
this.$store.dispatch('refreshAuthState').then(() => {
that.loading = false
var auth = this.auth
if (!auth.bankCardState) {
that.goSign(0)
} else {
uni.switchTab({
url: '/pages/index/index'
})
}
})
}).catch((err) => {
this.loading = false
// this.$refs.code.refushCode()
});
uni.reLaunch({
url: '/pages/login/blank?token=' + options.query.token
})
this.$store.commit('changeLoginType', options.query.token)
} else if (this.$store.state.user.token) {
this.$store.dispatch('startRefreshTokenTimer')
this.$store.dispatch('startRefreshNewsTimer')