Yansen 5 年之前
父節點
當前提交
405b1750aa
共有 4 個檔案被更改,包括 11 行新增11 行删除
  1. 7
    8
      config/config.js
  2. 2
    1
      package.json
  3. 1
    1
      src/pages/activity/groupActivity/list.jsx
  4. 1
    1
      src/pages/activity/helpActivity/list.jsx

+ 7
- 8
config/config.js 查看文件

@@ -33,11 +33,11 @@ const plugins = [
33 33
       },
34 34
       pwa: pwa
35 35
         ? {
36
-          workboxPluginMode: 'InjectManifest',
37
-          workboxOptions: {
38
-            importWorkboxFrom: 'local',
39
-          },
40
-        }
36
+            workboxPluginMode: 'InjectManifest',
37
+            workboxOptions: {
38
+              importWorkboxFrom: 'local',
39
+            },
40
+          }
41 41
         : false, // default close dll, because issue https://github.com/ant-design/ant-design-pro/issues/4665
42 42
       // dll features https://webpack.js.org/plugins/dll-plugin/
43 43
       // dll: {
@@ -83,7 +83,8 @@ export default {
83 83
   targets: {
84 84
     ie: 11,
85 85
   },
86
-  publicPath: './',
86
+  publicPath:
87
+    process.env.PROD_ENV === 1 ? 'https://njcjweb.oss-accelerate.aliyuncs.com/admin/' : './',
87 88
   // publicPath: 'https://njcjweb.oss-accelerate.aliyuncs.com/admin/',
88 89
   history: 'hash',
89 90
   devtool: isAntDesignProPreview ? 'source-map' : false,
@@ -97,8 +98,6 @@ export default {
97 98
     'btn-danger-bg': '#FF7E48',
98 99
     'radio-button-hover-color': '#FF7E48',
99 100
     'radio-button-active-color': 'red',
100
-    
101
-
102 101
   },
103 102
   define: {
104 103
     ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION:

+ 2
- 1
package.json 查看文件

@@ -5,7 +5,8 @@
5 5
   "description": "An out-of-box UI solution for enterprise applications",
6 6
   "scripts": {
7 7
     "analyze": "cross-env ANALYZE=1 umi build",
8
-    "build": "umi build",
8
+    "build": "cross-env PROD_ENV=1 umi build",
9
+    "build:test": "cross-env PROD_ENV=2 umi build",
9 10
     "deploy": "cross-env ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION=site npm run site && npm run gh-pages",
10 11
     "fetch:blocks": "pro fetch-blocks",
11 12
     "format-imports": "import-sort --write '**/*.{js,jsx,ts,tsx}'",

+ 1
- 1
src/pages/activity/groupActivity/list.jsx 查看文件

@@ -163,7 +163,7 @@ const header = props => {
163 163
           </AuthButton>,
164 164
             
165 165
           <AuthButton name="admin.taShareActivity.top" noRight={null}>
166
-            <EditIcon type={row.sort === 1 ? 'cancel' : 'top'} text={row.sort === 1 ? '取消推荐首页' : '推荐首页'} onClick={recommendGroupActivity(row)} />
166
+            <EditIcon type={row.sort ? 'cancel' : 'top'} text={row.sort ? '取消推荐首页' : '推荐首页'} onClick={recommendGroupActivity(row)} />
167 167
           </AuthButton>,
168 168
 
169 169
           <EditIcon type="record" text="数据记录" onClick={() => toDataReacord(row.groupActivityId)} />,

+ 1
- 1
src/pages/activity/helpActivity/list.jsx 查看文件

@@ -149,7 +149,7 @@ const header = props => {
149 149
         </AuthButton>,
150 150
 
151 151
         <AuthButton name="admin.help.top" noRight={null}>
152
-          <EditIcon type={row.isMain === 1 ? 'cancel' : 'top'} text={row.isMain === 1 ? '取消推首页' : '推荐首页'} onClick={topDynamic(row, 1)} />
152
+          <EditIcon type={row.isMain ? 'cancel' : 'top'} text={row.isMain ? '取消推首页' : '推荐首页'} onClick={topDynamic(row, 1)} />
153 153
         </AuthButton>,
154 154
 
155 155
         <EditIcon type="record" text="数据记录" onClick={() => toDataReacord(row.helpActivityId)} />,