张涛 11 个月前
父节点
当前提交
2f82d1e370
共有 4 个文件被更改,包括 28 次插入28 次删除
  1. 9
    1
      config/index.js
  2. 17
    14
      src/layouts/index.jsx
  3. 2
    12
      src/pages/issue/components/Issue/index.jsx
  4. 0
    1
      src/pages/issue/edit/index.jsx

+ 9
- 1
config/index.js 查看文件

26
       828: 1.81 / 2,
26
       828: 1.81 / 2,
27
       375: 2 / 1,
27
       375: 2 / 1,
28
     },
28
     },
29
-
29
+    // jsMinimizer: 'terser',
30
+    // terser: {
31
+    //   enable: false,
32
+    // },
30
     sourceRoot: "src",
33
     sourceRoot: "src",
31
     outputRoot: "dist",
34
     outputRoot: "dist",
32
     plugins: [],
35
     plugins: [],
110
          
113
          
111
         },
114
         },
112
       },
115
       },
116
+      webpackChain(chain, webpack) {
117
+        chain.merge({
118
+          mode: "development",
119
+        })
120
+      },
113
     },
121
     },
114
   };
122
   };
115
   if (process.env.NODE_ENV === "development") {
123
   if (process.env.NODE_ENV === "development") {

+ 17
- 14
src/layouts/index.jsx 查看文件

17
   const containerClass = `${laySty["page-conatiner"]} ${
17
   const containerClass = `${laySty["page-conatiner"]} ${
18
     tabBar ? laySty["with-tabbar"] : ""
18
     tabBar ? laySty["with-tabbar"] : ""
19
   } ${className}`;
19
   } ${className}`;
20
-  
21
   React.useEffect(() => {
20
   React.useEffect(() => {
22
     const currentPage = Taro.getCurrentPages().slice().pop();
21
     const currentPage = Taro.getCurrentPages().slice().pop();
23
-console.log("--user***************************",user)
24
-    if (!user) {
25
-      current().then((res) => {
26
-        console.log('---当前人员----', res);
27
-      }).catch((err) => {
28
-        console.log('---当前人员--报错了--');
29
-        console.error(err);
30
 
22
 
31
-        if (!currentPage.route.includes("pages/login/index")) {
32
-          Taro.navigateTo({
33
-            url: "/pages/login/index",
34
-          });
35
-        }
36
-      });
23
+    if (!user) {
24
+      try {
25
+        current().then((res) => {
26
+          console.log('---当前人员----', res);
27
+        }).catch((err) => {
28
+          console.log('---当前人员--报错了--');
29
+          console.error(err);
30
+  
31
+          if (!currentPage.route.includes("pages/login/index")) {
32
+            Taro.navigateTo({
33
+              url: "/pages/login/index",
34
+            });
35
+          }
36
+        });
37
+      } catch (error) {
38
+        console.error(error);
39
+      }
37
     }
40
     }
38
 
41
 
39
     // if (!person || !user) {
42
     // if (!person || !user) {

+ 2
- 12
src/pages/issue/components/Issue/index.jsx 查看文件

190
       />
190
       />
191
 
191
 
192
       <CellGroup>
192
       <CellGroup>
193
-        {issue?.issueId && <Cell title="ID" value={issue.issueId} />}
193
+        {!!issue?.issueId && <Cell title="ID" value={issue.issueId} />}
194
         <Cell
194
         <Cell
195
           title="点位"
195
           title="点位"
196
           isLink={!readOnly}
196
           isLink={!readOnly}
205
           onChange={(e) => setFieldChange("addr", e.detail)}
205
           onChange={(e) => setFieldChange("addr", e.detail)}
206
         />
206
         />
207
       </CellGroup>
207
       </CellGroup>
208
-
208
+ 
209
       {readOnly && (
209
       {readOnly && (
210
         <CellGroup style={{ marginTop: "20px" }}>
210
         <CellGroup style={{ marginTop: "20px" }}>
211
           <IssueStatus issue={issue} />
211
           <IssueStatus issue={issue} />
221
           onClick={() => !readOnly && setShowIssueType(true)}
221
           onClick={() => !readOnly && setShowIssueType(true)}
222
         />
222
         />
223
         <Cell title="问题描述" border={false} />
223
         <Cell title="问题描述" border={false} />
224
-        {/* <Textarea
225
-          // type="textarea"
226
-          name="content"
227
-          placeholder="请输入问题描述"
228
-          readonly={readOnly}
229
-          autosize={{ minHeight: "120px" }}
230
-          style={{ marginLeft: "20px" }}
231
-          value={formData.content}
232
-          onChange={onChangeText}
233
-        ></Textarea> */}
234
         <Field
224
         <Field
235
           type="textarea"
225
           type="textarea"
236
           placeholder="请输入问题描述"
226
           placeholder="请输入问题描述"

+ 0
- 1
src/pages/issue/edit/index.jsx 查看文件

1
 import React from "react";
1
 import React from "react";
2
 import Taro from "@tarojs/taro";
2
 import Taro from "@tarojs/taro";
3
 import { View } from "@tarojs/components";
3
 import { View } from "@tarojs/components";
4
-import { CellGroup, Cell } from "@antmjs/vantui";
5
 import Page from "@/layouts/index";
4
 import Page from "@/layouts/index";
6
 import { useModel } from "@/store";
5
 import { useModel } from "@/store";
7
 import {
6
 import {