mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-11 18:42:54 +00:00
perf: 补充优化
This commit is contained in:
parent
e0fc1c5ef7
commit
efe80ce0eb
@ -1239,7 +1239,7 @@
|
||||
* Call the given Closure / class@method and inject its dependencies.
|
||||
*
|
||||
* @param callable|string $callback
|
||||
* @param \Illuminate\Container\array<string, mixed> $parameters
|
||||
* @param array<string, mixed> $parameters
|
||||
* @param string|null $defaultMethod
|
||||
* @return mixed
|
||||
* @throws \InvalidArgumentException
|
||||
|
||||
@ -614,7 +614,7 @@ class FileController extends AbstractController
|
||||
* @apiName office__token
|
||||
*
|
||||
* @apiParam {array} config
|
||||
*
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
* @apiSuccess {Object} data 返回数据
|
||||
@ -622,9 +622,12 @@ class FileController extends AbstractController
|
||||
public function office__token()
|
||||
{
|
||||
User::auth();
|
||||
//
|
||||
$config = Request::input('config');
|
||||
$token = \Firebase\JWT\JWT::encode($config, env('APP_KEY') ,'HS256');
|
||||
return Base::retSuccess('成功', $token);
|
||||
return Base::retSuccess('成功', [
|
||||
'token' => $token
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -83,28 +83,28 @@ class IndexController extends InvokeController
|
||||
}
|
||||
$array = [
|
||||
"office/web-apps/apps/api/documents/api.js?hash=" . Base::getVersion(),
|
||||
"office/7.3.2-8/web-apps/vendor/requirejs/require.js",
|
||||
"office/7.3.2-8/web-apps/apps/api/documents/api.js",
|
||||
"office/7.3.2-8/sdkjs/common/AllFonts.js",
|
||||
"office/7.3.2-8/web-apps/vendor/xregexp/xregexp-all-min.js",
|
||||
"office/7.3.2-8/web-apps/vendor/sockjs/sockjs.min.js",
|
||||
"office/7.3.2-8/web-apps/vendor/jszip/jszip.min.js",
|
||||
"office/7.3.2-8/web-apps/vendor/jszip-utils/jszip-utils.min.js",
|
||||
"office/7.3.2-8/sdkjs/common/libfont/wasm/fonts.js",
|
||||
"office/7.3.2-8/sdkjs/common/Charts/ChartStyles.js",
|
||||
"office/7.3.2-8/sdkjs/slide/themes//themes.js",
|
||||
"office/7.5.1-23/web-apps/vendor/requirejs/require.js",
|
||||
"office/7.5.1-23/web-apps/apps/api/documents/api.js",
|
||||
"office/7.5.1-23/sdkjs/common/AllFonts.js",
|
||||
"office/7.5.1-23/web-apps/vendor/xregexp/xregexp-all-min.js",
|
||||
"office/7.5.1-23/web-apps/vendor/sockjs/sockjs.min.js",
|
||||
"office/7.5.1-23/web-apps/vendor/jszip/jszip.min.js",
|
||||
"office/7.5.1-23/web-apps/vendor/jszip-utils/jszip-utils.min.js",
|
||||
"office/7.5.1-23/sdkjs/common/libfont/wasm/fonts.js",
|
||||
"office/7.5.1-23/sdkjs/common/Charts/ChartStyles.js",
|
||||
"office/7.5.1-23/sdkjs/slide/themes//themes.js",
|
||||
|
||||
"office/7.3.2-8/web-apps/apps/presentationeditor/main/app.js",
|
||||
"office/7.3.2-8/sdkjs/slide/sdk-all-min.js",
|
||||
"office/7.3.2-8/sdkjs/slide/sdk-all.js",
|
||||
"office/7.5.1-23/web-apps/apps/presentationeditor/main/app.js",
|
||||
"office/7.5.1-23/sdkjs/slide/sdk-all-min.js",
|
||||
"office/7.5.1-23/sdkjs/slide/sdk-all.js",
|
||||
|
||||
"office/7.3.2-8/web-apps/apps/documenteditor/main/app.js",
|
||||
"office/7.3.2-8/sdkjs/word/sdk-all-min.js",
|
||||
"office/7.3.2-8/sdkjs/word/sdk-all.js",
|
||||
"office/7.5.1-23/web-apps/apps/documenteditor/main/app.js",
|
||||
"office/7.5.1-23/sdkjs/word/sdk-all-min.js",
|
||||
"office/7.5.1-23/sdkjs/word/sdk-all.js",
|
||||
|
||||
"office/7.3.2-8/web-apps/apps/spreadsheeteditor/main/app.js",
|
||||
"office/7.3.2-8/sdkjs/cell/sdk-all-min.js",
|
||||
"office/7.3.2-8/sdkjs/cell/sdk-all.js",
|
||||
"office/7.5.1-23/web-apps/apps/spreadsheeteditor/main/app.js",
|
||||
"office/7.5.1-23/sdkjs/cell/sdk-all-min.js",
|
||||
"office/7.5.1-23/sdkjs/cell/sdk-all.js",
|
||||
];
|
||||
foreach ($array as &$item) {
|
||||
$item = url($item);
|
||||
|
||||
@ -6,7 +6,6 @@ namespace App\Models;
|
||||
* App\Models\ApproveProcMsg
|
||||
*
|
||||
* @property int $id
|
||||
* @property string|null $type 信息类型(如:candidate-候选人、participant-参与人、notifier-抄送人)
|
||||
* @property int|null $proc_inst_id 流程实例ID
|
||||
* @property int|null $userid 会员ID
|
||||
* @property int|null $msg_id 消息ID
|
||||
@ -19,7 +18,6 @@ namespace App\Models;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereMsgId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereProcInstId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereType($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereUserid($value)
|
||||
* @mixin \Eloquent
|
||||
|
||||
@ -14,10 +14,10 @@ use Illuminate\Support\Carbon;
|
||||
* @property string|null $name 会议主题
|
||||
* @property string|null $channel 频道
|
||||
* @property int|null $userid 创建人
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property Carbon|null $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
* @property string|null $end_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @property Carbon|null $deleted_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Meeting newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Meeting newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Meeting query()
|
||||
|
||||
@ -32,6 +32,7 @@ use Request;
|
||||
* @property int|null $archived_follow 跟随项目归档(项目取消归档时任务也取消归档)
|
||||
* @property string|null $complete_at 完成时间
|
||||
* @property int|null $userid 创建人
|
||||
* @property int|null $is_all_visible 是否所有人可见
|
||||
* @property int|null $p_level 优先级
|
||||
* @property string|null $p_name 优先级名称
|
||||
* @property string|null $p_color 优先级颜色
|
||||
@ -80,6 +81,7 @@ use Request;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereFlowItemId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereFlowItemName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereIsAllVisible($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereLoop($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereLoopAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereName($value)
|
||||
|
||||
@ -379,7 +379,7 @@ class User extends AbstractModel
|
||||
{
|
||||
$user = self::authInfo();
|
||||
if (!$user) {
|
||||
if (Base::headerOrInput('token')) {
|
||||
if (Base::token()) {
|
||||
throw new ApiException('身份已失效,请重新登录', [], -1);
|
||||
} else {
|
||||
throw new ApiException('请登录后继续...', [], -1);
|
||||
|
||||
@ -21,6 +21,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @property string $avatar 头像(群)
|
||||
* @property string|null $last_at 最后消息时间
|
||||
* @property int|null $owner_id 群主用户ID
|
||||
* @property int|null $link_id 关联id
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
@ -36,6 +37,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereGroupType($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereLastAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereLinkId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereOwnerId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereType($value)
|
||||
|
||||
@ -15,12 +15,14 @@ use Carbon\Carbon;
|
||||
* @property int|null $silence 是否免打扰:0否,1是
|
||||
* @property int|null $inviter 邀请人
|
||||
* @property int|null $important 是否不可移出(项目、任务、部门人员)
|
||||
* @property string|null $color 颜色
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \App\Models\WebSocketDialog|null $webSocketDialog
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser whereColor($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser whereDialogId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser whereId($value)
|
||||
|
||||
@ -77,6 +77,15 @@ class Base
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取token
|
||||
* @return mixed|string
|
||||
*/
|
||||
public static function token()
|
||||
{
|
||||
return Base::headerOrInput('dootask-token') ?: Base::headerOrInput('token');
|
||||
}
|
||||
|
||||
/**
|
||||
* 如果header没有则通过input读取
|
||||
* @param $key
|
||||
@ -2882,13 +2891,13 @@ class Base
|
||||
if ($name && !str_contains($name, '.')) {
|
||||
$name .= ".";
|
||||
}
|
||||
//
|
||||
//
|
||||
if ($file instanceof \Closure) {
|
||||
return Response::streamDownload($file, $name, [
|
||||
'Content-Type' => $contentType,
|
||||
]);
|
||||
}
|
||||
//
|
||||
//
|
||||
if (!$file instanceof File) {
|
||||
if ($file instanceof \SplFileInfo) {
|
||||
$file = new File($file->getPathname());
|
||||
|
||||
@ -51,7 +51,7 @@ class Doo
|
||||
char* pgpEncrypt(char* plainText, char* publicKey);
|
||||
char* pgpDecrypt(char* cipherText, char* privateKey, char* passphrase);
|
||||
EOF, "/usr/lib/doo/doo.so");
|
||||
$token = $token ?: Base::headerOrInput('dootask-token') ?: Base::headerOrInput('token');
|
||||
$token = $token ?: Base::token();
|
||||
$language = $language ?: Base::headerOrInput('language');
|
||||
self::$doo->initialize("/var/www", $token, $language);
|
||||
}
|
||||
|
||||
1067
composer.lock
generated
1067
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -83,7 +83,7 @@ services:
|
||||
|
||||
office:
|
||||
container_name: "dootask-office-${APP_ID}"
|
||||
image: "onlyoffice/documentserver:7.5"
|
||||
image: "onlyoffice/documentserver:7.5.1.1"
|
||||
volumes:
|
||||
- ./docker/office/logs:/var/log/onlyoffice
|
||||
- ./docker/office/data:/var/www/onlyoffice/Data
|
||||
@ -95,8 +95,7 @@ services:
|
||||
- ./docker/office/resources/spreadsheeteditor/main/resources/css/app.css:/var/www/onlyoffice/documentserver/web-apps/apps/spreadsheeteditor/main/resources/css/app.css
|
||||
- ./docker/office/resources/spreadsheeteditor/mobile/css/887.css:/var/www/onlyoffice/documentserver/web-apps/apps/spreadsheeteditor/mobile/css/887.css
|
||||
environment:
|
||||
JWT_ENABLED: true
|
||||
JWT_SECRET: ${APP_KEY}
|
||||
JWT_SECRET: ${APP_KEY}
|
||||
networks:
|
||||
extnetwork:
|
||||
ipv4_address: "${APP_IPPR}.6"
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -269,7 +269,7 @@ export default {
|
||||
url: 'file/office/token',
|
||||
data: { config: config },
|
||||
}).then(({data}) => {
|
||||
config.token = data
|
||||
config.token = data.token
|
||||
this.docEditor = new DocsAPI.DocEditor(this.id, config);
|
||||
}).catch(({msg}) => {
|
||||
$A.modalError({content: msg});
|
||||
|
||||
2
resources/assets/js/store/markdown.js
vendored
2
resources/assets/js/store/markdown.js
vendored
@ -24,7 +24,7 @@ const MarkdownUtils = {
|
||||
|
||||
export function MarkdownConver(text) {
|
||||
if (text === '...') {
|
||||
return '<p class="input-blink"> </p>'
|
||||
return '<p><span class="input-blink"></span> </p>'
|
||||
}
|
||||
if (MarkdownUtils.mdi === null) {
|
||||
MarkdownUtils.mdi = new MarkdownIt({
|
||||
|
||||
@ -74,8 +74,13 @@ body {
|
||||
}
|
||||
|
||||
.input-blink {
|
||||
position: absolute;
|
||||
content: '';
|
||||
display: inline-block;
|
||||
width: 2px;
|
||||
transform: scaleY(0.8);
|
||||
height: 16px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
animation: blink-animate 1.2s infinite steps(1, start);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user