@heycar/heycars-map 0.9.27-google8 → 0.9.27-google9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -137,6 +137,7 @@ function wechatWatchPosition(onSuccess, onError, option) {
|
|
|
137
137
|
unwatchVisibilityState();
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
|
+
let isAlipayUserDenied = false;
|
|
140
141
|
function alipayWatchPosition(onSuccess, onError, option, getLocationFn) {
|
|
141
142
|
let enable = true;
|
|
142
143
|
let prevGeoPosition = void 0;
|
|
@@ -150,6 +151,8 @@ function alipayWatchPosition(onSuccess, onError, option, getLocationFn) {
|
|
|
150
151
|
await sleep(ALIPAY_GET_LOCATION_INTERVAL);
|
|
151
152
|
continue;
|
|
152
153
|
}
|
|
154
|
+
if (isAlipayUserDenied)
|
|
155
|
+
break;
|
|
153
156
|
const geoPosition = await new Promise((resolve) => {
|
|
154
157
|
const handleSuccess = (res) => {
|
|
155
158
|
lastSuccessfulResponse = res;
|
|
@@ -172,7 +175,7 @@ function alipayWatchPosition(onSuccess, onError, option, getLocationFn) {
|
|
|
172
175
|
geoErrorMessage = message;
|
|
173
176
|
resolve(void 0);
|
|
174
177
|
if (code == 2001 || code == 2002 || code == 2003)
|
|
175
|
-
|
|
178
|
+
isAlipayUserDenied = true;
|
|
176
179
|
if (prevMessage === message)
|
|
177
180
|
return;
|
|
178
181
|
console.warn("MyWarning: my.getLocation failed code, message = ", code, message);
|
package/dist/utils/log.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const availableLogKeys = /* @__PURE__ */ new Set();
|
|
2
2
|
const pkgName = "@heycar/heycars-map";
|
|
3
|
-
const pkgVersion = "0.9.27-
|
|
3
|
+
const pkgVersion = "0.9.27-google9";
|
|
4
4
|
const isEnableLog = (name) => {
|
|
5
5
|
const searchParam = new URLSearchParams(location.search);
|
|
6
6
|
return searchParam.has(`log-${name}`);
|