配置临时token
This commit is contained in:
parent
4193573c69
commit
28cbac1be2
11
App.vue
11
App.vue
|
|
@ -2,6 +2,17 @@
|
|||
export default {
|
||||
onLaunch: function() {
|
||||
console.log('App Launch')
|
||||
|
||||
// TODO: 测试用 - 临时设置 token,测试完成后删除此代码
|
||||
// #ifdef VUE3
|
||||
// 如果还没有 token,则设置一个测试 token
|
||||
const token = uni.getStorageSync('token')
|
||||
if (!token) {
|
||||
const testToken = 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjFiOTJmMjU0LTg1NjAtNDI3OC1hNjhkLWU2NzM2OTY5MTQyNiJ9.Zq4WXvpZ84hqoST2AhOzdrSTkpCs_ySzVLGc53bQvJi8Z9rsBDOXx4wv9wfaNw-djzK7rGEwcvh0sl_9koUGfw' // 你可以替换成实际的测试 token
|
||||
uni.setStorageSync('token', testToken)
|
||||
console.log('已设置测试 token:', testToken)
|
||||
}
|
||||
// #endif
|
||||
},
|
||||
onShow: function() {
|
||||
console.log('App Show')
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user