Compare commits
154 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23a363aeea | ||
|
|
6cbf2bbada | ||
|
|
ee9cf0a6b6 | ||
|
|
8d39b4aa0d | ||
|
|
3c93ad18b2 | ||
|
|
cc125cc292 | ||
|
|
6823d87198 | ||
|
|
288e857321 | ||
|
|
73d1950d97 | ||
|
|
ee2b047e5d | ||
|
|
ae83fce524 | ||
|
|
985c5ff54b | ||
|
|
fe5f56e98b | ||
|
|
40ef700e5a | ||
|
|
8661c28d10 | ||
|
|
9edddc461d | ||
|
|
2fbb640bc8 | ||
|
|
a03050bc7b | ||
|
|
654a90626e | ||
|
|
9acafed459 | ||
|
|
b7dcb543f6 | ||
|
|
e2768f7f20 | ||
|
|
cda2d0da27 | ||
|
|
c61815db3a | ||
|
|
9390965a0c | ||
|
|
0688feefb1 | ||
|
|
93c8d86caf | ||
|
|
540bff89cf | ||
|
|
41c09b3838 | ||
|
|
0a26361724 | ||
|
|
ee9ad65e18 | ||
|
|
db6b571cfb | ||
|
|
bfe359c440 | ||
|
|
ee8f67793a | ||
|
|
629fe79c61 | ||
|
|
9ae278d622 | ||
|
|
3417d68609 | ||
|
|
f757749282 | ||
|
|
ea40e95cae | ||
|
|
eb066f52fe | ||
|
|
b7007135cb | ||
|
|
a7bd403b2c | ||
|
|
59c7b148dd | ||
|
|
c67f52e960 | ||
|
|
f311625060 | ||
|
|
d3c08f8d90 | ||
|
|
2bc655d7ef | ||
|
|
d2b8d0372e | ||
|
|
40b637b16e | ||
|
|
6e68f399b4 | ||
|
|
0be6c70e92 | ||
|
|
6c2d8fc163 | ||
|
|
a8193b8feb | ||
|
|
34159caf22 | ||
|
|
c75f406459 | ||
|
|
99dca06d44 | ||
|
|
d12c0c4207 | ||
|
|
915a5ed7d5 | ||
|
|
7bfc43c85f | ||
|
|
77ea022ddf | ||
|
|
93578f93f4 | ||
|
|
f129615ebe | ||
|
|
0e5b44baad | ||
|
|
3596475790 | ||
|
|
6218521dea | ||
|
|
65db8b5703 | ||
|
|
f5ff9a3648 | ||
|
|
cbbd50a2e3 | ||
|
|
b04647e65a | ||
|
|
d34d94faa6 | ||
|
|
4038d9560f | ||
|
|
006fc43498 | ||
|
|
47c9b2e1b0 | ||
|
|
dc3e5f0a59 | ||
|
|
01bda83fcd | ||
|
|
9ecb9c68fb | ||
|
|
4612d5180a | ||
|
|
cfb653796c | ||
|
|
d00cd5cb26 | ||
|
|
285a62c87e | ||
|
|
bcb0c6bc77 | ||
|
|
d1ab2d98eb | ||
|
|
c3d5328154 | ||
|
|
fc30588014 | ||
|
|
65b02001b2 | ||
|
|
cd011a172f | ||
|
|
bf913d9eff | ||
|
|
c2dd15fca1 | ||
|
|
b267863b58 | ||
|
|
d189fb100a | ||
|
|
dc6c5bef26 | ||
|
|
7208d51644 | ||
|
|
16359a968d | ||
|
|
d553f77533 | ||
|
|
bc25f5dfdf | ||
|
|
d40028340c | ||
|
|
4194d1cddd | ||
|
|
1fdd532133 | ||
|
|
71c62a3772 | ||
|
|
9be6cd5148 | ||
|
|
c6568969c7 | ||
|
|
f5b1a6ab05 | ||
|
|
5efe659cf5 | ||
|
|
b254fd5ce2 | ||
|
|
631a0ffff4 | ||
|
|
8b11e9a19e | ||
|
|
f6b006b000 | ||
|
|
3a26f420b8 | ||
|
|
0919e415ec | ||
|
|
030a07698d | ||
|
|
a7f2582df7 | ||
|
|
5f0a0e0371 | ||
|
|
28717fd0c7 | ||
|
|
7014ea176a | ||
|
|
b4f2da66be | ||
|
|
b53462cf6e | ||
|
|
8b40364722 | ||
|
|
6ee1824410 | ||
|
|
f63c2da37a | ||
|
|
9be0642ba5 | ||
|
|
55a922c7b3 | ||
|
|
50893929d6 | ||
|
|
03c94e791a | ||
|
|
96bb554813 | ||
|
|
1bc77de144 | ||
|
|
aa07c78fc8 | ||
|
|
52dda88d40 | ||
|
|
c555b309bd | ||
|
|
0a51225762 | ||
|
|
fab49b1dda | ||
|
|
57e422f2d3 | ||
|
|
50a1a3147e | ||
|
|
277115a30f | ||
|
|
7464de3adc | ||
|
|
3d725ddeef | ||
|
|
38d8f289e4 | ||
|
|
edfd6e6de2 | ||
|
|
a68ab6512e | ||
|
|
8383b88a44 | ||
|
|
27ff24f44e | ||
|
|
b111ecb227 | ||
|
|
ac17952cd3 | ||
|
|
e24978fdd7 | ||
|
|
a4d7579e3f | ||
|
|
52171b794a | ||
|
|
3c33f02e9d | ||
|
|
0a8823c40b | ||
|
|
a3f7e71638 | ||
|
|
7ebf4fb9ce | ||
|
|
c96bad3cdf | ||
|
|
0968c43f61 | ||
|
|
ae147c76ff | ||
|
|
0e916a2804 | ||
|
|
494565e131 |
@@ -10,6 +10,7 @@ APP_URL=http://localhost
|
||||
APP_ID=
|
||||
APP_IPPR=
|
||||
APP_PORT=2222
|
||||
APP_SSL_PORT=
|
||||
APP_DEV_PORT=
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
|
||||
5
.github/workflows/publish-desktop-mac.yml
vendored
5
.github/workflows/publish-desktop-mac.yml
vendored
@@ -7,6 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: Build Mac
|
||||
runs-on: macos-latest
|
||||
environment: build
|
||||
|
||||
@@ -15,10 +16,10 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js 16.x
|
||||
- name: Use Node.js 20.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 20.x
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
|
||||
5
.github/workflows/publish-desktop-win.yml
vendored
5
.github/workflows/publish-desktop-win.yml
vendored
@@ -7,6 +7,7 @@ on:
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
name: Build Windows
|
||||
runs-on: windows-latest
|
||||
environment: build
|
||||
|
||||
@@ -15,10 +16,10 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js 16.x
|
||||
- name: Use Node.js 20.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 20.x
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
|
||||
27
.prefetch
Normal file
27
.prefetch
Normal file
@@ -0,0 +1,27 @@
|
||||
office/web-apps/apps/api/documents/api.js?hash={version}
|
||||
office/7.5.1-23/sdkjs/cell/css/main.css
|
||||
office/7.5.1-23/web-apps/apps/spreadsheeteditor/main/resources/css/app.css
|
||||
office/7.5.1-23/web-apps/vendor/requirejs/require.js
|
||||
office/7.5.1-23/web-apps/apps/spreadsheeteditor/main/app.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/socketio/socket.io.min.js
|
||||
office/7.5.1-23/sdkjs/cell/sdk-all-min.js
|
||||
office/7.5.1-23/sdkjs/cell/sdk-all.js
|
||||
office/7.5.1-23/sdkjs/common/libfont/engine/fonts.js
|
||||
office/7.5.1-23/sdkjs/common/Charts/ChartStyles.js
|
||||
office/7.5.1-23/sdkjs/common/libfont/engine/fonts.wasm
|
||||
office/7.5.1-23/web-apps/apps/presentationeditor/main/resources/css/app.css
|
||||
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.5.1-23/sdkjs/slide/themes//themes.js
|
||||
office/7.5.1-23/web-apps/apps/documenteditor/main/resources/css/app.css
|
||||
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
|
||||
drawio/webapp/js/app.min.js
|
||||
drawio/webapp/js/stencils.min.js
|
||||
drawio/webapp/js/extensions.min.js
|
||||
drawio/webapp/js/shapes-14-6-5.min.js
|
||||
drawio/webapp/math/es5/output/svg/fonts/tex.js
|
||||
211
CHANGELOG.md
211
CHANGELOG.md
@@ -2,6 +2,217 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [0.36.75]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- Added non-passive event listener to a scroll-blocking 'touchstart' event
|
||||
|
||||
### Performance
|
||||
|
||||
- 下载pdf使用自带浏览器
|
||||
- 优化消息加载中效果
|
||||
- 审批内容禁止转发
|
||||
- 滑动快捷表情选择
|
||||
- 优化聊天输入框
|
||||
- Update chat editor
|
||||
- 优化机器人回复
|
||||
- 优化android体验
|
||||
|
||||
## [0.36.60]
|
||||
|
||||
### Performance
|
||||
|
||||
- 优化使用默认浏览器打开规则
|
||||
- 优化聊天图片上传
|
||||
- 临时帐号别名
|
||||
- Tab icon load error
|
||||
- 优化会议
|
||||
- 创建会议不需要加入机器人
|
||||
- 暗黑模式下窗口背景色兼容问题
|
||||
- 优化网络检查
|
||||
- 客户端会议优化
|
||||
|
||||
## [0.36.49]
|
||||
|
||||
### Performance
|
||||
|
||||
- 优化会议室
|
||||
|
||||
## [0.36.44]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- 部分情况出现注册失败
|
||||
- 最小化阅读窗口新建窗口不自动激活
|
||||
- 独立窗口不更新消息
|
||||
|
||||
### Performance
|
||||
|
||||
- 优化数据读取机制
|
||||
- 优化缓存规则
|
||||
- 优化完成待办数据推送
|
||||
- 评论审批图片和投票深色按钮
|
||||
|
||||
## [0.36.36]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- 修改回复、转发消息后引用的部分消失
|
||||
|
||||
### Performance
|
||||
|
||||
- 优化任务日志内容
|
||||
- 查看版本免请求接口
|
||||
- 添加任务时选择任务位置内容溢出
|
||||
- 消息支持style
|
||||
- 回复消息列表隐藏顶部loading
|
||||
- 支持FCM推送
|
||||
- 设置华为推送自分类
|
||||
- 优化添加任务可见性点击效果
|
||||
|
||||
## [0.36.26]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- 关闭文件后无法再次打开
|
||||
|
||||
### Performance
|
||||
|
||||
- 优化数据结构
|
||||
- 接龙优化为清空内容默认删除
|
||||
- 支持取消发送中的消息
|
||||
- 1. 强化接龙接口本地时间戳问题 2. 接龙消息点展开按钮后做缓存处理
|
||||
|
||||
## [0.36.15]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- 消息太长导致菜单无法正常显示
|
||||
- 项目数量不正确的情况
|
||||
- 部分未读和待办信息不显示的情况
|
||||
- 审批中心修复loadIng效果
|
||||
|
||||
### Performance
|
||||
|
||||
- 自动识别md格式发送
|
||||
- 优化回复、转发消息数据结构
|
||||
- 优化iOS端数据读取失败的情况
|
||||
- 回复消息时自动@提及
|
||||
- 优化会话数据结构
|
||||
|
||||
## [0.35.90]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- 子窗口出现重新登录的情况
|
||||
|
||||
### Performance
|
||||
|
||||
- 聊天文件发送进度
|
||||
- 拨打电话确认提示
|
||||
- 优化预加载文件
|
||||
|
||||
## [0.35.84]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- 回复消息点击到原文无效
|
||||
|
||||
### Performance
|
||||
|
||||
- 优化接口时间
|
||||
- 优化审批对话按钮配色
|
||||
|
||||
## [0.35.76]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- 客户端无法打开excel文件
|
||||
- 修复投票实名逻辑
|
||||
|
||||
### Features
|
||||
|
||||
- 升级okr
|
||||
|
||||
### Performance
|
||||
|
||||
- 优化文件功能按钮
|
||||
- 文件上传支持覆盖上传
|
||||
- 优化app等比显示
|
||||
- 优化发送文件预览
|
||||
- 消息发送中禁止右键菜单
|
||||
- 部分搜索框图标抖动
|
||||
- 优化复制功能
|
||||
- 优化pdf文件预览
|
||||
- 优化投票接口,加上事务锁
|
||||
- 优化接龙接口,加上事务锁
|
||||
- 优化转发消息样式
|
||||
- 接龙接口-强化排序
|
||||
- 审批按钮色微调
|
||||
- 统一审批中心的按钮色
|
||||
- 转发会议亮色皮肤问题,转发文件宽度铺满
|
||||
- 优化app数据交互
|
||||
|
||||
### Styling
|
||||
|
||||
- 调整代码格式
|
||||
|
||||
## [0.35.48]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- 修复搜索偶尔无效的情况
|
||||
|
||||
### Features
|
||||
|
||||
- 升级okr
|
||||
|
||||
### Performance
|
||||
|
||||
- 优化文件预览
|
||||
- 滑动列表自动隐藏键盘
|
||||
- 优化时间格式
|
||||
- 适配nodejs 20
|
||||
|
||||
## [0.35.40]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- 部分手机出现非正常滚动到底部的情况
|
||||
- Dootask官网标题
|
||||
- Dootask官网调整
|
||||
- 修复导出任务统计没有按创建时间来的bug
|
||||
|
||||
### Features
|
||||
|
||||
- 新增不显示会话功能
|
||||
- 升级okr
|
||||
|
||||
### Performance
|
||||
|
||||
- 修改消息换行优化
|
||||
- 优化预加载资源
|
||||
- 优化pdf文件预览
|
||||
- 优化签到消息
|
||||
- 优化登录
|
||||
- 优化安装脚本
|
||||
- 优化消息时间格式
|
||||
- 优化app功能
|
||||
|
||||
## [0.35.20]
|
||||
|
||||
### Features
|
||||
|
||||
- 发起投票功能添加缓存记录选中效果
|
||||
- 导出的签到数据和审批数据换成xlsx,因老版本的xls会出现兼容性问题
|
||||
|
||||
### Performance
|
||||
|
||||
- 默认映射443端口
|
||||
- 优化子窗口
|
||||
- 优化发布接口 删除目录的逻辑
|
||||
|
||||
## [0.35.10]
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
23
README.md
23
README.md
@@ -29,7 +29,7 @@ git clone -b pro --depth=1 https://gitee.com/aipaw/dootask.git
|
||||
# 2、Enter directory
|
||||
cd dootask
|
||||
|
||||
# 3、Installation(Custom port installation: ./cmd install --port 2222)
|
||||
# 3、Installation(Custom port installation, as: ./cmd install --port 80)
|
||||
./cmd install
|
||||
```
|
||||
|
||||
@@ -43,7 +43,8 @@ cd dootask
|
||||
### Change port
|
||||
|
||||
```bash
|
||||
./cmd port 2222
|
||||
# This method only replaces the HTTP port. To replace the HTTPS port, please read the SSL configuration below
|
||||
./cmd port 80
|
||||
```
|
||||
|
||||
### Change App Url
|
||||
@@ -67,7 +68,7 @@ cd dootask
|
||||
|
||||
### Development compilation
|
||||
|
||||
- `NodeJs 18+` must be installed
|
||||
- `NodeJs 20+` must be installed
|
||||
|
||||
```bash
|
||||
# Development
|
||||
@@ -87,11 +88,19 @@ cd dootask
|
||||
./cmd redis "your command" # To run a redis command
|
||||
./cmd composer "your command" # To run a composer command
|
||||
./cmd supervisorctl "your command" # To run a supervisorctl command
|
||||
./cmd test "your command" # To run a phpunit command
|
||||
./cmd mysql "your command" # To run a mysql command (backup: Backup database, recovery: Restore database)
|
||||
```
|
||||
|
||||
### NGINX PROXY SSL
|
||||
### SSL configuration
|
||||
|
||||
#### Method 1: Automatic configuration
|
||||
|
||||
```bash
|
||||
# Running commands in a project
|
||||
./cmd https
|
||||
```
|
||||
|
||||
#### Or Method 2: Nginx Agent Configuration
|
||||
|
||||
```bash
|
||||
# 1、Nginx config add
|
||||
@@ -99,8 +108,8 @@ proxy_set_header X-Forwarded-Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
# 2、Running commands in a project
|
||||
./cmd https
|
||||
# 2、Running commands in a project (If you unconfigure the NGINX agent, run: ./cmd https close)
|
||||
./cmd https agent
|
||||
```
|
||||
|
||||
## Upgrade
|
||||
|
||||
23
README_CN.md
23
README_CN.md
@@ -29,7 +29,7 @@ git clone -b pro --depth=1 https://gitee.com/aipaw/dootask.git
|
||||
# 2、进入目录
|
||||
cd dootask
|
||||
|
||||
# 3、一键安装项目(自定义端口安装 ./cmd install --port 2222)
|
||||
# 3、一键安装项目(自定义端口安装,如:./cmd install --port 80)
|
||||
./cmd install
|
||||
```
|
||||
|
||||
@@ -43,7 +43,8 @@ cd dootask
|
||||
### 更换端口
|
||||
|
||||
```bash
|
||||
./cmd port 2222
|
||||
# 此方法仅更换http端口,更换https端口请阅读下面SSL配置
|
||||
./cmd port 80
|
||||
```
|
||||
|
||||
### 更换URL
|
||||
@@ -67,7 +68,7 @@ cd dootask
|
||||
|
||||
### 开发编译
|
||||
|
||||
- 请确保你已经安装了 `NodeJs 18+`
|
||||
- 请确保你已经安装了 `NodeJs 20+`
|
||||
|
||||
```bash
|
||||
# 开发模式
|
||||
@@ -88,11 +89,19 @@ cd dootask
|
||||
./cmd redis "your command" # 运行 redis 命令
|
||||
./cmd composer "your command" # 运行 composer 命令
|
||||
./cmd supervisorctl "your command" # 运行 supervisorctl 命令
|
||||
./cmd test "your command" # 运行 phpunit 命令
|
||||
./cmd mysql "your command" # 运行 mysql 命令 (backup: 备份数据库,recovery: 还原数据库)
|
||||
```
|
||||
|
||||
### NGINX 代理 SSL
|
||||
### SSL 配置
|
||||
|
||||
#### 方法1:自动配置
|
||||
|
||||
```bash
|
||||
# 在项目下运行命令,根据提示执行即可
|
||||
./cmd https
|
||||
```
|
||||
|
||||
#### (或者)方法2:Nginx 代理配置
|
||||
|
||||
```bash
|
||||
# 1、Nginx 代理配置添加
|
||||
@@ -100,8 +109,8 @@ proxy_set_header X-Forwarded-Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
# 2、在项目下运行命令
|
||||
./cmd https
|
||||
# 2、在项目下运行命令(如果取消 Nginx 代理配置请运行:./cmd https close)
|
||||
./cmd https agent
|
||||
```
|
||||
|
||||
## 升级更新
|
||||
|
||||
@@ -207,7 +207,7 @@ class ApproveController extends AbstractController
|
||||
if ($id != $user->userid) {
|
||||
$dialog = WebSocketDialog::checkUserDialog($botUser, $id);
|
||||
$processInst['comment_user_id'] = $user->userid;
|
||||
$processInst['comment_content'] = json_decode($data['content'], true)['content'];
|
||||
$processInst['comment_contents'] = json_decode($data['content'], true) ?? [];
|
||||
$this->approveMsg('approve_comment_notifier', $dialog, $botUser, $processInst, $processInst);
|
||||
}
|
||||
}
|
||||
@@ -858,7 +858,7 @@ class ApproveController extends AbstractController
|
||||
BillExport::create()->setTitle($title)->setHeadings($headings)->setData($datas)->setStyles(["A1:Y1" => ["font" => ["bold" => true]]])
|
||||
];
|
||||
//
|
||||
$fileName = '审批记录_' . Base::time() . '.xls';
|
||||
$fileName = '审批记录_' . Base::time() . '.xlsx';
|
||||
$filePath = "temp/approve/export/" . date("Ym", Base::time());
|
||||
$export = new BillMultipleExport($sheets);
|
||||
$res = $export->store($filePath . "/" . $fileName);
|
||||
@@ -866,7 +866,7 @@ class ApproveController extends AbstractController
|
||||
return Base::retError('导出失败,' . $fileName . '!');
|
||||
}
|
||||
$xlsPath = storage_path("app/" . $filePath . "/" . $fileName);
|
||||
$zipFile = "app/" . $filePath . "/" . Base::rightDelete($fileName, '.xls') . ".zip";
|
||||
$zipFile = "app/" . $filePath . "/" . Base::rightDelete($fileName, '.xlsx') . ".zip";
|
||||
$zipPath = storage_path($zipFile);
|
||||
if (file_exists($zipPath)) {
|
||||
Base::deleteDirAndFile($zipPath, true);
|
||||
@@ -983,7 +983,8 @@ class ApproveController extends AbstractController
|
||||
'end_day_of_week' => '周' . Base::getTimeWeek(Carbon::parse($process['var']['end_time'])->timestamp),
|
||||
'description' => $process['var']['description'],
|
||||
'comment_nickname' => $process['comment_user_id'] ? User::userid2nickname($process['comment_user_id']) : '',
|
||||
'comment_content' => $process['comment_content'] ?? ''
|
||||
'comment_content' => $process['comment_contents']['content'] ?? '',
|
||||
'comment_pictures' => $process['comment_contents']['pictures'] ?? []
|
||||
];
|
||||
$text = view('push.bot', ['type' => $type, 'action' => $action, 'is_finished' => $process['is_finished'], 'data' => (object)$data])->render();
|
||||
$text = preg_replace("/^\x20+/", "", $text);
|
||||
@@ -992,14 +993,14 @@ class ApproveController extends AbstractController
|
||||
if ($action == 'withdraw' || $action == 'pass' || $action == 'refuse') {
|
||||
// 任务完成,给发起人发送消息
|
||||
if ($type == 'approve_submitter' && $action != 'withdraw') {
|
||||
return WebSocketDialogMsg::sendMsg($msg_action, $dialog->id, 'text', ['text' => $text], $botUser->userid, false, false, true);
|
||||
return WebSocketDialogMsg::sendMsg($msg_action, $dialog->id, 'text', ['text' => $text, 'approve_type' => $type], $botUser->userid, false, false, true);
|
||||
}
|
||||
// 查找最后一条消息msg_id
|
||||
$msg_action = 'change-' . $toUser['msg_id'];
|
||||
}
|
||||
//
|
||||
try {
|
||||
$msg = WebSocketDialogMsg::sendMsg($msg_action, $dialog->id, 'text', ['text' => $text], $botUser->userid, false, false, true);
|
||||
$msg = WebSocketDialogMsg::sendMsg($msg_action, $dialog->id, 'text', ['text' => $text, 'approve_type' => $type], $botUser->userid, false, false, true);
|
||||
// 关联信息
|
||||
if ($action == 'start') {
|
||||
$proc_msg = new ApproveProcMsg();
|
||||
|
||||
@@ -58,29 +58,36 @@ class DialogController extends AbstractController
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/dialog/unread 02. 未读对话列表
|
||||
* @api {get} api/dialog/beyond 02. 列表外对话
|
||||
*
|
||||
* @apiDescription 需要token身份
|
||||
* @apiDescription 需要token身份,列表外的未读对话 和 列表外的待办对话
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup dialog
|
||||
* @apiName lists
|
||||
* @apiName beyond
|
||||
*
|
||||
* @apiParam {String} before_at 在这个时间之前未读的数据
|
||||
* @apiParam {String} unread_at 在这个时间之前未读的数据
|
||||
* - 格式1:2021-01-01 00:00:00
|
||||
* - 格式2:1612051200
|
||||
* @apiParam {String} todo_at 在这个时间之前待办的数据
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
* @apiSuccess {Object} data 返回数据
|
||||
*/
|
||||
public function unread()
|
||||
public function beyond()
|
||||
{
|
||||
$user = User::auth();
|
||||
//
|
||||
$beforeAt = Request::input('before_at');
|
||||
if (empty($beforeAt)) {
|
||||
return Base::retError('参数错误');
|
||||
}
|
||||
$unreadAt = Request::input('unread_at');
|
||||
$todoAt = Request::input('todo_at');
|
||||
//
|
||||
$data = WebSocketDialog::getDialogUnread($user->userid, Carbon::parse($beforeAt));
|
||||
$unreadAt = Base::isNumber($unreadAt) ? intval($unreadAt) : trim($unreadAt);
|
||||
$unreadAt = Carbon::parse($unreadAt)->setTimezone(config('app.timezone'));
|
||||
//
|
||||
$todoAt = Base::isNumber($todoAt) ? intval($todoAt) : trim($todoAt);
|
||||
$todoAt = Carbon::parse($todoAt)->setTimezone(config('app.timezone'));
|
||||
//
|
||||
$data = WebSocketDialog::getDialogBeyond($user->userid, $unreadAt, $todoAt);
|
||||
//
|
||||
return Base::retSuccess('success', $data);
|
||||
}
|
||||
@@ -108,12 +115,12 @@ class DialogController extends AbstractController
|
||||
return Base::retError('请输入搜索关键词');
|
||||
}
|
||||
// 搜索会话
|
||||
$dialogs = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.mark_unread', 'u.silence', 'u.color', 'u.updated_at as user_at'])
|
||||
$dialogs = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.last_at', 'u.mark_unread', 'u.silence', 'u.hide', 'u.color', 'u.updated_at as user_at'])
|
||||
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
||||
->where('web_socket_dialogs.name', 'LIKE', "%{$key}%")
|
||||
->where('u.userid', $user->userid)
|
||||
->orderByDesc('u.top_at')
|
||||
->orderByDesc('web_socket_dialogs.last_at')
|
||||
->orderByDesc('u.last_at')
|
||||
->take(20)
|
||||
->get();
|
||||
$dialogs->transform(function (WebSocketDialog $item) use ($user) {
|
||||
@@ -145,7 +152,7 @@ class DialogController extends AbstractController
|
||||
}
|
||||
// 搜索消息会话
|
||||
if (count($list) < 20) {
|
||||
$msgs = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.mark_unread', 'u.silence', 'u.color', 'u.updated_at as user_at', 'm.id as search_msg_id'])
|
||||
$msgs = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.last_at', 'u.mark_unread', 'u.silence', 'u.hide', 'u.color', 'u.updated_at as user_at', 'm.id as search_msg_id'])
|
||||
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
||||
->join('web_socket_dialog_msgs as m', 'web_socket_dialogs.id', '=', 'm.dialog_id')
|
||||
->where('u.userid', $user->userid)
|
||||
@@ -178,7 +185,7 @@ class DialogController extends AbstractController
|
||||
{
|
||||
$user = User::auth();
|
||||
// 搜索会话
|
||||
$msgs = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.mark_unread', 'u.silence', 'u.color', 'u.updated_at as user_at', 'm.id as search_msg_id'])
|
||||
$msgs = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.last_at', 'u.mark_unread', 'u.silence', 'u.hide', 'u.color', 'u.updated_at as user_at', 'm.id as search_msg_id'])
|
||||
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
||||
->join('web_socket_dialog_msgs as m', 'web_socket_dialogs.id', '=', 'm.dialog_id')
|
||||
->where('u.userid', $user->userid)
|
||||
@@ -213,7 +220,7 @@ class DialogController extends AbstractController
|
||||
//
|
||||
$dialog_id = intval(Request::input('dialog_id'));
|
||||
//
|
||||
$item = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.mark_unread', 'u.silence', 'u.color', 'u.updated_at as user_at'])
|
||||
$item = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.last_at', 'u.mark_unread', 'u.silence', 'u.hide', 'u.color', 'u.updated_at as user_at'])
|
||||
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
||||
->where('web_socket_dialogs.id', $dialog_id)
|
||||
->where('u.userid', $user->userid)
|
||||
@@ -249,8 +256,8 @@ class DialogController extends AbstractController
|
||||
//
|
||||
$dialog = WebSocketDialog::checkDialog($dialog_id);
|
||||
//
|
||||
$data = $dialog->dialogUser->toArray();
|
||||
if ($getuser === 1) {
|
||||
$data = $dialog->dialogUser->toArray();
|
||||
$array = [];
|
||||
foreach ($data as $item) {
|
||||
$res = User::userid2basic($item['userid']);
|
||||
@@ -258,14 +265,16 @@ class DialogController extends AbstractController
|
||||
$array[] = array_merge($item, $res->toArray());
|
||||
}
|
||||
}
|
||||
$data = $array;
|
||||
}
|
||||
//
|
||||
$array = [];
|
||||
foreach ($data as $item) {
|
||||
if ($item['userid'] > 0) {
|
||||
$array[] = $item;
|
||||
}
|
||||
$array = array_filter($array, function ($item) {
|
||||
return $item['userid'] > 0;
|
||||
});
|
||||
} else {
|
||||
$data = WebSocketDialogUser::select(['web_socket_dialog_users.*', 'users.bot'])
|
||||
->join('users', 'web_socket_dialog_users.userid', '=', 'users.userid')
|
||||
->where('web_socket_dialog_users.dialog_id', $dialog_id)
|
||||
->orderBy('web_socket_dialog_users.id')
|
||||
->get();
|
||||
$array = $data->toArray();
|
||||
}
|
||||
return Base::retSuccess('success', $array);
|
||||
}
|
||||
@@ -330,6 +339,41 @@ class DialogController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @api {get} api/dialog/hide 08. 会话隐藏
|
||||
*
|
||||
* @apiDescription 需要token身份
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup dialog
|
||||
* @apiName hide
|
||||
*
|
||||
* @apiParam {Number} dialog_id 会话ID
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
* @apiSuccess {Object} data 返回数据
|
||||
*/
|
||||
public function hide()
|
||||
{
|
||||
$user = User::auth();
|
||||
$dialogId = intval(Request::input('dialog_id'));
|
||||
$dialogUser = WebSocketDialogUser::whereUserid($user->userid)->whereDialogId($dialogId)->first();
|
||||
if (!$dialogUser) {
|
||||
return Base::retError("会话不存在");
|
||||
}
|
||||
if ($dialogUser->top_at) {
|
||||
return Base::retError("置顶会话无法隐藏");
|
||||
}
|
||||
$dialogUser->hide = 1;
|
||||
$dialogUser->save();
|
||||
return Base::retSuccess("success", [
|
||||
'id' => $dialogUser->dialog_id,
|
||||
'hide' => 1,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/dialog/tel 09. 获取对方联系电话
|
||||
*
|
||||
@@ -1675,6 +1719,12 @@ class DialogController extends AbstractController
|
||||
if (Base::isSuccess($res)) {
|
||||
$add = $res['data'];
|
||||
}
|
||||
//
|
||||
$msg->webSocketDialog?->pushMsg('update', [
|
||||
'id' => $msg->id,
|
||||
'todo' => $msg->todo,
|
||||
'dialog_id' => $msg->dialog_id,
|
||||
]);
|
||||
}
|
||||
}
|
||||
//
|
||||
@@ -2133,43 +2183,66 @@ class DialogController extends AbstractController
|
||||
$dialog_id = intval(Request::input('dialog_id'));
|
||||
$uuid = trim(Request::input('uuid'));
|
||||
$text = trim(Request::input('text'));
|
||||
$list = Request::input('list');
|
||||
$list = Request::input('list') ?? [];
|
||||
//
|
||||
WebSocketDialog::checkDialog($dialog_id);
|
||||
$strlen = mb_strlen($text);
|
||||
$noimglen = mb_strlen(preg_replace("/<img[^>]*?>/i", "", $text));
|
||||
if ($strlen < 1) {
|
||||
if ($strlen < 1 || empty($list)) {
|
||||
return Base::retError('内容不能为空');
|
||||
}
|
||||
if ($noimglen > 200000) {
|
||||
return Base::retError('内容最大不能超过200000字');
|
||||
}
|
||||
//
|
||||
$userid = $user->userid;
|
||||
if ($uuid) {
|
||||
$dialogMsg = WebSocketDialogMsg::whereDialogId($dialog_id)
|
||||
->whereType('word-chain')
|
||||
->orderByDesc('created_at')
|
||||
->where('msg', 'like', "%$uuid%")
|
||||
->value('msg');
|
||||
$list = array_reverse(array_merge($dialogMsg['list'] ?? [], $list));
|
||||
$list = array_reduce($list, function ($result, $item) {
|
||||
$fieldValue = $item['id']; // 指定字段名
|
||||
if (!isset($result[$fieldValue])) {
|
||||
$result[$fieldValue] = $item;
|
||||
return AbstractModel::transaction(function () use ($user, $uuid, $dialog_id, $list, $text) {
|
||||
if ($uuid) {
|
||||
$dialogMsg = WebSocketDialogMsg::whereDialogId($dialog_id)
|
||||
->lockForUpdate()
|
||||
->whereType('word-chain')
|
||||
->orderByDesc('created_at')
|
||||
->where('msg', 'like', "%$uuid%")
|
||||
->value('msg');
|
||||
//
|
||||
$createId = $dialogMsg['createid'] ?? $user->userid;
|
||||
// 新增
|
||||
$msgList = $dialogMsg['list'] ?? [];
|
||||
$addList = array_udiff($list, $msgList, function($a, $b) {
|
||||
return ($a['id'] ?? 0) - $b['id'];
|
||||
});
|
||||
foreach ($addList as $key => $item) {
|
||||
$item['id'] = intval(round(microtime(true) * 1000)) + $key;
|
||||
$msgList[] = $item;
|
||||
}
|
||||
return $result;
|
||||
}, []);
|
||||
$list = array_reverse(array_values($list));
|
||||
}
|
||||
//
|
||||
$msgData = [
|
||||
'text' => $text,
|
||||
'list' => $list,
|
||||
'userid' => $userid,
|
||||
'uuid' => $uuid ?: Base::generatePassword(36),
|
||||
];
|
||||
return WebSocketDialogMsg::sendMsg(null, $dialog_id, 'word-chain', $msgData, $user->userid);
|
||||
// 编辑更新
|
||||
$lists = array_column($list,null,'id');
|
||||
foreach ($msgList as $key => $item) {
|
||||
if (isset($lists[$item['id']]) && $item['userid'] == $user->userid) {
|
||||
$msgList[$key] = $lists[$item['id']];
|
||||
}
|
||||
}
|
||||
$list = $msgList;
|
||||
} else {
|
||||
$createId = $user->userid;
|
||||
$uuid = Base::generatePassword(36);
|
||||
foreach ($list as $key => $item) {
|
||||
$list[$key]['id'] = intval(round(microtime(true) * 1000)) + $key;
|
||||
}
|
||||
}
|
||||
//
|
||||
usort($list, function ($a, $b) {
|
||||
return $a['id'] - $b['id'];
|
||||
});
|
||||
//
|
||||
$msgData = [
|
||||
'text' => $text,
|
||||
'list' => $list,
|
||||
'userid' => $user->userid,
|
||||
'createid' => $createId,
|
||||
'uuid' => $uuid,
|
||||
];
|
||||
return WebSocketDialogMsg::sendMsg(null, $dialog_id, 'word-chain', $msgData, $user->userid);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2210,8 +2283,6 @@ class DialogController extends AbstractController
|
||||
WebSocketDialog::checkDialog($dialog_id);
|
||||
//
|
||||
$action = null;
|
||||
$userid = $user->userid;
|
||||
$result = [];
|
||||
if ($type != 'create') {
|
||||
if ($type == 'vote' && empty($votes)) {
|
||||
return Base::retError('参数错误');
|
||||
@@ -2219,42 +2290,50 @@ class DialogController extends AbstractController
|
||||
if (empty($uuid)) {
|
||||
return Base::retError('参数错误');
|
||||
}
|
||||
$dialogMsgs = WebSocketDialogMsg::whereDialogId($dialog_id)
|
||||
->whereType('vote')
|
||||
->orderByDesc('created_at')
|
||||
->where('msg', 'like', "%$uuid%")
|
||||
->get();
|
||||
//
|
||||
if ($type == 'again') {
|
||||
$res = WebSocketDialogMsg::sendMsg(null, $dialog_id, 'vote', $dialogMsgs[0]->msg, $user->userid);
|
||||
if (Base::isError($res)) {
|
||||
return $res;
|
||||
}
|
||||
$result[] = $res['data'];
|
||||
} else {
|
||||
foreach ($dialogMsgs as $dialogMsg) {
|
||||
$action = "change-{$dialogMsg->id}";
|
||||
$msgData = $dialogMsg->msg;
|
||||
if ($type == 'finish') {
|
||||
$msgData['state'] = 0;
|
||||
} else {
|
||||
$msgDataVotes = $msgData['votes'] ?? [];
|
||||
if (in_array($userid, array_column($msgDataVotes, 'userid'))) {
|
||||
return Base::retError('不能重复投票');
|
||||
}
|
||||
$msgDataVotes[] = [
|
||||
'userid' => $userid,
|
||||
'votes' => $votes,
|
||||
];
|
||||
$msgData['votes'] = $msgDataVotes;
|
||||
}
|
||||
$res = WebSocketDialogMsg::sendMsg($action, $dialog_id, 'vote', $msgData, $user->userid);
|
||||
return AbstractModel::transaction(function () use ($user, $uuid, $dialog_id, $type, $votes) {
|
||||
//
|
||||
$dialogMsgs = WebSocketDialogMsg::whereDialogId($dialog_id)
|
||||
->lockForUpdate()
|
||||
->whereType('vote')
|
||||
->orderByDesc('created_at')
|
||||
->where('msg', 'like', "%$uuid%")
|
||||
->get();
|
||||
//
|
||||
$result = [];
|
||||
if ($type == 'again') {
|
||||
$res = WebSocketDialogMsg::sendMsg(null, $dialog_id, 'vote', $dialogMsgs[0]->msg, $user->userid);
|
||||
if (Base::isError($res)) {
|
||||
return $res;
|
||||
}
|
||||
$result[] = $res['data'];
|
||||
} else {
|
||||
foreach ($dialogMsgs as $dialogMsg) {
|
||||
$action = "change-{$dialogMsg->id}";
|
||||
$msgData = $dialogMsg->msg;
|
||||
if ($type == 'finish') {
|
||||
$msgData['state'] = 0;
|
||||
} else {
|
||||
$msgDataVotes = $msgData['votes'] ?? [];
|
||||
if (in_array($user->userid, array_column($msgDataVotes, 'userid'))) {
|
||||
return Base::retError('不能重复投票');
|
||||
}
|
||||
$msgDataVotes[] = [
|
||||
'userid' => $user->userid,
|
||||
'votes' => $votes,
|
||||
];
|
||||
$msgData['votes'] = $msgDataVotes;
|
||||
}
|
||||
//
|
||||
$res = WebSocketDialogMsg::sendMsg($action, $dialog_id, 'vote', $msgData, $user->userid);
|
||||
if (Base::isError($res)) {
|
||||
return $res;
|
||||
}
|
||||
$result[] = $res['data'];
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
return Base::retSuccess('发送成功', $result);
|
||||
});
|
||||
} else {
|
||||
$strlen = mb_strlen($text);
|
||||
$noimglen = mb_strlen(preg_replace("/<img[^>]*?>/i", "", $text));
|
||||
@@ -2267,7 +2346,7 @@ class DialogController extends AbstractController
|
||||
$msgData = [
|
||||
'text' => $text,
|
||||
'list' => $list,
|
||||
'userid' => $userid,
|
||||
'userid' => $user->userid,
|
||||
'uuid' => $uuid ?: Base::generatePassword(36),
|
||||
'multiple' => $multiple,
|
||||
'anonymous' => $anonymous,
|
||||
@@ -2278,9 +2357,8 @@ class DialogController extends AbstractController
|
||||
if (Base::isError($res)) {
|
||||
return $res;
|
||||
}
|
||||
$result[] = $res['data'];
|
||||
return Base::retSuccess('发送成功', [$res['data']]);
|
||||
}
|
||||
return Base::retSuccess('发送成功', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -699,6 +699,9 @@ class FileController extends AbstractController
|
||||
* @apiName content__upload
|
||||
*
|
||||
* @apiParam {Number} [pid] 父级ID
|
||||
* @apiParam {Number} [cover] 覆盖已存在的文件
|
||||
* - 0:不覆盖,保留两者(默认)
|
||||
* - 1:覆盖
|
||||
* @apiParam {String} [files] 文件名
|
||||
*
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
@@ -709,8 +712,9 @@ class FileController extends AbstractController
|
||||
{
|
||||
$user = User::auth();
|
||||
$pid = intval(Request::input('pid'));
|
||||
$overwrite = intval(Request::input('cover'));
|
||||
$webkitRelativePath = Request::input('webkitRelativePath');
|
||||
$data = (new File)->contentUpload($user, $pid, $webkitRelativePath);
|
||||
$data = (new File)->contentUpload($user, $pid, $webkitRelativePath, $overwrite);
|
||||
return Base::retSuccess($data['data']['name'] . ' 上传成功', $data['addItem']);
|
||||
}
|
||||
|
||||
|
||||
@@ -2301,7 +2301,7 @@ class ProjectController extends AbstractController
|
||||
$project = Project::userProject($task->project_id);
|
||||
ProjectPermission::userTaskPermission($project, ProjectPermission::TASK_MOVE, $task);
|
||||
//
|
||||
if( $task->project_id == $project_id && $task->column_id == $column_id){
|
||||
if ($task->project_id == $project_id && $task->column_id == $column_id) {
|
||||
return Base::retSuccess('移动成功', ['id' => $task_id]);
|
||||
}
|
||||
//
|
||||
@@ -2310,7 +2310,7 @@ class ProjectController extends AbstractController
|
||||
if (empty($column)) {
|
||||
return Base::retError('列表不存在');
|
||||
}
|
||||
if($flow_item_id){
|
||||
if ($flow_item_id) {
|
||||
$flowItem = projectFlowItem::whereProjectId($project->id)->whereId($flow_item_id)->first();
|
||||
if (empty($flowItem)) {
|
||||
return Base::retError('任务状态不存在');
|
||||
@@ -2463,6 +2463,21 @@ class ProjectController extends AbstractController
|
||||
'week' => Doo::translate("周" . Base::getTimeWeek($timestamp)),
|
||||
'segment' => Doo::translate(Base::getTimeDayeSegment($timestamp)),
|
||||
];
|
||||
$record = Base::json2array($log->record);
|
||||
if (is_array($record['change'])) {
|
||||
foreach ($record['change'] as &$item) {
|
||||
$item = preg_replace_callback('/\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}/', function ($matches) {
|
||||
$time = strtotime($matches[0]);
|
||||
$second = date("s", $time);
|
||||
$second = $second === "00" ? "" : ":$second";
|
||||
if (date("Y") === date("Y", $time)) {
|
||||
return date("m-d H:i", $time) . $second;
|
||||
}
|
||||
return date("Y-m-d H:i", $time) . $second;
|
||||
}, $item);
|
||||
}
|
||||
$log->record = $record;
|
||||
}
|
||||
return $log;
|
||||
});
|
||||
//
|
||||
|
||||
@@ -40,7 +40,7 @@ class SystemController extends AbstractController
|
||||
* @apiParam {String} type
|
||||
* - get: 获取(默认)
|
||||
* - all: 获取所有(需要管理员权限)
|
||||
* - save: 保存设置(参数:['reg', 'reg_identity', 'reg_invite', 'login_code', 'password_policy', 'project_invite', 'chat_information', 'anon_message', 'e2e_message', 'auto_archived', 'archived_day', 'task_visible', 'task_default_time', 'all_group_mute', 'all_group_autoin', 'user_private_chat_mute', 'user_group_chat_mute', 'image_compress', 'image_save_local', 'start_home'])
|
||||
* - save: 保存设置(参数:['reg', 'reg_identity', 'reg_invite', 'temp_account_alias', 'login_code', 'password_policy', 'project_invite', 'chat_information', 'anon_message', 'e2e_message', 'auto_archived', 'archived_day', 'task_visible', 'task_default_time', 'all_group_mute', 'all_group_autoin', 'user_private_chat_mute', 'user_group_chat_mute', 'image_compress', 'image_save_local', 'start_home'])
|
||||
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
@@ -60,6 +60,7 @@ class SystemController extends AbstractController
|
||||
'reg',
|
||||
'reg_identity',
|
||||
'reg_invite',
|
||||
'temp_account_alias',
|
||||
'login_code',
|
||||
'password_policy',
|
||||
'project_invite',
|
||||
@@ -99,13 +100,14 @@ class SystemController extends AbstractController
|
||||
//
|
||||
if ($type == 'all' || $type == 'save') {
|
||||
User::auth('admin');
|
||||
$setting['reg_invite'] = $setting['reg_invite'] ?: Base::generatePassword(8);
|
||||
$setting['reg_invite'] = $setting['reg_invite'] ?: Base::generatePassword();
|
||||
} else {
|
||||
if (isset($setting['reg_invite'])) unset($setting['reg_invite']);
|
||||
}
|
||||
//
|
||||
$setting['reg'] = $setting['reg'] ?: 'open';
|
||||
$setting['reg_identity'] = $setting['reg_identity'] ?: 'normal';
|
||||
$setting['temp_account_alias'] = $setting['temp_account_alias'] ?: '';
|
||||
$setting['login_code'] = $setting['login_code'] ?: 'auto';
|
||||
$setting['password_policy'] = $setting['password_policy'] ?: 'simple';
|
||||
$setting['project_invite'] = $setting['project_invite'] ?: 'open';
|
||||
@@ -126,6 +128,7 @@ class SystemController extends AbstractController
|
||||
$setting['file_upload_limit'] = $setting['file_upload_limit'] ?: '';
|
||||
$setting['unclaimed_task_reminder'] = $setting['unclaimed_task_reminder'] ?: 'close';
|
||||
$setting['unclaimed_task_reminder_time'] = $setting['unclaimed_task_reminder_time'] ?: '';
|
||||
$setting['server_version'] = Base::getVersion();
|
||||
//
|
||||
return Base::retSuccess('success', $setting ?: json_decode('{}'));
|
||||
}
|
||||
@@ -201,7 +204,7 @@ class SystemController extends AbstractController
|
||||
*
|
||||
* @apiParam {String} type
|
||||
* - get: 获取(默认)
|
||||
* - save: 保存设置(参数:['open', 'appid', 'app_certificate'])
|
||||
* - save: 保存设置(参数:['open', 'appid', 'app_certificate', 'api_key', 'api_secret'])
|
||||
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||
* @apiSuccess {Object} data 返回数据
|
||||
@@ -221,12 +224,14 @@ class SystemController extends AbstractController
|
||||
'open',
|
||||
'appid',
|
||||
'app_certificate',
|
||||
'api_key',
|
||||
'api_secret',
|
||||
])) {
|
||||
unset($all[$key]);
|
||||
}
|
||||
}
|
||||
if ($all['open'] === 'open' && (!$all['appid'] || !$all['app_certificate'])) {
|
||||
return Base::retError('请填写完整的参数');
|
||||
return Base::retError('请填写基本配置');
|
||||
}
|
||||
$setting = Base::setting('meetingSetting', Base::newTrim($all));
|
||||
} else {
|
||||
@@ -237,6 +242,8 @@ class SystemController extends AbstractController
|
||||
if (env("SYSTEM_SETTING") == 'disabled') {
|
||||
$setting['appid'] = substr($setting['appid'], 0, 4) . str_repeat('*', strlen($setting['appid']) - 8) . substr($setting['appid'], -4);
|
||||
$setting['app_certificate'] = substr($setting['app_certificate'], 0, 4) . str_repeat('*', strlen($setting['app_certificate']) - 8) . substr($setting['app_certificate'], -4);
|
||||
$setting['api_key'] = substr($setting['api_key'], 0, 4) . str_repeat('*', strlen($setting['api_key']) - 8) . substr($setting['api_key'], -4);
|
||||
$setting['api_secret'] = substr($setting['api_secret'], 0, 4) . str_repeat('*', strlen($setting['api_secret']) - 8) . substr($setting['api_secret'], -4);
|
||||
}
|
||||
//
|
||||
return Base::retSuccess('success', $setting ?: json_decode('{}'));
|
||||
@@ -1210,7 +1217,7 @@ class SystemController extends AbstractController
|
||||
if (count($users) > 1) {
|
||||
$fileName .= "等" . count($userid) . "位成员";
|
||||
}
|
||||
$fileName .= '签到记录_' . Base::time() . '.xls';
|
||||
$fileName .= '签到记录_' . Base::time() . '.xlsx';
|
||||
$filePath = "temp/checkin/export/" . date("Ym", Base::time());
|
||||
$export = new BillMultipleExport($sheets);
|
||||
$res = $export->store($filePath . "/" . $fileName);
|
||||
@@ -1218,7 +1225,7 @@ class SystemController extends AbstractController
|
||||
return Base::retError('导出失败,' . $fileName . '!');
|
||||
}
|
||||
$xlsPath = storage_path("app/" . $filePath . "/" . $fileName);
|
||||
$zipFile = "app/" . $filePath . "/" . Base::rightDelete($fileName, '.xls') . ".zip";
|
||||
$zipFile = "app/" . $filePath . "/" . Base::rightDelete($fileName, '.xlsx') . ".zip";
|
||||
$zipPath = storage_path($zipFile);
|
||||
if (file_exists($zipPath)) {
|
||||
Base::deleteDirAndFile($zipPath, true);
|
||||
@@ -1275,8 +1282,14 @@ class SystemController extends AbstractController
|
||||
* @apiGroup system
|
||||
* @apiName version
|
||||
*
|
||||
* @apiSuccess {String} version
|
||||
* @apiSuccess {String} publish
|
||||
* @apiSuccessExample {json} Success-Response:
|
||||
{
|
||||
"version": "0.0.1",
|
||||
"publish": {
|
||||
"provider": "generic",
|
||||
"url": ""
|
||||
}
|
||||
}
|
||||
*/
|
||||
public function version()
|
||||
{
|
||||
@@ -1298,4 +1311,52 @@ class SystemController extends AbstractController
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* @api {get} api/system/prefetch 25. 预加载的资源
|
||||
*
|
||||
* @apiVersion 1.0.0
|
||||
* @apiGroup system
|
||||
* @apiName prefetch
|
||||
*
|
||||
* @apiSuccessExample {array} Success-Response:
|
||||
[
|
||||
"https://......",
|
||||
"https://......",
|
||||
"......",
|
||||
]
|
||||
*/
|
||||
public function prefetch()
|
||||
{
|
||||
$userAgent = strtolower(Request::server('HTTP_USER_AGENT'));
|
||||
$isMain = str_contains($userAgent, 'maintaskwindow');
|
||||
$isApp = str_contains($userAgent, 'kuaifan_eeui');
|
||||
$version = Base::getVersion();
|
||||
$array = [];
|
||||
|
||||
if ($isMain || $isApp) {
|
||||
$path = 'js/build/';
|
||||
$list = Base::readDir(public_path($path), false);
|
||||
foreach ($list as $item) {
|
||||
if (is_file($item) && filesize($item) > 50 * 1024) {
|
||||
$array[] = $path . basename($item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($isMain) {
|
||||
$file = base_path('.prefetch');
|
||||
if (file_exists($file)) {
|
||||
$content = file_get_contents($file);
|
||||
$items = explode("\n", $content);
|
||||
$array = array_merge($array, $items);
|
||||
}
|
||||
}
|
||||
|
||||
return array_map(function($item) use ($version) {
|
||||
$url = trim($item);
|
||||
$url = str_replace('{version}', $version, $url);
|
||||
return url($url);
|
||||
}, array_values(array_filter($array)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ class UsersController extends AbstractController
|
||||
$tags[] = Doo::translate("系统管理员");
|
||||
}
|
||||
if ($userInfo->isTemp()) {
|
||||
$tags[] = Doo::translate("临时帐号");
|
||||
$tags[] = User::tempAccountAlias(); // 临时帐号
|
||||
}
|
||||
if ($userInfo->userid > 3 && Carbon::parse($userInfo->created_at)->isAfter(Carbon::now()->subDays(30))) {
|
||||
$tags[] = Doo::translate("新帐号");
|
||||
@@ -615,7 +615,7 @@ class UsersController extends AbstractController
|
||||
public function basic()
|
||||
{
|
||||
$sharekey = Request::header('sharekey');
|
||||
if(empty($sharekey) || !Meeting::getShareInfo($sharekey)){
|
||||
if (empty($sharekey) || !Meeting::getShareInfo($sharekey)) {
|
||||
User::auth();
|
||||
}
|
||||
//
|
||||
@@ -768,7 +768,7 @@ class UsersController extends AbstractController
|
||||
//
|
||||
if ($getCheckinMac) {
|
||||
$list->transform(function (User $user) use ($getCheckinMac) {
|
||||
if($getCheckinMac){
|
||||
if ($getCheckinMac) {
|
||||
$user->checkin_macs = UserCheckinMac::select(['id', 'mac', 'remark'])->whereUserid($user->userid)->orderBy('id')->get();
|
||||
}
|
||||
return $user;
|
||||
@@ -1101,10 +1101,17 @@ class UsersController extends AbstractController
|
||||
];
|
||||
$row = UmengAlias::where($inArray);
|
||||
if ($row->exists()) {
|
||||
$row->update(['updated_at' => Carbon::now()]);
|
||||
$row->update([
|
||||
'ua' => $data['userAgent'],
|
||||
'device' => $data['deviceModel'],
|
||||
'updated_at' => Carbon::now()
|
||||
]);
|
||||
return Base::retSuccess('别名已存在');
|
||||
}
|
||||
$row = UmengAlias::createInstance($inArray);
|
||||
$row = UmengAlias::createInstance(array_merge($inArray, [
|
||||
'ua' => $data['userAgent'],
|
||||
'device' => $data['deviceModel'],
|
||||
]));
|
||||
if ($row->save()) {
|
||||
return Base::retSuccess('添加成功');
|
||||
} else {
|
||||
@@ -1136,17 +1143,17 @@ class UsersController extends AbstractController
|
||||
public function meeting__open()
|
||||
{
|
||||
$type = trim(Request::input('type'));
|
||||
$meetingid = trim(Request::input('meetingid'));
|
||||
$meetingid = str_replace(' ', '', trim(Request::input('meetingid')));
|
||||
$name = trim(Request::input('name'));
|
||||
$userids = Request::input('userids');
|
||||
$sharekey = trim(Request::input('sharekey'));
|
||||
$username = trim(Request::input('username'));
|
||||
$user = null;
|
||||
if(!empty($sharekey) && $type === 'join'){
|
||||
if(!Meeting::getShareInfo($sharekey)){
|
||||
if (!empty($sharekey) && $type === 'join') {
|
||||
if (!Meeting::getShareInfo($sharekey)) {
|
||||
return Base::retError('分享链接已过期');
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
$user = User::auth();
|
||||
}
|
||||
$isCreate = false;
|
||||
@@ -1156,6 +1163,11 @@ class UsersController extends AbstractController
|
||||
if (empty($meeting)) {
|
||||
return Base::retError('频道ID不存在');
|
||||
}
|
||||
if ($meeting->end_at) {
|
||||
return Base::retError('会议已结束');
|
||||
}
|
||||
$meeting->updated_at = Carbon::now();
|
||||
$meeting->save();
|
||||
} elseif ($type === 'create') {
|
||||
$meetingid = strtoupper(Base::generatePassword(11, 1));
|
||||
$name = $name ?: "{$user?->nickname} 发起的会议";
|
||||
@@ -1180,9 +1192,9 @@ class UsersController extends AbstractController
|
||||
if (empty($meetingSetting['appid']) || empty($meetingSetting['app_certificate'])) {
|
||||
return Base::retError('会议功能配置错误,请联系管理员');
|
||||
}
|
||||
$uid = intval(str_pad(Base::generatePassword(4,1), 9, 8, STR_PAD_LEFT));
|
||||
if($user){
|
||||
$uid = intval(str_pad(Base::generatePassword(5,1), 6, 9, STR_PAD_LEFT).$user->userid);
|
||||
$uid = intval(str_pad(Base::generatePassword(4, 1), 9, 8, STR_PAD_LEFT));
|
||||
if ($user) {
|
||||
$uid = intval(str_pad(Base::generatePassword(5, 1), 6, 9, STR_PAD_LEFT) . $user->userid);
|
||||
}
|
||||
try {
|
||||
$service = new AgoraTokenGenerator($meetingSetting['appid'], $meetingSetting['app_certificate'], $meeting->channel, $uid);
|
||||
@@ -1213,7 +1225,7 @@ class UsersController extends AbstractController
|
||||
//
|
||||
$data['appid'] = $meetingSetting['appid'];
|
||||
$data['uid'] = $uid;
|
||||
$data['userimg'] = $sharekey ? Base::fillUrl('avatar/'.$username.'.png') : $user?->userimg;
|
||||
$data['userimg'] = $sharekey ? Base::fillUrl('avatar/' . $username . '.png') : $user?->userimg;
|
||||
$data['nickname'] = $sharekey ? $username : $user?->nickname;
|
||||
$data['token'] = $token;
|
||||
$data['msgs'] = $msgs;
|
||||
@@ -1242,7 +1254,7 @@ class UsersController extends AbstractController
|
||||
{
|
||||
$meetingid = trim(Request::input('meetingid'));
|
||||
$sharekey = trim(Request::input('sharekey'));
|
||||
if(empty($sharekey) || !Meeting::getShareInfo($sharekey)){
|
||||
if (empty($sharekey) || !Meeting::getShareInfo($sharekey)) {
|
||||
User::auth();
|
||||
}
|
||||
$meeting = Meeting::whereMeetingid($meetingid)->first();
|
||||
@@ -1963,7 +1975,7 @@ class UsersController extends AbstractController
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if($type == 'file'){
|
||||
if ($type == 'file') {
|
||||
$lists[] = [
|
||||
'type' => 'children',
|
||||
'url' => Base::fillUrl("api/users/share/list") . "?pid=0",
|
||||
|
||||
@@ -10,18 +10,19 @@ use Response;
|
||||
use App\Module\Doo;
|
||||
use App\Models\File;
|
||||
use App\Module\Base;
|
||||
use App\Tasks\LoopTask;
|
||||
use App\Module\Extranet;
|
||||
use App\Tasks\AppPushTask;
|
||||
use App\Module\RandomColor;
|
||||
use App\Tasks\LoopTask;
|
||||
use App\Tasks\AppPushTask;
|
||||
use App\Tasks\JokeSoupTask;
|
||||
use App\Tasks\DeleteTmpTask;
|
||||
use App\Tasks\EmailNoticeTask;
|
||||
use App\Tasks\AutoArchivedTask;
|
||||
use App\Tasks\DeleteBotMsgTask;
|
||||
use App\Tasks\CheckinRemindTask;
|
||||
use Hhxsv5\LaravelS\Swoole\Task\Task;
|
||||
use App\Tasks\CloseMeetingRoomTask;
|
||||
use App\Tasks\UnclaimedTaskRemindTask;
|
||||
use Hhxsv5\LaravelS\Swoole\Task\Task;
|
||||
use LasseRafn\InitialAvatarGenerator\InitialAvatar;
|
||||
|
||||
|
||||
@@ -38,14 +39,8 @@ class IndexController extends InvokeController
|
||||
if ($action) {
|
||||
$app .= "__" . $action;
|
||||
}
|
||||
switch ($app) {
|
||||
case 'manifest.txt':
|
||||
$app = 'manifest';
|
||||
$child = 'txt';
|
||||
break;
|
||||
|
||||
case 'default':
|
||||
return '';
|
||||
if ($app == 'default') {
|
||||
return '';
|
||||
}
|
||||
if (!method_exists($this, $app)) {
|
||||
$app = method_exists($this, $method) ? $method : 'main';
|
||||
@@ -74,49 +69,7 @@ class IndexController extends InvokeController
|
||||
'version' => Base::getVersion(),
|
||||
'style' => $style,
|
||||
'script' => $script,
|
||||
])->header('Link', "<" . url('manifest.txt') . ">; rel=\"prefetch\"");
|
||||
}
|
||||
|
||||
/**
|
||||
* Manifest
|
||||
* @param $child
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\Routing\ResponseFactory|\Illuminate\Http\Response|string
|
||||
*/
|
||||
public function manifest($child = '')
|
||||
{
|
||||
if (empty($child)) {
|
||||
$murl = url('manifest.txt');
|
||||
return response($murl)->header('Link', "<{$murl}>; rel=\"prefetch\"");
|
||||
}
|
||||
$array = [
|
||||
"office/web-apps/apps/api/documents/api.js?hash=" . Base::getVersion(),
|
||||
"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.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.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.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);
|
||||
}
|
||||
return implode(PHP_EOL, $array);
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -213,6 +166,8 @@ class IndexController extends InvokeController
|
||||
Task::deliver(new JokeSoupTask());
|
||||
// 未领取任务通知
|
||||
Task::deliver(new UnclaimedTaskRemindTask());
|
||||
// 关闭会议室
|
||||
Task::deliver(new CloseMeetingRoomTask());
|
||||
|
||||
return "success";
|
||||
}
|
||||
@@ -252,7 +207,7 @@ class IndexController extends InvokeController
|
||||
if ($uploadSuccessFileNum >= $fileNum){
|
||||
$directoryPath = public_path("uploads/desktop");
|
||||
$files = array_filter(scandir($directoryPath), function($file) use($directoryPath) {
|
||||
return is_dir($directoryPath . '/' . $file) && $file != '.' && $file != '..';
|
||||
return preg_match("/^\d+\.\d+\.\d+$/", $file) && is_dir($directoryPath . '/' . $file) && $file != '.' && $file != '..';
|
||||
});
|
||||
sort($files);
|
||||
foreach ($files as $key => $file) {
|
||||
@@ -350,77 +305,85 @@ class IndexController extends InvokeController
|
||||
abort(404);
|
||||
}
|
||||
//
|
||||
if (file_exists($file)) {
|
||||
parse_str($data['query'], $query);
|
||||
$name = Arr::get($query, 'name');
|
||||
$ext = strtolower(Arr::get($query, 'ext'));
|
||||
$userAgent = strtolower(Request::server('HTTP_USER_AGENT'));
|
||||
if ($ext === 'pdf') {
|
||||
// 文件超过 10m 不支持在线预览,提示下载
|
||||
if (filesize($file) > 10 * 1024 * 1024) {
|
||||
return view('download', [
|
||||
'name' => $name,
|
||||
'size' => Base::readableBytes(filesize($file)),
|
||||
'url' => Base::fillUrl($path),
|
||||
'button' => Doo::translate('点击下载'),
|
||||
]);
|
||||
}
|
||||
// 浏览器类型
|
||||
$browser = 'none';
|
||||
if (str_contains($userAgent, 'chrome')) {
|
||||
$browser = str_contains($userAgent, 'android') || str_contains($userAgent, 'harmonyos') ? 'android-mobile' : 'chrome-desktop';
|
||||
} elseif (str_contains($userAgent, 'safari')) {
|
||||
$browser = str_contains($userAgent, 'iphone') || str_contains($userAgent, 'ipad') ? 'safari-mobile' : 'safari-desktop';
|
||||
}
|
||||
// electron 直接在线预览查看
|
||||
if (str_contains($userAgent, 'electron') || str_contains($browser, 'desktop')) {
|
||||
return Response::download($file, $name, [
|
||||
'Content-Type' => 'application/pdf'
|
||||
], 'inline');
|
||||
}
|
||||
// EEUI App 直接在线预览查看
|
||||
if (str_contains($userAgent, 'eeui') && Base::judgeClientVersion("0.34.47")) {
|
||||
if ($browser === 'safari-mobile') {
|
||||
$message = Base::array2json([
|
||||
'type' => 'currentOpen',
|
||||
'url' => Base::fillUrl($path),
|
||||
]);
|
||||
return "<script>window.top.postMessage($message, '*')</script>";
|
||||
}
|
||||
}
|
||||
}
|
||||
//
|
||||
if (in_array($ext, File::localExt)) {
|
||||
$url = Base::fillUrl($path);
|
||||
} else {
|
||||
$url = 'http://' . env('APP_IPPR') . '.3/' . $path;
|
||||
}
|
||||
if ($ext !== 'pdf') {
|
||||
$url = Base::urlAddparameter($url, [
|
||||
'fullfilename' => $name . '.' . $ext
|
||||
if (!file_exists($file)) {
|
||||
abort(404);
|
||||
}
|
||||
//
|
||||
parse_str($data['query'], $query);
|
||||
$name = Arr::get($query, 'name');
|
||||
$ext = strtolower(Arr::get($query, 'ext'));
|
||||
$userAgent = strtolower(Request::server('HTTP_USER_AGENT'));
|
||||
if ($ext === 'pdf') {
|
||||
// 文件超过 10m 不支持在线预览,提示下载
|
||||
if (filesize($file) > 10 * 1024 * 1024) {
|
||||
return view('download', [
|
||||
'name' => $name,
|
||||
'size' => Base::readableBytes(filesize($file)),
|
||||
'url' => Base::fillUrl($path),
|
||||
'button' => Doo::translate('点击下载'),
|
||||
]);
|
||||
}
|
||||
$toUrl = Base::fillUrl("fileview/onlinePreview?url=" . urlencode(base64_encode($url)));
|
||||
return Redirect::to($toUrl, 301);
|
||||
// 浏览器类型
|
||||
$browser = 'none';
|
||||
if (str_contains($userAgent, 'chrome') || str_contains($userAgent, 'android_kuaifan_eeui')) {
|
||||
$browser = str_contains($userAgent, 'android_kuaifan_eeui') ? 'android-mobile' : 'chrome-desktop';
|
||||
} elseif (str_contains($userAgent, 'safari') || str_contains($userAgent, 'ios_kuaifan_eeui')) {
|
||||
$browser = str_contains($userAgent, 'ios_kuaifan_eeui') ? 'safari-mobile' : 'safari-desktop';
|
||||
}
|
||||
// electron 直接在线预览查看
|
||||
if (str_contains($userAgent, 'electron') || str_contains($browser, 'desktop')) {
|
||||
return Response::download($file, $name, [
|
||||
'Content-Type' => 'application/pdf'
|
||||
], 'inline');
|
||||
}
|
||||
// EEUI App 直接在线预览查看
|
||||
if (str_contains($userAgent, 'eeui') && Base::judgeClientVersion("0.34.47")) {
|
||||
if ($browser === 'safari-mobile') {
|
||||
$redirectUrl = Base::fillUrl($path);
|
||||
return <<<EOF
|
||||
<script>
|
||||
window.top.postMessage({
|
||||
action: "eeuiAppSendMessage",
|
||||
data: [
|
||||
{
|
||||
action: 'setPageData',
|
||||
data: {
|
||||
showProgress: true,
|
||||
titleFixed: true,
|
||||
urlFixed: true,
|
||||
}
|
||||
},
|
||||
{
|
||||
action: 'createTarget',
|
||||
url: "{$redirectUrl}",
|
||||
}
|
||||
]
|
||||
}, "*")
|
||||
</script>
|
||||
EOF;
|
||||
}
|
||||
}
|
||||
}
|
||||
abort(404);
|
||||
//
|
||||
if (in_array($ext, File::localExt)) {
|
||||
$url = Base::fillUrl($path);
|
||||
} else {
|
||||
$url = 'http://' . env('APP_IPPR') . '.3/' . $path;
|
||||
}
|
||||
$url = Base::urlAddparameter($url, [
|
||||
'fullfilename' => Base::rightDelete($name, '.' . $ext) . '_' . filemtime($file) . '.' . $ext
|
||||
]);
|
||||
$redirectUrl = Base::fillUrl("fileview/onlinePreview?url=" . urlencode(base64_encode($url)));
|
||||
return Redirect::to($redirectUrl, 301);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存配置
|
||||
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View|string
|
||||
* 保存配置 (todo 已废弃)
|
||||
* @return string
|
||||
*/
|
||||
public function storage__synch()
|
||||
{
|
||||
$key = Request::input('key');
|
||||
$value = Request::input('value');
|
||||
if ($key) {
|
||||
$value = [$key => $value];
|
||||
}
|
||||
if (!is_array($value)) {
|
||||
$value = Base::json2array($value);
|
||||
}
|
||||
return view('storage', ['value' => Base::array2json($value)]);
|
||||
return '<!-- Deprecated -->';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,9 +15,6 @@ class VerifyCsrfToken extends Middleware
|
||||
// 接口部分
|
||||
'api/*',
|
||||
|
||||
// 保存配置
|
||||
'storage/synch/',
|
||||
|
||||
// 发布桌面端
|
||||
'desktop/publish/',
|
||||
];
|
||||
|
||||
@@ -11,9 +11,15 @@ namespace App\Models;
|
||||
* @property int|null $msg_id 消息ID
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ApproveProcMsg whereMsgId($value)
|
||||
|
||||
@@ -12,9 +12,15 @@ use Carbon\Carbon;
|
||||
* @property int|null $did 删除的数据ID
|
||||
* @property int|null $userid 关系会员ID
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Deleted newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Deleted newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Deleted query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Deleted whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Deleted whereDid($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Deleted whereId($value)
|
||||
|
||||
@@ -28,10 +28,16 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|File newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|File newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|File onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|File query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|File whereCid($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|File whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|File whereCreatedId($value)
|
||||
@@ -190,9 +196,10 @@ class File extends AbstractModel
|
||||
* @param user $user
|
||||
* @param int $pid
|
||||
* @param string $webkitRelativePath
|
||||
* @param bool $overwrite
|
||||
* @return array
|
||||
*/
|
||||
public function contentUpload($user, int $pid, $webkitRelativePath)
|
||||
public function contentUpload($user, int $pid, $webkitRelativePath, $overwrite = false)
|
||||
{
|
||||
$userid = $user->userid;
|
||||
if ($pid > 0) {
|
||||
@@ -283,17 +290,25 @@ class File extends AbstractModel
|
||||
if ($data['ext'] == 'markdown') {
|
||||
$data['ext'] = 'md';
|
||||
}
|
||||
$file = File::createInstance([
|
||||
$file = null;
|
||||
$params = [
|
||||
'pid' => $pid,
|
||||
'name' => Base::rightDelete($data['name'], '.' . $data['ext']),
|
||||
'type' => $type,
|
||||
'ext' => $data['ext'],
|
||||
'userid' => $userid,
|
||||
'created_id' => $user->userid,
|
||||
]);
|
||||
$file->handleDuplicateName();
|
||||
];
|
||||
if ($overwrite) {
|
||||
$file = self::wherePid($params['pid'])->whereExt($params['ext'])->whereName($params['name'])->first();
|
||||
}
|
||||
if (!$file) {
|
||||
$overwrite = false;
|
||||
$file = File::createInstance($params);
|
||||
$file->handleDuplicateName();
|
||||
}
|
||||
// 开始创建
|
||||
return AbstractModel::transaction(function () use ($addItem, $webkitRelativePath, $type, $user, $data, $file) {
|
||||
return AbstractModel::transaction(function () use ($overwrite, $addItem, $webkitRelativePath, $type, $user, $data, $file) {
|
||||
$file->size = $data['size'] * 1024;
|
||||
$file->saveBeforePP();
|
||||
//
|
||||
@@ -321,11 +336,12 @@ class File extends AbstractModel
|
||||
$tmpRow->pushMsg('add', $tmpRow);
|
||||
//
|
||||
$data = File::handleImageUrl($tmpRow->toArray());
|
||||
$data['full_name'] = $webkitRelativePath ?: $data['name'];
|
||||
$data['full_name'] = $webkitRelativePath ?: ($data['name'] . '.' . $data['ext']);
|
||||
$data['overwrite'] = $overwrite ? 1 : 0;
|
||||
//
|
||||
$addItem[] = $data;
|
||||
|
||||
return ['data'=>$data,'addItem'=>$addItem];
|
||||
return ['data' => $data, 'addItem' => $addItem];
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -18,10 +18,16 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileContent newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileContent newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileContent onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileContent query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileContent whereContent($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileContent whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileContent whereDeletedAt($value)
|
||||
@@ -70,7 +76,7 @@ class FileContent extends AbstractModel
|
||||
'name' => $name,
|
||||
'ext' => $fileExt
|
||||
]));
|
||||
return Base::fillUrl("online/preview/{$name}?key={$key}");
|
||||
return Base::fillUrl("online/preview/{$name}?key={$key}&version=" . Base::getVersion() . "&__=" . Base::msecTime());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -8,16 +8,22 @@ use App\Module\Base;
|
||||
* App\Models\FileLink
|
||||
*
|
||||
* @property int $id
|
||||
* @property int|null $file_id 项目ID
|
||||
* @property int|null $file_id 文件ID
|
||||
* @property int|null $num 累计访问
|
||||
* @property string|null $code 链接码
|
||||
* @property int|null $userid 会员ID
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \App\Models\File|null $file
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileLink newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileLink newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileLink query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileLink whereCode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileLink whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileLink whereFileId($value)
|
||||
|
||||
@@ -12,9 +12,15 @@ namespace App\Models;
|
||||
* @property int|null $permission 权限:0只读,1读写
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileUser newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileUser newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileUser query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileUser whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileUser whereFileId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|FileUser whereId($value)
|
||||
|
||||
@@ -18,9 +18,15 @@ use Illuminate\Support\Carbon;
|
||||
* @property Carbon|null $updated_at
|
||||
* @property string|null $end_at
|
||||
* @property Carbon|null $deleted_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Meeting newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Meeting newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Meeting query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Meeting whereChannel($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Meeting whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Meeting whereDeletedAt($value)
|
||||
@@ -44,12 +50,12 @@ class Meeting extends AbstractModel
|
||||
public function getShareLink()
|
||||
{
|
||||
$code = base64_encode("{$this->meetingid}" . Base::generatePassword());
|
||||
Cache::put(self::CACHE_KEY.'_'.$code, [
|
||||
Cache::put(self::CACHE_KEY . '_' . $code, [
|
||||
'id' => $this->id,
|
||||
'meetingid' => $this->meetingid,
|
||||
'channel' => $this->channel,
|
||||
], Carbon::now()->addHours(self::CACHE_EXPIRED_TIME));
|
||||
return Base::fillUrl("meeting/{$this->meetingid}/".$code);
|
||||
return Base::fillUrl("meeting/{$this->meetingid}/" . $code);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,19 +64,19 @@ class Meeting extends AbstractModel
|
||||
*/
|
||||
public static function getShareInfo($code)
|
||||
{
|
||||
if(Cache::has(self::CACHE_KEY.'_'.$code)){
|
||||
return Cache::get(self::CACHE_KEY.'_'.$code);
|
||||
if (Cache::has(self::CACHE_KEY . '_' . $code)) {
|
||||
return Cache::get(self::CACHE_KEY . '_' . $code);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存访客信息
|
||||
* @return mixed
|
||||
* @return void
|
||||
*/
|
||||
public static function setTouristInfo($data)
|
||||
{
|
||||
Cache::put(Meeting::CACHE_KEY.'_'.$data['uid'], [
|
||||
Cache::put(Meeting::CACHE_KEY . '_' . $data['uid'], [
|
||||
'uid' => $data['uid'],
|
||||
'userimg' => $data['userimg'],
|
||||
'nickname' => $data['nickname'],
|
||||
@@ -83,8 +89,8 @@ class Meeting extends AbstractModel
|
||||
*/
|
||||
public static function getTouristInfo($touristId)
|
||||
{
|
||||
if(Cache::has(Meeting::CACHE_KEY.'_'.$touristId)){
|
||||
return Cache::get(Meeting::CACHE_KEY.'_'.$touristId);
|
||||
if (Cache::has(Meeting::CACHE_KEY . '_' . $touristId)) {
|
||||
return Cache::get(Meeting::CACHE_KEY . '_' . $touristId);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
34
app/Models/MeetingMsg.php
Normal file
34
app/Models/MeetingMsg.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
/**
|
||||
* App\Models\MeetingMsg
|
||||
*
|
||||
* @property int $id
|
||||
* @property string|null $meetingid 会议ID
|
||||
* @property int|null $dialog_id 对话ID
|
||||
* @property int|null $msg_id 消息ID
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|MeetingMsg newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|MeetingMsg newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|MeetingMsg query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|MeetingMsg whereDialogId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|MeetingMsg whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|MeetingMsg whereMeetingid($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|MeetingMsg whereMsgId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class MeetingMsg extends AbstractModel
|
||||
{
|
||||
function __construct(array $attributes = [])
|
||||
{
|
||||
parent::__construct($attributes);
|
||||
$this->timestamps = false;
|
||||
}
|
||||
}
|
||||
@@ -36,10 +36,16 @@ use Request;
|
||||
* @property-read int|null $project_user_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Project allData($userid = null)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Project authData($userid = null, $owner = null)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Project newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Project newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Project onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Project query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Project whereArchivedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Project whereArchivedUserid($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Project whereCreatedAt($value)
|
||||
|
||||
@@ -22,10 +22,16 @@ use Request;
|
||||
* @property-read \App\Models\Project|null $project
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ProjectTask> $projectTask
|
||||
* @property-read int|null $project_task_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn whereColor($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectColumn whereDeletedAt($value)
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Module\Base;
|
||||
|
||||
/**
|
||||
* App\Models\ProjectFlow
|
||||
*
|
||||
@@ -14,9 +12,15 @@ use App\Module\Base;
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\ProjectFlowItem> $projectFlowItem
|
||||
* @property-read int|null $project_flow_item_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectFlow newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectFlow newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectFlow query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectFlow whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectFlow whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectFlow whereName($value)
|
||||
|
||||
@@ -13,7 +13,7 @@ use App\Module\Base;
|
||||
* @property string|null $name 名称
|
||||
* @property string|null $status 状态
|
||||
* @property array $turns 可流转
|
||||
* @property array $userids 自动负责人ID
|
||||
* @property array $userids 状态负责人ID
|
||||
* @property string|null $usertype 流转模式
|
||||
* @property int|null $userlimit 限制负责人
|
||||
* @property int|null $columnid 对应的项目列表
|
||||
@@ -21,9 +21,15 @@ use App\Module\Base;
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \App\Models\ProjectFlow|null $projectFlow
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectFlowItem newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectFlowItem newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectFlowItem query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectFlowItem whereColumnid($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectFlowItem whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectFlowItem whereFlowId($value)
|
||||
|
||||
@@ -13,9 +13,15 @@ namespace App\Models;
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read bool $already
|
||||
* @property-read \App\Models\Project|null $project
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectInvite newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectInvite newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectInvite query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectInvite whereCode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectInvite whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectInvite whereId($value)
|
||||
|
||||
@@ -10,7 +10,7 @@ use App\Module\Base;
|
||||
* @property int $id
|
||||
* @property int|null $project_id 项目ID
|
||||
* @property int|null $column_id 列表ID
|
||||
* @property int|null $task_id 项目ID
|
||||
* @property int|null $task_id 任务ID
|
||||
* @property int|null $userid 会员ID
|
||||
* @property string|null $detail 详细信息
|
||||
* @property array $record 记录数据
|
||||
@@ -18,9 +18,15 @@ use App\Module\Base;
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \App\Models\ProjectTask|null $projectTask
|
||||
* @property-read \App\Models\User|null $user
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectLog newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectLog newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectLog query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectLog whereColumnId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectLog whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectLog whereDetail($value)
|
||||
|
||||
@@ -13,9 +13,15 @@ use App\Module\Base;
|
||||
* @property string $permissions 权限
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectPermission newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectPermission newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectPermission query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectPermission whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectPermission whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectPermission wherePermissions($value)
|
||||
|
||||
@@ -63,10 +63,16 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask allData($userid = null)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask authData($userid = null, $owner = null)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask betweenTime($start, $end, $type = 'taskTime')
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereArchivedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereArchivedFollow($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTask whereArchivedUserid($value)
|
||||
@@ -329,13 +335,7 @@ class ProjectTask extends AbstractModel
|
||||
$query->where(function ($q1) use ($start, $end, $type) {
|
||||
switch ($type) {
|
||||
case 'createdTime':
|
||||
$q1->where(function ($q2) use ($start) {
|
||||
$q2->where('project_tasks.created_at', '>=', $start);
|
||||
})->orWhere(function ($q2) use ($end) {
|
||||
$q2->where('project_tasks.created_at', '<=', $end);
|
||||
})->orWhere(function ($q2) use ($start, $end) {
|
||||
$q2->where('project_tasks.created_at', '>', $start)->where('project_tasks.created_at', '<', $end);
|
||||
});
|
||||
$q1->where('project_tasks.created_at', '>=', $start)->where('project_tasks.created_at', '<=', $end);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -14,9 +14,15 @@ use App\Exceptions\ApiException;
|
||||
* @property string|null $content 内容
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskContent newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskContent newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskContent query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskContent whereContent($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskContent whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskContent whereId($value)
|
||||
|
||||
@@ -22,9 +22,15 @@ use Cache;
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read int $height
|
||||
* @property-read int $width
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskFile newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskFile newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskFile query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskFile whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskFile whereDownload($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskFile whereExt($value)
|
||||
|
||||
@@ -14,9 +14,15 @@ namespace App\Models;
|
||||
* @property string|null $after_flow_item_name (变化后)工作流状态名称
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskFlowChange newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskFlowChange newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskFlowChange query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskFlowChange whereAfterFlowItemId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskFlowChange whereAfterFlowItemName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskFlowChange whereBeforeFlowItemId($value)
|
||||
|
||||
@@ -17,10 +17,16 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskPushLog whereId($value)
|
||||
|
||||
@@ -12,9 +12,15 @@ namespace App\Models;
|
||||
* @property string|null $color 颜色
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskTag newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskTag newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskTag query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskTag whereColor($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskTag whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskTag whereId($value)
|
||||
|
||||
@@ -14,9 +14,15 @@ namespace App\Models;
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \App\Models\ProjectTask|null $projectTask
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskUser newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskUser newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskUser query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskUser whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskUser whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskUser whereOwner($value)
|
||||
|
||||
@@ -12,9 +12,15 @@ namespace App\Models;
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \App\Models\ProjectTask|null $projectTask
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskVisibilityUser newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskVisibilityUser newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskVisibilityUser query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskVisibilityUser whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskVisibilityUser whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectTaskVisibilityUser whereProjectId($value)
|
||||
|
||||
@@ -13,9 +13,15 @@ namespace App\Models;
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property-read \App\Models\Project|null $project
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectUser newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectUser newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectUser query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectUser whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectUser whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ProjectUser whereOwner($value)
|
||||
|
||||
@@ -29,9 +29,15 @@ use JetBrains\PhpStorm\Pure;
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\User> $receivesUser
|
||||
* @property-read int|null $receives_user_count
|
||||
* @property-read \App\Models\User|null $sendUser
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static Builder|Report newModelQuery()
|
||||
* @method static Builder|Report newQuery()
|
||||
* @method static Builder|Report query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static Builder|Report whereContent($value)
|
||||
* @method static Builder|Report whereCreatedAt($value)
|
||||
* @method static Builder|Report whereId($value)
|
||||
|
||||
@@ -13,9 +13,15 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* @property string|null $receive_time 接收时间
|
||||
* @property int $userid 接收人
|
||||
* @property int $read 是否已读
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ReportReceive newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ReportReceive newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ReportReceive query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ReportReceive whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ReportReceive whereRead($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|ReportReceive whereReceiveTime($value)
|
||||
|
||||
@@ -13,9 +13,15 @@ use App\Module\Base;
|
||||
* @property string|null $setting
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereDesc($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Setting whereId($value)
|
||||
|
||||
@@ -15,10 +15,16 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TaskWorker newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TaskWorker newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TaskWorker onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TaskWorker query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TaskWorker whereArgs($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TaskWorker whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|TaskWorker whereDeletedAt($value)
|
||||
|
||||
@@ -11,9 +11,15 @@ namespace App\Models;
|
||||
* @property string|null $content
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tmp newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tmp newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tmp query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tmp whereContent($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tmp whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|Tmp whereId($value)
|
||||
|
||||
@@ -14,15 +14,25 @@ use Hedeqiang\UMeng\IOS;
|
||||
* @property int|null $userid 会员ID
|
||||
* @property string|null $alias 别名
|
||||
* @property string|null $platform 平台类型
|
||||
* @property string|null $device 设备类型
|
||||
* @property string|null $ua userAgent
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UmengAlias newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UmengAlias newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UmengAlias query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UmengAlias whereAlias($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UmengAlias whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UmengAlias whereDevice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UmengAlias whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UmengAlias wherePlatform($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UmengAlias whereUa($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UmengAlias whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UmengAlias whereUserid($value)
|
||||
* @mixin \Eloquent
|
||||
@@ -142,7 +152,13 @@ class UmengAlias extends AbstractModel
|
||||
'mi_activity' => 'app.eeui.umeng.activity.MfrMessageActivity',
|
||||
'policy' => [
|
||||
'expire_time' => Carbon::now()->addSeconds($seconds)->toDateTimeString(),
|
||||
]
|
||||
],
|
||||
'channel_properties' => [
|
||||
'vivo_category' => 'IM',
|
||||
'huawei_channel_importance' => 'NORMAL',
|
||||
'huawei_channel_category' => 'IM',
|
||||
'channel_fcm' => 1,
|
||||
],
|
||||
]);
|
||||
|
||||
default:
|
||||
|
||||
@@ -37,10 +37,16 @@ use Carbon\Carbon;
|
||||
* @property int|null $bot 是否机器人
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Database\Factories\UserFactory factory(...$parameters)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User whereAz($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User whereBot($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|User whereChangepass($value)
|
||||
@@ -527,6 +533,16 @@ class User extends AbstractModel
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 临时帐号别名
|
||||
* @return mixed|string
|
||||
*/
|
||||
public static function tempAccountAlias()
|
||||
{
|
||||
$alias = Base::settingFind('system', 'temp_account_alias');
|
||||
return $alias ?: Doo::translate("临时帐号");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取头像
|
||||
* @param $userid
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Models;
|
||||
use App\Module\Base;
|
||||
use App\Module\Doo;
|
||||
use App\Module\Extranet;
|
||||
use App\Tasks\JokeSoupTask;
|
||||
use Cache;
|
||||
use Carbon\Carbon;
|
||||
|
||||
@@ -20,9 +21,15 @@ use Carbon\Carbon;
|
||||
* @property int|null $webhook_num 消息webhook请求次数
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBot newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBot newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBot query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBot whereBotId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBot whereClearAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserBot whereClearDay($value)
|
||||
@@ -229,8 +236,8 @@ class UserBot extends AbstractModel
|
||||
if ($checkins && $botUser = User::botGetOrCreate('check-in')) {
|
||||
$getJokeSoup = function($type) {
|
||||
$pre = $type == "up" ? "每日开心:" : "心灵鸡汤:";
|
||||
$key = $type == "up" ? "JokeSoupTask:jokes" : "JokeSoupTask:soups";
|
||||
$array = Base::json2array(Cache::get($key));
|
||||
$key = $type == "up" ? "jokes" : "soups";
|
||||
$array = Base::json2array(Cache::get(JokeSoupTask::keyName($key)));
|
||||
if ($array) {
|
||||
$item = $array[array_rand($array)];
|
||||
if ($item) {
|
||||
|
||||
@@ -15,9 +15,15 @@ use App\Module\Base;
|
||||
* @property string|null $remark 备注
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinMac whereMac($value)
|
||||
|
||||
@@ -16,9 +16,15 @@ use App\Module\Base;
|
||||
* @property int|null $report_time 上报的时间戳
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinRecord newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinRecord newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinRecord query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinRecord whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinRecord whereDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserCheckinRecord whereId($value)
|
||||
|
||||
@@ -16,9 +16,15 @@ use App\Module\Base;
|
||||
* @property string $cache 会员资料缓存
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserDelete newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserDelete newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserDelete query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserDelete whereCache($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserDelete whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserDelete whereEmail($value)
|
||||
|
||||
@@ -14,9 +14,15 @@ use App\Exceptions\ApiException;
|
||||
* @property int|null $owner_userid 部门负责人
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserDepartment newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserDepartment newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserDepartment query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserDepartment whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserDepartment whereDialogId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserDepartment whereId($value)
|
||||
|
||||
@@ -19,9 +19,15 @@ use Guanguans\Notify\Messages\EmailMessage;
|
||||
* @property int|null $type 邮件类型:1-邮箱认证,2-修改邮箱
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserEmailVerification newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserEmailVerification newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserEmailVerification query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserEmailVerification whereCode($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserEmailVerification whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserEmailVerification whereEmail($value)
|
||||
|
||||
@@ -16,9 +16,15 @@ use Guanguans\Notify\Messages\EmailMessage;
|
||||
* @property int|null $new_userid 交接人
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserTransfer newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserTransfer newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserTransfer query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserTransfer whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserTransfer whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|UserTransfer whereNewUserid($value)
|
||||
|
||||
@@ -13,9 +13,15 @@ namespace App\Models;
|
||||
* @property int|null $userid
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocket newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocket newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocket query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocket whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocket whereFd($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocket whereId($value)
|
||||
|
||||
@@ -20,29 +20,35 @@ use Illuminate\Support\Facades\DB;
|
||||
* @property string|null $group_type 聊天室类型
|
||||
* @property string|null $name 对话名称
|
||||
* @property string $avatar 头像(群)
|
||||
* @property string|null $last_at 最后消息时间
|
||||
* @property int|null $owner_id 群主用户ID
|
||||
* @property int|null $link_id 关联id
|
||||
* @property int|null $top_userid 置顶的用户ID
|
||||
* @property int|null $top_msg_id 置顶的消息ID
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\WebSocketDialogUser> $dialogUser
|
||||
* @property-read int|null $dialog_user_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereAvatar($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereDeletedAt($value)
|
||||
* @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 whereTopMsgId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereTopUserid($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereType($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialog withTrashed()
|
||||
@@ -81,7 +87,7 @@ class WebSocketDialog extends AbstractModel
|
||||
*/
|
||||
public static function getDialogList($userid, $updated = "", $deleted = "")
|
||||
{
|
||||
$builder = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.mark_unread', 'u.silence', 'u.color', 'u.updated_at as user_at'])
|
||||
$builder = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.last_at', 'u.mark_unread', 'u.silence', 'u.hide', 'u.color', 'u.updated_at as user_at'])
|
||||
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
||||
->where('u.userid', $userid);
|
||||
if ($updated) {
|
||||
@@ -89,7 +95,7 @@ class WebSocketDialog extends AbstractModel
|
||||
}
|
||||
$list = $builder
|
||||
->orderByDesc('u.top_at')
|
||||
->orderByDesc('web_socket_dialogs.last_at')
|
||||
->orderByDesc('u.last_at')
|
||||
->paginate(Base::getPaginate(100, 50));
|
||||
$list->transform(function (WebSocketDialog $item) use ($userid) {
|
||||
return $item->formatData($userid);
|
||||
@@ -103,31 +109,70 @@ class WebSocketDialog extends AbstractModel
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取未读对话列表
|
||||
* 列表外的未读对话 和 列表外的待办对话
|
||||
* @param $userid
|
||||
* @param $beforeAt
|
||||
* @param $take
|
||||
* @param $unreadAt
|
||||
* @param $todoAt
|
||||
* @return WebSocketDialog[]
|
||||
*/
|
||||
public static function getDialogUnread($userid, $beforeAt, $take = 20)
|
||||
public static function getDialogBeyond($userid, $unreadAt, $todoAt)
|
||||
{
|
||||
DB::statement("SET SQL_MODE=''");
|
||||
$list = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.mark_unread', 'u.silence', 'u.color', 'u.updated_at as user_at'])
|
||||
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
||||
->join('web_socket_dialog_msg_reads as r', 'web_socket_dialogs.id', '=', 'r.dialog_id')
|
||||
->where('u.userid', $userid)
|
||||
->where('r.userid', $userid)
|
||||
->where('r.silence', 0)
|
||||
->where('r.read_at')
|
||||
->where('web_socket_dialogs.last_at', '>', $beforeAt)
|
||||
->groupBy('web_socket_dialogs.id')
|
||||
->take(min(100, $take))
|
||||
->get();
|
||||
$list->transform(function (WebSocketDialog $item) use ($userid) {
|
||||
return $item->formatData($userid);
|
||||
});
|
||||
//
|
||||
return $list;
|
||||
$ids = [];
|
||||
$array = [];
|
||||
if ($unreadAt) {
|
||||
// 未读对话
|
||||
$list = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.last_at', 'u.mark_unread', 'u.silence', 'u.hide', 'u.color', 'u.updated_at as user_at'])
|
||||
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
||||
->join('web_socket_dialog_msg_reads as r', 'web_socket_dialogs.id', '=', 'r.dialog_id')
|
||||
->where('u.userid', $userid)
|
||||
->where('r.userid', $userid)
|
||||
->where('r.read_at')
|
||||
->where('u.last_at', '<', $unreadAt)
|
||||
->groupBy('u.dialog_id')
|
||||
->take(20)
|
||||
->get();
|
||||
$list->transform(function (WebSocketDialog $item) use ($userid, &$ids, &$array) {
|
||||
if (!in_array($item->id, $ids)) {
|
||||
$ids[] = $item->id;
|
||||
$array[] = $item->formatData($userid);
|
||||
}
|
||||
});
|
||||
// 标记未读会话
|
||||
$list = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.last_at', 'u.mark_unread', 'u.silence', 'u.hide', 'u.color', 'u.updated_at as user_at'])
|
||||
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
||||
->where('u.userid', $userid)
|
||||
->where('u.mark_unread', 1)
|
||||
->where('u.last_at', '<', $unreadAt)
|
||||
->take(20)
|
||||
->get();
|
||||
$list->transform(function (WebSocketDialog $item) use ($userid, &$ids, &$array) {
|
||||
if (!in_array($item->id, $ids)) {
|
||||
$ids[] = $item->id;
|
||||
$array[] = $item->formatData($userid);
|
||||
}
|
||||
});
|
||||
}
|
||||
if ($todoAt) {
|
||||
// 待办会话
|
||||
$list = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.last_at', 'u.mark_unread', 'u.silence', 'u.hide', 'u.color', 'u.updated_at as user_at'])
|
||||
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
||||
->join('web_socket_dialog_msg_todos as t', 'web_socket_dialogs.id', '=', 't.dialog_id')
|
||||
->where('u.userid', $userid)
|
||||
->where('t.userid', $userid)
|
||||
->where('t.done_at')
|
||||
->where('u.last_at', '<', $todoAt)
|
||||
->groupBy('u.dialog_id')
|
||||
->take(20)
|
||||
->get();
|
||||
$list->transform(function (WebSocketDialog $item) use ($userid, &$ids, &$array) {
|
||||
if (!in_array($item->id, $ids)) {
|
||||
$ids[] = $item->id;
|
||||
$array[] = $item->formatData($userid);
|
||||
}
|
||||
});
|
||||
}
|
||||
return $array;
|
||||
}
|
||||
|
||||
|
||||
@@ -147,14 +192,16 @@ class WebSocketDialog extends AbstractModel
|
||||
};
|
||||
//
|
||||
$time = Carbon::parse($this->user_at ?? $dialogUserFun('updated_at'));
|
||||
$this->hide = $this->hide ?? $dialogUserFun('hide');
|
||||
$this->top_at = $this->top_at ?? $dialogUserFun('top_at');
|
||||
$this->last_at = $this->last_at ?? $dialogUserFun('last_at');
|
||||
$this->user_at = $time->toDateTimeString('millisecond');
|
||||
$this->user_ms = $time->valueOf();
|
||||
//
|
||||
if (isset($this->search_msg_id)) {
|
||||
// 最后消息 (搜索预览消息)
|
||||
$this->last_msg = WebSocketDialogMsg::whereDialogId($this->id)->find($this->search_msg_id);
|
||||
$this->last_at = $this->last_msg?->created_at;
|
||||
$this->last_at = $this->last_msg ? Carbon::parse($this->last_msg->created_at)->format('Y-m-d H:i:s') : null;
|
||||
} else {
|
||||
// 未读信息
|
||||
if (Base::judgeClientVersion("0.34.0")) {
|
||||
@@ -551,20 +598,6 @@ class WebSocketDialog extends AbstractModel
|
||||
Task::deliver($task);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新对话最后消息时间
|
||||
* @return WebSocketDialogMsg|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|\Illuminate\Database\Query\Builder|object|null
|
||||
*/
|
||||
public function updateMsgLastAt()
|
||||
{
|
||||
$lastMsg = WebSocketDialogMsg::whereDialogId($this->id)->orderByDesc('id')->first();
|
||||
if ($lastMsg) {
|
||||
$this->last_at = $lastMsg->created_at;
|
||||
$this->save();
|
||||
}
|
||||
return $lastMsg;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取对话(同时检验对话身份)
|
||||
* @param $dialog_id
|
||||
@@ -621,7 +654,6 @@ class WebSocketDialog extends AbstractModel
|
||||
'name' => $name ?: '',
|
||||
'group_type' => $group_type,
|
||||
'owner_id' => $owner_id,
|
||||
'last_at' => in_array($group_type, ['user', 'department', 'all']) ? Carbon::now() : null,
|
||||
]);
|
||||
$dialog->save();
|
||||
foreach (is_array($userid) ? $userid : [$userid] as $value) {
|
||||
@@ -629,7 +661,8 @@ class WebSocketDialog extends AbstractModel
|
||||
WebSocketDialogUser::createInstance([
|
||||
'dialog_id' => $dialog->id,
|
||||
'userid' => $value,
|
||||
'important' => !in_array($group_type, ['user', 'all'])
|
||||
'important' => !in_array($group_type, ['user', 'all']),
|
||||
'last_at' => in_array($group_type, ['user', 'department', 'all']) ? Carbon::now() : null,
|
||||
])->save();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,18 +33,21 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @property int|null $reply_id 回复ID
|
||||
* @property int|null $forward_id 转发ID
|
||||
* @property int|null $forward_num 被转发多少次
|
||||
* @property int|null $forward_show 是否显示转发的来源
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @property-read \App\Models\WebSocketDialogMsg|null $forward_data
|
||||
* @property-read int|mixed $percentage
|
||||
* @property-read \App\Models\WebSocketDialogMsg|null $reply_data
|
||||
* @property-read \App\Models\WebSocketDialog|null $webSocketDialog
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereDialogId($value)
|
||||
@@ -52,7 +55,6 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereEmoji($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereForwardId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereForwardNum($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereForwardShow($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereKey($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsg whereLink($value)
|
||||
@@ -78,8 +80,6 @@ class WebSocketDialogMsg extends AbstractModel
|
||||
|
||||
protected $appends = [
|
||||
'percentage',
|
||||
'reply_data',
|
||||
'forward_data',
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
@@ -107,36 +107,6 @@ class WebSocketDialogMsg extends AbstractModel
|
||||
return $this->appendattrs['percentage'];
|
||||
}
|
||||
|
||||
/**
|
||||
* 回复消息详情
|
||||
* @return WebSocketDialogMsg|null
|
||||
*/
|
||||
public function getReplyDataAttribute()
|
||||
{
|
||||
if (!isset($this->appendattrs['reply_data'])) {
|
||||
$this->appendattrs['reply_data'] = null;
|
||||
if ($this->reply_id > 0) {
|
||||
$this->appendattrs['reply_data'] = self::find($this->reply_id, ['id', 'userid', 'type', 'msg'])?->cancelAppend() ?: null;
|
||||
}
|
||||
}
|
||||
return $this->appendattrs['reply_data'];
|
||||
}
|
||||
|
||||
/**
|
||||
* 转发消息详情
|
||||
* @return WebSocketDialogMsg|null
|
||||
*/
|
||||
public function getForwardDataAttribute()
|
||||
{
|
||||
if (!isset($this->appendattrs['forward_data'])) {
|
||||
$this->appendattrs['forward_data'] = null;
|
||||
if ($this->forward_id > 0) {
|
||||
$this->appendattrs['forward_data'] = self::find($this->forward_id, ['id', 'userid', 'type', 'msg'])?->cancelAppend() ?: null;
|
||||
}
|
||||
}
|
||||
return $this->appendattrs['forward_data'];
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息格式化
|
||||
* @param $value
|
||||
@@ -147,13 +117,9 @@ class WebSocketDialogMsg extends AbstractModel
|
||||
if (is_array($value)) {
|
||||
return $value;
|
||||
}
|
||||
$value = Base::json2array($value);
|
||||
if ($this->type === 'file') {
|
||||
$value['type'] = in_array($value['ext'], ['jpg', 'jpeg', 'webp', 'png', 'gif']) ? 'img' : 'file';
|
||||
$value['path'] = Base::fillUrl($value['path']);
|
||||
$value['thumb'] = Base::fillUrl($value['thumb'] ?: Base::extIcon($value['ext']));
|
||||
} else if ($this->type === 'record') {
|
||||
$value['path'] = Base::fillUrl($value['path']);
|
||||
$value = $this->formatDataMsg($this->type, $value);
|
||||
if (isset($value['reply_data'])) {
|
||||
$value['reply_data']['msg'] = $this->formatDataMsg($value['reply_data']['type'], $value['reply_data']['msg']);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
@@ -171,6 +137,27 @@ class WebSocketDialogMsg extends AbstractModel
|
||||
return Base::json2array($value);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理消息数据
|
||||
* @param $type
|
||||
* @param $msg
|
||||
* @return mixed
|
||||
*/
|
||||
private function formatDataMsg($type, $msg)
|
||||
{
|
||||
if (!is_array($msg)) {
|
||||
$msg = Base::json2array($msg);
|
||||
}
|
||||
if ($type === 'file') {
|
||||
$msg['type'] = in_array($msg['ext'], ['jpg', 'jpeg', 'webp', 'png', 'gif']) ? 'img' : 'file';
|
||||
$msg['path'] = Base::fillUrl($msg['path']);
|
||||
$msg['thumb'] = Base::fillUrl($msg['thumb'] ?: Base::extIcon($msg['ext']));
|
||||
} else if ($type === 'record') {
|
||||
$msg['path'] = Base::fillUrl($msg['path']);
|
||||
}
|
||||
return $msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取占比
|
||||
* @param bool|int $increment 是否新增阅读数
|
||||
@@ -391,15 +378,25 @@ class WebSocketDialogMsg extends AbstractModel
|
||||
* 转发消息
|
||||
* @param array|int $dialogids
|
||||
* @param array|int $userids
|
||||
* @param User $user 发送的会员
|
||||
* @param int $showSource 是否显示原发送者信息
|
||||
* @param string $leaveMessage 转发留言
|
||||
* @param User $user 发送的会员
|
||||
* @param int $showSource 是否显示原发送者信息
|
||||
* @param string $leaveMessage 转发留言
|
||||
* @return mixed
|
||||
*/
|
||||
public function forwardMsg($dialogids, $userids, $user, $showSource = 1, $leaveMessage = '')
|
||||
{
|
||||
return AbstractModel::transaction(function() use ($dialogids, $user, $userids, $showSource, $leaveMessage) {
|
||||
$originalMsg = Base::json2array($this->getRawOriginal('msg'));
|
||||
return AbstractModel::transaction(function () use ($dialogids, $user, $userids, $showSource, $leaveMessage) {
|
||||
$msgData = Base::json2array($this->getRawOriginal('msg'));
|
||||
$forwardData = is_array($msgData['forward_data']) ? $msgData['forward_data'] : [];
|
||||
$forwardId = $forwardData['id'] ?: $this->id;
|
||||
$forwardUserid = $forwardData['userid'] ?: $this->userid;
|
||||
$msgData['forward_data'] = [
|
||||
'id' => $forwardId, // 转发的消息ID(原始)
|
||||
'userid' => $forwardUserid, // 转发的消息会员ID(原始)
|
||||
'parent_id' => $this->id, // 转发的消息ID
|
||||
'parent_userid' => $this->userid, // 转发的消息会员ID
|
||||
'show' => $showSource, // 是否显示原发送者信息
|
||||
];
|
||||
$msgs = [];
|
||||
$already = [];
|
||||
if ($dialogids) {
|
||||
@@ -407,7 +404,7 @@ class WebSocketDialogMsg extends AbstractModel
|
||||
$dialogids = [$dialogids];
|
||||
}
|
||||
foreach ($dialogids as $dialogid) {
|
||||
$res = self::sendMsg('forward-'.( $showSource ? 1 : 0).'-'.($this->forward_id ?: $this->id), $dialogid, $this->type, $originalMsg, $user->userid);
|
||||
$res = self::sendMsg('forward-' . $forwardId, $dialogid, $this->type, $msgData, $user->userid);
|
||||
if (Base::isSuccess($res)) {
|
||||
$msgs[] = $res['data'];
|
||||
$already[] = $dialogid;
|
||||
@@ -427,7 +424,7 @@ class WebSocketDialogMsg extends AbstractModel
|
||||
}
|
||||
$dialog = WebSocketDialog::checkUserDialog($user, $userid);
|
||||
if ($dialog && !in_array($dialog->id, $already)) {
|
||||
$res = self::sendMsg('forward-'.( $showSource ? 1 : 0).'-'.($this->forward_id ?: $this->id), $dialog->id, $this->type, $originalMsg, $user->userid);
|
||||
$res = self::sendMsg('forward-' . $forwardId, $dialog->id, $this->type, $msgData, $user->userid);
|
||||
if (Base::isSuccess($res)) {
|
||||
$msgs[] = $res['data'];
|
||||
}
|
||||
@@ -437,6 +434,9 @@ class WebSocketDialogMsg extends AbstractModel
|
||||
}
|
||||
}
|
||||
}
|
||||
if (count($msgs) > 0) {
|
||||
$this->increment('forward_num', count($msgs));
|
||||
}
|
||||
return Base::retSuccess('转发成功', [
|
||||
'msgs' => $msgs
|
||||
]);
|
||||
@@ -458,9 +458,8 @@ class WebSocketDialogMsg extends AbstractModel
|
||||
WebSocketDialogMsgTodo::whereIn('msg_id', $ids)->delete();
|
||||
self::whereIn('id', $ids)->delete();
|
||||
//
|
||||
$dialogDatas = WebSocketDialog::whereIn('id', $dialogIds)->get();
|
||||
foreach ($dialogDatas as $dialogData) {
|
||||
$dialogData->updateMsgLastAt();
|
||||
foreach ($dialogIds as $dialogId) {
|
||||
WebSocketDialogUser::updateMsgLastAt($dialogId);
|
||||
}
|
||||
foreach ($replyIds as $id) {
|
||||
self::whereId($id)->update(['reply_num' => self::whereReplyId($id)->count()]);
|
||||
@@ -501,7 +500,7 @@ class WebSocketDialogMsg extends AbstractModel
|
||||
'data' => [
|
||||
'id' => $this->id,
|
||||
'dialog_id' => $this->dialog_id,
|
||||
'last_msg' => $dialogData->updateMsgLastAt(),
|
||||
'last_msg' => WebSocketDialogUser::updateMsgLastAt($this->dialog_id),
|
||||
'update_read' => $deleteRead ? 1 : 0
|
||||
],
|
||||
]
|
||||
@@ -786,7 +785,20 @@ class WebSocketDialogMsg extends AbstractModel
|
||||
}
|
||||
// 过滤标签
|
||||
$text = strip_tags($text, '<blockquote> <strong> <pre> <ol> <ul> <li> <em> <p> <s> <u> <a>');
|
||||
$text = preg_replace("/\<(blockquote|strong|pre|ol|ul|li|em|p|s|u).*?\>/is", "<$1>", $text); // 不用去除a标签,上面已经处理过了
|
||||
$text = preg_replace_callback("/\<(blockquote|strong|pre|ol|ul|li|em|p|s|u)(.*?)\>/is", function (array $match) { // 不用去除a标签,上面已经处理过了
|
||||
preg_match("/<[^>]*?style=([\"'])(.*?)\\1[^>]*?>/is", $match[0], $matchs);
|
||||
$attach = '';
|
||||
if ($matchs) {
|
||||
$styleArray = explode(';', $matchs[2]);
|
||||
$validStyles = array_filter($styleArray, function ($styleItem) {
|
||||
return preg_match('/\s*(?:color|font-size|background-color|font-weight|font-family|text-decoration|font-style)\s*:/i', $styleItem); // 只保留指定样式
|
||||
});
|
||||
if ($validStyles) {
|
||||
$attach = ' style="' . implode(';', $validStyles) . '"';
|
||||
}
|
||||
}
|
||||
return "<{$match[1]}{$attach}>";
|
||||
}, $text);
|
||||
$text = preg_replace_callback("/\[:LINK:(.*?):(.*?):\]/i", function (array $match) {
|
||||
return "<a href=\"" . base64_decode($match[1]) . "\" target=\"_blank\">" . base64_decode($match[2]) . "</a>";
|
||||
}, $text);
|
||||
@@ -846,10 +858,10 @@ class WebSocketDialogMsg extends AbstractModel
|
||||
$push_silence = !in_array($type, ["text", "file", "record", "meeting"]);
|
||||
}
|
||||
//
|
||||
$update_id = preg_match("/^update-(\d+)$/", $action, $match) ? $match[1] : 0;
|
||||
$change_id = preg_match("/^change-(\d+)$/", $action, $match) ? $match[1] : 0;
|
||||
$reply_id = preg_match("/^reply-(\d+)$/", $action, $match) ? $match[1] : 0;
|
||||
$forward_id = preg_match("/^forward-(\d+)-(\d+)$/", $action, $match) ? $match[2] : 0;
|
||||
$update_id = intval(preg_match("/^update-(\d+)$/", $action, $match) ? $match[1] : 0);
|
||||
$change_id = intval(preg_match("/^change-(\d+)$/", $action, $match) ? $match[1] : 0);
|
||||
$reply_id = intval(preg_match("/^reply-(\d+)$/", $action, $match) ? $match[1] : 0);
|
||||
$forward_id = intval(preg_match("/^forward-(\d+)$/", $action, $match) ? $match[1] : 0);
|
||||
$sender = $sender === null ? User::userid() : $sender;
|
||||
//
|
||||
$dialog = WebSocketDialog::find($dialog_id);
|
||||
@@ -871,23 +883,37 @@ class WebSocketDialogMsg extends AbstractModel
|
||||
if (empty($dialogMsg)) {
|
||||
throw new ApiException('消息不存在');
|
||||
}
|
||||
if ($dialogMsg->type !== 'text' && $dialogMsg->type !== 'vote') {
|
||||
throw new ApiException('此消息不支持此操作');
|
||||
}
|
||||
if ($dialogMsg->userid != $sender && $dialogMsg->type !== 'vote') {
|
||||
throw new ApiException('仅支持修改自己的消息');
|
||||
$oldMsg = Base::json2array($dialogMsg->getRawOriginal('msg'));
|
||||
if ($dialogMsg->type === 'vote') {
|
||||
if ($dialogMsg->userid != $sender) {
|
||||
$msg = [
|
||||
'votes' => $msg['votes'],
|
||||
];
|
||||
}
|
||||
} else {
|
||||
if ($dialogMsg->type !== 'text') {
|
||||
throw new ApiException('此消息不支持此操作');
|
||||
}
|
||||
if ($dialogMsg->userid != $sender) {
|
||||
throw new ApiException('仅支持修改自己的消息');
|
||||
}
|
||||
}
|
||||
//
|
||||
$updateData = [
|
||||
'mtype' => $mtype,
|
||||
'link' => $link,
|
||||
'msg' => $msg,
|
||||
'msg' => array_merge($oldMsg, $msg),
|
||||
'modify' => $modify,
|
||||
];
|
||||
$dialogMsg->updateInstance($updateData);
|
||||
$dialogMsg->key = $dialogMsg->generateMsgKey();
|
||||
$dialogMsg->save();
|
||||
//
|
||||
WebSocketDialogUser::whereDialogId($dialog->id)->whereUserid($sender)->whereHide(1)->change([
|
||||
'hide' => 0, // 修改消息时,显示会话(仅自己)
|
||||
'updated_at' => Carbon::now()->toDateTimeString('millisecond'),
|
||||
]);
|
||||
//
|
||||
$dialogMsg->msgJoinGroup($dialog);
|
||||
//
|
||||
$dialog->pushMsg('update', array_merge($updateData, [
|
||||
@@ -897,34 +923,53 @@ class WebSocketDialogMsg extends AbstractModel
|
||||
return Base::retSuccess('修改成功', $dialogMsg);
|
||||
} else {
|
||||
// 发送
|
||||
if ($reply_id && !self::whereId($reply_id)->increment('reply_num')) {
|
||||
throw new ApiException('回复的消息不存在');
|
||||
}
|
||||
// 转发
|
||||
if ($forward_id && !self::whereId($forward_id)->increment('forward_num')) {
|
||||
throw new ApiException('转发的消息不存在');
|
||||
if ($reply_id) {
|
||||
// 回复
|
||||
$replyRow = self::whereId($reply_id)->whereDialogId($dialog_id)->first();
|
||||
if (empty($replyRow)) {
|
||||
throw new ApiException('回复的消息不存在');
|
||||
}
|
||||
$replyMsg = Base::json2array($replyRow->getRawOriginal('msg'));
|
||||
unset($replyMsg['reply_data']);
|
||||
$msg['reply_data'] = [
|
||||
'id' => $replyRow->id,
|
||||
'userid' => $replyRow->userid,
|
||||
'type' => $replyRow->type,
|
||||
'msg' => $replyMsg,
|
||||
];
|
||||
$replyRow->increment('reply_num');
|
||||
}
|
||||
//
|
||||
$dialogMsg = self::createInstance([
|
||||
'dialog_id' => $dialog_id,
|
||||
'dialog_type' => $dialog->type,
|
||||
'reply_id' => $reply_id,
|
||||
'forward_id' => $forward_id,
|
||||
'userid' => $sender,
|
||||
'type' => $type,
|
||||
'mtype' => $mtype,
|
||||
'link' => $link,
|
||||
'msg' => $msg,
|
||||
'read' => 0,
|
||||
'forward_id' => $forward_id,
|
||||
'forward_show' => $forward_id ? $match[1] : 1,
|
||||
]);
|
||||
AbstractModel::transaction(function () use ($dialog, $dialogMsg) {
|
||||
$dialog->last_at = Carbon::now();
|
||||
$dialog->save();
|
||||
AbstractModel::transaction(function () use ($dialogMsg) {
|
||||
$dialogMsg->send = 1;
|
||||
$dialogMsg->key = $dialogMsg->generateMsgKey();
|
||||
$dialogMsg->save();
|
||||
WebSocketDialogUser::whereDialogId($dialog->id)->change(['updated_at' => Carbon::now()->toDateTimeString('millisecond')]);
|
||||
//
|
||||
if ($dialogMsg->type === 'meeting') {
|
||||
MeetingMsg::createInstance([
|
||||
'meetingid' => $dialogMsg->msg['meetingid'],
|
||||
'dialog_id' => $dialogMsg->dialog_id,
|
||||
'msg_id' => $dialogMsg->id,
|
||||
])->save();
|
||||
}
|
||||
//
|
||||
WebSocketDialogUser::whereDialogId($dialogMsg->dialog_id)->change([
|
||||
'hide' => 0, // 有新消息时,显示会话(会话内所有会员)
|
||||
'last_at' => Carbon::now(),
|
||||
'updated_at' => Carbon::now()->toDateTimeString('millisecond'),
|
||||
]);
|
||||
});
|
||||
//
|
||||
$task = new WebSocketDialogMsgTask($dialogMsg->id);
|
||||
|
||||
@@ -17,9 +17,15 @@ use Carbon\Carbon;
|
||||
* @property int|null $after 在阅读之后才添加的记录
|
||||
* @property string|null $read_at 阅读时间
|
||||
* @property-read \App\Models\WebSocketDialogMsg|null $webSocketDialogMsg
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsgRead newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsgRead newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsgRead query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsgRead whereAfter($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsgRead whereDialogId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsgRead whereEmail($value)
|
||||
|
||||
@@ -11,9 +11,15 @@ namespace App\Models;
|
||||
* @property int|null $userid 接收会员ID
|
||||
* @property string|null $done_at 完成时间
|
||||
* @property-read array|mixed $msg_data
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsgTodo newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsgTodo newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsgTodo query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsgTodo whereDialogId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsgTodo whereDoneAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogMsgTodo whereId($value)
|
||||
|
||||
@@ -11,23 +11,33 @@ use Carbon\Carbon;
|
||||
* @property int|null $dialog_id 对话ID
|
||||
* @property int|null $userid 会员ID
|
||||
* @property string|null $top_at 置顶时间
|
||||
* @property string|null $last_at 最后消息时间
|
||||
* @property int|null $mark_unread 是否标记为未读:0否,1是
|
||||
* @property int|null $silence 是否免打扰:0否,1是
|
||||
* @property int|null $hide 不显示会话:0否,1是
|
||||
* @property int|null $inviter 邀请人
|
||||
* @property int|null $important 是否不可移出(项目、任务人员)
|
||||
* @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|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @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|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @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 whereHide($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser whereImportant($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser whereInviter($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser whereLastAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser whereMarkUnread($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser whereSilence($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketDialogUser whereTopAt($value)
|
||||
@@ -46,4 +56,17 @@ class WebSocketDialogUser extends AbstractModel
|
||||
{
|
||||
return $this->hasOne(WebSocketDialog::class, 'id', 'dialog_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新对话最后消息时间
|
||||
* @return WebSocketDialogMsg|\Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Eloquent\Model|\Illuminate\Database\Query\Builder|object|null
|
||||
*/
|
||||
public static function updateMsgLastAt($dialogId)
|
||||
{
|
||||
$lastMsg = WebSocketDialogMsg::whereDialogId($dialogId)->orderByDesc('id')->first();
|
||||
if ($lastMsg) {
|
||||
WebSocketDialogUser::whereDialogId($dialogId)->change(['last_at' => $lastMsg->created_at]);
|
||||
}
|
||||
return $lastMsg;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,9 +12,15 @@ namespace App\Models;
|
||||
* @property int|null $create_id 所属会员ID
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelAppend()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel cancelHidden()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel change($array)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel getKeyValue()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketTmpMsg newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketTmpMsg newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketTmpMsg query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel remove()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|AbstractModel saveOrIgnore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketTmpMsg whereCreateId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketTmpMsg whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|WebSocketTmpMsg whereId($value)
|
||||
|
||||
@@ -133,7 +133,8 @@ class Base
|
||||
|
||||
/**
|
||||
* 判断客户端版本
|
||||
* @param $min
|
||||
* @param $min // 最小版本(满足此版本返回true)
|
||||
* @param null $clientVersion
|
||||
* @return bool
|
||||
*/
|
||||
public static function judgeClientVersion($min, $clientVersion = null)
|
||||
@@ -2472,13 +2473,18 @@ class Base
|
||||
*/
|
||||
public static function extIcon($ext)
|
||||
{
|
||||
return match ($ext) {
|
||||
"docx" => 'images/ext/doc.png',
|
||||
"xlsx" => 'images/ext/xls.png',
|
||||
"pptx" => 'images/ext/ppt.png',
|
||||
"ai", "avi", "bmp", "cdr", "doc", "eps", "gif", "mov", "mp3", "mp4", "pdf", "ppt", "pr", "psd", "rar", "svg", "tif", "txt", "xls", "zip" => 'images/ext/' . $ext . '.png',
|
||||
default => 'images/ext/file.png',
|
||||
};
|
||||
if ($ext == "docx") {
|
||||
$ext = 'doc';
|
||||
} elseif ($ext == "xlsx") {
|
||||
$ext = 'xls';
|
||||
} elseif ($ext == "pptx") {
|
||||
$ext = 'ppt';
|
||||
}
|
||||
if (in_array($ext, ["ai", "avi", "bmp", "cdr", "doc", "eps", "gif", "mov", "mp3", "mp4", "pdf", "ppt", "pr", "psd", "rar", "svg", "tif", "txt", "xls", "zip"])) {
|
||||
return 'images/ext/' . $ext . '.png';
|
||||
} else {
|
||||
return 'images/ext/file.png';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -228,6 +228,14 @@ class Doo
|
||||
if (Base::isError($data)) {
|
||||
throw new ApiException($data['msg'] ?: '注册失败');
|
||||
}
|
||||
if (\DB::transactionLevel() > 0) {
|
||||
try {
|
||||
\DB::commit();
|
||||
\DB::beginTransaction();
|
||||
} catch (\Throwable) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
$user = User::whereEmail($email)->first();
|
||||
if (empty($user)) {
|
||||
throw new ApiException('注册失败');
|
||||
|
||||
@@ -29,8 +29,9 @@ class TimeRange
|
||||
$updated = Base::isNumber($range[0]) ? intval($range[0]) : trim($range[0]);
|
||||
$deleted = Base::isNumber($range[1]) ? intval($range[1]) : trim($range[1]);
|
||||
//
|
||||
$this->updated = $updated ? Carbon::parse($updated) : null;
|
||||
$this->deleted = $deleted ? Carbon::parse($deleted) : null;
|
||||
$timezone = config('app.timezone');
|
||||
$this->updated = $updated ? Carbon::parse($updated)->setTimezone($timezone) : null;
|
||||
$this->deleted = $deleted ? Carbon::parse($deleted)->setTimezone($timezone) : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Observers;
|
||||
|
||||
use App\Models\Deleted;
|
||||
use App\Models\WebSocketDialogUser;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class WebSocketDialogUserObserver
|
||||
{
|
||||
@@ -15,6 +16,18 @@ class WebSocketDialogUserObserver
|
||||
*/
|
||||
public function created(WebSocketDialogUser $webSocketDialogUser)
|
||||
{
|
||||
if (!$webSocketDialogUser->last_at) {
|
||||
if (in_array($webSocketDialogUser->webSocketDialog?->group_type, ['user', 'department', 'all'])) {
|
||||
$webSocketDialogUser->last_at = Carbon::now();
|
||||
$webSocketDialogUser->save();
|
||||
} else {
|
||||
$item = WebSocketDialogUser::whereDialogId($webSocketDialogUser->dialog_id)->orderByDesc('last_at')->first();
|
||||
if ($item?->last_at) {
|
||||
$webSocketDialogUser->last_at = $item->last_at;
|
||||
$webSocketDialogUser->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
Deleted::forget('dialog', $webSocketDialogUser->dialog_id, $webSocketDialogUser->userid);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,6 +62,7 @@ class WebSocketService implements WebSocketHandlerInterface
|
||||
'type' => 'open',
|
||||
'data' => [
|
||||
'fd' => $fd,
|
||||
'ud' => $user->userid,
|
||||
],
|
||||
]));
|
||||
// 通知上线
|
||||
|
||||
@@ -316,12 +316,12 @@ class BotReceiveMsgTask extends AbstractTask
|
||||
$nameKey = $isManager ? $array[2] : $array[1];
|
||||
$data = $this->botManagerOne($botId, $msg->userid);
|
||||
if ($data) {
|
||||
$list = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.mark_unread', 'u.silence', 'u.color', 'u.updated_at as user_at'])
|
||||
$list = WebSocketDialog::select(['web_socket_dialogs.*', 'u.top_at', 'u.last_at', 'u.mark_unread', 'u.silence', 'u.hide', 'u.color', 'u.updated_at as user_at'])
|
||||
->join('web_socket_dialog_users as u', 'web_socket_dialogs.id', '=', 'u.dialog_id')
|
||||
->where('web_socket_dialogs.name', 'LIKE', "%{$nameKey}%")
|
||||
->where('u.userid', $data->userid)
|
||||
->orderByDesc('u.top_at')
|
||||
->orderByDesc('web_socket_dialogs.last_at')
|
||||
->orderByDesc('u.last_at')
|
||||
->take(20)
|
||||
->get();
|
||||
if ($list->isEmpty()) {
|
||||
|
||||
132
app/Tasks/CloseMeetingRoomTask.php
Normal file
132
app/Tasks/CloseMeetingRoomTask.php
Normal file
@@ -0,0 +1,132 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tasks;
|
||||
|
||||
use App\Models\Meeting;
|
||||
use App\Models\WebSocketDialog;
|
||||
use App\Module\Base;
|
||||
use Carbon\Carbon;
|
||||
use App\Models\WebSocketDialogMsg;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
|
||||
@error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
|
||||
|
||||
class CloseMeetingRoomTask extends AbstractTask
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function start()
|
||||
{
|
||||
// 10分钟执行一次
|
||||
$time = intval(Cache::get("CloseMeetingRoomTask:Time"));
|
||||
if (time() - $time < 600) {
|
||||
return;
|
||||
}
|
||||
Cache::put("CloseMeetingRoomTask:Time", time(), Carbon::now()->addMinutes(10));
|
||||
// 判断参数
|
||||
$setting = Base::setting('meetingSetting');
|
||||
if ($setting['open'] !== 'open') {
|
||||
return;
|
||||
}
|
||||
if (empty($setting['appid']) ||empty($setting['api_key']) || empty($setting['api_secret'])) {
|
||||
return;
|
||||
}
|
||||
$credentials = $setting['api_key'] . ":" . $setting['api_secret'];
|
||||
$base64Credentials = base64_encode($credentials);
|
||||
$arrHeader = [
|
||||
"Accept: application/json",
|
||||
"Authorization: Basic " . $base64Credentials
|
||||
];
|
||||
// 获取10分钟未更新的会议
|
||||
$meetings = Meeting::whereNull('end_at')
|
||||
->where('updated_at', '<', Carbon::now()->subMinutes(10))
|
||||
->take(100)
|
||||
->get();
|
||||
$dialogIds = [];
|
||||
/** @var Meeting $meeting */
|
||||
foreach ($meetings as $meeting) {
|
||||
if (!$this->isEmptyChannel($setting['appid'], $meeting->channel, $arrHeader)) {
|
||||
$meeting->updated_at = Carbon::now();
|
||||
$meeting->save();
|
||||
continue;
|
||||
}
|
||||
$meeting->end_at = Carbon::now();
|
||||
$meeting->save();
|
||||
// 更新消息
|
||||
$newMsg = $meeting->toArray();
|
||||
$newMsg['end_at'] = $meeting->end_at->toDateTimeString();
|
||||
WebSocketDialogMsg::select(['web_socket_dialog_msgs.*', 'm.meetingid'])
|
||||
->join("meeting_msgs as m", "m.msg_id", "=", "web_socket_dialog_msgs.id")
|
||||
->where('m.meetingid', $meeting->meetingid)
|
||||
->chunk(100, function ($msgs) use ($newMsg, &$dialogIds) {
|
||||
/** @var WebSocketDialogMsg $msg */
|
||||
foreach ($msgs as $msg) {
|
||||
$msgData = Base::json2array($msg->getRawOriginal('msg'));
|
||||
$msg->msg = Base::array2json(array_merge($msgData, $newMsg));
|
||||
$msg->save();
|
||||
//
|
||||
if (!isset($dialogIds[$msg->dialog_id])) {
|
||||
$dialogIds[$msg->dialog_id] = [];
|
||||
}
|
||||
$dialogIds[$msg->dialog_id][] = [
|
||||
'id' => $msg->id,
|
||||
'msg' => $msg->msg,
|
||||
];
|
||||
}
|
||||
});
|
||||
}
|
||||
// 推送更新
|
||||
foreach ($dialogIds as $dialogId => $datas) {
|
||||
$dialog = WebSocketDialog::find($dialogId);
|
||||
if (empty($dialog)) {
|
||||
continue;
|
||||
}
|
||||
foreach ($datas as $data) {
|
||||
$dialog->pushMsg('update', $data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function end()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否空频道
|
||||
* @param $appid
|
||||
* @param $channel
|
||||
* @param $arrHeader
|
||||
* @return bool
|
||||
*/
|
||||
private function isEmptyChannel($appid, $channel, $arrHeader)
|
||||
{
|
||||
$curl = curl_init();
|
||||
curl_setopt_array($curl, [
|
||||
CURLOPT_URL => "https://api.sd-rtn.com/dev/v1/channel/user/{$appid}/{$channel}",
|
||||
CURLOPT_RETURNTRANSFER => true,
|
||||
CURLOPT_ENCODING => "",
|
||||
CURLOPT_MAXREDIRS => 10,
|
||||
CURLOPT_TIMEOUT => 30,
|
||||
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
|
||||
CURLOPT_CUSTOMREQUEST => "GET",
|
||||
CURLOPT_HTTPHEADER => $arrHeader,
|
||||
]);
|
||||
$response = curl_exec($curl);
|
||||
$err = curl_error($curl);
|
||||
curl_close($curl);
|
||||
if ($err) {
|
||||
return false; // 错误
|
||||
}
|
||||
$data = Base::json2array($response);
|
||||
if (!$data['success']) {
|
||||
return false; // 失败
|
||||
}
|
||||
if ($data['data']['channel_exist']) {
|
||||
return false; // 有人
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,10 @@ use Carbon\Carbon;
|
||||
*/
|
||||
class JokeSoupTask extends AbstractTask
|
||||
{
|
||||
private $keyPrefix = "JokeSoupTask-v2";
|
||||
public static function keyName($key)
|
||||
{
|
||||
return "JokeSoupTask-v2:{$key}";
|
||||
}
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -27,24 +30,24 @@ class JokeSoupTask extends AbstractTask
|
||||
public function start()
|
||||
{
|
||||
// 判断每分钟执行一次
|
||||
if (Cache::get("{$this->keyPrefix}:YmdHi") == date("YmdHi")) {
|
||||
if (Cache::get(self::keyName("YmdHi")) == date("YmdHi")) {
|
||||
return;
|
||||
}
|
||||
Cache::put("{$this->keyPrefix}:YmdHi", date("YmdHi"), Carbon::now()->addDay());
|
||||
Cache::put(self::keyName("YmdHi"), date("YmdHi"), Carbon::now()->addDay());
|
||||
//
|
||||
$array = Base::json2array(Cache::get("{$this->keyPrefix}:jokes"));
|
||||
$array = Base::json2array(Cache::get(self::keyName("jokes")));
|
||||
$data = Extranet::randJoke();
|
||||
if ($data) {
|
||||
$array[] = $data;
|
||||
}
|
||||
Cache::forever("{$this->keyPrefix}:jokes", Base::array2json(array_slice($array, -200)));
|
||||
Cache::forever(self::keyName("jokes"), Base::array2json(array_slice($array, -200)));
|
||||
//
|
||||
$array = Base::json2array(Cache::get("{$this->keyPrefix}:soups"));
|
||||
$array = Base::json2array(Cache::get(self::keyName("soups")));
|
||||
$data = Extranet::soups();
|
||||
if ($data) {
|
||||
$array[] = $data;
|
||||
}
|
||||
Cache::forever("{$this->keyPrefix}:soups", Base::array2json(array_slice($array, -200)));
|
||||
Cache::forever(self::keyName("soups"), Base::array2json(array_slice($array, -200)));
|
||||
}
|
||||
|
||||
public function end()
|
||||
|
||||
169
bin/https
Normal file
169
bin/https
Normal file
@@ -0,0 +1,169 @@
|
||||
#!/bin/sh
|
||||
|
||||
#fonts color
|
||||
Green="\033[32m"
|
||||
Yellow="\033[33m"
|
||||
Red="\033[31m"
|
||||
GreenBG="\033[42;37m"
|
||||
YellowBG="\033[43;37m"
|
||||
RedBG="\033[41;37m"
|
||||
Font="\033[0m"
|
||||
|
||||
#notification information
|
||||
OK="${Green}[OK]${Font}"
|
||||
Warn="${Yellow}[警告]${Font}"
|
||||
Error="${Red}[错误]${Font}"
|
||||
|
||||
cd "$(
|
||||
cd "$(dirname "$0")" || exit
|
||||
pwd
|
||||
)" || exit
|
||||
|
||||
#================================================================
|
||||
#================================================================
|
||||
|
||||
success() {
|
||||
echo -e "${OK} ${GreenBG}$1${Font}"
|
||||
}
|
||||
|
||||
warning() {
|
||||
echo -e "${Warn} ${YellowBG}$1${Font}"
|
||||
}
|
||||
|
||||
error() {
|
||||
echo -e "${Error} ${RedBG}$1${Font}"
|
||||
}
|
||||
|
||||
info() {
|
||||
echo -e "$1"
|
||||
}
|
||||
|
||||
env_get() {
|
||||
local key=$1
|
||||
local value=`cat $(dirname "$PWD")/.env | grep "^$key=" | awk -F '=' '{print $2}'`
|
||||
echo "$value"
|
||||
}
|
||||
|
||||
env_set() {
|
||||
local key=$1
|
||||
local val=$2
|
||||
local exist=`cat $(dirname "$PWD")/.env | grep "^$key="`
|
||||
if [ -z "$exist" ]; then
|
||||
echo "$key=$val" >> $(dirname "$PWD")/.env
|
||||
else
|
||||
sed -i "/^${key}=/c\\${key}=${val}" $(dirname "$PWD")/.env
|
||||
fi
|
||||
}
|
||||
|
||||
#================================================================
|
||||
#================================================================
|
||||
|
||||
check() {
|
||||
while [ -z "$domain" ]; do
|
||||
read -rp "请输入你的域名: " domain
|
||||
# 判断域名是否合法
|
||||
if [ -z "$domain" ]; then
|
||||
error "域名不能为空"
|
||||
elif [ -z "$(echo "$domain" | grep -E '^[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)+$')" ]; then
|
||||
error "域名格式不正确"
|
||||
domain=""
|
||||
fi
|
||||
done
|
||||
|
||||
success "正在域名DNS解析IP..."
|
||||
local domain_ip=$(ping -c 1 "${domain}" 2>/dev/null | grep PING | cut -d "(" -f2 | cut -d ")" -f1)
|
||||
local local_ip=$(curl -sk ip.sb)
|
||||
info "域名DNS解析IP: ${domain_ip}"
|
||||
info "本机IP: ${local_ip}"
|
||||
|
||||
sleep 2
|
||||
if [[ "$(echo "${local_ip}" | tr '.' '+' | bc)" == "$(echo "${domain_ip}" | tr '.' '+' | bc)" ]]; then
|
||||
success "域名DNS解析IP 与 本机IP 匹配"
|
||||
sleep 2
|
||||
else
|
||||
warning "域名DNS解析IP 与 本机IP 不匹配,是否继续操作? [Y/n]"
|
||||
read -r continue_next
|
||||
[[ -z ${continue_next} ]] && continue_next="Y"
|
||||
case $continue_next in
|
||||
[yY][eE][sS] | [yY])
|
||||
success "继续操作"
|
||||
sleep 2
|
||||
;;
|
||||
*)
|
||||
error "操作终止"
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
install() {
|
||||
local sitePath="$(dirname "$PWD")/docker/nginx/site"
|
||||
local sslPath="$sitePath/ssl"
|
||||
if [[ -f "$sslPath/$domain.key" && -f "$sslPath/$domain.crt" ]]; then
|
||||
warning "$domain 证书文件已存在,是否删除并继续操作? [Y/n]"
|
||||
read -r continue_install
|
||||
[[ -z ${continue_install} ]] && continue_install="Y"
|
||||
case $continue_install in
|
||||
[yY][eE][sS] | [yY])
|
||||
rm -f "$sslPath/$domain.key"
|
||||
rm -f "$sslPath/$domain.crt"
|
||||
success "继续操作"
|
||||
sleep 2
|
||||
;;
|
||||
*)
|
||||
error "操作终止"
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
apk add --no-cache openssl socat
|
||||
curl https://get.acme.sh | sh
|
||||
if [[ 0 -ne $? ]]; then
|
||||
error "安装证书生成脚本失败"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if /root/.acme.sh/acme.sh --issue -d "${domain}" -w "$(dirname "$PWD")/public" --standalone -k ec-256 --force --test; then
|
||||
success "SSL 证书测试签发成功,开始正式签发"
|
||||
rm -rf "/root/.acme.sh/${domain}_ecc"
|
||||
sleep 2
|
||||
else
|
||||
error "SSL 证书测试签发失败"
|
||||
rm -rf "root/.acme.sh/${domain}_ecc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if /root/.acme.sh/acme.sh --issue -d "${domain}" -w "$(dirname "$PWD")/public" --server letsencrypt --standalone -k ec-256 --force; then
|
||||
success "SSL 证书生成成功"
|
||||
sleep 2
|
||||
mkdir -p $sslPath
|
||||
if /root/.acme.sh/acme.sh --installcert -d "${domain}" --fullchainpath "${sslPath}/${domain}.crt" --keypath "${sslPath}/${domain}.key" --ecc --force; then
|
||||
success "SSL 证书配置成功"
|
||||
sleep 2
|
||||
fi
|
||||
else
|
||||
error "SSL 证书生成失败"
|
||||
rm -rf "/root/.acme.sh/${domain}_ecc"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
env_set "APP_URL" "https://${domain}"
|
||||
|
||||
cat >${sitePath}/ssl.conf <<EOF
|
||||
server_name ${domain};
|
||||
listen 443 ssl;
|
||||
ssl_certificate /etc/nginx/conf.d/site/ssl/${domain}.crt;
|
||||
ssl_certificate_key /etc/nginx/conf.d/site/ssl/${domain}.key;
|
||||
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
ssl_session_timeout 10m;
|
||||
error_page 497 https://\$host\$request_uri;
|
||||
EOF
|
||||
}
|
||||
|
||||
check
|
||||
install
|
||||
2
version.js → bin/version.js
vendored
2
version.js → bin/version.js
vendored
@@ -43,7 +43,7 @@ runExec("git rev-list --count HEAD $(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
|
||||
console.error(err);
|
||||
return;
|
||||
}
|
||||
const num = 1240 + parseInt(response)
|
||||
const num = 1250 + parseInt(response)
|
||||
if (isNaN(num) || Math.floor(num % 100) < 0) {
|
||||
console.error("get version error " + response);
|
||||
return;
|
||||
155
cmd
155
cmd
@@ -2,13 +2,16 @@
|
||||
|
||||
#fonts color
|
||||
Green="\033[32m"
|
||||
Yellow="\033[33m"
|
||||
Red="\033[31m"
|
||||
GreenBG="\033[42;37m"
|
||||
YellowBG="\033[43;37m"
|
||||
RedBG="\033[41;37m"
|
||||
Font="\033[0m"
|
||||
|
||||
#notification information
|
||||
OK="${Green}[OK]${Font}"
|
||||
Warn="${Yellow}[警告]${Font}"
|
||||
Error="${Red}[错误]${Font}"
|
||||
|
||||
cur_path="$(pwd)"
|
||||
@@ -17,14 +20,30 @@ COMPOSE="docker-compose"
|
||||
|
||||
judge() {
|
||||
if [[ 0 -eq $? ]]; then
|
||||
echo -e "${OK} ${GreenBG} $1 完成 ${Font}"
|
||||
success "$1 完成"
|
||||
sleep 1
|
||||
else
|
||||
echo -e "${Error} ${RedBG} $1 失败${Font}"
|
||||
error "$1 失败"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
success() {
|
||||
echo -e "${OK} ${GreenBG}$1${Font}"
|
||||
}
|
||||
|
||||
warning() {
|
||||
echo -e "${Warn} ${YellowBG}$1${Font}"
|
||||
}
|
||||
|
||||
error() {
|
||||
echo -e "${Error} ${RedBG}$1${Font}"
|
||||
}
|
||||
|
||||
info() {
|
||||
echo -e "$1"
|
||||
}
|
||||
|
||||
rand() {
|
||||
local min=$1
|
||||
local max=$(($2-$min+1))
|
||||
@@ -51,7 +70,7 @@ restart_php() {
|
||||
$COMPOSE stop php
|
||||
$COMPOSE start php
|
||||
else
|
||||
echo -e "$RES"
|
||||
info "$RES"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -69,21 +88,21 @@ switch_debug() {
|
||||
check_docker() {
|
||||
docker --version &> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${Error} ${RedBG} 未安装 Docker!${Font}"
|
||||
error "未安装 Docker!"
|
||||
exit 1
|
||||
fi
|
||||
docker-compose version &> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
docker compose version &> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${Error} ${RedBG} 未安装 Docker-compose!${Font}"
|
||||
error "未安装 Docker-compose!"
|
||||
exit 1
|
||||
fi
|
||||
COMPOSE="docker compose"
|
||||
fi
|
||||
if [[ -n `$COMPOSE version | grep -E "\sv*1"` ]]; then
|
||||
if [[ -n `$COMPOSE version | grep -E "\sv1"` ]]; then
|
||||
$COMPOSE version
|
||||
echo -e "${Error} ${RedBG} Docker-compose 版本过低,请升级至v2+!${Font}"
|
||||
error "Docker-compose 版本过低,请升级至v2+!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@@ -91,7 +110,17 @@ check_docker() {
|
||||
check_node() {
|
||||
npm --version &> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${Error} ${RedBG} 未安装nodejs!${Font}"
|
||||
error "未安装 npm!"
|
||||
exit 1
|
||||
fi
|
||||
node --version &> /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
error "未安装 Node.js!"
|
||||
exit 1
|
||||
fi
|
||||
if [[ -n `node --version | grep -E "v1"` ]]; then
|
||||
node --version
|
||||
error "Node.js 版本过低,请升级至v20+!"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
@@ -154,7 +183,7 @@ run_exec() {
|
||||
local cmd=$2
|
||||
local name=`docker_name $container`
|
||||
if [ -z "$name" ]; then
|
||||
echo -e "${Error} ${RedBG} 没有找到 $container 容器! ${Font}"
|
||||
error "没有找到 $container 容器!"
|
||||
exit 1
|
||||
fi
|
||||
docker exec -it "$name" /bin/sh -c "$cmd"
|
||||
@@ -170,7 +199,7 @@ run_mysql() {
|
||||
filename="${cur_path}/docker/mysql/backup/${database}_$(date "+%Y%m%d%H%M%S").sql.gz"
|
||||
run_exec mariadb "exec mysqldump --databases $database -u$username -p$password" | gzip > $filename
|
||||
judge "备份数据库"
|
||||
[ -f "$filename" ] && echo -e "备份文件:$filename"
|
||||
[ -f "$filename" ] && info "备份文件:$filename"
|
||||
elif [ "$1" = "recovery" ]; then
|
||||
database=$(env_get DB_DATABASE)
|
||||
username=$(env_get DB_USERNAME)
|
||||
@@ -179,19 +208,19 @@ run_mysql() {
|
||||
mkdir -p ${cur_path}/docker/mysql/backup
|
||||
list=`ls -1 "${cur_path}/docker/mysql/backup" | grep ".sql.gz"`
|
||||
if [ -z "$list" ]; then
|
||||
echo -e "${Error} ${RedBG} 没有备份文件!${Font}"
|
||||
error "没有备份文件!"
|
||||
exit 1
|
||||
fi
|
||||
echo "$list"
|
||||
read -rp "请输入备份文件名称还原:" inputname
|
||||
filename="${cur_path}/docker/mysql/backup/${inputname}"
|
||||
if [ ! -f "$filename" ]; then
|
||||
echo -e "${Error} ${RedBG} 备份文件:${inputname} 不存在! ${Font}"
|
||||
error "备份文件:${inputname} 不存在!"
|
||||
exit 1
|
||||
fi
|
||||
container_name=`docker_name mariadb`
|
||||
if [ -z "$container_name" ]; then
|
||||
echo -e "${Error} ${RedBG} 没有找到 mariadb 容器! ${Font}"
|
||||
error "没有找到 mariadb 容器!"
|
||||
exit 1
|
||||
fi
|
||||
docker cp $filename $container_name:/
|
||||
@@ -201,6 +230,49 @@ run_mysql() {
|
||||
fi
|
||||
}
|
||||
|
||||
https_auto() {
|
||||
restart_nginx="n"
|
||||
if [[ "$(env_get APP_PORT)" != "80" ]]; then
|
||||
warning "HTTP服务端口不是80,是否修改并继续操作? [Y/n]"
|
||||
read -r continue_http
|
||||
[[ -z ${continue_http} ]] && continue_http="Y"
|
||||
case $continue_http in
|
||||
[yY][eE][sS] | [yY])
|
||||
success "继续操作"
|
||||
env_set "APP_PORT" "80"
|
||||
restart_nginx="y"
|
||||
;;
|
||||
*)
|
||||
error "操作终止"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [[ "$(env_get APP_SSL_PORT)" != "443" ]]; then
|
||||
warning "HTTPS服务端口不是443,是否修改并继续操作? [Y/n]"
|
||||
read -r continue_https
|
||||
[[ -z ${continue_https} ]] && continue_https="Y"
|
||||
case $continue_https in
|
||||
[yY][eE][sS] | [yY])
|
||||
success "继续操作"
|
||||
env_set "APP_SSL_PORT" "443"
|
||||
restart_nginx="y"
|
||||
;;
|
||||
*)
|
||||
error "操作终止"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if [[ "$restart_nginx" == "y" ]]; then
|
||||
$COMPOSE up -d
|
||||
fi
|
||||
docker run -it --rm -v $(pwd):/work nginx:alpine sh "/work/bin/https"
|
||||
if [[ 0 -eq $? ]]; then
|
||||
run_exec nginx "nginx -s reload"
|
||||
fi
|
||||
}
|
||||
|
||||
env_get() {
|
||||
local key=$1
|
||||
local value=`cat ${cur_path}/.env | grep "^$key=" | awk -F '=' '{print $2}'`
|
||||
@@ -220,7 +292,7 @@ env_set() {
|
||||
docker run -it --rm -v ${cur_path}:/www alpine sh -c "sed -i "/^${key}=/c\\${key}=${val}" /www/.env"
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
echo -e "${Error} ${RedBG} 设置env参数失败!${Font}"
|
||||
error "设置env参数失败!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
@@ -293,7 +365,7 @@ if [ $# -gt 0 ]; then
|
||||
run_exec php "composer config --unset repos.packagist"
|
||||
fi
|
||||
if [ ! -f "${cur_path}/vendor/autoload.php" ]; then
|
||||
echo -e "${Error} ${RedBG}composer install 失败,请重试! ${Font}"
|
||||
error "composer install 失败,请重试!"
|
||||
exit 1
|
||||
fi
|
||||
[[ -z "$(env_get APP_KEY)" ]] && run_exec php "php artisan key:generate"
|
||||
@@ -303,7 +375,7 @@ if [ $# -gt 0 ]; then
|
||||
while [ ! -f "${cur_path}/docker/mysql/data/$(env_get DB_DATABASE)/db.opt" ]; do
|
||||
((remaining=$remaining-1))
|
||||
if [ $remaining -lt 0 ]; then
|
||||
echo -e "${Error} ${RedBG} 数据库初始化失败! ${Font}"
|
||||
error "数据库初始化失败!"
|
||||
exit 1
|
||||
fi
|
||||
chmod -R 775 "${cur_path}/docker/mysql/data"
|
||||
@@ -311,19 +383,21 @@ if [ $# -gt 0 ]; then
|
||||
done
|
||||
run_exec php "php artisan migrate --seed"
|
||||
if [ ! -f "${cur_path}/docker/mysql/data/$(env_get DB_DATABASE)/$(env_get DB_PREFIX)migrations.ibd" ]; then
|
||||
echo -e "${Error} ${RedBG} 数据库安装失败! ${Font}"
|
||||
error "数据库安装失败!"
|
||||
exit 1
|
||||
fi
|
||||
# 设置初始化密码
|
||||
res=`run_exec mariadb "sh /etc/mysql/repassword.sh"`
|
||||
$COMPOSE up -d
|
||||
restart_php
|
||||
echo -e "${OK} ${GreenBG} 安装完成 ${Font}"
|
||||
echo -e "地址: http://${GreenBG}127.0.0.1:$(env_get APP_PORT)${Font}"
|
||||
echo -e "$res"
|
||||
success "安装完成"
|
||||
info "地址: http://${GreenBG}127.0.0.1:$(env_get APP_PORT)${Font}"
|
||||
info "$res"
|
||||
elif [[ "$1" == "update" ]]; then
|
||||
shift 1
|
||||
run_mysql backup
|
||||
if [[ "$@" != "nobackup" ]]; then
|
||||
run_mysql backup
|
||||
fi
|
||||
if [[ -z "$(arg_get local)" ]]; then
|
||||
git fetch --all
|
||||
git reset --hard origin/$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
|
||||
@@ -340,10 +414,10 @@ if [ $# -gt 0 ]; then
|
||||
[[ -z ${uninstall} ]] && uninstall="Y"
|
||||
case $uninstall in
|
||||
[yY][eE][sS] | [yY])
|
||||
echo -e "${RedBG} 开始卸载... ${Font}"
|
||||
info "${RedBG}开始卸载...${Font}"
|
||||
;;
|
||||
*)
|
||||
echo -e "${GreenBG} 终止卸载。 ${Font}"
|
||||
info "${GreenBG}终止卸载。${Font}"
|
||||
exit 2
|
||||
;;
|
||||
esac
|
||||
@@ -352,7 +426,7 @@ if [ $# -gt 0 ]; then
|
||||
rm -rf "./docker/mysql/data"
|
||||
rm -rf "./docker/log/supervisor"
|
||||
find "./storage/logs" -name "*.log" | xargs rm -rf
|
||||
echo -e "${OK} ${GreenBG} 卸载完成 ${Font}"
|
||||
success "卸载完成"
|
||||
elif [[ "$1" == "reinstall" ]]; then
|
||||
shift 1
|
||||
./cmd uninstall $@
|
||||
@@ -362,20 +436,20 @@ if [ $# -gt 0 ]; then
|
||||
shift 1
|
||||
env_set APP_PORT "$1"
|
||||
$COMPOSE up -d
|
||||
echo -e "${OK} ${GreenBG} 修改成功 ${Font}"
|
||||
echo -e "地址: http://${GreenBG}127.0.0.1:$(env_get APP_PORT)${Font}"
|
||||
success "修改成功"
|
||||
info "地址: http://${GreenBG}127.0.0.1:$(env_get APP_PORT)${Font}"
|
||||
elif [[ "$1" == "url" ]]; then
|
||||
shift 1
|
||||
env_set APP_URL "$1"
|
||||
restart_php
|
||||
echo -e "${OK} ${GreenBG} 修改成功 ${Font}"
|
||||
success "修改成功"
|
||||
elif [[ "$1" == "env" ]]; then
|
||||
shift 1
|
||||
if [ -n "$1" ]; then
|
||||
env_set $1 "$2"
|
||||
fi
|
||||
restart_php
|
||||
echo -e "${OK} ${GreenBG} 修改成功 ${Font}"
|
||||
success "修改成功"
|
||||
elif [[ "$1" == "repassword" ]]; then
|
||||
shift 1
|
||||
run_exec mariadb "sh /etc/mysql/repassword.sh \"$@\""
|
||||
@@ -391,6 +465,23 @@ if [ $# -gt 0 ]; then
|
||||
elif [[ "$1" == "electron" ]]; then
|
||||
shift 1
|
||||
run_electron $@
|
||||
elif [[ "$1" == "eeui" ]]; then
|
||||
shift 1
|
||||
cli="$@"
|
||||
por=""
|
||||
if [[ "$cli" == "build" ]]; then
|
||||
cli="build --simple"
|
||||
elif [[ "$cli" == "dev" ]]; then
|
||||
por="-p 8880:8880"
|
||||
fi
|
||||
docker run -it --rm -v ${cur_path}/resources/mobile:/work -w /work ${por} kuaifan/eeui-cli:0.0.1 eeui ${cli}
|
||||
elif [[ "$1" == "npm" ]]; then
|
||||
shift 1
|
||||
npm $@
|
||||
cd electron
|
||||
npm $@
|
||||
cd ..
|
||||
docker run --rm -it -v ${cur_path}/resources/mobile:/work -w /work --entrypoint=/bin/bash node:16 -c "npm $@"
|
||||
elif [[ "$1" == "doc" ]]; then
|
||||
shift 1
|
||||
run_exec php "php app/Http/Controllers/Api/apidoc.php"
|
||||
@@ -398,13 +489,15 @@ if [ $# -gt 0 ]; then
|
||||
elif [[ "$1" == "debug" ]]; then
|
||||
shift 1
|
||||
switch_debug "$@"
|
||||
echo "success"
|
||||
info "success"
|
||||
elif [[ "$1" == "https" ]]; then
|
||||
shift 1
|
||||
if [[ "$@" == "auto" ]]; then
|
||||
if [[ "$1" == "agent" ]] || [[ "$1" == "true" ]]; then
|
||||
env_set APP_SCHEME "true"
|
||||
elif [[ "$1" == "close" ]] || [[ "$1" == "auto" ]]; then
|
||||
env_set APP_SCHEME "auto"
|
||||
else
|
||||
env_set APP_SCHEME "true"
|
||||
https_auto
|
||||
fi
|
||||
restart_php
|
||||
elif [[ "$1" == "artisan" ]]; then
|
||||
|
||||
950
composer.lock
generated
950
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
@error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\WebSocketDialog;
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddWebSocketDialogUsersAddHide extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('web_socket_dialog_users', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('web_socket_dialog_users', 'hide')) {
|
||||
$table->integer('hide')->nullable()->default(0)->after('silence')->comment('不显示会话:0否,1是');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('web_socket_dialog_users', function (Blueprint $table) {
|
||||
$table->dropColumn("hide");
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddIndexSome20240315 extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('web_socket_dialog_msg_reads', function (Blueprint $table) {
|
||||
$table->index(['dialog_id', 'userid', 'read_at', 'msg_id'], 'IDEX_dialog_id_userid_read_at_msg_id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return voidw
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('web_socket_dialog_msg_reads', function (Blueprint $table) {
|
||||
$table->dropIndex('IDEX_dialog_id_userid_read_at_msg_id');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
use App\Models\WebSocketDialog;
|
||||
use App\Models\WebSocketDialogUser;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddWebSocketDialogUsersLastAt extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
$isAdd = false;
|
||||
Schema::table('web_socket_dialog_users', function (Blueprint $table) use (&$isAdd) {
|
||||
if (!Schema::hasColumn('web_socket_dialog_users', 'last_at')) {
|
||||
$isAdd = true;
|
||||
$table->timestamp('last_at')->nullable()->after('top_at')->comment('最后消息时间');
|
||||
}
|
||||
});
|
||||
if ($isAdd) {
|
||||
// 更新数据
|
||||
WebSocketDialog::chunk(100, function ($dialogs) {
|
||||
/** @var WebSocketDialog $dialog */
|
||||
foreach ($dialogs as $dialog) {
|
||||
WebSocketDialogUser::whereDialogId($dialog->id)->update(['last_at' => $dialog->last_at]);
|
||||
}
|
||||
});
|
||||
|
||||
// 删除表字段
|
||||
Schema::table('web_socket_dialogs', function (Blueprint $table) {
|
||||
$table->dropColumn("last_at");
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
// 回滚数据 - 无法回滚
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddIndexSome20240317 extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('web_socket_dialog_users', function (Blueprint $table) {
|
||||
$table->dropIndex(['userid']);
|
||||
$table->index(['userid', 'dialog_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return voidw
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
// 回滚数据 - 无法回滚
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
use App\Module\Base;
|
||||
use App\Models\WebSocketDialogMsg;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class ChangeForwardData extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('web_socket_dialog_msgs', function (Blueprint $table) {
|
||||
if (Schema::hasColumn('web_socket_dialog_msgs', 'forward_show')) {
|
||||
WebSocketDialogMsg::where("forward_id", ">", 0)->chunk(100, function ($items) {
|
||||
/** @var WebSocketDialogMsg $item */
|
||||
foreach ($items as $item) {
|
||||
$msg = Base::json2array($item->getRawOriginal('msg'));
|
||||
$msg['forward_data'] = [
|
||||
'id' => $item->forward_id,
|
||||
'userid' => 0,
|
||||
'parent_id' => $item->forward_id,
|
||||
'parent_userid' => 0,
|
||||
'show' => 0,
|
||||
];
|
||||
$original = WebSocketDialogMsg::select(['id', 'userid', 'forward_show'])->whereId($item->forward_id)->withTrashed()->first();
|
||||
if ($original) {
|
||||
$msg['forward_data']['userid'] = $original->userid;
|
||||
$msg['forward_data']['parent_userid'] = $original->userid;
|
||||
$msg['forward_data']['show'] = $original->forward_show;
|
||||
}
|
||||
$item->msg = Base::array2json($msg);
|
||||
$item->save();
|
||||
}
|
||||
});
|
||||
$table->dropColumn("forward_show");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
// 回滚数据 - 无法回滚
|
||||
}
|
||||
}
|
||||
49
database/migrations/2024_03_18_153504_change_reply_data.php
Normal file
49
database/migrations/2024_03_18_153504_change_reply_data.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
use App\Module\Base;
|
||||
use App\Models\WebSocketDialogMsg;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class ChangeReplyData extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
WebSocketDialogMsg::where("reply_id", ">", 0)->chunk(100, function ($items) {
|
||||
/** @var WebSocketDialogMsg $item */
|
||||
foreach ($items as $item) {
|
||||
$msg = Base::json2array($item->getRawOriginal('msg'));
|
||||
$msg['reply_data'] = [
|
||||
'id' => $item->reply_id,
|
||||
'userid' => 0,
|
||||
'type' => '',
|
||||
'msg' => [],
|
||||
];
|
||||
$original = WebSocketDialogMsg::whereId($item->reply_id)->withTrashed()->first();
|
||||
if ($original) {
|
||||
$replyMsg = Base::json2array($original->getRawOriginal('msg'));
|
||||
unset($replyMsg['reply_data']);
|
||||
$msg['reply_data']['userid'] = $original->userid;
|
||||
$msg['reply_data']['type'] = $original->type;
|
||||
$msg['reply_data']['msg'] = $replyMsg;
|
||||
}
|
||||
$item->msg = Base::array2json($msg);
|
||||
$item->save();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
// 回滚数据 - 无法回滚
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddUmengAliasDevice extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
//
|
||||
Schema::table('umeng_alias', function (Blueprint $table) {
|
||||
if (!Schema::hasColumn('umeng_alias', 'device')) {
|
||||
$table->text('ua')->nullable()->after('platform')->comment('userAgent');
|
||||
$table->string('device', 100)->nullable()->default('')->after('platform')->comment('设备类型');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
//
|
||||
Schema::table('umeng_alias', function (Blueprint $table) {
|
||||
$table->dropColumn("ua");
|
||||
$table->dropColumn("device");
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\WebSocketDialog;
|
||||
use App\Models\WebSocketDialogUser;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
@@ -19,8 +20,7 @@ class GenerateWebSocketDialogsDefaultGroup extends Migration
|
||||
if ($botUser) {
|
||||
$dialog = WebSocketDialog::checkUserDialog($botUser, 1);
|
||||
if ($dialog) {
|
||||
$dialog->last_at = Carbon::now();
|
||||
$dialog->save();
|
||||
WebSocketDialogUser::whereDialogId($dialog->id)->update(['last_at' => Carbon::now()]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use App\Models\WebSocketDialogMsg;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateMeetingMsgsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('meeting_msgs');
|
||||
Schema::create('meeting_msgs', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('meetingid')->nullable()->default('')->comment('会议ID');
|
||||
$table->bigInteger('dialog_id')->nullable()->default(0)->comment('对话ID');
|
||||
$table->bigInteger('msg_id')->nullable()->default(0)->comment('消息ID');
|
||||
});
|
||||
\DB::table('meetings')->update(['end_at' => null]);
|
||||
WebSocketDialogMsg::whereType('meeting')->chunk(100, function ($msgs) {
|
||||
/** @var WebSocketDialogMsg $msg */
|
||||
foreach ($msgs as $msg) {
|
||||
$meetingid = $msg->msg['meetingid'];
|
||||
$dialog_id = $msg->dialog_id;
|
||||
$msg_id = $msg->id;
|
||||
\DB::table('meeting_msgs')->insert(compact('meetingid', 'dialog_id', 'msg_id'));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('meeting_msgs');
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 1,
|
||||
'dialog_id' => 1,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 10:46:37'),
|
||||
'created_at' => seeders_at('2021-07-01 10:46:37'),
|
||||
'updated_at' => seeders_at('2021-07-01 10:46:37'),
|
||||
),
|
||||
@@ -34,6 +35,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 2,
|
||||
'dialog_id' => 1,
|
||||
'userid' => 2,
|
||||
'last_at' => seeders_at('2021-07-01 10:46:37'),
|
||||
'created_at' => seeders_at('2021-07-01 10:46:37'),
|
||||
'updated_at' => seeders_at('2021-07-01 10:46:37'),
|
||||
),
|
||||
@@ -42,6 +44,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 3,
|
||||
'dialog_id' => 2,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 10:46:47'),
|
||||
'created_at' => seeders_at('2021-07-01 10:46:47'),
|
||||
'updated_at' => seeders_at('2021-07-01 10:46:47'),
|
||||
),
|
||||
@@ -50,6 +53,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 4,
|
||||
'dialog_id' => 3,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 10:46:47'),
|
||||
'created_at' => seeders_at('2021-07-01 10:46:47'),
|
||||
'updated_at' => seeders_at('2021-07-01 10:46:47'),
|
||||
),
|
||||
@@ -58,6 +62,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 5,
|
||||
'dialog_id' => 4,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 10:47:45'),
|
||||
'created_at' => seeders_at('2021-07-01 10:47:45'),
|
||||
'updated_at' => seeders_at('2021-07-01 10:47:45'),
|
||||
),
|
||||
@@ -66,6 +71,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 6,
|
||||
'dialog_id' => 5,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 10:47:45'),
|
||||
'created_at' => seeders_at('2021-07-01 10:47:45'),
|
||||
'updated_at' => seeders_at('2021-07-01 10:47:45'),
|
||||
),
|
||||
@@ -74,6 +80,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 7,
|
||||
'dialog_id' => 6,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 11:02:57'),
|
||||
'created_at' => seeders_at('2021-07-01 11:02:57'),
|
||||
'updated_at' => seeders_at('2021-07-01 11:02:57'),
|
||||
),
|
||||
@@ -82,6 +89,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 8,
|
||||
'dialog_id' => 7,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 11:02:57'),
|
||||
'created_at' => seeders_at('2021-07-01 11:02:57'),
|
||||
'updated_at' => seeders_at('2021-07-01 11:02:57'),
|
||||
),
|
||||
@@ -90,6 +98,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 9,
|
||||
'dialog_id' => 8,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 11:43:01'),
|
||||
'created_at' => seeders_at('2021-07-01 11:43:01'),
|
||||
'updated_at' => seeders_at('2021-07-01 11:43:01'),
|
||||
),
|
||||
@@ -98,6 +107,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 10,
|
||||
'dialog_id' => 9,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 11:43:01'),
|
||||
'created_at' => seeders_at('2021-07-01 11:43:01'),
|
||||
'updated_at' => seeders_at('2021-07-01 11:43:01'),
|
||||
),
|
||||
@@ -106,6 +116,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 11,
|
||||
'dialog_id' => 10,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 15:33:23'),
|
||||
'created_at' => seeders_at('2021-07-01 15:33:23'),
|
||||
'updated_at' => seeders_at('2021-07-01 15:33:23'),
|
||||
),
|
||||
@@ -114,6 +125,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 12,
|
||||
'dialog_id' => 11,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 15:33:23'),
|
||||
'created_at' => seeders_at('2021-07-01 15:33:23'),
|
||||
'updated_at' => seeders_at('2021-07-01 15:33:23'),
|
||||
),
|
||||
@@ -122,6 +134,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 13,
|
||||
'dialog_id' => 12,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 15:37:06'),
|
||||
'created_at' => seeders_at('2021-07-01 15:37:06'),
|
||||
'updated_at' => seeders_at('2021-07-01 15:37:06'),
|
||||
),
|
||||
@@ -130,6 +143,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 14,
|
||||
'dialog_id' => 13,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 15:37:06'),
|
||||
'created_at' => seeders_at('2021-07-01 15:37:06'),
|
||||
'updated_at' => seeders_at('2021-07-01 15:37:06'),
|
||||
),
|
||||
@@ -138,6 +152,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 15,
|
||||
'dialog_id' => 14,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 16:15:28'),
|
||||
'created_at' => seeders_at('2021-07-01 16:15:28'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:15:28'),
|
||||
),
|
||||
@@ -146,6 +161,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 16,
|
||||
'dialog_id' => 15,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 16:15:28'),
|
||||
'created_at' => seeders_at('2021-07-01 16:15:28'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:15:28'),
|
||||
),
|
||||
@@ -154,6 +170,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 17,
|
||||
'dialog_id' => 7,
|
||||
'userid' => 2,
|
||||
'last_at' => seeders_at('2021-07-01 16:22:42'),
|
||||
'created_at' => seeders_at('2021-07-01 16:22:42'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:22:42'),
|
||||
),
|
||||
@@ -162,6 +179,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 18,
|
||||
'dialog_id' => 5,
|
||||
'userid' => 2,
|
||||
'last_at' => seeders_at('2021-07-01 16:23:15'),
|
||||
'created_at' => seeders_at('2021-07-01 16:23:15'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:23:15'),
|
||||
),
|
||||
@@ -170,6 +188,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 19,
|
||||
'dialog_id' => 15,
|
||||
'userid' => 2,
|
||||
'last_at' => seeders_at('2021-07-01 16:23:40'),
|
||||
'created_at' => seeders_at('2021-07-01 16:23:40'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:23:40'),
|
||||
),
|
||||
@@ -178,6 +197,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 20,
|
||||
'dialog_id' => 11,
|
||||
'userid' => 2,
|
||||
'last_at' => seeders_at('2021-07-01 16:29:38'),
|
||||
'created_at' => seeders_at('2021-07-01 16:29:38'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:29:38'),
|
||||
),
|
||||
@@ -186,6 +206,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 21,
|
||||
'dialog_id' => 16,
|
||||
'userid' => 2,
|
||||
'last_at' => seeders_at('2021-07-01 16:56:05'),
|
||||
'created_at' => seeders_at('2021-07-01 16:56:05'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:56:05'),
|
||||
),
|
||||
@@ -194,6 +215,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 22,
|
||||
'dialog_id' => 16,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 16:56:05'),
|
||||
'created_at' => seeders_at('2021-07-01 16:56:05'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:56:05'),
|
||||
),
|
||||
@@ -202,6 +224,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 23,
|
||||
'dialog_id' => 17,
|
||||
'userid' => 2,
|
||||
'last_at' => seeders_at('2021-07-01 16:56:35'),
|
||||
'created_at' => seeders_at('2021-07-01 16:56:35'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:56:35'),
|
||||
),
|
||||
@@ -210,6 +233,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 24,
|
||||
'dialog_id' => 17,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 16:56:35'),
|
||||
'created_at' => seeders_at('2021-07-01 16:56:35'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:56:35'),
|
||||
),
|
||||
@@ -218,6 +242,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 25,
|
||||
'dialog_id' => 18,
|
||||
'userid' => 2,
|
||||
'last_at' => seeders_at('2021-07-01 16:56:57'),
|
||||
'created_at' => seeders_at('2021-07-01 16:56:57'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:56:57'),
|
||||
),
|
||||
@@ -226,6 +251,7 @@ class WebSocketDialogUsersTableSeeder extends Seeder
|
||||
'id' => 26,
|
||||
'dialog_id' => 18,
|
||||
'userid' => 1,
|
||||
'last_at' => seeders_at('2021-07-01 16:56:57'),
|
||||
'created_at' => seeders_at('2021-07-01 16:56:57'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:56:57'),
|
||||
),
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Database\Seeders;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\WebSocketDialog;
|
||||
use App\Models\WebSocketDialogUser;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
@@ -30,7 +31,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'user',
|
||||
'group_type' => '',
|
||||
'name' => '',
|
||||
'last_at' => seeders_at('2021-07-01 17:12:52'),
|
||||
'created_at' => seeders_at('2021-07-01 10:46:37'),
|
||||
'updated_at' => seeders_at('2021-07-01 17:12:52'),
|
||||
'deleted_at' => NULL,
|
||||
@@ -41,7 +41,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'project',
|
||||
'name' => '',
|
||||
'last_at' => NULL,
|
||||
'created_at' => seeders_at('2021-07-01 10:46:47'),
|
||||
'updated_at' => seeders_at('2021-07-01 17:31:03'),
|
||||
'deleted_at' => seeders_at('2021-07-01 17:31:03'),
|
||||
@@ -52,7 +51,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'project',
|
||||
'name' => '',
|
||||
'last_at' => NULL,
|
||||
'created_at' => seeders_at('2021-07-01 10:46:47'),
|
||||
'updated_at' => seeders_at('2021-07-01 10:46:55'),
|
||||
'deleted_at' => seeders_at('2021-07-01 10:46:55'),
|
||||
@@ -63,7 +61,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'project',
|
||||
'name' => '',
|
||||
'last_at' => NULL,
|
||||
'created_at' => seeders_at('2021-07-01 10:47:45'),
|
||||
'updated_at' => seeders_at('2021-07-01 17:30:05'),
|
||||
'deleted_at' => seeders_at('2021-07-01 17:30:05'),
|
||||
@@ -74,7 +71,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'project',
|
||||
'name' => '',
|
||||
'last_at' => seeders_at('2021-07-01 16:31:58'),
|
||||
'created_at' => seeders_at('2021-07-01 10:47:45'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:31:58'),
|
||||
'deleted_at' => NULL,
|
||||
@@ -85,7 +81,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'project',
|
||||
'name' => '',
|
||||
'last_at' => NULL,
|
||||
'created_at' => seeders_at('2021-07-01 11:02:57'),
|
||||
'updated_at' => seeders_at('2021-07-01 17:31:28'),
|
||||
'deleted_at' => seeders_at('2021-07-01 17:31:28'),
|
||||
@@ -96,7 +91,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'project',
|
||||
'name' => '',
|
||||
'last_at' => seeders_at('2021-07-01 16:32:50'),
|
||||
'created_at' => seeders_at('2021-07-01 11:02:57'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:32:50'),
|
||||
'deleted_at' => NULL,
|
||||
@@ -107,7 +101,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'project',
|
||||
'name' => '',
|
||||
'last_at' => NULL,
|
||||
'created_at' => seeders_at('2021-07-01 11:43:01'),
|
||||
'updated_at' => seeders_at('2021-07-01 17:31:28'),
|
||||
'deleted_at' => seeders_at('2021-07-01 17:31:28'),
|
||||
@@ -118,7 +111,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'project',
|
||||
'name' => '',
|
||||
'last_at' => seeders_at('2021-07-01 14:02:57'),
|
||||
'created_at' => seeders_at('2021-07-01 11:43:01'),
|
||||
'updated_at' => seeders_at('2021-07-01 14:02:57'),
|
||||
'deleted_at' => NULL,
|
||||
@@ -129,7 +121,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'project',
|
||||
'name' => '',
|
||||
'last_at' => NULL,
|
||||
'created_at' => seeders_at('2021-07-01 15:33:23'),
|
||||
'updated_at' => seeders_at('2021-07-01 17:31:28'),
|
||||
'deleted_at' => seeders_at('2021-07-01 17:31:28'),
|
||||
@@ -140,7 +131,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'project',
|
||||
'name' => '',
|
||||
'last_at' => seeders_at('2021-07-01 16:31:40'),
|
||||
'created_at' => seeders_at('2021-07-01 15:33:23'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:31:40'),
|
||||
'deleted_at' => NULL,
|
||||
@@ -151,7 +141,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'project',
|
||||
'name' => '',
|
||||
'last_at' => NULL,
|
||||
'created_at' => seeders_at('2021-07-01 15:37:06'),
|
||||
'updated_at' => seeders_at('2021-07-01 17:31:28'),
|
||||
'deleted_at' => seeders_at('2021-07-01 17:31:28'),
|
||||
@@ -162,7 +151,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'project',
|
||||
'name' => '',
|
||||
'last_at' => seeders_at('2021-07-01 15:44:09'),
|
||||
'created_at' => seeders_at('2021-07-01 15:37:06'),
|
||||
'updated_at' => seeders_at('2021-07-01 15:44:09'),
|
||||
'deleted_at' => NULL,
|
||||
@@ -173,7 +161,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'project',
|
||||
'name' => '',
|
||||
'last_at' => NULL,
|
||||
'created_at' => seeders_at('2021-07-01 16:15:28'),
|
||||
'updated_at' => seeders_at('2021-07-01 17:31:28'),
|
||||
'deleted_at' => seeders_at('2021-07-01 17:31:28'),
|
||||
@@ -184,7 +171,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'project',
|
||||
'name' => '',
|
||||
'last_at' => seeders_at('2021-07-01 16:37:59'),
|
||||
'created_at' => seeders_at('2021-07-01 16:15:28'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:37:59'),
|
||||
'deleted_at' => NULL,
|
||||
@@ -195,7 +181,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'task',
|
||||
'name' => '',
|
||||
'last_at' => seeders_at('2021-07-01 16:58:02'),
|
||||
'created_at' => seeders_at('2021-07-01 16:56:05'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:58:02'),
|
||||
'deleted_at' => NULL,
|
||||
@@ -206,7 +191,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'task',
|
||||
'name' => '',
|
||||
'last_at' => seeders_at('2021-07-01 16:57:58'),
|
||||
'created_at' => seeders_at('2021-07-01 16:56:35'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:57:58'),
|
||||
'deleted_at' => NULL,
|
||||
@@ -217,7 +201,6 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
'type' => 'group',
|
||||
'group_type' => 'task',
|
||||
'name' => '',
|
||||
'last_at' => seeders_at('2021-07-01 16:57:52'),
|
||||
'created_at' => seeders_at('2021-07-01 16:56:57'),
|
||||
'updated_at' => seeders_at('2021-07-01 16:57:52'),
|
||||
'deleted_at' => NULL,
|
||||
@@ -228,8 +211,7 @@ class WebSocketDialogsTableSeeder extends Seeder
|
||||
if ($botUser) {
|
||||
$dialog = WebSocketDialog::checkUserDialog($botUser, 1);
|
||||
if ($dialog) {
|
||||
$dialog->last_at = Carbon::now();
|
||||
$dialog->save();
|
||||
WebSocketDialogUser::whereDialogId($dialog->id)->change(['last_at' => Carbon::now()->subSecond()]);
|
||||
}
|
||||
}
|
||||
User::botGetOrCreate('ai-openai');
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
php:
|
||||
container_name: "dootask-php-${APP_ID}"
|
||||
@@ -36,6 +34,7 @@ services:
|
||||
image: "nginx:alpine"
|
||||
ports:
|
||||
- "${APP_PORT}:80"
|
||||
- "${APP_SSL_PORT:-}:443"
|
||||
volumes:
|
||||
- ./docker/nginx:/etc/nginx/conf.d
|
||||
- ./public:/var/www/public
|
||||
@@ -103,7 +102,7 @@ services:
|
||||
|
||||
fileview:
|
||||
container_name: "dootask-fileview-${APP_ID}"
|
||||
image: "kuaifan/fileview:4.2.0-SNAPSHOT-RC22"
|
||||
image: "kuaifan/fileview:4.2.0-SNAPSHOT-RC25"
|
||||
environment:
|
||||
KK_CONTEXT_PATH: "/fileview"
|
||||
KK_OFFICE_PREVIEW_SWITCH_DISABLED: true
|
||||
@@ -178,7 +177,7 @@ services:
|
||||
|
||||
okr:
|
||||
container_name: "dootask-okr-${APP_ID}"
|
||||
image: "kuaifan/doookr:0.0.37"
|
||||
image: "kuaifan/doookr:0.4.2"
|
||||
environment:
|
||||
TZ: "${TIMEZONE:-PRC}"
|
||||
DOO_TASK_URL: "http://${APP_IPPR}.3"
|
||||
|
||||
@@ -12,7 +12,7 @@ default_storage_engine = InnoDB
|
||||
performance_schema_max_table_instances = 400
|
||||
table_definition_cache = 400
|
||||
key_buffer_size = 1024M
|
||||
max_allowed_packet = 10G
|
||||
max_allowed_packet = 8192M
|
||||
table_open_cache = 2048
|
||||
sort_buffer_size = 4096K
|
||||
net_buffer_length = 4K
|
||||
@@ -47,7 +47,7 @@ innodb_write_io_threads = 2
|
||||
|
||||
[mysqldump]
|
||||
quick
|
||||
max_allowed_packet = 500M
|
||||
max_allowed_packet = 8192M
|
||||
|
||||
[mysql]
|
||||
no-auto-rehash
|
||||
|
||||
1
docker/nginx/.gitignore
vendored
1
docker/nginx/.gitignore
vendored
@@ -1 +0,0 @@
|
||||
site
|
||||
2
docker/nginx/conf.d/.gitignore
vendored
2
docker/nginx/conf.d/.gitignore
vendored
@@ -1 +1 @@
|
||||
/*.conf
|
||||
!.gitignore
|
||||
|
||||
1
docker/nginx/site/.gitignore
vendored
Normal file
1
docker/nginx/site/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!.gitignore
|
||||
1
docker/office/resources/require.js
vendored
1
docker/office/resources/require.js
vendored
@@ -52,7 +52,6 @@
|
||||
window._disableDownload = setInterval(function() {
|
||||
var downloadBtn = document.getElementById("slot-hbtn-download")
|
||||
if(downloadBtn) {
|
||||
console.log(1)
|
||||
clearInterval(window._disableDownload);
|
||||
document.getElementById("slot-hbtn-download")?.remove()
|
||||
document.getElementById("fm-btn-download")?.remove()
|
||||
|
||||
17
electron/build.js
vendored
17
electron/build.js
vendored
@@ -19,14 +19,13 @@ const devloadCachePath = path.resolve(__dirname, ".devload");
|
||||
const packageFile = path.resolve(__dirname, "package.json");
|
||||
const packageBakFile = path.resolve(__dirname, "package-bak.json");
|
||||
const platforms = ["build-mac", "build-win"];
|
||||
const comSuffix = os.type() == 'Windows_NT' ? '.cmd' : '';
|
||||
|
||||
/**
|
||||
* 克隆 Drawio
|
||||
* @param systemInfo
|
||||
*/
|
||||
function cloneDrawio(systemInfo) {
|
||||
child_process.spawnSync("git", ["submodule", "update", "--quiet", "--init", "--depth=1"], {stdio: "inherit"});
|
||||
child_process.execSync("git submodule update --quiet --init --depth=1", {stdio: "inherit"});
|
||||
const drawioSrcDir = path.resolve(__dirname, "../resources/drawio/src/main/webapp");
|
||||
const drawioCoverDir = path.resolve(__dirname, "../docker/drawio/webapp");
|
||||
const drawioDestDir = path.resolve(electronDir, "drawio/webapp");
|
||||
@@ -122,6 +121,10 @@ function genericPublish({url, key, version, output}) {
|
||||
return
|
||||
}
|
||||
const filePath = path.resolve(__dirname, output)
|
||||
if (!fs.existsSync(filePath)) {
|
||||
console.warn("Publish output not found: " + filePath)
|
||||
return
|
||||
}
|
||||
fs.readdir(filePath, async (err, files) => {
|
||||
if (err) {
|
||||
console.warn(err)
|
||||
@@ -229,14 +232,16 @@ function startBuild(data) {
|
||||
fs.writeFileSync(indexFile, indexString, 'utf8');
|
||||
//
|
||||
if (data.id === 'app') {
|
||||
const eeuiDir = path.resolve(__dirname, "../resources/mobile");
|
||||
const eeuiCli = "kuaifan/eeui-cli:0.0.1"
|
||||
const publicDir = path.resolve(__dirname, "../resources/mobile/src/public");
|
||||
fse.removeSync(publicDir)
|
||||
fse.copySync(electronDir, publicDir)
|
||||
if (argv[3] === "setting") {
|
||||
child_process.spawnSync("eeui", ["setting"], {stdio: "inherit", cwd: "resources/mobile"});
|
||||
child_process.execSync(`docker run -it --rm -v ${eeuiDir}:/work -w /work ${eeuiCli} eeui setting`, {stdio: "inherit", cwd: "resources/mobile"});
|
||||
}
|
||||
if (['setting', 'build'].includes(argv[3])) {
|
||||
child_process.spawnSync("eeui", ["build", "--simple"], {stdio: "inherit", cwd: "resources/mobile"});
|
||||
child_process.execSync(`docker run -it --rm -v ${eeuiDir}:/work -w /work ${eeuiCli} eeui build --simple`, {stdio: "inherit", cwd: "resources/mobile"});
|
||||
} else {
|
||||
[
|
||||
path.resolve(publicDir, "../../platforms/ios/eeuiApp/bundlejs/eeui/public"),
|
||||
@@ -289,13 +294,13 @@ function startBuild(data) {
|
||||
}
|
||||
econfig.build.directories.output = `${output}-github`;
|
||||
fs.writeFileSync(packageFile, JSON.stringify(econfig, null, 2), 'utf8');
|
||||
child_process.spawnSync("npm" + comSuffix, ["run", `${platform}-publish`], {stdio: "inherit", cwd: "electron"});
|
||||
child_process.execSync(`npm run ${platform}-publish`, {stdio: "inherit", cwd: "electron"});
|
||||
}
|
||||
// generic (build || publish)
|
||||
econfig.build.publish = data.publish
|
||||
econfig.build.directories.output = `${output}-generic`;
|
||||
fs.writeFileSync(packageFile, JSON.stringify(econfig, null, 2), 'utf8');
|
||||
child_process.spawnSync("npm" + comSuffix, ["run", platform], {stdio: "inherit", cwd: "electron"});
|
||||
child_process.execSync(`npm run ${platform}`, {stdio: "inherit", cwd: "electron"});
|
||||
if (publish === true && DP_KEY) {
|
||||
genericPublish({
|
||||
url: econfig.build.publish.url,
|
||||
|
||||
240
electron/electron.js
vendored
240
electron/electron.js
vendored
@@ -26,8 +26,6 @@ let enablePlugins = false;
|
||||
|
||||
let mainWindow = null,
|
||||
mainTray = null,
|
||||
subWindow = [],
|
||||
storageBrowser = null,
|
||||
isReady = false,
|
||||
willQuitApp = false,
|
||||
devloadUrl = "",
|
||||
@@ -36,7 +34,8 @@ let mainWindow = null,
|
||||
let screenshotObj = null,
|
||||
screenshotKey = null;
|
||||
|
||||
let webWindow = null,
|
||||
let childWindow = [],
|
||||
webTabWindow = null,
|
||||
webTabView = [],
|
||||
webTabHeight = 38;
|
||||
|
||||
@@ -116,7 +115,7 @@ function createMainWindow() {
|
||||
* 创建子窗口
|
||||
* @param args {path, hash, title, titleFixed, force, userAgent, config, webPreferences}
|
||||
*/
|
||||
function createSubWindow(args) {
|
||||
function createChildWindow(args) {
|
||||
if (!args) {
|
||||
return;
|
||||
}
|
||||
@@ -126,7 +125,7 @@ function createSubWindow(args) {
|
||||
}
|
||||
|
||||
let name = args.name || "auto_" + utils.randomString(6);
|
||||
let item = subWindow.find(item => item.name == name);
|
||||
let item = childWindow.find(item => item.name == name);
|
||||
let browser = item ? item.browser : null;
|
||||
if (browser) {
|
||||
browser.focus();
|
||||
@@ -169,9 +168,9 @@ function createSubWindow(args) {
|
||||
})
|
||||
|
||||
browser.on('closed', () => {
|
||||
let index = subWindow.findIndex(item => item.name == name);
|
||||
let index = childWindow.findIndex(item => item.name == name);
|
||||
if (index > -1) {
|
||||
subWindow.splice(index, 1)
|
||||
childWindow.splice(index, 1)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -183,7 +182,7 @@ function createSubWindow(args) {
|
||||
onShowWindow(browser);
|
||||
})
|
||||
|
||||
subWindow.push({ name, browser })
|
||||
childWindow.push({ name, browser })
|
||||
}
|
||||
const originalUA = browser.webContents.session.getUserAgent() || browser.webContents.getUserAgent()
|
||||
browser.webContents.setUserAgent(originalUA + " SubTaskWindow/" + process.platform + "/" + os.arch() + "/1.0" + (args.userAgent ? (" " + args.userAgent) : ""));
|
||||
@@ -219,7 +218,7 @@ function createSubWindow(args) {
|
||||
* @param browser
|
||||
* @param args
|
||||
*/
|
||||
function updateSubWindow(browser, args) {
|
||||
function updateChildWindow(browser, args) {
|
||||
if (!args) {
|
||||
return;
|
||||
}
|
||||
@@ -239,7 +238,7 @@ function updateSubWindow(browser, args) {
|
||||
}
|
||||
}
|
||||
if (args.name) {
|
||||
const er = subWindow.find(item => item.browser == browser);
|
||||
const er = childWindow.find(item => item.browser == browser);
|
||||
if (er) {
|
||||
er.name = args.name;
|
||||
}
|
||||
@@ -250,7 +249,7 @@ function updateSubWindow(browser, args) {
|
||||
* 创建内置浏览器
|
||||
* @param args {url, ?}
|
||||
*/
|
||||
function createWebWindow(args) {
|
||||
function createWebTabWindow(args) {
|
||||
if (!args) {
|
||||
return;
|
||||
}
|
||||
@@ -264,8 +263,8 @@ function createWebWindow(args) {
|
||||
}
|
||||
|
||||
// 创建父级窗口
|
||||
if (!webWindow) {
|
||||
let config = Object.assign(args.config || {}, userConf.get('webWindow', {}));
|
||||
if (!webTabWindow) {
|
||||
let config = Object.assign(args.config || {}, userConf.get('webTabWindow', {}));
|
||||
let webPreferences = args.webPreferences || {};
|
||||
const titleBarOverlay = {
|
||||
height: webTabHeight
|
||||
@@ -274,7 +273,7 @@ function createWebWindow(args) {
|
||||
titleBarOverlay.color = '#3B3B3D'
|
||||
titleBarOverlay.symbolColor = '#C5C5C5'
|
||||
}
|
||||
webWindow = new BrowserWindow(Object.assign({
|
||||
webTabWindow = new BrowserWindow(Object.assign({
|
||||
x: mainWindow.getBounds().x + webTabHeight,
|
||||
y: mainWindow.getBounds().y + webTabHeight,
|
||||
width: 1280,
|
||||
@@ -295,55 +294,75 @@ function createWebWindow(args) {
|
||||
}, webPreferences),
|
||||
}, config))
|
||||
|
||||
webWindow.on('resize', () => {
|
||||
if (nativeTheme.shouldUseDarkColors) {
|
||||
webTabWindow.setBackgroundColor('#3B3B3D')
|
||||
} else {
|
||||
webTabWindow.setBackgroundColor('#EFF0F4')
|
||||
}
|
||||
|
||||
webTabWindow.on('resize', () => {
|
||||
resizeWebTab(0)
|
||||
})
|
||||
|
||||
webWindow.on('enter-full-screen', () => {
|
||||
utils.onDispatchEvent(webWindow.webContents, {
|
||||
webTabWindow.on('enter-full-screen', () => {
|
||||
utils.onDispatchEvent(webTabWindow.webContents, {
|
||||
event: 'enter-full-screen',
|
||||
}).then(_ => { })
|
||||
})
|
||||
|
||||
webWindow.on('leave-full-screen', () => {
|
||||
utils.onDispatchEvent(webWindow.webContents, {
|
||||
webTabWindow.on('leave-full-screen', () => {
|
||||
utils.onDispatchEvent(webTabWindow.webContents, {
|
||||
event: 'leave-full-screen',
|
||||
}).then(_ => { })
|
||||
})
|
||||
|
||||
webWindow.on('close', event => {
|
||||
webTabWindow.on('close', event => {
|
||||
if (!willQuitApp) {
|
||||
closeWebTab(0)
|
||||
event.preventDefault()
|
||||
} else {
|
||||
userConf.set('webWindow', webWindow.getBounds())
|
||||
userConf.set('webTabWindow', webTabWindow.getBounds())
|
||||
}
|
||||
})
|
||||
|
||||
webWindow.on('closed', () => {
|
||||
webWindow = null
|
||||
webTabWindow.on('closed', () => {
|
||||
webTabView.forEach(({view}) => {
|
||||
try {
|
||||
view.webContents.close()
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
})
|
||||
webTabView = []
|
||||
webTabWindow = null
|
||||
})
|
||||
|
||||
webWindow.once('ready-to-show', () => {
|
||||
onShowWindow(webWindow);
|
||||
webTabWindow.once('ready-to-show', () => {
|
||||
onShowWindow(webTabWindow);
|
||||
})
|
||||
|
||||
webWindow.webContents.once('dom-ready', () => {
|
||||
onShowWindow(webWindow);
|
||||
webTabWindow.webContents.once('dom-ready', () => {
|
||||
onShowWindow(webTabWindow);
|
||||
})
|
||||
|
||||
webWindow.webContents.on('before-input-event', (event, input) => {
|
||||
webTabWindow.webContents.on('before-input-event', (event, input) => {
|
||||
if (utils.isMetaOrControl(input) && input.key.toLowerCase() === 'r') {
|
||||
reloadWebTab(0)
|
||||
event.preventDefault()
|
||||
} else if (utils.isMetaOrControl(input) && input.shift && input.key.toLowerCase() === 'i') {
|
||||
devToolsWebTab(0)
|
||||
}
|
||||
})
|
||||
|
||||
webWindow.loadFile('./render/tabs/index.html', {}).then(_ => {
|
||||
webTabWindow.loadFile('./render/tabs/index.html', {}).then(_ => {
|
||||
|
||||
})
|
||||
}
|
||||
webWindow.focus();
|
||||
if (webTabWindow.isMinimized()) {
|
||||
webTabWindow.restore()
|
||||
}
|
||||
webTabWindow.focus();
|
||||
webTabWindow.show();
|
||||
|
||||
// 创建子窗口
|
||||
const browserView = new BrowserView({
|
||||
@@ -351,9 +370,7 @@ function createWebWindow(args) {
|
||||
useLoadingView: true,
|
||||
useErrorView: true,
|
||||
webPreferences: {
|
||||
type: 'browserView',
|
||||
preload: path.join(__dirname, 'electron-preload.js'),
|
||||
nodeIntegrationInSubFrames: true,
|
||||
}
|
||||
})
|
||||
if (nativeTheme.shouldUseDarkColors) {
|
||||
@@ -364,18 +381,21 @@ function createWebWindow(args) {
|
||||
browserView.setBounds({
|
||||
x: 0,
|
||||
y: webTabHeight,
|
||||
width: webWindow.getContentBounds().width || 1280,
|
||||
height: (webWindow.getContentBounds().height || 800) - webTabHeight,
|
||||
width: webTabWindow.getContentBounds().width || 1280,
|
||||
height: (webTabWindow.getContentBounds().height || 800) - webTabHeight,
|
||||
})
|
||||
browserView.webContents.on('destroyed', () => {
|
||||
closeWebTab(browserView.webContents.id)
|
||||
})
|
||||
browserView.webContents.setWindowOpenHandler(({url}) => {
|
||||
if (allowedCalls.test(url)) {
|
||||
return {action: 'allow'}
|
||||
}
|
||||
createWebWindow({url})
|
||||
createWebTabWindow({url})
|
||||
return {action: 'deny'}
|
||||
})
|
||||
browserView.webContents.on('page-title-updated', (event, title) => {
|
||||
utils.onDispatchEvent(webWindow.webContents, {
|
||||
utils.onDispatchEvent(webTabWindow.webContents, {
|
||||
event: 'title',
|
||||
id: browserView.webContents.id,
|
||||
title: title,
|
||||
@@ -386,7 +406,7 @@ function createWebWindow(args) {
|
||||
if (!errorDescription) {
|
||||
return
|
||||
}
|
||||
utils.onDispatchEvent(webWindow.webContents, {
|
||||
utils.onDispatchEvent(webTabWindow.webContents, {
|
||||
event: 'title',
|
||||
id: browserView.webContents.id,
|
||||
title: errorDescription,
|
||||
@@ -394,46 +414,50 @@ function createWebWindow(args) {
|
||||
}).then(_ => { })
|
||||
})
|
||||
browserView.webContents.on('page-favicon-updated', (event, favicons) => {
|
||||
utils.onDispatchEvent(webWindow.webContents, {
|
||||
utils.onDispatchEvent(webTabWindow.webContents, {
|
||||
event: 'favicon',
|
||||
id: browserView.webContents.id,
|
||||
favicons
|
||||
}).then(_ => { })
|
||||
})
|
||||
browserView.webContents.on('did-start-loading', _ => {
|
||||
utils.onDispatchEvent(webWindow.webContents, {
|
||||
utils.onDispatchEvent(webTabWindow.webContents, {
|
||||
event: 'start-loading',
|
||||
id: browserView.webContents.id,
|
||||
}).then(_ => { })
|
||||
})
|
||||
browserView.webContents.on('did-stop-loading', _ => {
|
||||
utils.onDispatchEvent(webWindow.webContents, {
|
||||
utils.onDispatchEvent(webTabWindow.webContents, {
|
||||
event: 'stop-loading',
|
||||
id: browserView.webContents.id,
|
||||
}).then(_ => { })
|
||||
// 加载完成暗黑模式下把窗口背景色改成白色,避免透明网站背景色穿透
|
||||
if (nativeTheme.shouldUseDarkColors) {
|
||||
browserView.setBackgroundColor('#FFFFFF')
|
||||
}
|
||||
})
|
||||
browserView.webContents.on('before-input-event', (event, input) => {
|
||||
if (utils.isMetaOrControl(input) && input.key.toLowerCase() === 'r') {
|
||||
browserView.webContents.reload()
|
||||
event.preventDefault()
|
||||
} else if (input.meta && input.shift && input.key.toLowerCase() === 'i') {
|
||||
} else if (utils.isMetaOrControl(input) && input.shift && input.key.toLowerCase() === 'i') {
|
||||
browserView.webContents.toggleDevTools()
|
||||
}
|
||||
})
|
||||
browserView.webContents.loadURL(args.url).then(_ => { }).catch(_ => { })
|
||||
|
||||
webWindow.addBrowserView(browserView)
|
||||
webTabWindow.addBrowserView(browserView)
|
||||
webTabView.push({
|
||||
id: browserView.webContents.id,
|
||||
view: browserView
|
||||
})
|
||||
|
||||
utils.onDispatchEvent(webWindow.webContents, {
|
||||
utils.onDispatchEvent(webTabWindow.webContents, {
|
||||
event: 'create',
|
||||
id: browserView.webContents.id,
|
||||
url: args.url,
|
||||
}).then(_ => { })
|
||||
switchWebTab(browserView.webContents.id)
|
||||
activateWebTab(browserView.webContents.id)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -441,7 +465,7 @@ function createWebWindow(args) {
|
||||
* @returns {Electron.BrowserView|undefined}
|
||||
*/
|
||||
function currentWebTab() {
|
||||
const views = webWindow.getBrowserViews()
|
||||
const views = webTabWindow.getBrowserViews()
|
||||
const view = views.length ? views[views.length - 1] : undefined
|
||||
if (!view) {
|
||||
return undefined
|
||||
@@ -461,6 +485,18 @@ function reloadWebTab(id) {
|
||||
item.view.webContents.reload()
|
||||
}
|
||||
|
||||
/**
|
||||
* 内置浏览器标签打开开发者工具
|
||||
* @param id
|
||||
*/
|
||||
function devToolsWebTab(id) {
|
||||
const item = id === 0 ? currentWebTab() : webTabView.find(item => item.id == id)
|
||||
if (!item) {
|
||||
return
|
||||
}
|
||||
item.view.webContents.toggleDevTools()
|
||||
}
|
||||
|
||||
/**
|
||||
* 调整内置浏览器标签尺寸
|
||||
* @param id
|
||||
@@ -473,8 +509,8 @@ function resizeWebTab(id) {
|
||||
item.view.setBounds({
|
||||
x: 0,
|
||||
y: webTabHeight,
|
||||
width: webWindow.getContentBounds().width || 1280,
|
||||
height: (webWindow.getContentBounds().height || 800) - webTabHeight,
|
||||
width: webTabWindow.getContentBounds().width || 1280,
|
||||
height: (webTabWindow.getContentBounds().height || 800) - webTabHeight,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -482,15 +518,15 @@ function resizeWebTab(id) {
|
||||
* 切换内置浏览器标签
|
||||
* @param id
|
||||
*/
|
||||
function switchWebTab(id) {
|
||||
function activateWebTab(id) {
|
||||
const item = id === 0 ? currentWebTab() : webTabView.find(item => item.id == id)
|
||||
if (!item) {
|
||||
return
|
||||
}
|
||||
resizeWebTab(item.id)
|
||||
webWindow.setTopBrowserView(item.view)
|
||||
webTabWindow.setTopBrowserView(item.view)
|
||||
item.view.webContents.focus()
|
||||
utils.onDispatchEvent(webWindow.webContents, {
|
||||
utils.onDispatchEvent(webTabWindow.webContents, {
|
||||
event: 'switch',
|
||||
id: item.id,
|
||||
}).then(_ => { })
|
||||
@@ -506,26 +542,30 @@ function closeWebTab(id) {
|
||||
return
|
||||
}
|
||||
if (webTabView.length === 1) {
|
||||
webWindow.hide()
|
||||
webTabWindow.hide()
|
||||
}
|
||||
webTabWindow.removeBrowserView(item.view)
|
||||
try {
|
||||
item.view.webContents.close()
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
webWindow.removeBrowserView(item.view)
|
||||
item.view.webContents.close()
|
||||
|
||||
const index = webTabView.findIndex(({id}) => item.id == id)
|
||||
if (index > -1) {
|
||||
webTabView.splice(index, 1)
|
||||
}
|
||||
|
||||
utils.onDispatchEvent(webWindow.webContents, {
|
||||
utils.onDispatchEvent(webTabWindow.webContents, {
|
||||
event: 'close',
|
||||
id: item.id,
|
||||
}).then(_ => { })
|
||||
|
||||
if (webTabView.length === 0) {
|
||||
userConf.set('webWindow', webWindow.getBounds())
|
||||
webWindow.destroy()
|
||||
userConf.set('webTabWindow', webTabWindow.getBounds())
|
||||
webTabWindow.destroy()
|
||||
} else {
|
||||
switchWebTab(0)
|
||||
activateWebTab(0)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -612,9 +652,6 @@ app.on('browser-window-focus', () => {
|
||||
if (mainWindow) {
|
||||
mainWindow.webContents.send("browserWindowFocus", {})
|
||||
}
|
||||
if (storageBrowser) {
|
||||
storageBrowser.webContents.reload()
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -649,8 +686,8 @@ ipcMain.on('windowQuit', (event) => {
|
||||
* 创建路由窗口
|
||||
* @param args {path, ?}
|
||||
*/
|
||||
ipcMain.on('windowRouter', (event, args) => {
|
||||
createSubWindow(args)
|
||||
ipcMain.on('openChildWindow', (event, args) => {
|
||||
createChildWindow(args)
|
||||
event.returnValue = "ok"
|
||||
})
|
||||
|
||||
@@ -658,9 +695,28 @@ ipcMain.on('windowRouter', (event, args) => {
|
||||
* 更新路由窗口
|
||||
* @param args {?name, ?path} // name: 不是要更改的窗口名,是要把窗口名改成什么, path: 地址
|
||||
*/
|
||||
ipcMain.on('updateChildWindow', (event, args) => {
|
||||
const browser = BrowserWindow.fromWebContents(event.sender);
|
||||
updateChildWindow(browser, args)
|
||||
event.returnValue = "ok"
|
||||
})
|
||||
|
||||
/**
|
||||
* 创建路由窗口(todo 已废弃)
|
||||
* @param args {path, ?}
|
||||
*/
|
||||
ipcMain.on('windowRouter', (event, args) => {
|
||||
createChildWindow(args)
|
||||
event.returnValue = "ok"
|
||||
})
|
||||
|
||||
/**
|
||||
* 更新路由窗口(todo 已废弃)
|
||||
* @param args {?name, ?path} // name: 不是要更改的窗口名,是要把窗口名改成什么, path: 地址
|
||||
*/
|
||||
ipcMain.on('updateRouter', (event, args) => {
|
||||
const browser = BrowserWindow.fromWebContents(event.sender);
|
||||
updateSubWindow(browser, args)
|
||||
updateChildWindow(browser, args)
|
||||
event.returnValue = "ok"
|
||||
})
|
||||
|
||||
@@ -668,8 +724,8 @@ ipcMain.on('updateRouter', (event, args) => {
|
||||
* 内置浏览器 - 打开创建
|
||||
* @param args {url, ?}
|
||||
*/
|
||||
ipcMain.on('openWebWindow', (event, args) => {
|
||||
createWebWindow(args)
|
||||
ipcMain.on('openWebTabWindow', (event, args) => {
|
||||
createWebTabWindow(args)
|
||||
event.returnValue = "ok"
|
||||
})
|
||||
|
||||
@@ -677,8 +733,8 @@ ipcMain.on('openWebWindow', (event, args) => {
|
||||
* 内置浏览器 - 激活标签
|
||||
* @param id
|
||||
*/
|
||||
ipcMain.on('webTabSwitch', (event, id) => {
|
||||
switchWebTab(id)
|
||||
ipcMain.on('webTabActivate', (event, id) => {
|
||||
activateWebTab(id)
|
||||
event.returnValue = "ok"
|
||||
})
|
||||
|
||||
@@ -694,7 +750,7 @@ ipcMain.on('webTabClose', (event, id) => {
|
||||
/**
|
||||
* 内置浏览器 - 在外部浏览器打开
|
||||
*/
|
||||
ipcMain.on('webTabBrowser', (event) => {
|
||||
ipcMain.on('webTabExternal', (event) => {
|
||||
const item = currentWebTab()
|
||||
if (!item) {
|
||||
return
|
||||
@@ -715,6 +771,16 @@ ipcMain.on('webTabOpenDevTools', (event) => {
|
||||
event.returnValue = "ok"
|
||||
})
|
||||
|
||||
/**
|
||||
* 内置浏览器 - 销毁所有标签及窗口
|
||||
*/
|
||||
ipcMain.on('webTabDestroyAll', (event) => {
|
||||
if (webTabWindow) {
|
||||
webTabWindow.destroy()
|
||||
}
|
||||
event.returnValue = "ok"
|
||||
})
|
||||
|
||||
/**
|
||||
* 隐藏窗口(mac、win隐藏,其他关闭)
|
||||
*/
|
||||
@@ -748,8 +814,8 @@ ipcMain.on('windowDestroy', (event) => {
|
||||
/**
|
||||
* 关闭所有子窗口
|
||||
*/
|
||||
ipcMain.on('subWindowCloseAll', (event) => {
|
||||
subWindow.some(({browser}) => {
|
||||
ipcMain.on('childWindowCloseAll', (event) => {
|
||||
childWindow.some(({browser}) => {
|
||||
browser && browser.close()
|
||||
})
|
||||
event.returnValue = "ok"
|
||||
@@ -758,8 +824,8 @@ ipcMain.on('subWindowCloseAll', (event) => {
|
||||
/**
|
||||
* 销毁所有子窗口
|
||||
*/
|
||||
ipcMain.on('subWindowDestroyAll', (event) => {
|
||||
subWindow.some(({browser}) => {
|
||||
ipcMain.on('childWindowDestroyAll', (event) => {
|
||||
childWindow.some(({browser}) => {
|
||||
browser && browser.destroy()
|
||||
})
|
||||
event.returnValue = "ok"
|
||||
@@ -852,34 +918,6 @@ ipcMain.on('windowMax', (event) => {
|
||||
event.returnValue = "ok"
|
||||
})
|
||||
|
||||
/**
|
||||
* 创建子窗口存储浏览器
|
||||
* @param args {url}
|
||||
*/
|
||||
ipcMain.on('storageBrowser', (event, args) => {
|
||||
if (utils.isJson(args) && allowedUrls.test(args.url)) {
|
||||
if (storageBrowser === null) {
|
||||
storageBrowser = new BrowserWindow({
|
||||
show: false,
|
||||
frame: false,
|
||||
transparent: true,
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, 'electron-preload.js'),
|
||||
webSecurity: true,
|
||||
nodeIntegration: true,
|
||||
contextIsolation: true,
|
||||
nativeWindowOpen: true
|
||||
},
|
||||
})
|
||||
storageBrowser.on('closed', () => {
|
||||
storageBrowser = null
|
||||
})
|
||||
}
|
||||
storageBrowser.loadURL(args.url).then(_ => { }).catch(_ => { })
|
||||
}
|
||||
event.returnValue = "ok"
|
||||
})
|
||||
|
||||
/**
|
||||
* 给主窗口发送信息
|
||||
* @param args {channel, data}
|
||||
@@ -1087,7 +1125,7 @@ ipcMain.on('mainWindowActive', (event) => {
|
||||
ipcMain.on('updateQuitAndInstall', (event) => {
|
||||
event.returnValue = "ok"
|
||||
willQuitApp = true
|
||||
subWindow.some(({browser}) => {
|
||||
childWindow.some(({browser}) => {
|
||||
browser && browser.destroy()
|
||||
})
|
||||
setTimeout(_ => {
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
"url": "https://github.com/kuaifan/dootask.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-forge/cli": "^7.3.0",
|
||||
"@electron-forge/maker-deb": "^7.3.0",
|
||||
"@electron-forge/maker-rpm": "^7.3.0",
|
||||
"@electron-forge/maker-squirrel": "^7.3.0",
|
||||
"@electron-forge/maker-zip": "^7.3.0",
|
||||
"@electron-forge/cli": "^7.3.1",
|
||||
"@electron-forge/maker-deb": "^7.3.1",
|
||||
"@electron-forge/maker-rpm": "^7.3.1",
|
||||
"@electron-forge/maker-squirrel": "^7.3.1",
|
||||
"@electron-forge/maker-zip": "^7.3.1",
|
||||
"dotenv": "^16.3.1",
|
||||
"electron": "^29.1.0",
|
||||
"electron-builder": "^24.12.0",
|
||||
"electron": "^29.2.0",
|
||||
"electron-builder": "^24.13.3",
|
||||
"electron-notarize": "^1.2.2",
|
||||
"form-data": "^4.0.0",
|
||||
"ora": "^4.1.1"
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
data() {
|
||||
return {
|
||||
activeId: 0,
|
||||
tabs: []
|
||||
tabs: [],
|
||||
|
||||
stopTimer: null,
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
@@ -77,21 +79,30 @@
|
||||
const faviconItem = this.tabs.find(item => item.id === id)
|
||||
if (faviconItem) {
|
||||
faviconItem.icon = detail.favicons[detail.favicons.length - 1]
|
||||
//
|
||||
const img = new Image();
|
||||
img.onerror = () => {
|
||||
faviconItem.icon = ''
|
||||
};
|
||||
img.src = faviconItem.icon
|
||||
}
|
||||
break
|
||||
|
||||
case 'start-loading':
|
||||
const startItem = this.tabs.find(item => item.id === id)
|
||||
if (startItem) {
|
||||
this.stopTimer && clearTimeout(this.stopTimer)
|
||||
startItem.state = 'loading'
|
||||
}
|
||||
break
|
||||
|
||||
case 'stop-loading':
|
||||
const stopItem = this.tabs.find(item => item.id === id)
|
||||
if (stopItem) {
|
||||
stopItem.state = 'loaded'
|
||||
}
|
||||
this.stopTimer = setTimeout(_ => {
|
||||
const stopItem = this.tabs.find(item => item.id === id)
|
||||
if (stopItem) {
|
||||
stopItem.state = 'loaded'
|
||||
}
|
||||
}, 300)
|
||||
break
|
||||
|
||||
case 'enter-full-screen':
|
||||
@@ -120,7 +131,7 @@
|
||||
},
|
||||
methods: {
|
||||
onSwitch(item) {
|
||||
this.sendMessage('webTabSwitch', item.id)
|
||||
this.sendMessage('webTabActivate', item.id)
|
||||
},
|
||||
|
||||
onClose(item) {
|
||||
@@ -128,7 +139,7 @@
|
||||
},
|
||||
|
||||
onBrowser() {
|
||||
this.sendMessage('webTabBrowser')
|
||||
this.sendMessage('webTabExternal')
|
||||
},
|
||||
|
||||
iconStyle(item) {
|
||||
|
||||
@@ -441,7 +441,7 @@ Api接口文档
|
||||
开心笑话
|
||||
心灵鸡汤
|
||||
|
||||
请填写完整的参数
|
||||
请填写基本配置
|
||||
|
||||
终端SN与License不匹配
|
||||
终端MAC与License不匹配
|
||||
@@ -489,3 +489,8 @@ Api接口文档
|
||||
个人群组禁言
|
||||
|
||||
点击下载
|
||||
|
||||
置顶会话无法隐藏
|
||||
|
||||
注册失败
|
||||
会议已结束
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
如果必填,发送聊天前必须设置昵称、电话。
|
||||
开启同步本地帐号登录后将同步到 LDAP 服务器
|
||||
必填:发送聊天内容前必须设置昵称、电话。
|
||||
进入路由器终端执行以下命令即可完成安装:
|
||||
进入路由器终端执行以下命令即可完成安装
|
||||
设备连接上指定路由器(WiFi)后自动签到。
|
||||
切换语言需要刷新后生效,是否确定刷新?
|
||||
详细描述,选填...(点击右键使用工具栏)
|
||||
@@ -58,7 +58,7 @@
|
||||
密码错误,请输入正确密码
|
||||
开放:所有人都可以发言。
|
||||
强大易用的协同创作云文档
|
||||
注销前,请确认一下事项:
|
||||
注销前,请确认一下事项
|
||||
签到前后时间收到消息通知
|
||||
签到提醒对象:3天内有签到的成员(法定工作日)
|
||||
该状态下任务自动标记完成
|
||||
@@ -146,7 +146,7 @@
|
||||
选择转发最近聊天
|
||||
邮箱、昵称、职位
|
||||
请输入会议频道ID
|
||||
第二次任务提醒:
|
||||
第二次任务提醒
|
||||
请输入职位/职称
|
||||
不在成员列表内
|
||||
仅支持网页版。
|
||||
@@ -364,7 +364,7 @@ html转markdown
|
||||
验证码错误
|
||||
会议频道ID
|
||||
SMTP服务器
|
||||
任务提醒:
|
||||
任务提醒
|
||||
职位/职称
|
||||
验收/测试
|
||||
上传图片
|
||||
@@ -461,7 +461,7 @@ SMTP服务器
|
||||
导出成员
|
||||
尚未签到
|
||||
工作报告
|
||||
开启后:
|
||||
开启后
|
||||
开启推送
|
||||
开启通知
|
||||
开始会议
|
||||
@@ -642,7 +642,6 @@ LDAP 端口
|
||||
MD编辑器
|
||||
Word 文档
|
||||
导出XLSX
|
||||
APP推送
|
||||
MAC地址
|
||||
扫一扫
|
||||
上个月
|
||||
@@ -1107,7 +1106,8 @@ html转markdown
|
||||
是否将消息中的网络图片保存到本地服务器。
|
||||
保存网络图片
|
||||
无声发送
|
||||
Markdown 格式发送
|
||||
MD 格式发送
|
||||
正常发送
|
||||
编辑消息
|
||||
发送失败
|
||||
再次编辑
|
||||
@@ -1251,9 +1251,9 @@ Markdown 格式发送
|
||||
退出
|
||||
会议组件加载失败!
|
||||
|
||||
OKR管理
|
||||
OKR结果
|
||||
OKR结果分析
|
||||
OKR 管理
|
||||
OKR 结果
|
||||
OKR 结果分析
|
||||
计划时间冲突提示
|
||||
忽略并继续
|
||||
你确定要清除缓存吗?
|
||||
@@ -1273,10 +1273,10 @@ OKR结果分析
|
||||
审批类型
|
||||
导出类型
|
||||
未完成
|
||||
AI机器人
|
||||
AI 机器人
|
||||
任务相关
|
||||
请填写名称!
|
||||
访问OpenAI网站查看:
|
||||
访问OpenAI网站查看
|
||||
使用代理
|
||||
支持 http 或 socks 代理
|
||||
例如:http://proxy.com 或 socks5://proxy.com
|
||||
@@ -1372,9 +1372,9 @@ AI机器人
|
||||
加入视频会议,参与已经创建的会议,在会议过程中与其他参会人员进行远程实时视听交流和协作。
|
||||
新会议
|
||||
新建会议
|
||||
LDAP设置
|
||||
LDAP 设置
|
||||
邮件管理
|
||||
APP推送
|
||||
APP 推送
|
||||
流程设置
|
||||
邮件
|
||||
签到
|
||||
@@ -1439,7 +1439,7 @@ APP推送
|
||||
服务器版本过低,请升级服务器。
|
||||
|
||||
不显示原发送者信息
|
||||
转发给:
|
||||
转发给
|
||||
留言
|
||||
多选
|
||||
@我的
|
||||
@@ -1509,7 +1509,7 @@ License Key
|
||||
|
||||
数据已超过(*)条,是否继续加载?
|
||||
版本过低
|
||||
服务器接口版本过低,部分功能可能无法正常使用。
|
||||
服务器((*))接口版本过低,部分功能可能无法正常使用。
|
||||
|
||||
|
||||
禁言
|
||||
@@ -1525,3 +1525,41 @@ License Key
|
||||
注意,仅禁止个人群组,其他类型的群组不禁止,比如:部门群聊、项目群聊等系统群聊。
|
||||
|
||||
浏览器打开
|
||||
|
||||
离最新版本只有一步之遥了!重新启动应用即可完成更新。
|
||||
重新启动
|
||||
|
||||
欢迎使用本软件!
|
||||
在您使用本软件前,请您认真阅读并了解相应的
|
||||
以了解我们的服务内容和您相关个人信息的处理规则。
|
||||
我们将严格的按照隐私服务协议为您提供服务,保护您的个人信息。
|
||||
服务器((*))版本过低
|
||||
|
||||
不显示该会话
|
||||
昨天
|
||||
|
||||
文件已存在
|
||||
文件(*)已存在,是否替换?
|
||||
保留两者
|
||||
替换
|
||||
|
||||
端到端加密
|
||||
关闭端到端加密传输数据。
|
||||
等(*)个文件
|
||||
你确定要删除【(*)】等2个文件吗?
|
||||
审批详情
|
||||
天前
|
||||
月前
|
||||
请输入用户名
|
||||
是否拨打电话给(*)?
|
||||
|
||||
你确定要取消发送吗?
|
||||
消息已发送,不可取消
|
||||
取消发送失败
|
||||
|
||||
基本配置
|
||||
用于生成会议频道。
|
||||
用于频道管理。
|
||||
比如
|
||||
结束会议室
|
||||
会议已结束
|
||||
|
||||
@@ -3916,15 +3916,15 @@
|
||||
"id": "Harus mengisi: anda harus mengatur nama panggilan, panggilan sebelum anda mengirim obrolan."
|
||||
},
|
||||
{
|
||||
"key": "进入路由器终端执行以下命令即可完成安装:",
|
||||
"key": "进入路由器终端执行以下命令即可完成安装",
|
||||
"zh": "",
|
||||
"zh-CHT": "進入路由器終端執行以下命令即可完成安裝:",
|
||||
"en": "Log in to the router terminal and run the following command to complete the installation:",
|
||||
"ko": "라우터 터미널에 들어가서 다음 명령을 실행하면 설치가 완료됩니다:",
|
||||
"zh-CHT": "進入路由器終端執行以下命令即可完成安裝",
|
||||
"en": "Log in to the router terminal and run the following command to complete the installation",
|
||||
"ko": "라우터 터미널에 들어가서 다음 명령을 실행하면 설치가 완료됩니다",
|
||||
"ja": "ルーター端末に入って以下のコマンドを実行すればインストール完了です。",
|
||||
"de": "Um die installation abzuschließen, müssen sie die folgenden befehle ausführen:",
|
||||
"fr": "Allez dans le terminal du routeur et exécutez les commandes suivantes pour terminer l’installation:",
|
||||
"id": "Memasuki terminal router untuk melakukan instalasi selesai dengan perintah berikut:"
|
||||
"de": "Um die installation abzuschließen, müssen sie die folgenden befehle ausführen",
|
||||
"fr": "Allez dans le terminal du routeur et exécutez les commandes suivantes pour terminer l’installation",
|
||||
"id": "Memasuki terminal router untuk melakukan instalasi selesai dengan perintah berikut"
|
||||
},
|
||||
{
|
||||
"key": "设备连接上指定路由器(WiFi)后自动签到。",
|
||||
@@ -4411,15 +4411,15 @@
|
||||
"id": "Melalui sinergi menghasilkan dokumen awan yang kuat dan mudah digunakan"
|
||||
},
|
||||
{
|
||||
"key": "注销前,请确认一下事项:",
|
||||
"key": "注销前,请确认一下事项",
|
||||
"zh": "",
|
||||
"zh-CHT": "註銷前,請確認一下事項:",
|
||||
"en": "Before cancellation, please confirm the following:",
|
||||
"zh-CHT": "註銷前,請確認一下事項",
|
||||
"en": "Before cancellation, please confirm the following",
|
||||
"ko": "로그아웃하기 전에 다음 사항을 확인하시기 바랍니다.",
|
||||
"ja": "登録を抹消する前に、確認事項をお願いします。",
|
||||
"de": "Vor der abschreibung überprüfen sie bitte den auftrag:",
|
||||
"fr": "Avant de vous déconnecter, veuillez vérifier les choses:",
|
||||
"id": "Pastikan hal sebelum log keluar:"
|
||||
"de": "Vor der abschreibung überprüfen sie bitte den auftrag",
|
||||
"fr": "Avant de vous déconnecter, veuillez vérifier les choses",
|
||||
"id": "Pastikan hal sebelum log keluar"
|
||||
},
|
||||
{
|
||||
"key": "签到前后时间收到消息通知",
|
||||
@@ -5203,15 +5203,15 @@
|
||||
"id": "Harap masukkan ID saluran pertemuan"
|
||||
},
|
||||
{
|
||||
"key": "第二次任务提醒:",
|
||||
"key": "第二次任务提醒",
|
||||
"zh": "",
|
||||
"zh-CHT": "第二次任務提醒:",
|
||||
"en": "Second mission reminder:",
|
||||
"ko": "두 번째 작업 알람:",
|
||||
"ja": "2回目のタスクリマインダーです:",
|
||||
"zh-CHT": "第二次任務提醒",
|
||||
"en": "Second mission reminder",
|
||||
"ko": "두 번째 작업 알람",
|
||||
"ja": "2回目のタスクリマインダーです",
|
||||
"de": "Das war unser auftrag.",
|
||||
"fr": "Deuxième rappel de mission:",
|
||||
"id": "Pengingat untuk tugas kedua:"
|
||||
"fr": "Deuxième rappel de mission",
|
||||
"id": "Pengingat untuk tugas kedua"
|
||||
},
|
||||
{
|
||||
"key": "请输入职位\/职称",
|
||||
@@ -7480,15 +7480,15 @@
|
||||
"id": "Server SMTP"
|
||||
},
|
||||
{
|
||||
"key": "任务提醒:",
|
||||
"key": "任务提醒",
|
||||
"zh": "",
|
||||
"zh-CHT": "任務提醒:",
|
||||
"en": "Task reminder:",
|
||||
"ko": "작업 알람:",
|
||||
"ja": "タスクリマインダーです:",
|
||||
"de": "Das beruhigt mich.",
|
||||
"fr": "Rappel des tâches:",
|
||||
"id": "Peringatan misi:"
|
||||
"zh-CHT": "任務提醒",
|
||||
"en": "Task reminder",
|
||||
"ko": "작업 알람",
|
||||
"ja": "タスクリマインダーです",
|
||||
"de": "Ich brauche eine bestätigung.",
|
||||
"fr": "Rappel des tâches",
|
||||
"id": "Pengingat tugas"
|
||||
},
|
||||
{
|
||||
"key": "职位\/职称",
|
||||
@@ -7699,17 +7699,6 @@
|
||||
"fr": "Description des tâches",
|
||||
"id": "Deskripsi tugas"
|
||||
},
|
||||
{
|
||||
"key": "任务提醒",
|
||||
"zh": "",
|
||||
"zh-CHT": "任務提醒",
|
||||
"en": "Task reminder",
|
||||
"ko": "작업 알람",
|
||||
"ja": "タスクリマインダーです",
|
||||
"de": "Ich brauche eine bestätigung.",
|
||||
"fr": "Rappel des tâches",
|
||||
"id": "Pengingat tugas"
|
||||
},
|
||||
{
|
||||
"key": "任务时间",
|
||||
"zh": "",
|
||||
@@ -8558,15 +8547,15 @@
|
||||
"id": "Laporan pekerjaan"
|
||||
},
|
||||
{
|
||||
"key": "开启后:",
|
||||
"key": "开启后",
|
||||
"zh": "",
|
||||
"zh-CHT": "開啓後:",
|
||||
"en": "After opening:",
|
||||
"ko": "켜진 후:",
|
||||
"ja": "オンにします:",
|
||||
"de": "Aktivierung:",
|
||||
"fr": "Après ouverture:",
|
||||
"id": "Setelah di buka:"
|
||||
"zh-CHT": "開啓後",
|
||||
"en": "After opening",
|
||||
"ko": "켜진 후",
|
||||
"ja": "オンにします",
|
||||
"de": "Aktivierung",
|
||||
"fr": "Après ouverture",
|
||||
"id": "Setelah di buka"
|
||||
},
|
||||
{
|
||||
"key": "开启推送",
|
||||
@@ -10471,17 +10460,6 @@
|
||||
"fr": "Exportez votre XLSX",
|
||||
"id": "Ekspor XLSX"
|
||||
},
|
||||
{
|
||||
"key": "APP推送",
|
||||
"zh": "",
|
||||
"zh-CHT": "APP推送",
|
||||
"en": "APP push",
|
||||
"ko": "App 푸시",
|
||||
"ja": "アプリでプッシュします",
|
||||
"de": "Die APP.",
|
||||
"fr": "Push par APP",
|
||||
"id": "Aplikasi push"
|
||||
},
|
||||
{
|
||||
"key": "MAC地址",
|
||||
"zh": "",
|
||||
@@ -15300,17 +15278,6 @@
|
||||
"fr": "Télécharger maintenant télécharger",
|
||||
"id": "Download sekarang"
|
||||
},
|
||||
{
|
||||
"key": "请填写完整的参数",
|
||||
"zh": "",
|
||||
"zh-CHT": "請填寫完整的參數",
|
||||
"en": "Please fill in the complete parameters",
|
||||
"ko": "완벽한 파라메터를 기입해 주십시오",
|
||||
"ja": "完全なパラメータをお願いします。",
|
||||
"de": "Füllen sie bitte die vollständige parameter aus",
|
||||
"fr": "Veuillez remplir tous les paramètres",
|
||||
"id": "Silahkan isi seluruh parameter"
|
||||
},
|
||||
{
|
||||
"key": "图片优化",
|
||||
"zh": "",
|
||||
@@ -15377,17 +15344,6 @@
|
||||
"fr": "Envoi en silence",
|
||||
"id": "Diam kirim"
|
||||
},
|
||||
{
|
||||
"key": "Markdown 格式发送",
|
||||
"zh": "",
|
||||
"zh-CHT": "Markdown 格式發送",
|
||||
"en": "It is sent in Markdown format",
|
||||
"ko": "마크다운 포맷 전송",
|
||||
"ja": "Markdownフォーマット送信します",
|
||||
"de": "Das format in der glauben glauben spielt",
|
||||
"fr": "Envoyer au format Markdown",
|
||||
"id": "Markdown format kirim"
|
||||
},
|
||||
{
|
||||
"key": "编辑消息",
|
||||
"zh": "",
|
||||
@@ -17104,17 +17060,6 @@
|
||||
"fr": "Types d’export",
|
||||
"id": "Tipe ekspor"
|
||||
},
|
||||
{
|
||||
"key": "AI机器人",
|
||||
"zh": "",
|
||||
"zh-CHT": "AI機器人",
|
||||
"en": "AI robot",
|
||||
"ko": "Ai 로봇",
|
||||
"ja": "AIロボットです",
|
||||
"de": "AI roboter",
|
||||
"fr": "Le robot AI",
|
||||
"id": "Robot al"
|
||||
},
|
||||
{
|
||||
"key": "任务相关",
|
||||
"zh": "",
|
||||
@@ -17138,15 +17083,15 @@
|
||||
"id": "Nama, silakan!"
|
||||
},
|
||||
{
|
||||
"key": "访问OpenAI网站查看:",
|
||||
"key": "访问OpenAI网站查看",
|
||||
"zh": "",
|
||||
"zh-CHT": "訪問OpenAI網站查看:",
|
||||
"en": "Visit the OpenAI website to see:",
|
||||
"ko": "Openai 사이트를 방문하십시오:",
|
||||
"zh-CHT": "訪問OpenAI網站查看",
|
||||
"en": "Visit the OpenAI website to see",
|
||||
"ko": "Openai 사이트를 방문하십시오",
|
||||
"ja": "OpenAIのウェブサイトをご覧ください。",
|
||||
"de": "Besuch der website OpenAI:",
|
||||
"fr": "Visitez le site OpenAI pour voir:",
|
||||
"id": "Kunjungi tampilan situs OpenAI:"
|
||||
"de": "Besuch der website OpenAI",
|
||||
"fr": "Visitez le site OpenAI pour voir",
|
||||
"id": "Kunjungi tampilan situs OpenAI"
|
||||
},
|
||||
{
|
||||
"key": "使用代理",
|
||||
@@ -17808,28 +17753,6 @@
|
||||
"fr": "Heure de soumission",
|
||||
"id": "Waktu pengiriman"
|
||||
},
|
||||
{
|
||||
"key": "OKR管理",
|
||||
"zh": "",
|
||||
"zh-CHT": "OKR管理",
|
||||
"en": "OKR",
|
||||
"ko": "Okr 매니지먼트",
|
||||
"ja": "OKRマネジメントです",
|
||||
"de": "Das ist OKR.",
|
||||
"fr": "Gestion des OKR",
|
||||
"id": "OKR manajemen"
|
||||
},
|
||||
{
|
||||
"key": "OKR结果分析",
|
||||
"zh": "",
|
||||
"zh-CHT": "OKR結果分析",
|
||||
"en": "Analysis of OKR results",
|
||||
"ko": "Okr 결과 분석",
|
||||
"ja": "OKR結果分析です",
|
||||
"de": "Wenn die ergebnisse umgekehrt sind",
|
||||
"fr": "Analyse des résultats OKR",
|
||||
"id": "Analisis hasil OKR"
|
||||
},
|
||||
{
|
||||
"key": "应用",
|
||||
"zh": "",
|
||||
@@ -17973,17 +17896,6 @@
|
||||
"fr": "Nouvelle conférence créée",
|
||||
"id": "Konferensi bangunan baru"
|
||||
},
|
||||
{
|
||||
"key": "LDAP设置",
|
||||
"zh": "",
|
||||
"zh-CHT": "LDAP設置",
|
||||
"en": "LDAP Settings",
|
||||
"ko": "Ldap 설정",
|
||||
"ja": "LDAP設定です",
|
||||
"de": "Das ist eine ldap-einstellung",
|
||||
"fr": "Paramètres de LDAP",
|
||||
"id": "Pengaturan LDAP"
|
||||
},
|
||||
{
|
||||
"key": "邮件管理",
|
||||
"zh": "",
|
||||
@@ -18479,17 +18391,6 @@
|
||||
"fr": "Tolérance et refus",
|
||||
"id": "Punya hati untuk menolak"
|
||||
},
|
||||
{
|
||||
"key": "OKR结果",
|
||||
"zh": "",
|
||||
"zh-CHT": "OKR結果",
|
||||
"en": "OKR result",
|
||||
"ko": "Okr 결과",
|
||||
"ja": "OKRの結果です",
|
||||
"de": "OKR bringt das ergebnis.",
|
||||
"fr": "Résultats pour OKR",
|
||||
"id": "Hasil OKR"
|
||||
},
|
||||
{
|
||||
"key": "开始聊天",
|
||||
"zh": "",
|
||||
@@ -18832,15 +18733,15 @@
|
||||
"id": "Tidak menunjukkan pesan asli"
|
||||
},
|
||||
{
|
||||
"key": "转发给:",
|
||||
"key": "转发给",
|
||||
"zh": "",
|
||||
"zh-CHT": "轉發給:",
|
||||
"en": "Forward to:",
|
||||
"ko": "다음으로 전달:",
|
||||
"ja": "転送します:",
|
||||
"zh-CHT": "轉發給",
|
||||
"en": "Forward to",
|
||||
"ko": "다음으로 전달",
|
||||
"ja": "転送します",
|
||||
"de": "Und an scotty.",
|
||||
"fr": "Envoyer à:",
|
||||
"id": "Teruskan ke:"
|
||||
"fr": "Envoyer à",
|
||||
"id": "Teruskan ke"
|
||||
},
|
||||
{
|
||||
"key": "留言",
|
||||
@@ -19557,17 +19458,6 @@
|
||||
"fr": "Version trop basse",
|
||||
"id": "Versi rendah"
|
||||
},
|
||||
{
|
||||
"key": "服务器接口版本过低,部分功能可能无法正常使用。",
|
||||
"zh": "",
|
||||
"zh-CHT": "服務器接口版本過低,部分功能可能無法正常使用。",
|
||||
"en": "The version of the server interface is too early, and some functions may be unavailable.",
|
||||
"ko": "서버 인터페이스 버전이 너무 낮아 일부 기능을 정상적으로 사용할 수 없을 것 같다.",
|
||||
"ja": "サーバーインターフェースのバージョンが低すぎて、一部の機能が正常に使用できない場合があります。",
|
||||
"de": "Die server-version ist zu niedrig und teilweise unbrauchbar.",
|
||||
"fr": "La version de l’interface du serveur est trop basse, certaines fonctions peuvent ne pas fonctionner correctement.",
|
||||
"id": "Versi antarmuka server yang rendah, sebagian fungsinya mungkin tidak berfungsi dengan baik."
|
||||
},
|
||||
{
|
||||
"key": "没有任何联系人",
|
||||
"zh": "",
|
||||
@@ -19787,5 +19677,478 @@
|
||||
"de": "Es wurde als antwort auf den aufstieg der chatgpt-kampfroboter entwickelt, die Von OpenAI entwickelt wurden.",
|
||||
"fr": "Développé en réponse à la montée en puissance du chatbot ChatGPT développé par OpenAI.",
|
||||
"id": "Dikembangkan sebagai respon terhadap kemunculan robot ChatGPT di OpenAI corporation."
|
||||
},
|
||||
{
|
||||
"key": "离最新版本只有一步之遥了!重新启动应用即可完成更新。",
|
||||
"zh": "",
|
||||
"zh-CHT": "離最新版本只有一步之遙了!重新啓動應用即可完成更新。",
|
||||
"en": "Just one step away from the latest version! Restart the app to complete the update.",
|
||||
"ko": "최신 버전이 얼마 남지 않았습니다!어플리케이션을 다시 시작하면 업데이트를 완료할 수 있습니다.",
|
||||
"ja": "最新バージョンまであと一歩です!アプリを再起動するとアップデートが完了します。",
|
||||
"de": "Nur ein schritt vor der aktuellen version! Mit dem erneuten start der anwendung kann die aktualisierung beendet werden",
|
||||
"fr": "À deux pas de la dernière version! Redémarrez l’application pour terminer la mise à jour.",
|
||||
"id": "Hanya satu langkah lagi untuk edisi terbaru! Restart aplikasi untuk menyelesaikan pembaruan."
|
||||
},
|
||||
{
|
||||
"key": "重新启动",
|
||||
"zh": "",
|
||||
"zh-CHT": "重新啓動",
|
||||
"en": "Restart",
|
||||
"ko": "다시 시작",
|
||||
"ja": "再起動します",
|
||||
"de": "Mach's nochmal!",
|
||||
"fr": "Redémarrer le",
|
||||
"id": "Restart"
|
||||
},
|
||||
{
|
||||
"key": "欢迎使用本软件!",
|
||||
"zh": "",
|
||||
"zh-CHT": "歡迎使用本軟件!",
|
||||
"en": "Welcome to use this software!",
|
||||
"ko": "이 소프트웨어 사용을 환영합니다!",
|
||||
"ja": "本ソフトの使用を歓迎します!",
|
||||
"de": "Willkommen bei unserer software!",
|
||||
"fr": "Bienvenue dans le logiciel!",
|
||||
"id": "Selamat datang di perangkat lunak ini!"
|
||||
},
|
||||
{
|
||||
"key": "在您使用本软件前,请您认真阅读并了解相应的",
|
||||
"zh": "",
|
||||
"zh-CHT": "在您使用本軟件前,請您認真閱讀並瞭解相應的",
|
||||
"en": "Before you use this software, please read and understand the corresponding",
|
||||
"ko": "이 소프트웨어를 사용하기 전에, 적절한 것을 읽고 이해하시기 바랍니다",
|
||||
"ja": "本ソフトをご利用になる前に、該当するものをよくお読みになって、ご理解いただけますようお願いいたします。",
|
||||
"de": "Bevor sie dieses programm verwenden, lesen sie es bitte sorgfältig und lernen sie es sich gut ein",
|
||||
"fr": "Avant d’utiliser ce logiciel, veuillez lire attentivement et comprendre en conséquence",
|
||||
"id": "Sebelum anda menggunakan perangkat lunak ini, silakan membaca dengan seksama dan memahami yang sesuai"
|
||||
},
|
||||
{
|
||||
"key": "以了解我们的服务内容和您相关个人信息的处理规则。",
|
||||
"zh": "",
|
||||
"zh-CHT": "以瞭解我們的服務內容和您相關個人信息的處理規則。",
|
||||
"en": "To understand the content of our services and your relevant personal information processing rules.",
|
||||
"ko": "저희 서비스의 내용과 귀하 관련 개인 정보의 처리 방법을 알아보십시오.",
|
||||
"ja": "私たちのサービス内容とあなたの箇人情報の取り扱いルールを理解するためです。",
|
||||
"de": "Ich möchte sie fragen, welche regeln sie zur bearbeitung Von informationen haben.",
|
||||
"fr": "Pour comprendre le contenu de nos services et les règles de traitement des informations personnelles vous concernant.",
|
||||
"id": "Untuk mengetahui isi layanan kami dan aturan pengolahan untuk informasi pribadi anda."
|
||||
},
|
||||
{
|
||||
"key": "我们将严格的按照隐私服务协议为您提供服务,保护您的个人信息。",
|
||||
"zh": "",
|
||||
"zh-CHT": "我們將嚴格的按照隱私服務協議爲您提供服務,保護您的個人信息。",
|
||||
"en": "We will provide you with services in strict accordance with the privacy service agreement and protect your personal information.",
|
||||
"ko": "당사는 귀하에게 서비스를 제공하고 귀하의 개인 정보를 보호하기 위해 엄격하게 개인 정보 보호 서비스 협의에 준할 것입니다.",
|
||||
"ja": "プライバシーサービス契約に基づいて厳格なサービスを提供し、お客様の箇人情報を保護します。",
|
||||
"de": "Wir werden ihre dienste strikt nach maßgabe der datenschutzbestimmungen anbieten und ihre persönlichen informationen schützen.",
|
||||
"fr": "Nous vous fournirons nos services en stricte conformité avec notre accord de service de confidentialité pour protéger vos informations personnelles.",
|
||||
"id": "Kami akan melayani anda dengan ketat sesuai dengan protokol privasi untuk melindungi informasi pribadi anda."
|
||||
},
|
||||
{
|
||||
"key": "服务器((*))版本过低",
|
||||
"zh": "",
|
||||
"zh-CHT": "服務器((*))版本過低",
|
||||
"en": "The server ((*)) version is too early",
|
||||
"ko": "서버 (*) 버전이 너무 낮습니다",
|
||||
"ja": "サーバー((*))のバージョンが低すぎます。",
|
||||
"de": "Server (*) zu niedrig rüber gehen",
|
||||
"fr": "Serveur ((*)) version trop basse",
|
||||
"id": "Versi server (*) terlalu rendah"
|
||||
},
|
||||
{
|
||||
"key": "服务器((*))接口版本过低,部分功能可能无法正常使用。",
|
||||
"zh": "",
|
||||
"zh-CHT": "服務器((*))接口版本過低,部分功能可能無法正常使用。",
|
||||
"en": "The interface version of the server ((*)) is too early, and some functions may be unavailable.",
|
||||
"ko": "서버 (*) 인터페이스 버전이 너무 낮아서 일부 기능을 제대로 사용할 수 없습니다.",
|
||||
"ja": "サーバー((*))インターフェースのバージョンが低いため、一部の機能が正常に使用できない場合があります。",
|
||||
"de": "Der server (*) ist bei zu niedrigen versionen möglicherweise nicht betriebsbereit",
|
||||
"fr": "La version de l’interface du serveur ((*)) est trop basse et certaines fonctions peuvent ne pas fonctionner correctement.",
|
||||
"id": "Server ((*) memiliki versi antarmuka yang lebih rendah sehingga sebagian fungsinya mungkin tidak berfungsi dengan baik."
|
||||
},
|
||||
{
|
||||
"key": "OKR 管理",
|
||||
"zh": "",
|
||||
"zh-CHT": "OKR 管理",
|
||||
"en": "OKR management",
|
||||
"ko": "Okr 매니지먼트",
|
||||
"ja": "OKRマネジメントです",
|
||||
"de": "Das ist OKR.",
|
||||
"fr": "Gestion des OKR",
|
||||
"id": "OKR manajemen"
|
||||
},
|
||||
{
|
||||
"key": "OKR 结果",
|
||||
"zh": "",
|
||||
"zh-CHT": "OKR 結果",
|
||||
"en": "OKR result",
|
||||
"ko": "Okr 결과",
|
||||
"ja": "OKRの結果です",
|
||||
"de": "OKR bringt das ergebnis.",
|
||||
"fr": "Résultats pour OKR",
|
||||
"id": "Hasil OKR"
|
||||
},
|
||||
{
|
||||
"key": "OKR 结果分析",
|
||||
"zh": "",
|
||||
"zh-CHT": "OKR 結果分析",
|
||||
"en": "Analysis of OKR results",
|
||||
"ko": "Okr 결과 분석",
|
||||
"ja": "OKR結果分析です",
|
||||
"de": "Wenn die ergebnisse umgekehrt sind",
|
||||
"fr": "Analyse des résultats OKR",
|
||||
"id": "Analisis hasil OKR"
|
||||
},
|
||||
{
|
||||
"key": "AI 机器人",
|
||||
"zh": "",
|
||||
"zh-CHT": "AI 機器人",
|
||||
"en": "AI robot",
|
||||
"ko": "Ai 로봇",
|
||||
"ja": "AIロボットです",
|
||||
"de": "AI roboter",
|
||||
"fr": "Le robot AI",
|
||||
"id": "Robot al"
|
||||
},
|
||||
{
|
||||
"key": "LDAP 设置",
|
||||
"zh": "",
|
||||
"zh-CHT": "LDAP 設置",
|
||||
"en": "LDAP Settings",
|
||||
"ko": "Ldap 설정",
|
||||
"ja": "LDAP設定です",
|
||||
"de": "Das ist eine ldap-einstellung",
|
||||
"fr": "Paramètres de LDAP",
|
||||
"id": "Pengaturan LDAP"
|
||||
},
|
||||
{
|
||||
"key": "APP 推送",
|
||||
"zh": "",
|
||||
"zh-CHT": "APP 推送",
|
||||
"en": "APP push",
|
||||
"ko": "App 푸시",
|
||||
"ja": "プッシュアプリです",
|
||||
"de": "Die APP.",
|
||||
"fr": "Push par APP",
|
||||
"id": "Aplikasi push"
|
||||
},
|
||||
{
|
||||
"key": "置顶会话无法隐藏",
|
||||
"zh": "",
|
||||
"zh-CHT": "置頂會話無法隱藏",
|
||||
"en": "Top session cannot be hidden",
|
||||
"ko": "머리 위 세션을 숨길 수 없습니다",
|
||||
"ja": "トップダウンの会話は隠せません",
|
||||
"de": "Selbstbedeckung lässt sich nicht verbergen",
|
||||
"fr": "La session de toit ne peut pas être cachée",
|
||||
"id": "Memuat sesi tertutup tak bisa disembunyikan"
|
||||
},
|
||||
{
|
||||
"key": "不显示该会话",
|
||||
"zh": "",
|
||||
"zh-CHT": "不顯示該會話",
|
||||
"en": "The session is not displayed",
|
||||
"ko": "이 세션을 보여주지 않습니다",
|
||||
"ja": "当該セッションは表示されません。",
|
||||
"de": "Die sitzung wird nicht angezeigt",
|
||||
"fr": "Ne pas afficher cette session",
|
||||
"id": "Sesi ini tidak ditampilkan"
|
||||
},
|
||||
{
|
||||
"key": "昨天",
|
||||
"zh": "",
|
||||
"zh-CHT": "昨天",
|
||||
"en": "Yesterday",
|
||||
"ko": "어제",
|
||||
"ja": "昨日です",
|
||||
"de": "Yesterday",
|
||||
"fr": "Yesterday",
|
||||
"id": "Yesterday"
|
||||
},
|
||||
{
|
||||
"key": "文件已存在",
|
||||
"zh": "",
|
||||
"zh-CHT": "文件已存在",
|
||||
"en": "File already exists",
|
||||
"ko": "파일이 이미 존재합니다",
|
||||
"ja": "ファイルは存在します",
|
||||
"de": "Die datei existiert.",
|
||||
"fr": "Le fichier existe déjà",
|
||||
"id": "File telah ada"
|
||||
},
|
||||
{
|
||||
"key": "文件(*)已存在,是否替换?",
|
||||
"zh": "",
|
||||
"zh-CHT": "文件(*)已存在,是否替換?",
|
||||
"en": "File (*) already exists. Do you want to replace it?",
|
||||
"ko": "파일 (*)이 이미 존재합니다. 바꾸시겠습니까?",
|
||||
"ja": "ファイル(*)が存在しますが、差し替えますか?",
|
||||
"de": "Die datei * existiert bereits. Wird sie ersetzt?",
|
||||
"fr": "Le fichier (*) existe déjà, est-il remplacé?",
|
||||
"id": "Berkas (*) telah ada, apakah diganti?"
|
||||
},
|
||||
{
|
||||
"key": "保留两者",
|
||||
"zh": "",
|
||||
"zh-CHT": "保留兩者",
|
||||
"en": "Retain both",
|
||||
"ko": "둘다 보류하다",
|
||||
"ja": "両方を留保します",
|
||||
"de": "Er bewahrt beide.",
|
||||
"fr": "Conserver les deux",
|
||||
"id": "Simpan keduanya"
|
||||
},
|
||||
{
|
||||
"key": "替换",
|
||||
"zh": "",
|
||||
"zh-CHT": "替換",
|
||||
"en": "Replace",
|
||||
"ko": "교체",
|
||||
"ja": "置き換えます",
|
||||
"de": "Ersetzung",
|
||||
"fr": "Remplacer",
|
||||
"id": "Pengganti"
|
||||
},
|
||||
{
|
||||
"key": "端到端加密",
|
||||
"zh": "",
|
||||
"zh-CHT": "端到端加密",
|
||||
"en": "End-to-end encryption",
|
||||
"ko": "종간 암호화",
|
||||
"ja": "エンドツーエンド暗号化です",
|
||||
"de": "Ende an ende verschlüsselt",
|
||||
"fr": "Chiffrement de bout en bout",
|
||||
"id": "End-to-end enkripsi"
|
||||
},
|
||||
{
|
||||
"key": "关闭端到端加密传输数据。",
|
||||
"zh": "",
|
||||
"zh-CHT": "關閉端到端加密傳輸數據。",
|
||||
"en": "Disable end-to-end encryption for data transmission.",
|
||||
"ko": "엔드 투 엔드 암호화된 전송 데이터",
|
||||
"ja": "エンド・ツー・エンドでのデータの暗号化を停止します。",
|
||||
"de": "Daten Von einem ende zum anderen verschlüsselt.",
|
||||
"fr": "Désactivez le transfert crypté de bout en bout des données.",
|
||||
"id": "Tutup end to end transmisi data dienkripsi."
|
||||
},
|
||||
{
|
||||
"key": "等(*)个文件",
|
||||
"zh": "",
|
||||
"zh-CHT": "等(*)個文件",
|
||||
"en": "Wait for (*) files",
|
||||
"ko": "등 (*) 개 문건을 제출하였다",
|
||||
"ja": "(*)のファイルです。",
|
||||
"de": "Etc. (*) ein dokument",
|
||||
"fr": "Etc. (*) fichiers",
|
||||
"id": "Tunggu (*) berkas"
|
||||
},
|
||||
{
|
||||
"key": "你确定要删除【(*)】等2个文件吗?",
|
||||
"zh": "",
|
||||
"zh-CHT": "你確定要刪除【(*)】等2個文件嗎?",
|
||||
"en": "Are you sure you want to delete [(*)] etc. 2 files?",
|
||||
"ko": "[(*)] 등 2개의 파일을 삭제하시겠습니까?",
|
||||
"ja": "【(*)】などの2つのファイルを削除しますか?",
|
||||
"de": "Sollen wirklich zwei dateien gelöscht werden? (*)",
|
||||
"fr": "Êtes-vous sûr de vouloir supprimer 2 fichiers comme [(*)]?",
|
||||
"id": "Apakah anda yakin ingin menghapus ((*) dan menunggu 2 file?"
|
||||
},
|
||||
{
|
||||
"key": "审批详情",
|
||||
"zh": "",
|
||||
"zh-CHT": "審批詳情",
|
||||
"en": "Approval details",
|
||||
"ko": "심사 정보",
|
||||
"ja": "承認の詳細です",
|
||||
"de": "Lektion 4 prüfung",
|
||||
"fr": "Détails des approbations",
|
||||
"id": "Detail persetujuan"
|
||||
},
|
||||
{
|
||||
"key": "天前",
|
||||
"zh": "",
|
||||
"zh-CHT": "天前",
|
||||
"en": "Days ago",
|
||||
"ko": "일 전",
|
||||
"ja": "先日です",
|
||||
"de": "Äh vortag.",
|
||||
"fr": "Jours",
|
||||
"id": "Hari yang lalu"
|
||||
},
|
||||
{
|
||||
"key": "月前",
|
||||
"zh": "",
|
||||
"zh-CHT": "月前",
|
||||
"en": "Month before",
|
||||
"ko": "1 개월 전에",
|
||||
"ja": "月の前です",
|
||||
"de": "Vor dem monat.",
|
||||
"fr": "Il y a",
|
||||
"id": "Bulan lalu"
|
||||
},
|
||||
{
|
||||
"key": "请输入用户名",
|
||||
"zh": "",
|
||||
"zh-CHT": "請輸入用戶名",
|
||||
"en": "Please enter your username",
|
||||
"ko": "사용자 이름을 입력하십시오",
|
||||
"ja": "ユーザー名の入力をお願いします",
|
||||
"de": "Bitte geben sie einen benutzernamen ein",
|
||||
"fr": "Veuillez entrer votre nom d’utilisateur",
|
||||
"id": "Nama pengguna, silakan"
|
||||
},
|
||||
{
|
||||
"key": "是否拨打电话给(*)?",
|
||||
"zh": "",
|
||||
"zh-CHT": "是否撥打電話給(*)?",
|
||||
"en": "Do you call (*)?",
|
||||
"ko": "(*)에게 전화를 걸어야 합니까?",
|
||||
"ja": "(*)に電話しますか?",
|
||||
"de": "Soll ich anrufen (*)?",
|
||||
"fr": "Est-ce que vous appelez à (*)?",
|
||||
"id": "Apakah ada panggilan untuk (*)?"
|
||||
},
|
||||
{
|
||||
"key": "MD 格式发送",
|
||||
"zh": "",
|
||||
"zh-CHT": "MD 格式發送",
|
||||
"en": "Send in MD format",
|
||||
"ko": "Md 포맷 전송",
|
||||
"ja": "MDフォーマットでお送りします。",
|
||||
"de": "Molt-format raus. Und zwar jetzt.",
|
||||
"fr": "Envoi au format MD",
|
||||
"id": "MD format kirim"
|
||||
},
|
||||
{
|
||||
"key": "正常发送",
|
||||
"zh": "",
|
||||
"zh-CHT": "正常發送",
|
||||
"en": "Normal transmission",
|
||||
"ko": "정상적으로 보내기",
|
||||
"ja": "正常に送ります",
|
||||
"de": "Sende normal.",
|
||||
"fr": "Envoyer comme normal",
|
||||
"id": "Kirim normal"
|
||||
},
|
||||
{
|
||||
"key": "你确定要取消发送吗?",
|
||||
"zh": "",
|
||||
"zh-CHT": "你確定要取消發送嗎?",
|
||||
"en": "Are you sure you want to cancel?",
|
||||
"ko": "발송을 취소하시겠습니까?",
|
||||
"ja": "送信をキャンセルすることは確実ですか?",
|
||||
"de": "Willst du die lieferung wirklich absagen?",
|
||||
"fr": "Êtes-vous sûr de vouloir annuler l’envoi?",
|
||||
"id": "Apakah anda yakin ingin membatalkan pengiriman?"
|
||||
},
|
||||
{
|
||||
"key": "消息已发送,不可取消",
|
||||
"zh": "",
|
||||
"zh-CHT": "消息已發送,不可取消",
|
||||
"en": "The message has been sent and cannot be cancelled",
|
||||
"ko": "메시지가 전송되었습니다. 취소할 수 없습니다",
|
||||
"ja": "メッセージは送信済みですので,キャンセルは不可です",
|
||||
"de": "Die nachricht wurde gesendet, du darfst sie nicht absagen",
|
||||
"fr": "Message envoyé et non annulable",
|
||||
"id": "Pesan terkirim dan tidak dapat dibatalkan"
|
||||
},
|
||||
{
|
||||
"key": "取消发送失败",
|
||||
"zh": "",
|
||||
"zh-CHT": "取消發送失敗",
|
||||
"en": "Unsend failed",
|
||||
"ko": "보내기 취소 실패",
|
||||
"ja": "送信キャンセルに失敗しました",
|
||||
"de": "Sagen sie das ab.",
|
||||
"fr": "Annuler l’envoi a échoué",
|
||||
"id": "Batal kirim"
|
||||
},
|
||||
{
|
||||
"key": "注册失败",
|
||||
"zh": "",
|
||||
"zh-CHT": "註冊失敗",
|
||||
"en": "Registration failure",
|
||||
"ko": "등록 실패",
|
||||
"ja": "登録に失敗しました",
|
||||
"de": "Antrag abgelehnt.",
|
||||
"fr": "L’inscription a échoué",
|
||||
"id": "Gagal mendaftar"
|
||||
},
|
||||
{
|
||||
"key": "请填写基本配置",
|
||||
"zh": "",
|
||||
"zh-CHT": "請填寫基本配置",
|
||||
"en": "Please fill in the basic configuration",
|
||||
"ko": "기본 사양을 기재해 주세요",
|
||||
"ja": "基本仕様をお願いします。",
|
||||
"de": "Füllen sie die grundeinstellungen aus",
|
||||
"fr": "Veuillez remplir la configuration de base",
|
||||
"id": "Silahkan mengisi konfigurasi dasar"
|
||||
},
|
||||
{
|
||||
"key": "会议已结束",
|
||||
"zh": "",
|
||||
"zh-CHT": "會議已結束",
|
||||
"en": "The meeting is over",
|
||||
"ko": "회의는 이미 끝났다",
|
||||
"ja": "会議は終わりました",
|
||||
"de": "Das Treffen ist vorbei.",
|
||||
"fr": "La conférence est terminée",
|
||||
"id": "Pertemuan selesai."
|
||||
},
|
||||
{
|
||||
"key": "基本配置",
|
||||
"zh": "",
|
||||
"zh-CHT": "基本配置",
|
||||
"en": "Basic configuration",
|
||||
"ko": "기본 설정",
|
||||
"ja": "基本的な仕様です",
|
||||
"de": "Grundausstattung. - grundausstattung.",
|
||||
"fr": "La configuration basique",
|
||||
"id": "Konfigurasi dasar"
|
||||
},
|
||||
{
|
||||
"key": "用于生成会议频道。",
|
||||
"zh": "",
|
||||
"zh-CHT": "用於生成會議頻道。",
|
||||
"en": "Used to generate conference channels.",
|
||||
"ko": "회의 채널을 만드는 데 사용합니다.",
|
||||
"ja": "会議のチャンネルを生成します。",
|
||||
"de": "Damit kriegt ihr konferenzkanäle.",
|
||||
"fr": "Utilisé pour générer le canal de conférence.",
|
||||
"id": "Untuk mendapatkan saluran pertemuan."
|
||||
},
|
||||
{
|
||||
"key": "用于频道管理。",
|
||||
"zh": "",
|
||||
"zh-CHT": "用於頻道管理。",
|
||||
"en": "Used for channel management.",
|
||||
"ko": "채널 관리용.",
|
||||
"ja": "チャンネル管理に使われます。",
|
||||
"de": "Du arbeitest für die nachrichtenverwaltung.",
|
||||
"fr": "Pour la gestion des canaux.",
|
||||
"id": "Untuk manajemen saluran."
|
||||
},
|
||||
{
|
||||
"key": "比如",
|
||||
"zh": "",
|
||||
"zh-CHT": "比如",
|
||||
"en": "For example",
|
||||
"ko": "례를들면",
|
||||
"ja": "たとえばです",
|
||||
"de": "Es gibt drei möglichkeiten.",
|
||||
"fr": "Comme",
|
||||
"id": "Seperti"
|
||||
},
|
||||
{
|
||||
"key": "结束会议室",
|
||||
"zh": "",
|
||||
"zh-CHT": "結束會議室",
|
||||
"en": "End meeting room",
|
||||
"ko": "회의실을 마치다",
|
||||
"ja": "会議室を終了します",
|
||||
"de": "Konferenzraum zu ende.",
|
||||
"fr": "Clôture salle de Réunion",
|
||||
"id": "Ruang pertemuan selesai"
|
||||
}
|
||||
]
|
||||
]
|
||||
15
package.json
15
package.json
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "DooTask",
|
||||
"version": "0.35.10",
|
||||
"version": "0.36.75",
|
||||
"description": "DooTask is task management system.",
|
||||
"scripts": {
|
||||
"start": "./cmd dev",
|
||||
"build": "./cmd prod",
|
||||
"version": "node ./version.js",
|
||||
"version": "node ./bin/version.js",
|
||||
"translate": "./cmd translate"
|
||||
},
|
||||
"author": {
|
||||
@@ -24,6 +24,7 @@
|
||||
"axios": "^0.24.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "^6.7.2",
|
||||
"default-passive-events": "^2.0.0",
|
||||
"dexie": "^3.2.3",
|
||||
"echarts": "^5.2.2",
|
||||
"element-sea": "^2.15.10-7",
|
||||
@@ -41,21 +42,21 @@
|
||||
"markdown-it": "^13.0.1",
|
||||
"markdown-it-link-attributes": "^4.0.1",
|
||||
"moment": "^2.29.1",
|
||||
"node-sass": "^6.0.1",
|
||||
"node-sass": "^9.0.0",
|
||||
"notification-koro1": "^1.1.1",
|
||||
"openpgp_hi": "^5.7.0-1",
|
||||
"photoswipe": "^5.2.8",
|
||||
"postcss": "^8.4.5",
|
||||
"quill": "^1.3.7",
|
||||
"quill-mention-hi": "^3.1.0-4",
|
||||
"quill-hitosea": "^2.0.0-rc.5.1",
|
||||
"quill-mention-hitosea": "^4.0.0-6",
|
||||
"resolve-url-loader": "^4.0.0",
|
||||
"sass": "^1.71.1",
|
||||
"sass-loader": "^12.6.0",
|
||||
"sass-loader": "^14.1.1",
|
||||
"stylus": "^0.59.0",
|
||||
"stylus-loader": "^7.1.0",
|
||||
"tinymce": "^5.10.3",
|
||||
"tui-calendar-hi": "^1.15.1-5",
|
||||
"view-design-hi": "^4.7.0-48",
|
||||
"view-design-hi": "^4.7.0-53",
|
||||
"vite": "^2.9.15",
|
||||
"vite-plugin-file-copy": "^1.0.0",
|
||||
"vite-plugin-require": "^1.1.10",
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user