|
@@ -38,7 +38,7 @@ export default {
|
|
|
return {
|
|
|
stores: null, // 门店信息
|
|
|
location: '', // 当前位置地址
|
|
|
- photograph: '', // 拍照
|
|
|
+ photograph: '', // 拍照临时地址
|
|
|
position: null // 位置信息
|
|
|
};
|
|
|
},
|
|
@@ -61,9 +61,9 @@ export default {
|
|
|
geocode: true,
|
|
|
success: function(res) {
|
|
|
console.log(res);
|
|
|
+ _this.position = res;
|
|
|
_this.location = res.address.province + res.address.city + res.address.district + res.address.street + res.address.streetNum +'靠近' + res.address.poiName
|
|
|
// console.log(_this.location, '城市编码 ', res.address.cityCode)
|
|
|
- _this.position = res;
|
|
|
},
|
|
|
fail: function(error){
|
|
|
console.log(error)
|
|
@@ -90,6 +90,19 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ // 预览签到图
|
|
|
+ previewPictures() {
|
|
|
+ const photograph = [this.photograph];
|
|
|
+ uni.previewImage({
|
|
|
+ urls: photograph
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 删除签到图
|
|
|
+ cancelPhotograph() {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.photograph = '';
|
|
|
+ }, 500);
|
|
|
+ },
|
|
|
// 签到
|
|
|
signInFun() {
|
|
|
if(!this.position || !this.position.latitude || !this.position.longitude){
|
|
@@ -117,19 +130,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- // 预览签到图
|
|
|
- previewPictures() {
|
|
|
- const photograph = [this.photograph];
|
|
|
- uni.previewImage({
|
|
|
- urls: photograph
|
|
|
- });
|
|
|
- },
|
|
|
- // 删除签到图
|
|
|
- cancelPhotograph() {
|
|
|
- setTimeout(() => {
|
|
|
- this.photograph = '';
|
|
|
- }, 500);
|
|
|
- }
|
|
|
}
|
|
|
};
|
|
|
</script>
|