@@ -63,7 +63,10 @@
"scope.userLocation" : {
"desc" : "你的位置信息将用于打卡签到定位"
}
- }
+ },
+ "requiredPrivateInfos": [
+ "getLocation"
+ ]
},
"mp-alipay" : {
"usingComponents" : true
@@ -99,13 +99,15 @@
},1000)
getLocation(){
+ const self=this;
uni.getLocation({
type: 'wgs84',
success: function (res) {
- this.formData.dutyLongitude=res.longitude
- this.formData.dutyLatitude=res.latitude
+ self.formData.dutyLongitude=res.longitude
+ self.formData.dutyLatitude=res.latitude
fail(res) {
+ // console.log(res)
// uni.showToast({
// icon:"none",
// title:"获取位置失败"
@@ -64,5 +64,8 @@
"desc": "你的位置信息将用于打卡签到定位"
+ ],
"usingComponents": {}