[baozhangchao] 3 年之前
父節點
當前提交
f8a7427eeb

+ 1
- 0
src/app.js 查看文件

14
     // 登录获取人员信息
14
     // 登录获取人员信息
15
 
15
 
16
     Taro.getLocation({
16
     Taro.getLocation({
17
+      type: 'gcj02',
17
       success (res) {
18
       success (res) {
18
         const location = `${res.longitude},${res.latitude}`
19
         const location = `${res.longitude},${res.latitude}`
19
         Taro.setStorageSync('location', location)
20
         Taro.setStorageSync('location', location)

+ 1
- 1
src/components/ButtontWX/index.jsx 查看文件

3
 import './style.less'
3
 import './style.less'
4
 
4
 
5
 export default (props) => {
5
 export default (props) => {
6
-  const { butText, butWidth, butHeight, butFontSize, butBorderRadius, onClick, formType, disabled, opacity } = props
6
+  const { butText, butWidth, butHeight, butFontSize, butBorderRadius, loading, onClick, formType, disabled, opacity } = props
7
   let butStyle = {
7
   let butStyle = {
8
     width: `${butWidth || 100}px`,
8
     width: `${butWidth || 100}px`,
9
     height: `${butHeight || 40}px`,
9
     height: `${butHeight || 40}px`,

+ 11
- 7
src/pages/CheckMap/index.jsx 查看文件

37
 
37
 
38
   const markers = [{ // 绘制浮标,传入JSON支持多个
38
   const markers = [{ // 绘制浮标,传入JSON支持多个
39
     iconPath: locationImage,
39
     iconPath: locationImage,
40
-    id: 0,
41
-    latitude: LocationMap[0],// 经度
42
-    longitude: LocationMap[1],//纬度
43
-    width: 50, // 浮标宽度
44
-    height: 50 // 浮标高度
40
+    id: 1,
41
+    // longitude: LocationMap[0] ,// 经度
42
+    // latitude: LocationMap[1] ,//纬度
43
+    longitude: 112.095318,
44
+    latitude: 32.695301,
45
+    top: 10,
46
+    width: 40, // 浮标宽度
47
+    height: 37,// 浮标高度
45
   }]
48
   }]
49
+  console.log("🚀 ~ file: index.jsx ~ line 46 ~ markers", markers)
46
 
50
 
47
   return (
51
   return (
48
     <View className='page-index'>
52
     <View className='page-index'>
54
         <View className='MapBox-centent'>
58
         <View className='MapBox-centent'>
55
           <Map
59
           <Map
56
             id='map'
60
             id='map'
57
-            longitude='112.092169'
58
-            latitude='32.694883'
61
+            longitude={112.092169}
62
+            latitude={32.694883}
59
             scale='12'
63
             scale='12'
60
             markers={markers}
64
             markers={markers}
61
             bindmarkertap='markertap'
65
             bindmarkertap='markertap'

+ 29
- 13
src/pages/FeedbackText/index.jsx 查看文件

12
 export default (props) => {
12
 export default (props) => {
13
 
13
 
14
   const [textAreaValue, setTextAreaValue] = useState('')
14
   const [textAreaValue, setTextAreaValue] = useState('')
15
-
15
+  const [loading, setLoading] = useState(false)
16
 
16
 
17
   const onSubmitClick = () => {
17
   const onSubmitClick = () => {
18
+    setLoading(true)
18
     console.log('textAreaValue', textAreaValue);
19
     console.log('textAreaValue', textAreaValue);
19
-    feedback({ content: textAreaValue }).then(() => {
20
+    if (textAreaValue == '') {
20
       Taro.showToast({
21
       Taro.showToast({
21
-        title: '反馈已收到!',
22
-        icon: 'success',
22
+        title: '请填写内容哦',
23
+        icon: 'none',
23
         duration: 2000
24
         duration: 2000
24
-      }).then(() => {
25
-        setTimeout(() => {
26
-          Taro.navigateBack({
27
-            delta: 1
28
-          }
25
+      })
26
+
27
+    } else {
28
+
29
+      feedback({ content: textAreaValue }).then(() => {
30
+        Taro.showToast({
31
+          title: '反馈已收到!',
32
+          icon: 'success',
33
+          duration: 2000
34
+        }).then(() => {
29
 
35
 
30
-          )
31
-        }, 1500)
36
+          setTimeout(() => {
37
+            setLoading(true)
32
 
38
 
39
+            Taro.navigateBack({
40
+              delta: 1
41
+            }
42
+
43
+
44
+            )
45
+          }, 1000)
46
+
47
+        })
33
       })
48
       })
34
-    })
49
+    }
50
+
35
 
51
 
36
 
52
 
37
   }
53
   }
47
           <Textarea placeholder='请留下您宝贵的意见和建议!' className='components-page-TextareaCentent' autoHeight onInput={(e) => { setTextAreaValue(e.detail.value) }} />
63
           <Textarea placeholder='请留下您宝贵的意见和建议!' className='components-page-TextareaCentent' autoHeight onInput={(e) => { setTextAreaValue(e.detail.value) }} />
48
         </View>
64
         </View>
49
         <View className='buton-bottom-Feedback'>
65
         <View className='buton-bottom-Feedback'>
50
-          <ButtontWX onClick={onSubmitClick} butText='提交' butWidth={350} butHeight={49} butFontSize={16} butBorderRadius={49} />
66
+          <ButtontWX disabled={loading} onClick={onSubmitClick} butText='提交' butWidth={350} butHeight={49} butFontSize={16} butBorderRadius={49} />
51
         </View>
67
         </View>
52
       </View>
68
       </View>
53
     </View>
69
     </View>

+ 2
- 2
src/pages/MyAddressList/AddressInfos/index.jsx 查看文件

34
             Taro.navigateBack({
34
             Taro.navigateBack({
35
               delta: 1
35
               delta: 1
36
             })
36
             })
37
-          }, 1500)
37
+          }, 1000)
38
 
38
 
39
         })
39
         })
40
       })
40
       })
50
             Taro.navigateBack({
50
             Taro.navigateBack({
51
               delta: 1
51
               delta: 1
52
             })
52
             })
53
-          }, 1500)
53
+          }, 1000)
54
         })
54
         })
55
       })
55
       })
56
     }
56
     }

+ 2
- 2
src/pages/OrderInfo/index.jsx 查看文件

44
                 Taro.navigateBack({
44
                 Taro.navigateBack({
45
                   delta: 1
45
                   delta: 1
46
                 })
46
                 })
47
-              }, 1500)
47
+              }, 1000)
48
             })
48
             })
49
           })
49
           })
50
         } else if (res.cancel) {
50
         } else if (res.cancel) {
69
           Taro.navigateBack({
69
           Taro.navigateBack({
70
             delta: 1
70
             delta: 1
71
           })
71
           })
72
-        }, 1500)
72
+        }, 1000)
73
       })
73
       })
74
     }
74
     }
75
 
75
 

+ 1
- 1
src/pages/userInfo/index.jsx 查看文件

44
           Taro.navigateBack({
44
           Taro.navigateBack({
45
             delta: 1
45
             delta: 1
46
           })
46
           })
47
-        }, 1500)
47
+        }, 1000)
48
       }).catch((e) => {
48
       }).catch((e) => {
49
         console.log(e)
49
         console.log(e)
50
         Taro.showToast({
50
         Taro.showToast({