diff --git a/.env.build b/.env.build new file mode 100644 index 0000000..45b6d46 --- /dev/null +++ b/.env.build @@ -0,0 +1,7 @@ +NODE_ENV = 'test' + + + +VITE_APP_BASE_URL='http://test-suyuan.lihaink.cn' + + diff --git a/.env.dev b/.env.dev new file mode 100644 index 0000000..e0805ee --- /dev/null +++ b/.env.dev @@ -0,0 +1,7 @@ +NODE_ENV = 'production' + + + +VITE_APP_BASE_URL='http://ceshi-suyuan.lihaink.cn' + + diff --git a/.env.development.example b/.env.development.example deleted file mode 100644 index c89d65a..0000000 --- a/.env.development.example +++ /dev/null @@ -1,4 +0,0 @@ -NODE_ENV = 'development' - -# Base API -VITE_APP_BASE_URL='' \ No newline at end of file diff --git a/.env.pro b/.env.pro new file mode 100644 index 0000000..149ca75 --- /dev/null +++ b/.env.pro @@ -0,0 +1,3 @@ +NODE_ENV = 'production' +# Base API +VITE_APP_BASE_URL='https://suyuan.lihaink.cn' \ No newline at end of file diff --git a/.env.production.example b/.env.production.example deleted file mode 100644 index 1e1ea2b..0000000 --- a/.env.production.example +++ /dev/null @@ -1,3 +0,0 @@ -NODE_ENV = 'production' -# Base API -VITE_APP_BASE_URL='' \ No newline at end of file diff --git a/package.json b/package.json index 0e80165..630f547 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,12 @@ "version": "0.0.0", "license": "MIT", "scripts": { - "dev": "vite", + "serve": "vite", + "dev": "vite --mode dev --port 8080", + "pro": "vite --mode pro --port 8080", "preview": "vite preview --port 4173", "build": "vite build && node scripts/release.mjs", + "build1": "vite build && node scripts/release.mjs && --mode build", "type-check": "vue-tsc --noEmit", "lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore" }, diff --git a/src/config/index.ts b/src/config/index.ts index b14d31a..887f331 100644 --- a/src/config/index.ts +++ b/src/config/index.ts @@ -3,11 +3,9 @@ const config = { title: '后台管理系统', //网站默认标题 version: '1.6.0', //版本号 baseUrl: `${ - import.meta.env.VITE_APP_BASE_URL + import.meta.env.VITE_APP_BASE_URL }/`, //请求接口域名 - // baseUrl: 'http://127.0.0.1:30005/', urlPrefix: 'adminapi', //请求默认前缀 timeout: 10 * 1000 //请求超时时长 } - export default config diff --git a/src/main.ts b/src/main.ts index 86aed41..deff756 100644 --- a/src/main.ts +++ b/src/main.ts @@ -10,3 +10,6 @@ const app = createApp(App) app.use(install) app.provide('base_url', configs.baseUrl+configs.urlPrefix); app.mount('#app') + + + diff --git a/src/views/land/bind.vue b/src/views/land/bind.vue index fda8498..f7054e3 100644 --- a/src/views/land/bind.vue +++ b/src/views/land/bind.vue @@ -1,42 +1,20 @@