فهرست منبع

fix: 关闭ssr

周玉环 6 ساعت پیش
والد
کامیت
5e4517d88a
3فایلهای تغییر یافته به همراه7 افزوده شده و 6 حذف شده
  1. 1 1
      xinkeaboard-web/assets/style/balance.scss
  2. 1 1
      xinkeaboard-web/composables/useFetchRaw.ts
  3. 5 4
      xinkeaboard-web/nuxt.config.ts

+ 1 - 1
xinkeaboard-web/assets/style/balance.scss

@@ -124,7 +124,7 @@
                 width: 113px;
                 height: 40px;
                 // border-right: 1px solid #e3e3e3;
-                &.$colorMain {
+                &.green {
                     color: #3fb091;
                 }
                 &.red {

+ 1 - 1
xinkeaboard-web/composables/useFetchRaw.ts

@@ -4,7 +4,7 @@ import { webSiteFlagRelation, webSiteLanguageRelation } from "../utils/common";
 export async function useFetchRaw<T = any>(url: string, options?: any) {
   const config = useRuntimeConfig()
   const { appType, serverPath } = config.public as any;
-  url = url.replace('/api/', serverPath)
+  // url = url.replace('/api/', serverPath)
   const newOptions = {
     ...(options ?? {}),
     headers: {

+ 5 - 4
xinkeaboard-web/nuxt.config.ts

@@ -7,11 +7,12 @@ const isDev = process.env.NODE_ENV === 'development';
 const appType = process.env.APP_TYPE;
 const SERVICE = process.env.SERVICE;
 export default defineNuxtConfig({
-  // ssr: !isDev,
+  ssr: false,
   nitro: {
     output: {
       dir: isDev ? undefined : `.output-${appType}`
-    }
+    },
+    preset: 'static'
   },
   css: [
     "@/assets/style/variable.scss",
@@ -61,7 +62,7 @@ export default defineNuxtConfig({
     server: {
       proxy: {
         "/api": {
-          target: "http://54.46.9.88:8001",
+          target: "http://xinke-alb-1217859923.ap-southeast-1.elb.amazonaws.com:18001",
           changeOrigin: true,
           rewrite: (path) => path.replace(/^\/api/, ""),
         },
@@ -81,7 +82,7 @@ export default defineNuxtConfig({
     public: {
       appType,
       supplierUrl: SERVICE === 'test' ? 'http://54.46.9.88:82/user/login' : 'https://seller.njnaexport.com/user/login',
-      serverPath: SERVICE === 'test' ? 'http://54.46.9.88:8001/' : 'http://10.0.130.251:8001/'
+      serverPath: SERVICE === 'test' ? 'http://54.46.9.88:8001/' : 'http://xinke-alb-1217859923.ap-southeast-1.elb.amazonaws.com:18001'
     }
   },
   app: {