agilebuilder-ui 1.0.26 → 1.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/permission.js +17 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agilebuilder-ui",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./lib/super-ui.js",
package/src/permission.js CHANGED
@@ -57,9 +57,25 @@ router.beforeEach((to, from, next) => {
57
57
  authApi.setSessionCache(runCurrentRoleKey, to.query[currentRoleKey])
58
58
  }
59
59
  let token
60
+ if (to.query && to.query.JWT) {
61
+ token = to.query.JWT
62
+ if (token) {
63
+ // 微信小程序web-view直接访问路径时使用?将JWT传过来
64
+ setToken(token)
65
+ }
66
+ console.log('router.beforeEach-to.query.JWT=', token)
67
+ }
68
+ if (!token && to.query && to.query.jwt) {
69
+ token = to.query.jwt
70
+ if (token) {
71
+ // 微信小程序web-view直接访问路径时使用?将JWT传过来
72
+ setToken(token)
73
+ }
74
+ console.log('router.beforeEach-to.query.jwt=', token)
75
+ }
60
76
  // 是否是开发环境功能
61
77
  let isDevp = isDevpSystem()
62
- if(authApi.getSessionCache(runDevpJWTKey)) {
78
+ if(!token && authApi.getSessionCache(runDevpJWTKey)) {
63
79
  // setToken(authApi.getSessionCache(runDevpJWTKey))
64
80
  token = authApi.getSessionCache(runDevpJWTKey)
65
81
  console.log('router.beforeEach-authApi.getSessionCache(_runDevpJWT)=', authApi.getSessionCache(runDevpJWTKey))