Ver Fonte

完善项目部署配置

jialuyu há 1 mês atrás
pai
commit
96e4994e03

+ 0 - 1
.env.development

@@ -35,7 +35,6 @@ VITE_APP_WEBSOCKET = false
 # sse 开关
 VITE_APP_SSE = true
 
-
 # 平台号
 VITE_APP_PLATFORM_CODE="PINGTAIDUAN"
 

+ 6 - 2
.env.production

@@ -15,7 +15,7 @@ VITE_APP_MONITOR_ADMIN = '/admin/applications'
 VITE_APP_SNAILJOB_ADMIN = '/snail-job'
 
 # 生产环境
-VITE_APP_BASE_API = '/prod-api'
+VITE_APP_BASE_API = 'https://ditingcaishen.com/api'
 
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip
@@ -38,5 +38,9 @@ VITE_APP_WEBSOCKET = false
 # sse 开关
 VITE_APP_SSE = true
 
+# 平台号
+VITE_APP_PLATFORM_CODE="PINGTAIDUAN"
+
 # 门户地址
-VITE_PORTAL_BASE_URL=
+VITE_PORTAL_BASE_URL=https://ditingcaishen.com
+

+ 1 - 0
package.json

@@ -8,6 +8,7 @@
   "type": "module",
   "scripts": {
     "dev": "vite serve --mode development",
+    "prod": "vite serve --mode production",
     "build:prod": "vite build --mode production",
     "build:dev": "vite build --mode development",
     "preview": "vite preview",

+ 1 - 1
src/utils/request.ts

@@ -25,7 +25,7 @@ export const globalHeaders = () => {
 
 axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8';
 axios.defaults.headers['clientid'] = import.meta.env.VITE_APP_CLIENT_ID;
-axios.defaults.headers['PLATFORM_CODE']=import.meta.env.VITE_APP_PLATFORM_CODE
+axios.defaults.headers['PLATFORM_CODE'] = 'PINGTAIDUAN';
 // 创建 axios 实例
 const service = axios.create({
   baseURL: import.meta.env.VITE_APP_BASE_API,

+ 2 - 1
src/views/system/customer/config/index.vue

@@ -280,7 +280,8 @@
 import { ref, reactive, computed, onMounted, getCurrentInstance } from 'vue';
 import { Search, Plus, Tickets, ArrowLeft, UserFilled, Picture } from '@element-plus/icons-vue';
 import { ElMessage, ElMessageBox } from 'element-plus';
-import { getSeatList, getSeatDetail, addSeat, updateSeat, deleteSeat, updateSeatStatus, uploadSeatAvatar } from '@/api/chat/seat';
+//import { getSeatList, getSeatDetail, addSeat, updateSeat, deleteSeat, updateSeatStatus, uploadSeatAvatar } from '@/api/chat/seat';
+import { getSeatList, getSeatDetail, addSeat, updateSeat, deleteSeat, updateSeatStatus } from '@/api/chat/seat';
 import { listUser } from '@/api/system/user';
 
 const { proxy } = getCurrentInstance();

+ 1 - 0
vite.config.ts

@@ -27,6 +27,7 @@ export default defineConfig(({ mode, command }) => {
       open: true,
       proxy: {
         [env.VITE_APP_BASE_API]: {
+          // target: 'https://ditingcaishen.com/api',
           target: 'http://localhost:8080',
           changeOrigin: true,
           ws: true,