[baozhangchao] il y a 3 ans
Parent
révision
f8a7427eeb

+ 1
- 0
src/app.js Voir le fichier

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

+ 1
- 1
src/components/ButtontWX/index.jsx Voir le fichier

@@ -3,7 +3,7 @@ import { View, Text, Button } from '@tarojs/components'
3 3
 import './style.less'
4 4
 
5 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 7
   let butStyle = {
8 8
     width: `${butWidth || 100}px`,
9 9
     height: `${butHeight || 40}px`,

+ 11
- 7
src/pages/CheckMap/index.jsx Voir le fichier

@@ -37,12 +37,16 @@ export default (props) => {
37 37
 
38 38
   const markers = [{ // 绘制浮标,传入JSON支持多个
39 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 51
   return (
48 52
     <View className='page-index'>
@@ -54,8 +58,8 @@ export default (props) => {
54 58
         <View className='MapBox-centent'>
55 59
           <Map
56 60
             id='map'
57
-            longitude='112.092169'
58
-            latitude='32.694883'
61
+            longitude={112.092169}
62
+            latitude={32.694883}
59 63
             scale='12'
60 64
             markers={markers}
61 65
             bindmarkertap='markertap'

+ 29
- 13
src/pages/FeedbackText/index.jsx Voir le fichier

@@ -12,26 +12,42 @@ import './style.less'
12 12
 export default (props) => {
13 13
 
14 14
   const [textAreaValue, setTextAreaValue] = useState('')
15
-
15
+  const [loading, setLoading] = useState(false)
16 16
 
17 17
   const onSubmitClick = () => {
18
+    setLoading(true)
18 19
     console.log('textAreaValue', textAreaValue);
19
-    feedback({ content: textAreaValue }).then(() => {
20
+    if (textAreaValue == '') {
20 21
       Taro.showToast({
21
-        title: '反馈已收到!',
22
-        icon: 'success',
22
+        title: '请填写内容哦',
23
+        icon: 'none',
23 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,7 +63,7 @@ export default (props) => {
47 63
           <Textarea placeholder='请留下您宝贵的意见和建议!' className='components-page-TextareaCentent' autoHeight onInput={(e) => { setTextAreaValue(e.detail.value) }} />
48 64
         </View>
49 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 67
         </View>
52 68
       </View>
53 69
     </View>

+ 2
- 2
src/pages/MyAddressList/AddressInfos/index.jsx Voir le fichier

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

+ 2
- 2
src/pages/OrderInfo/index.jsx Voir le fichier

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

+ 1
- 1
src/pages/userInfo/index.jsx Voir le fichier

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