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