|
@@ -12,7 +12,11 @@ Component({ |
|
@@ -12,7 +12,11 @@ Component({ |
|
12
|
hasAllowaAuthDeny:{//是否允许用户拒绝
|
12
|
hasAllowaAuthDeny:{//是否允许用户拒绝
|
|
13
|
type:Boolean,
|
13
|
type:Boolean,
|
|
14
|
value:true,
|
14
|
value:true,
|
|
15
|
- }
|
15
|
+ },
|
|
|
|
16
|
+ hasAllowLoading:{//包间查找中
|
|
|
|
17
|
+ type:Boolean,
|
|
|
|
18
|
+ value:true,
|
|
|
|
19
|
+ },
|
|
16
|
},
|
20
|
},
|
|
17
|
|
21
|
|
|
18
|
/**
|
22
|
/**
|
|
@@ -38,7 +42,7 @@ Component({ |
|
@@ -38,7 +42,7 @@ Component({ |
|
38
|
latitude: '',
|
42
|
latitude: '',
|
|
39
|
longitude: '',
|
43
|
longitude: '',
|
|
40
|
});
|
44
|
});
|
|
41
|
- wx.hideLoading()
|
45
|
+ if(this.data.hasAllowLoading) wx.hideLoading()
|
|
42
|
return;
|
46
|
return;
|
|
43
|
}
|
47
|
}
|
|
44
|
if(failCount>2){//定位失败
|
48
|
if(failCount>2){//定位失败
|
|
@@ -55,7 +59,7 @@ Component({ |
|
@@ -55,7 +59,7 @@ Component({ |
|
55
|
latitude:'',
|
59
|
latitude:'',
|
|
56
|
longitude:'',
|
60
|
longitude:'',
|
|
57
|
});
|
61
|
});
|
|
58
|
- wx.hideLoading()
|
62
|
+ if(this.data.hasAllowLoading) wx.hideLoading()
|
|
59
|
},
|
63
|
},
|
|
60
|
})
|
64
|
})
|
|
61
|
return;
|
65
|
return;
|
|
@@ -69,7 +73,7 @@ Component({ |
|
@@ -69,7 +73,7 @@ Component({ |
|
69
|
latitude: '',
|
73
|
latitude: '',
|
|
70
|
longitude: '',
|
74
|
longitude: '',
|
|
71
|
});
|
75
|
});
|
|
72
|
- wx.hideLoading()
|
76
|
+ if(this.data.hasAllowLoading) wx.hideLoading()
|
|
73
|
return;
|
77
|
return;
|
|
74
|
}
|
78
|
}
|
|
75
|
this.selectComponent('#showModal').options({
|
79
|
this.selectComponent('#showModal').options({
|
|
@@ -88,9 +92,11 @@ Component({ |
|
@@ -88,9 +92,11 @@ Component({ |
|
88
|
_getPos(){
|
92
|
_getPos(){
|
|
89
|
return new Promise((success, fail) => {
|
93
|
return new Promise((success, fail) => {
|
|
90
|
let rex={latitude:'',longitude:''};
|
94
|
let rex={latitude:'',longitude:''};
|
|
91
|
- wx.showLoading({
|
|
|
|
92
|
- title: '包间查找中',
|
|
|
|
93
|
- })
|
95
|
+ if(this.data.hasAllowLoading){
|
|
|
|
96
|
+ wx.showLoading({
|
|
|
|
97
|
+ title: '包间查找中',
|
|
|
|
98
|
+ })
|
|
|
|
99
|
+ }
|
|
94
|
let hasSuccess=false;
|
100
|
let hasSuccess=false;
|
|
95
|
wx.getLocation({
|
101
|
wx.getLocation({
|
|
96
|
type: 'gcj02',
|
102
|
type: 'gcj02',
|
|
@@ -110,7 +116,7 @@ Component({ |
|
@@ -110,7 +116,7 @@ Component({ |
|
110
|
setTimeout(()=>{
|
116
|
setTimeout(()=>{
|
|
111
|
if(!hasSuccess){
|
117
|
if(!hasSuccess){
|
|
112
|
success(rex)
|
118
|
success(rex)
|
|
113
|
- wx.hideLoading()
|
119
|
+ if(this.data.hasAllowLoading) wx.hideLoading()
|
|
114
|
}
|
120
|
}
|
|
115
|
},2000)
|
121
|
},2000)
|
|
116
|
})
|
122
|
})
|