765ab286 by ex

添加提示

1 parent fd64d9bb
...@@ -91,13 +91,18 @@ AppClient.prototype.getGPS = function (jsonStr, callback) { ...@@ -91,13 +91,18 @@ AppClient.prototype.getGPS = function (jsonStr, callback) {
91 isRes = true 91 isRes = true
92 var latitude = '' 92 var latitude = ''
93 var longitude = '' 93 var longitude = ''
94 try {
94 var result = /\{([\s\S]*)\}/.exec(data); 95 var result = /\{([\s\S]*)\}/.exec(data);
95 var arr = result[1].split(',') 96 var arr = result[1].split(',')
96 longitude = arr[0].split(':')[1] 97 longitude = arr[0].split(':')[1]
97 latitude = arr[1].split(':')[1] 98 latitude = arr[1].split(':')[1]
99 } catch (e) {
98 layer.open({ 100 layer.open({
99 content: JSON.stringify(longitude,latitude) 101 content: e
100 }) 102 })
103 }
104
105
101 callback(latitude, longitude, responseCallback) 106 callback(latitude, longitude, responseCallback)
102 }) 107 })
103 this.appObj.callHandler("getGPS", param, function (data, responseCallback) { 108 this.appObj.callHandler("getGPS", param, function (data, responseCallback) {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!