张延森 5 vuotta sitten
vanhempi
commit
41a1cdd3dd
1 muutettua tiedostoa jossa 9 lisäystä ja 9 poistoa
  1. 9
    9
      src/pages/project/index.js

+ 9
- 9
src/pages/project/index.js Näytä tiedosto

94
           let curCity = cityList.filter(item => {
94
           let curCity = cityList.filter(item => {
95
             return item.name == city
95
             return item.name == city
96
           })
96
           })
97
-          Taro.showModal({
98
-            title: 'fail',
99
-            content: JSON.stringify(curCity[0] + "---")
97
+          Taro.showToast({
98
+            title: `当前定位城市:${curCity[0].name}`,
99
+            icon: 'none',
100
           })
100
           })
101
           this.updateCity(curCity[0] || cityList[0])
101
           this.updateCity(curCity[0] || cityList[0])
102
         },
102
         },
103
         fail: (error) => {
103
         fail: (error) => {
104
-          Taro.showModal({
105
-            title: 'fail',
106
-            content: JSON.stringify(err)
104
+          Taro.showToast({
105
+            title: `定位城市错误...`,
106
+            icon: 'none',
107
           })
107
           })
108
           console.error(err)
108
           console.error(err)
109
           this.updateCity(cityList[0])
109
           this.updateCity(cityList[0])
110
         },
110
         },
111
       })
111
       })
112
     }).catch(err => {
112
     }).catch(err => {
113
-      Taro.showModal({
114
-        title: 'catch',
115
-        content: JSON.stringify(err)
113
+      Taro.showToast({
114
+        title: `定位城市错误...`,
115
+        icon: 'none',
116
       })
116
       })
117
       console.error(err)
117
       console.error(err)
118
       this.updateCity(cityList[0])
118
       this.updateCity(cityList[0])