|
@@ -92,7 +92,7 @@ export default {
|
|
|
},
|
|
|
// 签到
|
|
|
signInFun() {
|
|
|
- if(!this.position.latitude || !this.position.longitude){
|
|
|
+ if(!this.position || !this.position.latitude || !this.position.longitude){
|
|
|
uni.showToast({ icon: 'none', title: '位置获取失败,请重新定位后再进行签到' })
|
|
|
return
|
|
|
}else if(!this.photograph){
|
|
@@ -102,8 +102,10 @@ export default {
|
|
|
// 判断是否超出签到范围
|
|
|
validTaskPosition({
|
|
|
storeId: this.stores.id,
|
|
|
- lat: this.position.latitude,
|
|
|
- lng: this.position.longitude
|
|
|
+ point: {
|
|
|
+ lat: this.position.latitude,
|
|
|
+ lng: this.position.longitude,
|
|
|
+ }
|
|
|
}).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
// 跳转开始巡店
|
|
@@ -111,19 +113,7 @@ export default {
|
|
|
url: '/pages/shopTour/shopTour?storeId=' + this.stores.id + '&types=scene'
|
|
|
})
|
|
|
} else {
|
|
|
- this.isOutRange();
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- // 超出范围 提示
|
|
|
- isOutRange() {
|
|
|
- clzConfirm({
|
|
|
- title: '提示',
|
|
|
- content: '您所在的位置超出门店签到范围,无法开启巡店!',
|
|
|
- showCancel: false,
|
|
|
- success: function(res) {
|
|
|
- if (res.confirm || res.index == 0) {
|
|
|
- }
|
|
|
+ uni.showToast({ icon: 'none', title: res.message })
|
|
|
}
|
|
|
});
|
|
|
},
|