Showing
1 changed file
with
4 additions
and
9 deletions
@@ -29,20 +29,15 @@ Component({ | @@ -29,20 +29,15 @@ Component({ | ||
29 | * 更新属性和数据的方法与更新页面数据的方法类似 | 29 | * 更新属性和数据的方法与更新页面数据的方法类似 |
30 | */ | 30 | */ |
31 | methods: { | 31 | methods: { |
32 | - init(storeId,productId) { | ||
33 | - if(productId){ | ||
34 | - this.setData({ | ||
35 | - productId | ||
36 | - }) | ||
37 | - } | 32 | + init() { |
38 | return new Promise((resolve) => { | 33 | return new Promise((resolve) => { |
39 | let param = {}; | 34 | let param = {}; |
40 | this.dialog = this.selectComponent("#dialog"); | 35 | this.dialog = this.selectComponent("#dialog"); |
41 | wx.getLocation({ | 36 | wx.getLocation({ |
42 | success: (res) => { | 37 | success: (res) => { |
43 | - param.user_latitude = '32.049999'; | ||
44 | - param.user_longitude = '118.790001'; | ||
45 | - param.store_id = this.properties.storeId || storeId; | 38 | + param.user_latitude = res.latitude; |
39 | + param.user_longitude = res.longitude; | ||
40 | + param.store_id = this.properties.storeId; | ||
46 | storeApi.checkStore(param, () => { | 41 | storeApi.checkStore(param, () => { |
47 | wx.hideLoading(); | 42 | wx.hideLoading(); |
48 | }).then(r => { | 43 | }).then(r => { |
-
Please register or login to post a comment