diff --git a/.env.development b/.env.development index b380274..0de3189 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,6 @@ +# 页面标题 +VUE_APP_TITLE = 7UP PAY + # 开发环境配置 ENV = 'development' diff --git a/.env.production b/.env.production index c167185..5180c73 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,6 @@ +# 页面标题 +VUE_APP_TITLE = 7UP PAY + # 生产环境配置 ENV = 'production' diff --git a/build/[fallback].variant.js b/build/[fallback].variant.js new file mode 100644 index 0000000..8ad7396 --- /dev/null +++ b/build/[fallback].variant.js @@ -0,0 +1,18 @@ +// 图片资源均支持一下几种定义方式 +// 支持绝对路径 https://www.xx.com/static/logo.png +// 支持相对路径 /static/logo.png 使用相对路径时以 public 文件夹作为根路径 +// 支持动态资源 file:logo.png 使用动态资源仅支持访问 assets 下的文件, `file:logo.png` 在代码中被转换为 require("@/assets/logo.png") +// 如果未传入 variant 则使用 fallback.variant.js 文件作为默认变体 +module.exports = { + // 网站标题 + PAGE_TITLE: "7UP PAY", + // 网站图标资源(图片资源) + PAGE_LOGO_URI: "/favicon.ico", + // 登录页面标题 + SIGN_UP_TITLE: "7up-pay 后台系统", + // 侧边栏图片资源(图片资源) + SIDEBAR_TITLE_IMAGE_URI: "file:logo/logo.png", + // 侧边栏标题 + SIDEBAR_TITLE: "7UP PAY", + } + \ No newline at end of file diff --git a/build/absolute_logo.variant.js b/build/absolute_logo.variant.js new file mode 100644 index 0000000..b8f4776 --- /dev/null +++ b/build/absolute_logo.variant.js @@ -0,0 +1,12 @@ +module.exports = { + // 网站标题 + PAGE_TITLE: "7UP PAY absolute_logo", + // 网站图标资源(图片资源) + PAGE_LOGO_URI: "https://cdn-static.sspai.com/favicon/sspai.ico", + // 登录页面标题 + SIGN_UP_TITLE: "7up-pay 后台系统 来自 absolute_logo", + // 侧边栏图片资源(图片资源) + SIDEBAR_TITLE_IMAGE_URI: "https://cdn.sspai.com/2023/3/21/article/8dfc0f27-9889-8665-6b65-c69e8c81aa9d.png", + // 侧边栏标题 + SIDEBAR_TITLE: "7UP PAY 来自 absolute_logo", + } \ No newline at end of file diff --git a/build/dynamic_logo.variant.js b/build/dynamic_logo.variant.js new file mode 100644 index 0000000..9809200 --- /dev/null +++ b/build/dynamic_logo.variant.js @@ -0,0 +1,12 @@ +module.exports = { + // 网站标题 + PAGE_TITLE: "7UP PAY dynamic_logo", + // 网站图标资源(图片资源) + PAGE_LOGO_URI: "file:404_images/404_cloud.png", + // 登录页面标题 + SIGN_UP_TITLE: "7up-pay 后台系统 来自 dynamic_logo", + // 侧边栏图片资源(图片资源) + SIDEBAR_TITLE_IMAGE_URI: "file:404_images/404_cloud.png", + // 侧边栏标题 + SIDEBAR_TITLE: "7UP PAY 来自 dynamic_logo", + } \ No newline at end of file diff --git a/build/merchant_1.variant.js b/build/merchant_1.variant.js new file mode 100644 index 0000000..0f62340 --- /dev/null +++ b/build/merchant_1.variant.js @@ -0,0 +1,12 @@ +module.exports = { + // 网站标题 + PAGE_TITLE: "7UP PAY", + // 网站图标资源(图片资源) + PAGE_LOGO_URI: "/favicon.ico", + // 登录页面标题 + SIGN_UP_TITLE: "7up-pay 后台系统", + // 侧边栏图片资源(图片资源) + SIDEBAR_TITLE_IMAGE_URI: "file:logo/logo.png", + // 侧边栏标题 + SIDEBAR_TITLE: "7UP PAY", + } \ No newline at end of file diff --git a/build/static_logo.variant.js b/build/static_logo.variant.js new file mode 100644 index 0000000..a37feb0 --- /dev/null +++ b/build/static_logo.variant.js @@ -0,0 +1,12 @@ +module.exports = { + // 网站标题 + PAGE_TITLE: "7UP PAY 来自 static_logo", + // 网站图标资源(图片资源) + PAGE_LOGO_URI: "/logo.jpeg", + // 登录页面标题 + SIGN_UP_TITLE: "7up-pay 后台系统 来自 static_logo", + // 侧边栏图片资源(图片资源) + SIDEBAR_TITLE_IMAGE_URI: "/logo.jpeg", + // 侧边栏标题 + SIDEBAR_TITLE: "7UP PAY 来自 static_logo", + } \ No newline at end of file diff --git a/package.json b/package.json index fc91142..88cefd9 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,13 @@ "license": "MIT", "scripts": { "dev": "vue-cli-service serve", + "dev:staging": "vue-cli-service serve --mode staging", + "dev:staging:merchant_1": "vue-cli-service serve --mode staging --variant merchant_1", + "build:development": "vue-cli-service build --mode development", "build:prod": "vue-cli-service build", - "build:stage": "vue-cli-service build --mode staging", + "build:staging": "vue-cli-service build --mode staging", + "build:all": "npm run build:staging && npm run build:prod", + "build:staging:merchant_1": "vue-cli-service build --mode staging --variant merchant_1", "preview": "node build/index.js --preview", "lint": "eslint --ext .js,.vue src" }, diff --git a/src/App.vue b/src/App.vue index 130b26e..f745239 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,15 +7,24 @@