Commit 500b0360 authored by wangqinghua's avatar wangqinghua

签到发布

parent 28afe850
...@@ -50,6 +50,8 @@ export class DutySignUpPage { ...@@ -50,6 +50,8 @@ export class DutySignUpPage {
}; };
this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/signIn', data) this.appService.ObserverHttpGetOption('/wisdomgroup/schedule/signIn', data)
.subscribe((res) => { .subscribe((res) => {
this.commonSer.toast('签到成功!')
this.navCtrl.pop();
}) })
} }
...@@ -69,6 +71,11 @@ export class DutySignUpPage { ...@@ -69,6 +71,11 @@ export class DutySignUpPage {
calcuDistance() { calcuDistance() {
this.geolocation.getCurrentPosition().then((resp) => { this.geolocation.getCurrentPosition().then((resp) => {
const distance = this.getDisance(this.mainLat, this.mainLng, resp.coords.latitude, resp.coords.longitude); const distance = this.getDisance(this.mainLat, this.mainLng, resp.coords.latitude, resp.coords.longitude);
if(distance < 1000){
this.signIn();
}else{
this.commonSer.toast('距离太远,无法签到');
}
}).catch((error) => { }).catch((error) => {
console.log(error); console.log(error);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment