通过config.js配置appKey
Showing
1 changed file
with
4 additions
and
3 deletions
| ... | @@ -31,11 +31,12 @@ const useUserStore = defineStore( | ... | @@ -31,11 +31,12 @@ const useUserStore = defineStore( |
| 31 | const timer: any = ref(null); | 31 | const timer: any = ref(null); |
| 32 | //获取token. | 32 | //获取token. |
| 33 | async function getToken(data, state) { | 33 | async function getToken(data, state) { |
| 34 | const config = system.appConfig; | 34 | // const config = system.appConfig; |
| 35 | alert(system) | ||
| 35 | data.platformGuid = "7f16f697aec111ef8656fa163e60becd"; | 36 | data.platformGuid = "7f16f697aec111ef8656fa163e60becd"; |
| 36 | data.userType = 2; | 37 | data.userType = 2; |
| 37 | // data.appKey = '672c2c38e4b0cac8732a6106'; | 38 | data.appKey = '672c2c38e4b0cac8732a6106'; |
| 38 | data.appKey = config.appKey || '672c2c38e4b0cac8732a6106'; | 39 | // data.appKey = config.appKey; |
| 39 | data.validateUri = location.origin == 'http://localhost:9000' ? 'http://localhost:9000/' : location.origin + '/'; | 40 | data.validateUri = location.origin == 'http://localhost:9000' ? 'http://localhost:9000/' : location.origin + '/'; |
| 40 | return getTokenPromise.value = getTokenByCode(data).then((res: any) => { | 41 | return getTokenPromise.value = getTokenByCode(data).then((res: any) => { |
| 41 | getTokenPromise.value = null; | 42 | getTokenPromise.value = null; | ... | ... |
-
Please register or sign in to post a comment