fix: 移动打开分享链接时先关闭聊天窗口

This commit is contained in:
weifashi 2023-11-17 15:24:53 +08:00
parent bbb3cee927
commit b8ed8566ee

View File

@ -46,6 +46,7 @@
}
</style>
<script>
import {mapState} from "vuex";
export default {
data() {
return {
@ -56,6 +57,9 @@ export default {
project: {},
}
},
computed: {
...mapState(['dialogId','windowPortrait']),
},
watch: {
'$route': {
handler(route) {
@ -63,9 +67,15 @@ export default {
// app
if (!$A.Electron && !$A.isEEUiApp && navigator.userAgent.indexOf("MicroMessenger") === -1){
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
window.location.href = "dootask://" + route.fullPath
try {
window.location.href = "dootask://" + route.fullPath
} catch (error) {}
}
}
//
if (this.windowPortrait && this.dialogId > 0){
this.$store.dispatch("openDialog", 0)
}
//
this.code = route.query ? route.query.code : '';
this.getData();