diff --git a/.env.development b/.env.development index b7c31d5c..7e373863 100644 --- a/.env.development +++ b/.env.development @@ -2,16 +2,16 @@ VITE_HISTORY_HASH = false # 历史路径-前缀URL如:/h5 -VITE_HISTORY_BASE_URL = '/' +VITE_HISTORY_BASE_URL = "/" # 应用名称 -VITE_APP_NAME = '核心网管理系统' +VITE_APP_NAME = "核心网管理系统" # 应用标识 -VITE_APP_CODE = 'CoreNet' +VITE_APP_CODE = "CoreNet" # 应用版本 -VITE_APP_VERSION = '0.0.1' +VITE_APP_VERSION = "1.23.0" # 接口基础URL地址-不带/后缀 -VITE_API_BASE_URL = '/dev-api' +VITE_API_BASE_URL = "/omc-api" diff --git a/.env.production b/.env.production index 98dcc700..22c2860d 100644 --- a/.env.production +++ b/.env.production @@ -2,16 +2,17 @@ VITE_HISTORY_HASH = true # 历史路径-前缀URL如:/h5 -VITE_HISTORY_BASE_URL = '/' +VITE_HISTORY_BASE_URL = "/" # 应用名称 -VITE_APP_NAME = '核心网管理系统' +VITE_APP_NAME = "核心网管理系统" # 应用标识 -VITE_APP_CODE = 'CoreNet' +VITE_APP_CODE = "CoreNet" # 应用版本 -VITE_APP_VERSION = '0.0.1' +VITE_APP_VERSION = "1.23.1016" # 接口基础URL地址-不带/后缀 -VITE_API_BASE_URL = '/prod-api' +VITE_API_BASE_URL = "/omc-api" + diff --git a/public/config.js b/public/config.js new file mode 100644 index 00000000..9443bc82 --- /dev/null +++ b/public/config.js @@ -0,0 +1,15 @@ +/** + * config 临时配置参数 + */ +(function () { + // host = ip:prot + const host = "192.168.12.12:3030"; + + // 服务地址 + const baseUrl = `http://${host}` + sessionStorage.setItem("baseUrl", baseUrl) + + // websocket + const wsUrl = `ws://${host}` + sessionStorage.setItem("wsUrl", wsUrl) +})(); diff --git a/src/App.vue b/src/App.vue index 98d5fd18..d0f6f93a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,8 +6,10 @@ import enUS from 'ant-design-vue/lib/locale/en_US'; import dayjs from 'dayjs'; import 'dayjs/locale/zh-cn'; import { ref, watch } from 'vue'; +import useAppStore from '@/store/modules/app'; import useI18n from '@/hooks/useI18n'; const { currentLocale } = useI18n(); +const appStore = useAppStore(); dayjs.locale('zh-cn'); // 默认中文 usePrimaryColor(); // 载入用户自定义主题色 @@ -33,6 +35,13 @@ fnChangeLocale(currentLocale.value); watch(currentLocale, val => { fnChangeLocale(val); }); + +// 输出应用版本号 +console.info( + `%c ${appStore.appName} %c ${appStore.appCode} - ${appStore.appVersion} `, + 'color: #fadfa3; background: #030307; padding: 4px 0;', + 'color: #030307; background: #fadfa3; padding: 4px 0;' +); - + {{ value }} diff --git a/src/constants/token-constants.ts b/src/constants/token-constants.ts index c2a1bebb..34c4d1b5 100644 --- a/src/constants/token-constants.ts +++ b/src/constants/token-constants.ts @@ -1,11 +1,11 @@ /**令牌-数据响应字段 */ -export const TOKEN_RESPONSE_FIELD = 'accessToken'; +export const TOKEN_RESPONSE_FIELD = 'access_token'; /**令牌-请求头标识前缀 */ -export const TOKEN_KEY_PREFIX = ''; +export const TOKEN_KEY_PREFIX = 'Bearer '; /**令牌-请求头标识 */ -export const TOKEN_KEY = 'Accesstoken'; +export const TOKEN_KEY = 'Authorization'; /**令牌-存放Cookie标识 */ export const TOKEN_COOKIE = 'AuthOMC'; diff --git a/src/layouts/BasicLayout.vue b/src/layouts/BasicLayout.vue index 64a8b4bb..6f964ae3 100644 --- a/src/layouts/BasicLayout.vue +++ b/src/layouts/BasicLayout.vue @@ -126,7 +126,7 @@ tabsStore.clear(); disable-content-margin v-bind="proConfig" :iconfont-url="scriptUrl" - :sider-width="256" + :sider-width="208" >