Compare commits

..

4 Commits

Author SHA1 Message Date
dependabot[bot] e84528ca93 build(deps): bump element-plus in /web/delivery-platform-ui
Bumps [element-plus](https://github.com/element-plus/element-plus) from 2.13.6 to 2.14.1.
- [Release notes](https://github.com/element-plus/element-plus/releases)
- [Changelog](https://github.com/element-plus/element-plus/blob/dev/CHANGELOG.en-US.md)
- [Commits](https://github.com/element-plus/element-plus/compare/2.13.6...2.14.1)

---
updated-dependencies:
- dependency-name: element-plus
  dependency-version: 2.14.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-09 08:19:01 +00:00
huangping 327e5e2b91 chore: release v0.1.0
deploy / build-and-deploy (push) Waiting to run
2026-06-09 16:17:48 +08:00
huangping 7fc1fa3727 feat: add demo mode for prototype deployment (no backend) 2026-06-09 09:45:10 +08:00
huangping 4c2db92da4 fix: set vite base path for /authorization-sdk/ deployment 2026-06-09 09:43:21 +08:00
4 changed files with 55 additions and 38 deletions
+37 -35
View File
@@ -10,7 +10,7 @@
"dependencies": {
"axios": "^1.7.9",
"echarts": "^6.1.0",
"element-plus": "^2.9.1",
"element-plus": "^2.14.1",
"pinia": "^2.3.0",
"vue": "^3.5.13",
"vue-router": "^4.5.0"
@@ -941,9 +941,9 @@
}
},
"node_modules/@types/web-bluetooth": {
"version": "0.0.20",
"resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz",
"integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==",
"version": "0.0.21",
"resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.21.tgz",
"integrity": "sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==",
"license": "MIT"
},
"node_modules/@vitejs/plugin-vue": {
@@ -1067,39 +1067,41 @@
"license": "MIT"
},
"node_modules/@vueuse/core": {
"version": "12.0.0",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-12.0.0.tgz",
"integrity": "sha512-C12RukhXiJCbx4MGhjmd/gH52TjJsc3G0E0kQj/kb19H3Nt6n1CA4DRWuTdWWcaFRdlTe0npWDS942mvacvNBw==",
"version": "14.3.0",
"resolved": "https://registry.npmjs.org/@vueuse/core/-/core-14.3.0.tgz",
"integrity": "sha512-aHfz47g0ZhMtTVHmIzMVpJy8ePhhOy68GY5bv110+5DVtZ+W7BsOx+m61UNQqfrWyPztIHIanWa3E2tib3NFIw==",
"license": "MIT",
"dependencies": {
"@types/web-bluetooth": "^0.0.20",
"@vueuse/metadata": "12.0.0",
"@vueuse/shared": "12.0.0",
"vue": "^3.5.13"
"@types/web-bluetooth": "^0.0.21",
"@vueuse/metadata": "14.3.0",
"@vueuse/shared": "14.3.0"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"vue": "^3.5.0"
}
},
"node_modules/@vueuse/metadata": {
"version": "12.0.0",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-12.0.0.tgz",
"integrity": "sha512-Yzimd1D3sjxTDOlF05HekU5aSGdKjxhuhRFHA7gDWLn57PRbBIh+SF5NmjhJ0WRgF3my7T8LBucyxdFJjIfRJQ==",
"version": "14.3.0",
"resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-14.3.0.tgz",
"integrity": "sha512-BwxmbAzwAVF50+MW57GXOUEV61nFBGnlBvrTqj49PqWJu3uw7hdu72ztXeZ33RdZtDY6kO+bfCAE1PCn88Tktw==",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/antfu"
}
},
"node_modules/@vueuse/shared": {
"version": "12.0.0",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-12.0.0.tgz",
"integrity": "sha512-3i6qtcq2PIio5i/vVYidkkcgvmTjCqrf26u+Fd4LhnbBmIT6FN8y6q/GJERp8lfcB9zVEfjdV0Br0443qZuJpw==",
"version": "14.3.0",
"resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-14.3.0.tgz",
"integrity": "sha512-bZpge9eSXwa4ToSiqJ7j6KRwhAsneMFoSz3LMWKQDkqimm3D/tbFlrklrs/IOqC8tEcYmXQZJ6N0UrjhBirVCg==",
"license": "MIT",
"dependencies": {
"vue": "^3.5.13"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"vue": "^3.5.0"
}
},
"node_modules/async-validator": {
@@ -1196,29 +1198,29 @@
}
},
"node_modules/element-plus": {
"version": "2.13.6",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.13.6.tgz",
"integrity": "sha512-XHgwXr8Fjz6i+6BaqFhAbae/dJbG7bBAAlHrY3pWL7dpj+JcqcOyKYt4Oy5KP86FQwS1k4uIZDjCx2FyUR5lDg==",
"version": "2.14.1",
"resolved": "https://registry.npmjs.org/element-plus/-/element-plus-2.14.1.tgz",
"integrity": "sha512-UFnm1+BckNi+azkKJ7L32q1uXs9ekr99Z9pWTQPeDR05jqEWUwQq51ro4kZMVrANbjknX3Z7ukCZwTi2T6Tr9A==",
"license": "MIT",
"dependencies": {
"@ctrl/tinycolor": "^4.2.0",
"@element-plus/icons-vue": "^2.3.2",
"@floating-ui/dom": "^1.0.1",
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.7",
"@types/lodash": "^4.17.20",
"@floating-ui/dom": "^1.7.6",
"@popperjs/core": "npm:@sxzz/popperjs-es@^2.11.8",
"@types/lodash": "^4.17.24",
"@types/lodash-es": "^4.17.12",
"@vueuse/core": "12.0.0",
"@vueuse/core": "14.3.0",
"async-validator": "^4.2.5",
"dayjs": "^1.11.19",
"lodash": "^4.17.23",
"lodash-es": "^4.17.23",
"dayjs": "^1.11.20",
"lodash": "^4.18.1",
"lodash-es": "^4.18.1",
"lodash-unified": "^1.0.3",
"memoize-one": "^6.0.0",
"normalize-wheel-es": "^1.2.0",
"vue-component-type-helpers": "^3.2.4"
"vue-component-type-helpers": "^3.3.1"
},
"peerDependencies": {
"vue": "^3.3.0"
"vue": "^3.3.7"
}
},
"node_modules/entities": {
@@ -1836,9 +1838,9 @@
}
},
"node_modules/vue-component-type-helpers": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/vue-component-type-helpers/-/vue-component-type-helpers-3.2.6.tgz",
"integrity": "sha512-O02tnvIfOQVmnvoWwuSydwRoHjZVt8UEBR+2p4rT35p8GAy5VTlWP8o5qXfJR/GWCN0nVZoYWsVUvx2jwgdBmQ==",
"version": "3.3.4",
"resolved": "https://registry.npmjs.org/vue-component-type-helpers/-/vue-component-type-helpers-3.3.4.tgz",
"integrity": "sha512-joip1uZTaQR0nD23N400gIdJ7xY+WiiiMA/BCKz842gvGBknqDQAzklUvDEhqFvvrhQY8S2ZANBMu4X70VMFGw==",
"license": "MIT"
},
"node_modules/vue-demi": {
+1 -1
View File
@@ -11,7 +11,7 @@
"dependencies": {
"axios": "^1.7.9",
"echarts": "^6.1.0",
"element-plus": "^2.9.1",
"element-plus": "^2.14.1",
"pinia": "^2.3.0",
"vue": "^3.5.13",
"vue-router": "^4.5.0"
+16 -2
View File
@@ -9,7 +9,10 @@ function decodeJwtPayload(token) {
const parts = token.split(".");
if (parts.length !== 3) return null;
const payload = parts[1];
const decoded = atob(payload.replace(/-/g, "+").replace(/_/g, "/"));
const latin1 = atob(payload.replace(/-/g, "+").replace(/_/g, "/"));
// atob 返回 Latin-1 编码,需转为 UTF-8 才能正确解析中文
const bytes = Uint8Array.from(latin1, (c) => c.charCodeAt(0));
const decoded = new TextDecoder().decode(bytes);
return JSON.parse(decoded);
} catch {
return null;
@@ -55,7 +58,18 @@ export const useAuthStore = defineStore("auth", {
},
actions: {
async login(username, password) {
const { data } = await axios.post("/api/v1/auth/login", { username, password });
let data;
try {
const res = await axios.post("/api/v1/auth/login", { username, password });
data = res.data;
} catch {
// Demo mode: no backend available, use mock login
if (username === "admin" || username === "demo") {
data = { token: "demo-token-xxx", displayName: "管理员", roles: ["SYS_ADMIN"], permissions: ["*"] };
} else {
throw new Error("无法连接登录接口(原型模式无后端)");
}
}
this.token = data.token;
this.displayName = data.displayName || username;
this.roles = data.roles || [];
+1
View File
@@ -3,6 +3,7 @@ import vue from "@vitejs/plugin-vue";
export default defineConfig({
plugins: [vue()],
base: "/authorization-sdk/",
server: {
port: 5173,
proxy: {