Kaynağa Gözat

fix(bugs): 修改环境变量

tangning 3 yıl önce
ebeveyn
işleme
2b22610927

+ 1 - 0
.env.production

@@ -7,6 +7,7 @@ VITE_PUBLIC_PATH = /
 # Delete console
 VITE_DROP_CONSOLE = true
 
+VITE_PROXY = [["/basic-api","https://cszfb.4dkankan.com/basic-api"],["/upload","http://localhost:3300/upload"],["/zfb-api","https://cszfb.4dkankan.com"]]
 # Whether to enable gzip or brotli compression
 # Optional: gzip | brotli | none
 # If you need multiple forms, you can use `,` to separate

+ 37 - 0
.env.uat

@@ -0,0 +1,37 @@
+# Whether to open mock
+VITE_USE_MOCK = true
+
+# public path
+VITE_PUBLIC_PATH = /
+
+# Delete console
+VITE_DROP_CONSOLE = true
+
+VITE_PROXY = [["/basic-api","https://cszfb.4dkankan.com/basic-api"],["/upload","http://localhost:3300/upload"],["/zfb-api","https://cszfb.4dkankan.com"]]
+# Whether to enable gzip or brotli compression
+# Optional: gzip | brotli | none
+# If you need multiple forms, you can use `,` to separate
+VITE_BUILD_COMPRESS = 'none'
+
+# Whether to delete origin files when using compress, default false
+VITE_BUILD_COMPRESS_DELETE_ORIGIN_FILE = false
+
+# Basic interface address SPA
+# VITE_GLOB_API_URL=/basic-api
+VITE_GLOB_API_URL=
+
+# File upload address, optional
+# It can be forwarded by nginx or write the actual address directly
+VITE_GLOB_UPLOAD_URL=/upload
+
+# Interface prefix
+VITE_GLOB_API_URL_PREFIX=
+
+# Whether to enable image compression
+VITE_USE_IMAGEMIN= true
+
+# use pwa
+VITE_USE_PWA = false
+
+# Is it compatible with older browsers
+VITE_LEGACY = false

+ 1 - 0
package.json

@@ -6,6 +6,7 @@
     "serve": "npm run dev",
     "dev": "vite",
     "build": "cross-env NODE_ENV=production vite build && esno ./build/script/postBuild.ts",
+    "build:dev": "cross-env NODE_ENV=development vite build && esno ./build/script/postBuild.ts",
     "build:test": "cross-env vite build --mode test && esno ./build/script/postBuild.ts",
     "build:no-cache": "pnpm clean:cache && npm run build",
     "report": "cross-env REPORT=true npm run build",

+ 15 - 2
src/views/product/editCategoryModal.vue

@@ -75,7 +75,6 @@ wapBannerUrl: "https://4dkk.4dage.com/shop/huafa/20220302/23135195983e96.png?x-o
       },
       componentProps: {
         api: async function (params) {
-          console.log('params', params);
           const res = (await categoryApi(params)) as any as TreeNode[];
           // const treeData = makeTree(res);
           return res.filter((i) => i.level === 'L1');
@@ -147,7 +146,10 @@ wapBannerUrl: "https://4dkk.4dage.com/shop/huafa/20220302/23135195983e96.png?x-o
     setup(_, { emit }) {
       const { createMessage } = useMessage();
 
-      const [registerForm, { validate, getFieldsValue, resetFields, setFieldsValue }] = useForm({
+      const [
+        registerForm,
+        { validate, getFieldsValue, resetFields, setFieldsValue, updateSchema },
+      ] = useForm({
         labelWidth: 120,
         schemas,
         showActionButtonGroup: false,
@@ -167,6 +169,17 @@ wapBannerUrl: "https://4dkk.4dage.com/shop/huafa/20220302/23135195983e96.png?x-o
           isShow: String(data.isShow),
           wapBannerUrl: [data.wapBannerUrl],
         });
+        updateSchema({
+          field: 'parentId',
+          componentProps: {
+            api: async function (params) {
+              const res = (await categoryApi(params)) as any as TreeNode[];
+              return res.filter((i) => i.level === 'L1' && i.id !== data.id);
+            },
+            labelField: 'name',
+            valueField: 'id',
+          },
+        });
       }
 
       async function handleOk() {

+ 1 - 0
src/views/product/list.data.ts

@@ -72,6 +72,7 @@ export const columns: BasicColumn[] = [
   {
     title: '直播间名称',
     dataIndex: 'brandName',
+    ellipsis: true,
     // customRender: ({ record }) => {
     //   return record.steamRoom.name as unknown as {};
     // },