张涛 преди 1 година
родител
ревизия
228464100f
променени са 5 файла, в които са добавени 28 реда и са изтрити 16 реда
  1. 2
    2
      src/index.html
  2. 1
    1
      src/layouts/index.jsx
  3. 1
    0
      src/pages/feedback/issue/index.jsx
  4. 8
    5
      src/pages/feedback/issue/调用1000次.html
  5. 16
    8
      src/pages/issue/components/Issue/index.jsx

+ 2
- 2
src/index.html Целия файл

@@ -17,10 +17,10 @@
17 17
       src="https://map.qq.com/api/gljs?v=1.exp&key=HTPBZ-HHJA7-XD2XD-PRS37-H3HVJ-U5BAA&libraries=service"
18 18
     ></script>
19 19
     <script src="http://wmcj.ycjcjy.com/h5/assets/js/smartcitysdk.js"></script>
20
-    <!-- <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script> -->
20
+    <script src="https://unpkg.com/vconsole@latest/dist/vconsole.min.js"></script>
21 21
     <script>
22 22
       // VConsole 默认会挂载到 `window.VConsole` 上
23
-      // var vConsole = new window.VConsole();
23
+      var vConsole = new window.VConsole();
24 24
     </script>
25 25
 
26 26
     <script>

+ 1
- 1
src/layouts/index.jsx Целия файл

@@ -17,7 +17,7 @@ export default (props) => {
17 17
   const containerClass = `${laySty["page-conatiner"]} ${
18 18
     tabBar ? laySty["with-tabbar"] : ""
19 19
   } ${className}`;
20
-
20
+console.log(11111111111111111111111111111111111111111111111111111111)
21 21
   React.useEffect(() => {
22 22
     const currentPage = Taro.getCurrentPages().slice().pop();
23 23
 console.log("--user***************************",user)

+ 1
- 0
src/pages/feedback/issue/index.jsx Целия файл

@@ -104,6 +104,7 @@ export default (props) => {
104 104
   };
105 105
 
106 106
   const onChangeText = (e) => {
107
+  
107 108
     const value = e.detail.value||e.target.value||e.detail;
108 109
     // setFormData("content", value);
109 110
     setFieldChange("content", value)

+ 8
- 5
src/pages/feedback/issue/调用1000次.html Целия файл

@@ -8,10 +8,10 @@
8 8
   <body>
9 9
     <script>
10 10
       function random1() {
11
-        return Math.floor(Math.random() * 9000000000) + 1000000000;
11
+        return Math.floor(Math.random() * 90000000000) + 1000000000;
12 12
       }
13 13
       function random2() {
14
-        return Math.ceil(Math.random() * 9000000000) + 1000000000;
14
+        return Math.ceil(Math.random() * 90000000000) + 1000000000;
15 15
       }
16 16
       // 假设我们有一个模拟的API调用函数
17 17
       function mockApiCall() {
@@ -37,8 +37,11 @@
37 37
         });
38 38
       }
39 39
 
40
-      // 例如,我们每秒发送10次请求
41
-      const requestsPerSecond = 5;
40
+
41
+      
42
+
43
+      // 例如,我们每秒发送x次请求
44
+      const requestsPerSecond = 3;
42 45
       let counter = 0;
43 46
 
44 47
       // 使用setInterval来模拟每秒发送请求
@@ -53,7 +56,7 @@
53 56
 
54 57
         // 如果你想要在某个点停止发送请求,可以清除interval
55 58
         // 例如,当发送了100个请求后停止
56
-        if (counter >= 100000) {
59
+        if (counter >= 100000000) {
57 60
           clearInterval(intervalId);
58 61
           console.log("停止发送请求");
59 62
         }

+ 16
- 8
src/pages/issue/components/Issue/index.jsx Целия файл

@@ -102,6 +102,8 @@ export default (props) => {
102 102
   };
103 103
 
104 104
   const setFieldChange = (field, value) => {
105
+    console.log("field->>>>>>>>>>>>>>>>",field)
106
+    console.log("value->>>>>>>>>>>>>>>>",value)
105 107
     const data = {
106 108
       ...fmRef.current,
107 109
       [field]: value,
@@ -141,12 +143,10 @@ export default (props) => {
141 143
     }
142 144
   }, [issue]);
143 145
 
144
-
145
-const onChangeText=(e) => {
146
-
147
-const value=e.detail.value
148
-setFieldChange("content", value)
149
-}
146
+  const onChangeText = (e) => {
147
+    const value = e.detail.value||e.target.value||e.detail;
148
+    setFieldChange("content", value);
149
+  };
150 150
 
151 151
   return (
152 152
     <View>
@@ -219,7 +219,7 @@ setFieldChange("content", value)
219 219
           onClick={() => !readOnly && setShowIssueType(true)}
220 220
         />
221 221
         <Cell title="问题描述" border={false} />
222
-        <Textarea
222
+        {/* <Textarea
223 223
           // type="textarea"
224 224
           name="content"
225 225
           placeholder="请输入问题描述"
@@ -228,7 +228,15 @@ setFieldChange("content", value)
228 228
           style={{ marginLeft: "20px" }}
229 229
           value={formData.content}
230 230
           onChange={onChangeText}
231
-        ></Textarea>
231
+        ></Textarea> */}
232
+        <Field
233
+          type="textarea"
234
+          placeholder="请输入问题描述"
235
+          readonly={readOnly}
236
+          autosize={{ minHeight: "120px" }}
237
+          value={formData.content}
238
+          onChange={onChangeText}
239
+        />
232 240
       </CellGroup>
233 241
 
234 242
       <CellGroup style={{ marginTop: "20px" }}>