master
veypi 1 year ago
parent a000022aa3
commit ae1b5608bd

@ -1,3 +1,3 @@
<!DOCTYPE html><html><head><title>OA</title><meta charset=utf-8><meta name=description content=oneauth><meta name=format-detection content="telephone=no"><meta name=msapplication-tap-highlight content=no><meta name=viewport content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"><link rel=icon type=image/ico href="/favicon.ico"> <script type="module" crossorigin src="/assets/index.877b5ca9.js"></script> <!DOCTYPE html><html><head><title>OA</title><meta charset=utf-8><meta name=description content=oneauth><meta name=format-detection content="telephone=no"><meta name=msapplication-tap-highlight content=no><meta name=viewport content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width"><link rel=icon type=image/ico href="/favicon.ico"> <script type="module" crossorigin src="/assets/index.80ecf914.js"></script>
<link rel="stylesheet" href="/assets/index.835acc70.css"> <link rel="stylesheet" href="/assets/index.45343e6a.css">
</head><body><div id=v-msg></div><div id=q-app></div></body></html> </head><body><div id=v-msg></div><div id=q-app></div></body></html>

@ -32,6 +32,7 @@ pub async fn get(
) -> Result<impl Responder> { ) -> Result<impl Responder> {
let aid = aid.into_inner(); let aid = aid.into_inner();
let mut key = stat.key.clone(); let mut key = stat.key.clone();
info!("{}", key);
let sid = match &query.app_id { let sid = match &query.app_id {
Some(i) => { Some(i) => {
if !i.is_empty() { if !i.is_empty() {
@ -45,7 +46,6 @@ pub async fn get(
} }
_ => "", _ => "",
}; };
info!("{}", key);
let token = models::Token::from(&query.token, &key)?; let token = models::Token::from(&query.token, &key)?;
if aid.starts_with("nats") { if aid.starts_with("nats") {
let nonce = &query.nonce.clone().unwrap(); let nonce = &query.nonce.clone().unwrap();

@ -17,7 +17,7 @@
"@toast-ui/editor": "^3.2.2", "@toast-ui/editor": "^3.2.2",
"@types/validator": "^13.11.2", "@types/validator": "^13.11.2",
"@veypi/msg": "^0.1.1", "@veypi/msg": "^0.1.1",
"@veypi/oaer": "^0.0.3", "@veypi/oaer": "^0.0.6",
"@veypi/one-icon": "2", "@veypi/one-icon": "2",
"animate.css": "^4.1.1", "animate.css": "^4.1.1",
"axios": "^1.2.1", "axios": "^1.2.1",

@ -11,8 +11,8 @@ import ajax from './axios'
export default (uuid: string) => { export default (uuid: string) => {
return { return {
local: './app/' + uuid + '/token/', local: './app/' + uuid + '/token/',
get() { get(data: { app_id?: string, token: string }) {
return ajax.get(this.local) return ajax.post(this.local, data)
}, },
} }
} }

@ -84,7 +84,10 @@ function redirect(url: string) {
if (uuid.value && uuid.value !== app.id) { if (uuid.value && uuid.value !== app.id) {
api.app.get(uuid.value as string).then((app: modelsApp) => { 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 url = url || app.redirect
// let data = JSON.parse(Base64.decode(e.split('.')[1])) // let data = JSON.parse(Base64.decode(e.split('.')[1]))
// console.log(data) // console.log(data)

@ -23,7 +23,8 @@ export const useUserStore = defineStore('user', {
getters: { getters: {
}, },
actions: { actions: {
logout() { logout(msg?: string) {
console.log('logout: ' + msg)
this.ready = false this.ready = false
util.setToken('') util.setToken('')
router.push({ name: 'login' }) router.push({ name: 'login' })

@ -530,10 +530,10 @@
resolved "https://registry.yarnpkg.com/@veypi/msg/-/msg-0.1.1.tgz#94864ae2c0a81991b8a30d87f12d2245fdebbead" resolved "https://registry.yarnpkg.com/@veypi/msg/-/msg-0.1.1.tgz#94864ae2c0a81991b8a30d87f12d2245fdebbead"
integrity sha512-UiAF/Y0EGT/37tGApptzHBNUpo78LbnrEkCqGAGMkJp86wrUyOgTAvuvQ197Ifqw9PIbjZM9dAgMv4DfMJQEYA== integrity sha512-UiAF/Y0EGT/37tGApptzHBNUpo78LbnrEkCqGAGMkJp86wrUyOgTAvuvQ197Ifqw9PIbjZM9dAgMv4DfMJQEYA==
"@veypi/oaer@^0.0.3": "@veypi/oaer@^0.0.5":
version "0.0.3" version "0.0.5"
resolved "https://registry.yarnpkg.com/@veypi/oaer/-/oaer-0.0.3.tgz#b72623ae3b124ac03ca65a6715cc1a2aaa1590ee" resolved "https://registry.yarnpkg.com/@veypi/oaer/-/oaer-0.0.5.tgz#e29626baad7fb32c8764c13b5b1c11c41ff04404"
integrity sha512-KfbbXJFUiGoCWoYpMAKOEX32Hc2qxk0NnApCWgXAVwU5iyFC4onJpvwPn0ekbWXULWSov5T3Yde61kOirGToIw== integrity sha512-QkYfpvu09b09YUByiS/ybmSeY6wKfjQZeEVTjWpqA1N4pU9/lQV9mXGPJmF2DduXD9EipctK4qzlsq1lsttoPA==
dependencies: dependencies:
"@veypi/msg" "^0.1.0" "@veypi/msg" "^0.1.0"
"@veypi/one-icon" "2" "@veypi/one-icon" "2"
@ -3133,13 +3133,6 @@ nats.ws@^1.18.0:
optionalDependencies: optionalDependencies:
nkeys.js "1.0.5" 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: natural-compare-lite@^1.4.0:
version "1.4.0" version "1.4.0"
resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4"

@ -4,7 +4,7 @@ host: 127.0.0.1
port: 4222 port: 4222
# 监控端口 # 监控端口
http_port: 8222 http: 127.0.0.1:8222
jetstream: { jetstream: {
} }

Loading…
Cancel
Save