3
0
Fork 0

Compare commits

..

No commits in common. "c97341eb1e31e14a2eb374ee3aff9a124a4b1bef" and "bd55058227b7976a73f5041bfc0739ced69b20dd" have entirely different histories.

4 changed files with 3 additions and 22 deletions

View File

@ -1,7 +1,9 @@
<script> <script>
import { setToken, removeToken } from '@/config/auth.js' import { setToken } from '@/config/auth.js'
export default { export default {
onLaunch: function (options) { onLaunch: function (options) {
//
if (options.query?.token) { if (options.query?.token) {
setToken(options.query?.token) setToken(options.query?.token)
console.log('🌈ad', options.query?.token) console.log('🌈ad', options.query?.token)
@ -18,11 +20,6 @@ export default {
'pages/pay/success', 'pages/pay/success',
] ]
if (whiteList.indexOf(options.path) !== -1) return if (whiteList.indexOf(options.path) !== -1) return
const isRegiestLogin = uni.getStorageSync('regiest-login')
if (isRegiestLogin) {
uni.removeStorageSync('regiest-login')
removeToken()
}
this.$store.dispatch('GetInfo') this.$store.dispatch('GetInfo')
this.$store.dispatch('getCarLength') this.$store.dispatch('getCarLength')
uni.hideTabBar({}) uni.hideTabBar({})

View File

@ -78,20 +78,6 @@ module.exports = vm => {
}) })
}, 1500) }, 1500)
} else if (data.code == 500) { } else if (data.code == 500) {
if (['/member/api/member/get-info'].includes(response?.config?.url)) {
uni.showToast({
title: '登录失败',
icon: 'none',
duration: 500,
})
setTimeout(() => {
uni.reLaunch({
url: '/pages/login/index',
})
}, 500)
removeToken()
return data
}
uni.$u.toast(data.msg) uni.$u.toast(data.msg)
return data return data
} else { } else {

View File

@ -166,7 +166,6 @@ export default {
}).then(res => { }).then(res => {
uni.setStorageSync('username', memberCode) uni.setStorageSync('username', memberCode)
setToken(res.data.access_token) setToken(res.data.access_token)
uni.removeStorageSync('regiest-login')
store.dispatch('GetInfo').then(res => { store.dispatch('GetInfo').then(res => {
uni.switchTab({ url: '/pages/index/index' }) uni.switchTab({ url: '/pages/index/index' })
}) })

View File

@ -82,7 +82,6 @@ export default {
}) })
.then(res => { .then(res => {
setToken(res.data.access_token, res.data.expires_in) setToken(res.data.access_token, res.data.expires_in)
uni.setStorageSync('regiest-login', '1')
this.getList() this.getList()
this.getCode() this.getCode()
}) })