flat: 123

This commit is contained in:
Apcallover
2024-03-20 17:16:16 +08:00
parent 53cfc53ba8
commit 36ed184cd4
7 changed files with 41 additions and 7 deletions

32
App.vue
View File

@@ -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')