Compare commits

...

5 Commits

Author SHA1 Message Date
aa0e71ce94 update
Some checks failed
Deploy / build-and-deploy (push) Has been cancelled
2025-12-20 22:41:11 +08:00
b77f90559a fix
Some checks failed
Deploy / build-and-deploy (push) Has been cancelled
2025-09-25 10:29:10 +08:00
a1828a0aba update
Some checks failed
Deploy / build-and-deploy (push) Has been cancelled
2025-09-25 10:03:39 +08:00
cba1c5adb9 fix
Some checks failed
Deploy / build-and-deploy (push) Has been cancelled
2025-09-24 19:20:49 +08:00
095626b857 add staging env
Some checks failed
Deploy / build-and-deploy (push) Has been cancelled
2025-09-04 18:11:16 +08:00
10 changed files with 566 additions and 721 deletions

4
.env
View File

@@ -1 +1,3 @@
WEB_URL=http://localhost:8000
PUBLIC_WEB_URL=http://localhost:8000
PUBLIC_BASE_URL=http://localhost:8000/api
PUBLIC_ADMIN_URL=http://localhost:8000/admin

View File

@@ -1 +1,3 @@
WEB_URL=https://web.xuyue.cc
PUBLIC_WEB_URL=https://web.xuyue.cc
PUBLIC_ADMIN_URL=https://web.xuyue.cc/admin
PUBLIC_BASE_URL=https://web.xuyue.cc/api

3
.env.staging Normal file
View File

@@ -0,0 +1,3 @@
PUBLIC_WEB_URL=http://10.13.114.114:91
PUBLIC_ADMIN_URL=http://10.13.114.114:91/admin
PUBLIC_BASE_URL=http://10.13.114.114:91/api

View File

@@ -2,7 +2,7 @@
<html lang="zh-Hans-CN">
<head>
<meta charset="UTF-8" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="shortcut icon" href="/noto--honeybee.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>前端开发学习平台</title>
<link rel="stylesheet" href="/normalize.min.css" />

1223
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,40 +1,41 @@
{
"name": "web",
"private": true,
"version": "0.2.0",
"version": "0.3.0",
"type": "module",
"scripts": {
"start": "rsbuild dev",
"build": "rsbuild build",
"build:staging": "rsbuild build --env-mode staging",
"fmt": "prettier --write src/"
},
"dependencies": {
"@codemirror/lang-css": "^6.3.1",
"@codemirror/lang-html": "^6.4.9",
"@codemirror/lang-html": "^6.4.11",
"@codemirror/lang-javascript": "^6.2.4",
"@vueuse/core": "^13.5.0",
"axios": "^1.10.0",
"@vueuse/core": "^14.1.0",
"axios": "^1.13.2",
"codemirror": "^6.0.2",
"copy-text-to-clipboard": "^3.2.0",
"copy-text-to-clipboard": "^3.2.2",
"github-markdown-css": "^5.8.1",
"highlight.js": "^11.11.1",
"marked": "^16.0.0",
"marked": "^17.0.1",
"marked-alert": "^2.1.2",
"marked-code-preview": "^1.3.7",
"marked-highlight": "^2.2.2",
"md-editor-v3": "^5.8.1",
"naive-ui": "^2.42.0",
"vue": "^3.5.17",
"marked-highlight": "^2.2.3",
"md-editor-v3": "^6.2.1",
"naive-ui": "^2.43.2",
"vue": "^3.5.26",
"vue-codemirror": "^6.1.1",
"vue-router": "^4.5.1"
"vue-router": "^4.6.4"
},
"devDependencies": {
"@iconify/vue": "^5.0.0",
"@rsbuild/core": "^1.4.6",
"@rsbuild/plugin-vue": "^1.1.0",
"@vue/tsconfig": "^0.7.0",
"prettier": "^3.6.2",
"typescript": "^5.8.3",
"unplugin-vue-components": "^28.8.0"
"@rsbuild/core": "^1.6.15",
"@rsbuild/plugin-vue": "^1.2.2",
"@vue/tsconfig": "^0.8.1",
"prettier": "^3.7.4",
"typescript": "^5.9.3",
"unplugin-vue-components": "^30.0.0"
}
}

BIN
public/noto--honeybee.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 KiB

View File

@@ -29,7 +29,7 @@ export default defineConfig({
server: {
proxy: {
"/media": {
target: process.env.WEB_URL,
target: process.env.PUBLIC_WEB_URL,
changeOrigin: true,
},
},

4
src/env.d.ts vendored
View File

@@ -1,5 +1,7 @@
interface ImportMetaEnv {
readonly MODE: "production" | "development" | "none"
readonly PUBLIC_WEB_URL: string
readonly PUBLIC_BASE_URL: string
readonly PUBLIC_ADMIN_URL: string
}
interface ImportMeta {

View File

@@ -35,15 +35,9 @@ export const STORAGE_KEY = {
FONTSIZE: "web-fontsize",
}
export const ADMIN_URL =
import.meta.env.MODE === "development"
? "http://localhost:8000/admin"
: "https://web.xuyue.cc/admin"
export const ADMIN_URL = import.meta.env.PUBLIC_ADMIN_URL
export const BASE_URL =
import.meta.env.MODE === "development"
? "http://localhost:8000/api"
: "https://web.xuyue.cc/api"
export const BASE_URL = import.meta.env.PUBLIC_BASE_URL
export enum TASK_TYPE {
Tutorial = "tutorial",