flat: 登陆
This commit is contained in:
30
App.vue
30
App.vue
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user