张延森 5 年 前
コミット
41a1cdd3dd
共有1 個のファイルを変更した9 個の追加9 個の削除を含む
  1. 9
    9
      src/pages/project/index.js

+ 9
- 9
src/pages/project/index.js ファイルの表示

@@ -94,25 +94,25 @@ export default class Index extends Component {
94 94
           let curCity = cityList.filter(item => {
95 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 101
           this.updateCity(curCity[0] || cityList[0])
102 102
         },
103 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 108
           console.error(err)
109 109
           this.updateCity(cityList[0])
110 110
         },
111 111
       })
112 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 117
       console.error(err)
118 118
       this.updateCity(cityList[0])