mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-02 15:07:11 +00:00
no message
This commit is contained in:
parent
6cf2279d21
commit
41faf72c37
@ -20,3 +20,9 @@
|
||||
3. 执行 `git commit` 相关操作
|
||||
4. 制作标签
|
||||
5. 执行 `./cmd electron` 相关操作
|
||||
|
||||
|
||||
## 编译App
|
||||
|
||||
1. 执行 `./cmd appbuild` 编译
|
||||
2. 进入 `resources/mobile` eeui框架内打包Android或iOS应用
|
||||
|
||||
1
electron/build.js
vendored
1
electron/build.js
vendored
@ -131,6 +131,7 @@ function startBuild(data, publish) {
|
||||
const publicDir = path.resolve(__dirname, "../resources/mobile/src/public");
|
||||
fse.removeSync(publicDir)
|
||||
fse.copySync(electronDir, publicDir)
|
||||
child_process.spawnSync("eeui", ["build"], {stdio: "inherit", cwd: "resources/mobile"});
|
||||
return;
|
||||
}
|
||||
// package.json Backup
|
||||
|
||||
@ -32,9 +32,6 @@ export default {
|
||||
},
|
||||
|
||||
created() {
|
||||
if ($A.urlParameter('token')) {
|
||||
this.$store.state.userToken = $A.urlParameter('token');
|
||||
}
|
||||
this.electronEvents();
|
||||
},
|
||||
|
||||
|
||||
45
resources/assets/js/functions/common.js
vendored
45
resources/assets/js/functions/common.js
vendored
@ -704,34 +704,37 @@
|
||||
|
||||
/**
|
||||
* 刷新当前地址
|
||||
* @param url
|
||||
* @param key
|
||||
* @returns {string}
|
||||
*/
|
||||
reloadUrl(url = undefined, key = undefined) {
|
||||
url = key || window.location.href;
|
||||
key = (key || '_') + '='
|
||||
let reg = new RegExp(key + '\\d+');
|
||||
let timestamp = this.Time();
|
||||
if (url.indexOf(key) > -1) {
|
||||
url = url.replace(reg, key + timestamp);
|
||||
} else {
|
||||
if (url.indexOf('\?') > -1) {
|
||||
let urlArr = url.split('\?');
|
||||
if (urlArr[1]) {
|
||||
url = urlArr[0] + '?' + key + timestamp + '&' + urlArr[1];
|
||||
} else {
|
||||
url = urlArr[0] + '?' + key + timestamp;
|
||||
}
|
||||
reloadUrl() {
|
||||
if ($A.isEEUiApp && $A.isAndroid()) {
|
||||
let url = window.location.href;
|
||||
let key = '_='
|
||||
let reg = new RegExp(key + '\\d+');
|
||||
let timestamp = this.Time();
|
||||
if (url.indexOf(key) > -1) {
|
||||
url = url.replace(reg, key + timestamp);
|
||||
} else {
|
||||
if (url.indexOf('#') > -1) {
|
||||
url = url.split('#')[0] + '?' + key + timestamp + location.hash;
|
||||
if (url.indexOf('\?') > -1) {
|
||||
let urlArr = url.split('\?');
|
||||
if (urlArr[1]) {
|
||||
url = urlArr[0] + '?' + key + timestamp + '&' + urlArr[1];
|
||||
} else {
|
||||
url = urlArr[0] + '?' + key + timestamp;
|
||||
}
|
||||
} else {
|
||||
url = url + '?' + key + timestamp;
|
||||
if (url.indexOf('#') > -1) {
|
||||
url = url.split('#')[0] + '?' + key + timestamp + location.hash;
|
||||
} else {
|
||||
url = url + '?' + key + timestamp;
|
||||
}
|
||||
}
|
||||
}
|
||||
const webview = requireModuleJs("webview");
|
||||
webview.setUrl(url);
|
||||
} else {
|
||||
window.location.reload();
|
||||
}
|
||||
window.location.href = url
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@ -300,10 +300,11 @@ export default {
|
||||
this.viewPicture(msg.path);
|
||||
return
|
||||
}
|
||||
const uri = `/single/file/msg/${this.msgData.id}`;
|
||||
if (this.$Electron) {
|
||||
this.$Electron.sendMessage('windowRouter', {
|
||||
name: `file-msg-${this.msgData.id}`,
|
||||
path: `/single/file/msg/${this.msgData.id}`,
|
||||
path: uri,
|
||||
userAgent: "/hideenOfficeTitle/",
|
||||
force: false,
|
||||
config: {
|
||||
@ -319,10 +320,11 @@ export default {
|
||||
eeui.openPage({
|
||||
pageType: 'web',
|
||||
pageTitle: `${this.msgData.msg.name} (${$A.bytesToSize(this.msgData.msg.size)})`,
|
||||
url: $A.apiUrl(`../#/single/file/msg/${this.msgData.id}?token=${this.userToken}`)
|
||||
statusBarStyle: false,
|
||||
url: $A.apiUrl(`../#/token?token=${this.userToken}&from=${encodeURIComponent($A.apiUrl(`../#${uri}`))}`)
|
||||
}, _ => {});
|
||||
} else {
|
||||
window.open($A.apiUrl(`../single/file/msg/${this.msgData.id}`))
|
||||
window.open($A.apiUrl(`..${uri}`))
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@ -182,10 +182,11 @@ export default {
|
||||
break;
|
||||
|
||||
case 'preview':
|
||||
const uri = `/single/file/${this.fileId}?history_id=${row.id}&history_at=${row.created_at}`;
|
||||
if (this.$Electron) {
|
||||
this.$Electron.sendMessage('windowRouter', {
|
||||
name: `file-${this.fileId}-${row.id}`,
|
||||
path: `/single/file/${this.fileId}?history_id=${row.id}&history_at=${row.created_at}`,
|
||||
path: uri,
|
||||
userAgent: "/hideenOfficeTitle/",
|
||||
force: false,
|
||||
config: {
|
||||
@ -204,10 +205,11 @@ export default {
|
||||
eeui.openPage({
|
||||
pageType: 'web',
|
||||
pageTitle: $A.getFileName(this.file) + ` [${row.created_at}]`,
|
||||
url: $A.apiUrl(`../#/single/file/${this.fileId}?history_id=${row.id}&history_at=${row.created_at}&token=${this.userToken}`)
|
||||
statusBarStyle: false,
|
||||
url: $A.apiUrl(`../#/token?token=${this.userToken}&from=${encodeURIComponent($A.apiUrl(`../#${uri}`))}`)
|
||||
}, _ => {});
|
||||
} else {
|
||||
window.open($A.apiUrl(`../single/file/${this.fileId}?history_id=${row.id}&history_at=${row.created_at}`))
|
||||
window.open($A.apiUrl(`..${uri}`))
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -723,7 +723,7 @@ export default {
|
||||
openTask: {
|
||||
handler(data) {
|
||||
this.taskDetail = $A.cloneJSON(data);
|
||||
if (this.taskDetail.parent_id === 0 && this.$refs.name) {
|
||||
if (this.$refs.name) {
|
||||
this.__openTask && clearTimeout(this.__openTask);
|
||||
this.__openTask = setTimeout(this.$refs.name.resizeTextarea, 100)
|
||||
}
|
||||
@ -1249,10 +1249,11 @@ export default {
|
||||
}
|
||||
return
|
||||
}
|
||||
const uri = `/single/file/task/${file.id}`;
|
||||
if (this.$Electron) {
|
||||
this.$Electron.sendMessage('windowRouter', {
|
||||
name: `file-task-${file.id}`,
|
||||
path: `/single/file/task/${file.id}`,
|
||||
path: uri,
|
||||
userAgent: "/hideenOfficeTitle/",
|
||||
force: false,
|
||||
config: {
|
||||
@ -1268,10 +1269,11 @@ export default {
|
||||
eeui.openPage({
|
||||
pageType: 'web',
|
||||
pageTitle: `${file.name} (${$A.bytesToSize(file.size)})`,
|
||||
url: $A.apiUrl(`../#/single/file/task/${file.id}?token=${this.userToken}`)
|
||||
statusBarStyle: false,
|
||||
url: $A.apiUrl(`../#/token?token=${this.userToken}&from=${encodeURIComponent($A.apiUrl(`../#${uri}`))}`)
|
||||
}, _ => {});
|
||||
} else {
|
||||
window.open($A.apiUrl(`../single/file/task/${file.id}`))
|
||||
window.open($A.apiUrl(`..${uri}`))
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
54
resources/assets/js/pages/token.vue
Normal file
54
resources/assets/js/pages/token.vue
Normal file
@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<div class="token-transfer">
|
||||
<Loading/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.token-transfer {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
export default {
|
||||
mounted() {
|
||||
this.goNext();
|
||||
},
|
||||
|
||||
methods: {
|
||||
goNext() {
|
||||
const params = $A.urlParameterAll();
|
||||
if (params.token) {
|
||||
this.$store.dispatch("call", {
|
||||
url: 'users/info',
|
||||
header: {
|
||||
token: params.token
|
||||
}
|
||||
}).then(result => {
|
||||
this.$store.dispatch("saveUserInfo", result.data);
|
||||
this.goNext2();
|
||||
}).catch(_ => {
|
||||
this.goForward({name: 'login'}, true);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
goNext2() {
|
||||
let fromUrl = decodeURIComponent($A.getObject(this.$route.query, 'from'));
|
||||
if (fromUrl) {
|
||||
window.location.replace(fromUrl);
|
||||
} else {
|
||||
this.goForward({name: 'manage-dashboard'}, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
5
resources/assets/js/routes.js
vendored
5
resources/assets/js/routes.js
vendored
@ -107,6 +107,11 @@ export default [
|
||||
path: '/single/report/detail/:reportDetailId',
|
||||
component: () => import('./pages/single/reportDetail.vue')
|
||||
},
|
||||
{
|
||||
name: 'token',
|
||||
path: '/token',
|
||||
component: () => import('./pages/token.vue'),
|
||||
},
|
||||
{
|
||||
name: 'login',
|
||||
path: '/login',
|
||||
|
||||
20
resources/assets/js/store/actions.js
vendored
20
resources/assets/js/store/actions.js
vendored
@ -10,15 +10,21 @@ export default {
|
||||
*/
|
||||
call({state, dispatch}, params) {
|
||||
if (!$A.isJson(params)) params = {url: params}
|
||||
if (!$A.isJson(params.header)) params.header = {}
|
||||
const header = {
|
||||
'Content-Type': 'application/json',
|
||||
'language': $A.getLanguage(),
|
||||
'token': state.userToken,
|
||||
'fd': $A.getSessionStorageString("userWsFd"),
|
||||
'version': window.systemInfo.version || "0.0.1",
|
||||
'platform': $A.Platform,
|
||||
}
|
||||
if ($A.isJson(params.header)) {
|
||||
params.header = Object.assign(header, params.header)
|
||||
} else {
|
||||
params.header = header;
|
||||
}
|
||||
params.url = $A.apiUrl(params.url);
|
||||
params.data = $A.date2string(params.data);
|
||||
params.header['Content-Type'] = 'application/json';
|
||||
params.header['language'] = $A.getLanguage();
|
||||
params.header['token'] = state.userToken;
|
||||
params.header['fd'] = $A.getSessionStorageString("userWsFd");
|
||||
params.header['version'] = window.systemInfo.version || "0.0.1";
|
||||
params.header['platform'] = $A.Platform;
|
||||
//
|
||||
const cloneParams = $A.cloneJSON(params);
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
@ -90,7 +90,7 @@
|
||||
}
|
||||
}
|
||||
.advanced-option {
|
||||
margin-top: 42px;
|
||||
padding-top: 42px;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -108,6 +108,11 @@
|
||||
align-items: center;
|
||||
margin-left: 24px;
|
||||
height: 34px;
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
&::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
> li {
|
||||
list-style: none;
|
||||
margin-left: 3px;
|
||||
@ -200,3 +205,27 @@
|
||||
padding: 26px 0 22px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.task-add {
|
||||
.task-add-form,
|
||||
.task-add-advanced {
|
||||
.advanced-option {
|
||||
width: calc(100% + 8px);
|
||||
padding-right: 8px;
|
||||
justify-content: space-between;
|
||||
> button {
|
||||
&.advanced {
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
.advanced-priority {
|
||||
margin-left: 8px;
|
||||
}
|
||||
.advanced-time {
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user