no message

This commit is contained in:
kuaifan 2022-05-18 13:09:41 +08:00
parent 6cf2279d21
commit 41faf72c37
11 changed files with 149 additions and 42 deletions

View File

@ -20,3 +20,9 @@
3. 执行 `git commit` 相关操作 3. 执行 `git commit` 相关操作
4. 制作标签 4. 制作标签
5. 执行 `./cmd electron` 相关操作 5. 执行 `./cmd electron` 相关操作
## 编译App
1. 执行 `./cmd appbuild` 编译
2. 进入 `resources/mobile` eeui框架内打包Android或iOS应用

1
electron/build.js vendored
View File

@ -131,6 +131,7 @@ function startBuild(data, publish) {
const publicDir = path.resolve(__dirname, "../resources/mobile/src/public"); const publicDir = path.resolve(__dirname, "../resources/mobile/src/public");
fse.removeSync(publicDir) fse.removeSync(publicDir)
fse.copySync(electronDir, publicDir) fse.copySync(electronDir, publicDir)
child_process.spawnSync("eeui", ["build"], {stdio: "inherit", cwd: "resources/mobile"});
return; return;
} }
// package.json Backup // package.json Backup

View File

@ -32,9 +32,6 @@ export default {
}, },
created() { created() {
if ($A.urlParameter('token')) {
this.$store.state.userToken = $A.urlParameter('token');
}
this.electronEvents(); this.electronEvents();
}, },

View File

@ -704,13 +704,12 @@
/** /**
* 刷新当前地址 * 刷新当前地址
* @param url
* @param key
* @returns {string} * @returns {string}
*/ */
reloadUrl(url = undefined, key = undefined) { reloadUrl() {
url = key || window.location.href; if ($A.isEEUiApp && $A.isAndroid()) {
key = (key || '_') + '=' let url = window.location.href;
let key = '_='
let reg = new RegExp(key + '\\d+'); let reg = new RegExp(key + '\\d+');
let timestamp = this.Time(); let timestamp = this.Time();
if (url.indexOf(key) > -1) { if (url.indexOf(key) > -1) {
@ -731,7 +730,11 @@
} }
} }
} }
window.location.href = url const webview = requireModuleJs("webview");
webview.setUrl(url);
} else {
window.location.reload();
}
}, },
/** /**

View File

@ -300,10 +300,11 @@ export default {
this.viewPicture(msg.path); this.viewPicture(msg.path);
return return
} }
const uri = `/single/file/msg/${this.msgData.id}`;
if (this.$Electron) { if (this.$Electron) {
this.$Electron.sendMessage('windowRouter', { this.$Electron.sendMessage('windowRouter', {
name: `file-msg-${this.msgData.id}`, name: `file-msg-${this.msgData.id}`,
path: `/single/file/msg/${this.msgData.id}`, path: uri,
userAgent: "/hideenOfficeTitle/", userAgent: "/hideenOfficeTitle/",
force: false, force: false,
config: { config: {
@ -319,10 +320,11 @@ export default {
eeui.openPage({ eeui.openPage({
pageType: 'web', pageType: 'web',
pageTitle: `${this.msgData.msg.name} (${$A.bytesToSize(this.msgData.msg.size)})`, 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 { } else {
window.open($A.apiUrl(`../single/file/msg/${this.msgData.id}`)) window.open($A.apiUrl(`..${uri}`))
} }
}, },

View File

@ -182,10 +182,11 @@ export default {
break; break;
case 'preview': case 'preview':
const uri = `/single/file/${this.fileId}?history_id=${row.id}&history_at=${row.created_at}`;
if (this.$Electron) { if (this.$Electron) {
this.$Electron.sendMessage('windowRouter', { this.$Electron.sendMessage('windowRouter', {
name: `file-${this.fileId}-${row.id}`, name: `file-${this.fileId}-${row.id}`,
path: `/single/file/${this.fileId}?history_id=${row.id}&history_at=${row.created_at}`, path: uri,
userAgent: "/hideenOfficeTitle/", userAgent: "/hideenOfficeTitle/",
force: false, force: false,
config: { config: {
@ -204,10 +205,11 @@ export default {
eeui.openPage({ eeui.openPage({
pageType: 'web', pageType: 'web',
pageTitle: $A.getFileName(this.file) + ` [${row.created_at}]`, 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 { } else {
window.open($A.apiUrl(`../single/file/${this.fileId}?history_id=${row.id}&history_at=${row.created_at}`)) window.open($A.apiUrl(`..${uri}`))
} }
break; break;
} }

View File

@ -723,7 +723,7 @@ export default {
openTask: { openTask: {
handler(data) { handler(data) {
this.taskDetail = $A.cloneJSON(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 && clearTimeout(this.__openTask);
this.__openTask = setTimeout(this.$refs.name.resizeTextarea, 100) this.__openTask = setTimeout(this.$refs.name.resizeTextarea, 100)
} }
@ -1249,10 +1249,11 @@ export default {
} }
return return
} }
const uri = `/single/file/task/${file.id}`;
if (this.$Electron) { if (this.$Electron) {
this.$Electron.sendMessage('windowRouter', { this.$Electron.sendMessage('windowRouter', {
name: `file-task-${file.id}`, name: `file-task-${file.id}`,
path: `/single/file/task/${file.id}`, path: uri,
userAgent: "/hideenOfficeTitle/", userAgent: "/hideenOfficeTitle/",
force: false, force: false,
config: { config: {
@ -1268,10 +1269,11 @@ export default {
eeui.openPage({ eeui.openPage({
pageType: 'web', pageType: 'web',
pageTitle: `${file.name} (${$A.bytesToSize(file.size)})`, 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 { } else {
window.open($A.apiUrl(`../single/file/task/${file.id}`)) window.open($A.apiUrl(`..${uri}`))
} }
}, },

View 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>

View File

@ -107,6 +107,11 @@ export default [
path: '/single/report/detail/:reportDetailId', path: '/single/report/detail/:reportDetailId',
component: () => import('./pages/single/reportDetail.vue') component: () => import('./pages/single/reportDetail.vue')
}, },
{
name: 'token',
path: '/token',
component: () => import('./pages/token.vue'),
},
{ {
name: 'login', name: 'login',
path: '/login', path: '/login',

View File

@ -10,15 +10,21 @@ export default {
*/ */
call({state, dispatch}, params) { call({state, dispatch}, params) {
if (!$A.isJson(params)) params = {url: 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.url = $A.apiUrl(params.url);
params.data = $A.date2string(params.data); 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); const cloneParams = $A.cloneJSON(params);
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {

View File

@ -90,7 +90,7 @@
} }
} }
.advanced-option { .advanced-option {
margin-top: 42px; padding-top: 42px;
z-index: 1; z-index: 1;
display: flex; display: flex;
align-items: center; align-items: center;
@ -108,6 +108,11 @@
align-items: center; align-items: center;
margin-left: 24px; margin-left: 24px;
height: 34px; height: 34px;
overflow-y: hidden;
overflow-x: auto;
&::-webkit-scrollbar {
display: none;
}
> li { > li {
list-style: none; list-style: none;
margin-left: 3px; margin-left: 3px;
@ -200,3 +205,27 @@
padding: 26px 0 22px !important; 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;
}
}
}
}
}