fix: iOS16-无法打开定位签到的问题

This commit is contained in:
kuaifan 2024-11-11 12:11:01 +08:00
parent 812232b945
commit 34603ff96e

View File

@ -977,20 +977,22 @@ export default {
*/
openAppMapPage({dispatch}, objects) {
return new Promise(resolve => {
const title = $A.L("定位签到")
const channel = $A.randomString(6)
const params = {
title: $A.L("定位签到"),
label: $A.L("选择附近地点"),
placeholder: $A.L("搜索地点"),
noresult: $A.L("附近没有找到地点"),
errtip: $A.L("定位失败"),
title: encodeURIComponent(title),
label: encodeURIComponent($A.L("选择附近地点")),
placeholder: encodeURIComponent($A.L("搜索地点")),
noresult: encodeURIComponent($A.L("附近没有找到地点")),
errtip: encodeURIComponent($A.L("定位失败")),
selectclose: "true",
channel: $A.randomString(6)
channel,
}
$A.eeuiAppSetVariate(`location::${params.channel}`, "");
$A.eeuiAppSetVariate(`location::${channel}`, "");
const url = $A.urlAddParams($A.eeuiAppRewriteUrl('../public/tools/map/index.html'), Object.assign(params, objects || {}))
dispatch('openAppChildPage', {
pageType: 'app',
pageTitle: params.title,
pageTitle: title,
url: 'web.js',
params: {
titleFixed: true,
@ -999,9 +1001,9 @@ export default {
},
callback: ({status}) => {
if (status === 'pause') {
const data = $A.jsonParse($A.eeuiAppGetVariate(`location::${params.channel}`));
const data = $A.jsonParse($A.eeuiAppGetVariate(`location::${channel}`));
if (data.point) {
$A.eeuiAppSetVariate(`location::${params.channel}`, "");
$A.eeuiAppSetVariate(`location::${channel}`, "");
resolve(data);
}
}