diff --git a/oab/dist/index.html b/oab/dist/index.html
index 269b29a..a262394 100644
--- a/oab/dist/index.html
+++ b/oab/dist/index.html
@@ -1,3 +1,3 @@
-
OA
-
+OA
+
\ No newline at end of file
diff --git a/oab/src/api/token.rs b/oab/src/api/token.rs
index 533c13b..5d4316c 100644
--- a/oab/src/api/token.rs
+++ b/oab/src/api/token.rs
@@ -32,6 +32,7 @@ pub async fn get(
) -> Result {
let aid = aid.into_inner();
let mut key = stat.key.clone();
+ info!("{}", key);
let sid = match &query.app_id {
Some(i) => {
if !i.is_empty() {
@@ -45,7 +46,6 @@ pub async fn get(
}
_ => "",
};
- info!("{}", key);
let token = models::Token::from(&query.token, &key)?;
if aid.starts_with("nats") {
let nonce = &query.nonce.clone().unwrap();
diff --git a/oaweb/package.json b/oaweb/package.json
index c37d930..f69dfbb 100644
--- a/oaweb/package.json
+++ b/oaweb/package.json
@@ -17,7 +17,7 @@
"@toast-ui/editor": "^3.2.2",
"@types/validator": "^13.11.2",
"@veypi/msg": "^0.1.1",
- "@veypi/oaer": "^0.0.3",
+ "@veypi/oaer": "^0.0.6",
"@veypi/one-icon": "2",
"animate.css": "^4.1.1",
"axios": "^1.2.1",
diff --git a/oaweb/src/boot/api/token.ts b/oaweb/src/boot/api/token.ts
index f45a541..74efca9 100644
--- a/oaweb/src/boot/api/token.ts
+++ b/oaweb/src/boot/api/token.ts
@@ -11,8 +11,8 @@ import ajax from './axios'
export default (uuid: string) => {
return {
local: './app/' + uuid + '/token/',
- get() {
- return ajax.get(this.local)
+ get(data: { app_id?: string, token: string }) {
+ return ajax.post(this.local, data)
},
}
}
diff --git a/oaweb/src/pages/login.vue b/oaweb/src/pages/login.vue
index 8e92e58..2352a54 100644
--- a/oaweb/src/pages/login.vue
+++ b/oaweb/src/pages/login.vue
@@ -84,7 +84,10 @@ function redirect(url: string) {
if (uuid.value && uuid.value !== app.id) {
api.app.get(uuid.value as string).then((app: modelsApp) => {
- api.token(uuid.value as string).get().then(e => {
+ api.token(uuid.value as string).get({
+ token:
+ util.getToken()
+ }).then(e => {
url = url || app.redirect
// let data = JSON.parse(Base64.decode(e.split('.')[1]))
// console.log(data)
diff --git a/oaweb/src/stores/user.ts b/oaweb/src/stores/user.ts
index 92aee79..ee5892d 100644
--- a/oaweb/src/stores/user.ts
+++ b/oaweb/src/stores/user.ts
@@ -23,7 +23,8 @@ export const useUserStore = defineStore('user', {
getters: {
},
actions: {
- logout() {
+ logout(msg?: string) {
+ console.log('logout: ' + msg)
this.ready = false
util.setToken('')
router.push({ name: 'login' })
diff --git a/oaweb/yarn.lock b/oaweb/yarn.lock
index 7ced1d4..2efe2aa 100644
--- a/oaweb/yarn.lock
+++ b/oaweb/yarn.lock
@@ -530,10 +530,10 @@
resolved "https://registry.yarnpkg.com/@veypi/msg/-/msg-0.1.1.tgz#94864ae2c0a81991b8a30d87f12d2245fdebbead"
integrity sha512-UiAF/Y0EGT/37tGApptzHBNUpo78LbnrEkCqGAGMkJp86wrUyOgTAvuvQ197Ifqw9PIbjZM9dAgMv4DfMJQEYA==
-"@veypi/oaer@^0.0.3":
- version "0.0.3"
- resolved "https://registry.yarnpkg.com/@veypi/oaer/-/oaer-0.0.3.tgz#b72623ae3b124ac03ca65a6715cc1a2aaa1590ee"
- integrity sha512-KfbbXJFUiGoCWoYpMAKOEX32Hc2qxk0NnApCWgXAVwU5iyFC4onJpvwPn0ekbWXULWSov5T3Yde61kOirGToIw==
+"@veypi/oaer@^0.0.5":
+ version "0.0.5"
+ resolved "https://registry.yarnpkg.com/@veypi/oaer/-/oaer-0.0.5.tgz#e29626baad7fb32c8764c13b5b1c11c41ff04404"
+ integrity sha512-QkYfpvu09b09YUByiS/ybmSeY6wKfjQZeEVTjWpqA1N4pU9/lQV9mXGPJmF2DduXD9EipctK4qzlsq1lsttoPA==
dependencies:
"@veypi/msg" "^0.1.0"
"@veypi/one-icon" "2"
@@ -3133,13 +3133,6 @@ nats.ws@^1.18.0:
optionalDependencies:
nkeys.js "1.0.5"
-nats@^2.17.0:
- version "2.17.0"
- resolved "https://registry.yarnpkg.com/nats/-/nats-2.17.0.tgz#1f6ffa5d89bb8ea4549e205f42601dbf66c4561e"
- integrity sha512-749TtweWL6bc9R9yNra4a+tuk8J0bqurxcPV/9R2D+WPTplY4PPde/LPSXspqR/eCCTxiM80/AjVlfboEafRxA==
- dependencies:
- nkeys.js "1.0.5"
-
natural-compare-lite@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4"
diff --git a/script/nats.yml b/script/nats.yml
index 7170f4b..292ccff 100644
--- a/script/nats.yml
+++ b/script/nats.yml
@@ -4,7 +4,7 @@ host: 127.0.0.1
port: 4222
# 监控端口
-http_port: 8222
+http: 127.0.0.1:8222
jetstream: {
}