mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 19:23:26 +00:00
fix: 修复应用商店参数失效问题
This commit is contained in:
parent
34c56980d4
commit
4c34fe9b85
12
resources/assets/js/store/actions.js
vendored
12
resources/assets/js/store/actions.js
vendored
@ -4675,6 +4675,11 @@ export default {
|
|||||||
if (!data.id || !data.name || !data.url) {
|
if (!data.id || !data.name || !data.url) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
data.url = data.url.replace(/\{window[._]location[._](\w+)}/ig, (match, property) => {
|
||||||
|
if (property in window.location) {
|
||||||
|
return window.location[property];
|
||||||
|
}
|
||||||
|
})
|
||||||
const config = {
|
const config = {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
@ -4697,12 +4702,7 @@ export default {
|
|||||||
.replace(/\{user_token}/g, encodeURIComponent(state.userToken))
|
.replace(/\{user_token}/g, encodeURIComponent(state.userToken))
|
||||||
.replace(/\{system_theme}/g, state.systemConfig.themeName)
|
.replace(/\{system_theme}/g, state.systemConfig.themeName)
|
||||||
.replace(/\{system_lang}/g, languageName)
|
.replace(/\{system_lang}/g, languageName)
|
||||||
.replace(/\{system_base_url}/g, $A.mainUrl('').replace(/\/$/, ''))
|
.replace(/\{system_base_url}/g, $A.mainUrl('').replace(/\/$/, ''));
|
||||||
.replace(/\{window_location_(\w+)}/g, (match, property) => {
|
|
||||||
if (property in window.location) {
|
|
||||||
return window.location[property];
|
|
||||||
}
|
|
||||||
});
|
|
||||||
emitter.emit('observeMicroApp:open', config);
|
emitter.emit('observeMicroApp:open', config);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user