mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 03:01:12 +00:00
feat: 邀请加入项目的链接客户端直接打开
This commit is contained in:
parent
2737fa4697
commit
bbb3cee927
BIN
public/images/guide.png
Normal file
BIN
public/images/guide.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@ -21,6 +21,9 @@
|
||||
|
||||
<!--Hidden IFrame-->
|
||||
<iframe v-for="item in iframes" :key="item.key" v-if="item.url" v-show="false" :src="item.url"></iframe>
|
||||
|
||||
<!--引导页-->
|
||||
<GuidePage/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -38,12 +41,13 @@ import FloatSpinner from "./components/FloatSpinner";
|
||||
import RightBottom from "./components/RightBottom";
|
||||
import PreviewImageState from "./components/PreviewImage/state";
|
||||
import NetworkException from "./components/NetworkException";
|
||||
import GuidePage from "./components/GuidePage";
|
||||
import TaskOperation from "./pages/manage/components/TaskOperation";
|
||||
import {mapState} from "vuex";
|
||||
import {languageType} from "./language";
|
||||
|
||||
export default {
|
||||
components: {TaskOperation, NetworkException, PreviewImageState, RightBottom, FloatSpinner},
|
||||
components: {TaskOperation, NetworkException, PreviewImageState, RightBottom, FloatSpinner, GuidePage},
|
||||
|
||||
data() {
|
||||
return {
|
||||
@ -387,6 +391,10 @@ export default {
|
||||
window.__onNotificationPermissionStatus = (ret) => {
|
||||
this.$store.state.appNotificationPermission = $A.runNum(ret) == 1;
|
||||
}
|
||||
// 前往页面
|
||||
window.__handleLink = (path) => {
|
||||
this.goForward({ path: (path || '').indexOf('/') !==0 ? "/" + path : path });
|
||||
}
|
||||
},
|
||||
|
||||
otherEvents() {
|
||||
|
||||
41
resources/assets/js/components/GuidePage.vue
Normal file
41
resources/assets/js/components/GuidePage.vue
Normal file
@ -0,0 +1,41 @@
|
||||
<template>
|
||||
<div v-if="show" class="common-guide">
|
||||
<img :src="src" width="100%" />
|
||||
<div>
|
||||
<Button type="default" @click="show = false" size="large" long >{{ $L('忍心拒绝') }}</Button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'GuidePage',
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
src: '',
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.src = $.apiUrl('../images/guide.png');
|
||||
},
|
||||
|
||||
watch: {
|
||||
'$route': {
|
||||
handler(route) {
|
||||
this.show = false;
|
||||
if (navigator.userAgent.indexOf("MicroMessenger") === -1) {
|
||||
return;
|
||||
}
|
||||
//
|
||||
if (route.name == 'manage-project-invite') {
|
||||
this.show = true;
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1457,6 +1457,7 @@ export default {
|
||||
},
|
||||
|
||||
/********************文件打包下载部分************************/
|
||||
|
||||
packPercentageParse(val) {
|
||||
return parseInt(val, 10);
|
||||
},
|
||||
@ -1479,13 +1480,12 @@ export default {
|
||||
file.percentage = Math.max(1, pack.progress);
|
||||
if (file.status != 'finished' && file.percentage >= 100) {
|
||||
file.status = 'finished';
|
||||
// 下载文件
|
||||
this.downloadPackFile(file.name);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
async downloadPackFile(filePackName) {
|
||||
downloadPackFile(filePackName) {
|
||||
const downloadUrl = $A.apiUrl(`file/download/confirm?name=${filePackName}&token=${this.userToken}`);
|
||||
if (!$A.Electron && !$A.isEEUiApp) {
|
||||
const link = document.createElement('a');
|
||||
|
||||
@ -60,6 +60,13 @@ export default {
|
||||
'$route': {
|
||||
handler(route) {
|
||||
if(route.name == 'manage-project-invite'){
|
||||
// 唤醒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
|
||||
}
|
||||
}
|
||||
//
|
||||
this.code = route.query ? route.query.code : '';
|
||||
this.getData();
|
||||
}
|
||||
|
||||
2
resources/assets/sass/components/_.scss
vendored
2
resources/assets/sass/components/_.scss
vendored
@ -15,3 +15,5 @@
|
||||
@import "report";
|
||||
@import "resize-line";
|
||||
@import "right-bottom";
|
||||
@import "guide-page";
|
||||
|
||||
|
||||
14
resources/assets/sass/components/guide-page.scss
vendored
Normal file
14
resources/assets/sass/components/guide-page.scss
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
.common-guide {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
z-index: 999999;
|
||||
background-color: #000000de;
|
||||
padding: 5px 10px;
|
||||
|
||||
>div {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
BIN
resources/assets/statics/public/images/guide.png
Normal file
BIN
resources/assets/statics/public/images/guide.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
Loading…
x
Reference in New Issue
Block a user