flat: 123
This commit is contained in:
32
App.vue
32
App.vue
@@ -3,6 +3,7 @@
|
||||
@import "@/uni_modules/uview-ui/index.scss";
|
||||
</style>
|
||||
<script>
|
||||
import website from '@/config/website.js'
|
||||
import {
|
||||
mapGetters
|
||||
} from 'vuex'
|
||||
@@ -13,8 +14,35 @@
|
||||
// #endif
|
||||
|
||||
export default {
|
||||
onLaunch: function() {
|
||||
if (this.$store.state.user.token) {
|
||||
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()
|
||||
});
|
||||
} else if (this.$store.state.user.token) {
|
||||
this.$store.dispatch('startRefreshTokenTimer')
|
||||
this.$store.dispatch('startRefreshNewsTimer')
|
||||
this.$store.dispatch('refreshAuthState')
|
||||
|
||||
Reference in New Issue
Block a user