mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-27 13:08:13 +00:00
fix: 修复客户端无法打开部分应用的问题
This commit is contained in:
parent
32f30826b9
commit
40f5ba5004
@ -96,7 +96,7 @@ services:
|
|||||||
appstore:
|
appstore:
|
||||||
container_name: "dootask-appstore-${APP_ID}"
|
container_name: "dootask-appstore-${APP_ID}"
|
||||||
privileged: true
|
privileged: true
|
||||||
image: "dootask/appstore:0.1.2"
|
image: "dootask/appstore:0.1.3"
|
||||||
volumes:
|
volumes:
|
||||||
- shared_data:/usr/share/dootask
|
- shared_data:/usr/share/dootask
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
|||||||
14
resources/assets/js/store/actions.js
vendored
14
resources/assets/js/store/actions.js
vendored
@ -4679,15 +4679,17 @@ export default {
|
|||||||
if (!data.id || !data.name || !data.url) {
|
if (!data.id || !data.name || !data.url) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
const serverLocation = new URL($A.mainUrl(''))
|
||||||
data.url = data.url
|
data.url = data.url
|
||||||
.replace(/^\:(\d+)/ig, (_, port) => {
|
.replace(/^\:(\d+)/ig, (_, port) => {
|
||||||
return window.location.protocol + '//' + window.location.hostname + ':' + port;
|
return serverLocation.protocol + '//' + serverLocation.hostname + ':' + port;
|
||||||
})
|
})
|
||||||
.replace(/\{window[._]location[._](\w+)}/ig, (_, property) => {
|
.replace(/\{window[._]location[._](\w+)}/ig, (_, property) => {
|
||||||
if (property in window.location) {
|
if (property in serverLocation) {
|
||||||
return window.location[property];
|
return serverLocation[property];
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.replace(/\{system_base_url}/g, serverLocation.origin)
|
||||||
const config = {
|
const config = {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
@ -4703,14 +4705,14 @@ export default {
|
|||||||
$A.modalWarning(`应用「${config.id}」未安装`);
|
$A.modalWarning(`应用「${config.id}」未安装`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
config.url = config.url.replace(/\{user_id}/g, state.userId)
|
config.url = config.url
|
||||||
|
.replace(/\{user_id}/g, state.userId)
|
||||||
.replace(/\{user_nickname}/g, encodeURIComponent(state.userInfo.nickname))
|
.replace(/\{user_nickname}/g, encodeURIComponent(state.userInfo.nickname))
|
||||||
.replace(/\{user_email}/g, encodeURIComponent(state.userInfo.email))
|
.replace(/\{user_email}/g, encodeURIComponent(state.userInfo.email))
|
||||||
.replace(/\{user_avatar}/g, encodeURIComponent(state.userInfo.userimg))
|
.replace(/\{user_avatar}/g, encodeURIComponent(state.userInfo.userimg))
|
||||||
.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(/\/$/, ''));
|
|
||||||
emitter.emit('observeMicroApp:open', config);
|
emitter.emit('observeMicroApp:open', config);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user