wangfei 6 years ago
parent
commit
05da6c58e1
1 changed files with 3 additions and 4 deletions
  1. 3
    4
      src/pages/user/mainPage/indexPage/index.vue

+ 3
- 4
src/pages/user/mainPage/indexPage/index.vue View File

@@ -172,14 +172,13 @@ export default {
172 172
       return this.$refs.mySwiperH.swiper
173 173
     },
174 174
     ProjectWithLocationList () {
175
-      var data = this.project
175
+      var data = this.project || []
176 176
       if (this.latitude1 === 0 && this.longitude1 === 0) {
177 177
         data.forEach((item) => {
178 178
           item.jl = '未获取到当前定位'
179 179
         })
180 180
         return data
181 181
       } else {
182
-        data = data || []
183 182
         let arr = []
184 183
         let dataNew = []
185 184
         data.forEach((item) => {
@@ -222,9 +221,9 @@ export default {
222 221
           that.setLocation({ latitude1: res.latitude, longitude1: res.longitude })
223 222
         },
224 223
       })
225
-      that.showPage = true
226
-      that.init()
227 224
     })
225
+    that.showPage = true
226
+    that.init()
228 227
   },
229 228
   methods: {
230 229
     ...mapIndexActions(['getIndexLocation', 'getIndexInfo', 'getCourseList', 'setLocation']),