diff --git a/pages/home/index.js b/pages/home/index.js
index 46ae0e2..587e488 100644
--- a/pages/home/index.js
+++ b/pages/home/index.js
@@ -325,11 +325,19 @@ Page({
});
},
fail: function(res) {
- console.log(res);
+ that.setData({
+ latitude: 31.2336800000,
+ longitude: 121.4715700000,
+ })
+ that.getData({
+ latitude: that.data.latitude,
+ longitude: that.data.longitude,
+ zoom: 1
+ });
if (res.errMsg == 'getLocation:fail auth deny' || res.errMsg == 'getLocation:fail:auth denied') {
- that.setData({
- isShowAuth: true
- })
+ // that.setData({
+ // isShowAuth: true
+ // })
}
},
})
@@ -480,15 +488,44 @@ Page({
})
},
- // 回到开始
+ // 由原来的回到开始改为定位
goFrist() {
- let list = [{
- longitude: this.data.longitude,
- latitude: this.data.latitude
- }];
- // this.data.includePoints
+ let that = this;
+ wx.getLocation({
+ type: 'gcj02',
+ success: function(res) {
+ that.setData({
+ latitude: res.latitude,
+ longitude: res.longitude,
+ })
+ that.getData({
+ latitude: res.latitude,
+ longitude: res.longitude,
+ zoom: 1
+ });
+ let list = [{
+ longitude: this.data.longitude,
+ latitude: this.data.latitude
+ }];
+ // this.data.includePoints
+ this.setData({
+ includePoints: list
+ })
+ },
+ fail: function(res) {
+ console.log(res.errMsg)
+ if (res.errMsg == 'getLocation:fail auth deny' || res.errMsg == 'getLocation:fail:auth denied') {
+ that.setData({
+ isShowAuth: true
+ })
+ }
+ },
+ })
+ },
+ onCancel(e){
+ console.log(e)
this.setData({
- includePoints: list
+ isShowAuth: false
})
}
})
diff --git a/pages/home/index.wxml b/pages/home/index.wxml
index cf5db33..9cffc2a 100644
--- a/pages/home/index.wxml
+++ b/pages/home/index.wxml
@@ -112,4 +112,4 @@
-
+
diff --git a/pages/sportsGroundList/index.js b/pages/sportsGroundList/index.js
index f94a717..653519f 100644
--- a/pages/sportsGroundList/index.js
+++ b/pages/sportsGroundList/index.js
@@ -24,7 +24,7 @@ Page({
this.setData({
state: options.state
})
- this.getLocation();
+ this.getData();
},
/**
@@ -144,35 +144,6 @@ Page({
isShowNewplot: true
})
})
- },
+ }
- // 活动当前坐标
- getLocation() {
- let that = this;
- wx.getLocation({
- type: 'gcj02',
- success: function(res) {
- latitude = res.latitude;
- longitude = res.longitude;
- that.getData()
- },
- fail: function(res) {
- if (res.errMsg == 'getLocation:fail auth deny' || res.errMsg == 'getLocation:fail:auth denied') {
- that.setData({
- isShowAuth: true
- })
- }
- },
- })
- },
-
- // 获取授权
- setAuthSuccess(e) {
- if (e.detail.authSetting['scope.userLocation']) {
- this.getLocation();
- this.setData({
- isShowAuth: false
- })
- }
- },
-})
\ No newline at end of file
+})
diff --git a/pages/sportsGroundList/index.wxml b/pages/sportsGroundList/index.wxml
index dabf4f7..ef6eb5b 100644
--- a/pages/sportsGroundList/index.wxml
+++ b/pages/sportsGroundList/index.wxml
@@ -34,9 +34,7 @@
-
-
暂无运动场馆 ~
-
\ No newline at end of file
+
diff --git a/project.config.json b/project.config.json
index b22fba3..fbb3691 100644
--- a/project.config.json
+++ b/project.config.json
@@ -1,7 +1,8 @@
{
"description": "项目配置文件。",
"packOptions": {
- "ignore": []
+ "ignore": [],
+ "include": []
},
"setting": {
"urlCheck": false,
@@ -42,22 +43,11 @@
"libVersion": "2.17.0",
"appid": "wx73eb8a9ed10a029d",
"projectname": "%E6%99%BA%E6%85%A7%E4%BA%91%E9%A6%86",
- "isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
- "condition": {
- "search": {
- "list": []
- },
- "conversation": {
- "list": []
- },
- "game": {
- "currentL": -1,
- "list": []
- },
- "miniprogram": {
- "list": []
- }
+ "condition": {},
+ "editorSetting": {
+ "tabIndent": "insertSpaces",
+ "tabSize": 2
}
}
\ No newline at end of file