diff --git a/README.md b/README.md index 4364c692..fa574d57 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,15 @@ English | **[中文文档](./README_CN.md)** - [Screenshot Preview](README_PREVIEW.md) - [Demo site](http://www.dootask.com/) +**QQ Group** + +Group No.: `546574618` + ## Setup -> `Docker` & `Docker Compose v2.0+` must be installed - +- `Docker` & `Docker Compose v2.0+` must be installed +- System: `Centos/Debian/Ubuntu/macOS` +- Hardware suggestion: 2 cores and above 2G memory ### Deployment project @@ -49,18 +54,28 @@ cd dootask ./cmd start ``` +### Development compilation + +```bash +# Development mode, Mac OS only +./cmd dev + +# Production projects, macOS only +./cmd prod +``` + ### Shortcuts for running command ```bash # You can do this using the following command -./cmd artisan "your command" // To run a artisan command -./cmd php "your command" // To run a php command -./cmd nginx "your command" // To run a nginx command -./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) +./cmd artisan "your command" # To run a artisan command +./cmd php "your command" # To run a php command +./cmd nginx "your command" # To run a nginx command +./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 @@ -98,7 +113,3 @@ git pull # Enter directory and run command ./cmd uninstall ``` - -## Contact us - -QQ Group: 546574618 diff --git a/README_CN.md b/README_CN.md index 271cc4ea..8020c50d 100644 --- a/README_CN.md +++ b/README_CN.md @@ -5,10 +5,15 @@ - [截图预览](README_PREVIEW.md) - [演示站点](http://www.dootask.com/) +**QQ交流群** + +- QQ群号: `546574618` + ## 安装程序 -> 必须安装 `Docker` 和 `Docker Compose v2.0+` - +- 必须安装:`Docker` 和 `Docker Compose v2.0+` +- 支持环境:`Centos/Debian/Ubuntu/macOS` +- 硬件建议:2核2G以上 ### 部署项目 @@ -49,18 +54,29 @@ cd dootask ./cmd start ``` +### 开发编译 + +```bash +# 开发模式,仅限macOS +./cmd dev + +# 编译项目,仅限macOS +./cmd prod +``` + + ### 运行命令的快捷方式 ```bash # 你可以使用以下命令来执行 -./cmd artisan "your command" // 运行 artisan 命令 -./cmd php "your command" // 运行 php 命令 -./cmd nginx "your command" // 运行 nginx 命令 -./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: 还原数据库) +./cmd artisan "your command" # 运行 artisan 命令 +./cmd php "your command" # 运行 php 命令 +./cmd nginx "your command" # 运行 nginx 命令 +./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 @@ -98,7 +114,3 @@ git pull # 进入项目所在目录,运行以下命令 ./cmd uninstall ``` - -## 联系我们 - -QQ群号: 546574618 diff --git a/cmd b/cmd index 2de75cf0..9983257a 100755 --- a/cmd +++ b/cmd @@ -126,11 +126,7 @@ run_exec() { echo -e "${Error} ${RedBG} 没有找到 $container 容器! ${Font}" exit 1 fi - if [ "$container" = "php" ]; then - docker exec -it "$name" /bin/bash -c "$cmd" - else - docker exec -it "$name" /bin/sh -c "$cmd" - fi + docker exec -it "$name" /bin/sh -c "$cmd" } run_mysql() { diff --git a/resources/assets/js/store/state.js b/resources/assets/js/store/state.js index e3c78848..c282da75 100644 --- a/resources/assets/js/store/state.js +++ b/resources/assets/js/store/state.js @@ -45,9 +45,9 @@ const stateData = { // 会员信息 userInfo: $A.getStorageJson("userInfo"), - userId: state.userInfo.userid = $A.runNum(state.userInfo.userid), - userToken: state.userInfo.token, - userIsAdmin: $A.inArray("admin", state.userInfo.identity), + userId: 0, + userToken: '', + userIsAdmin: false, userOnline: {}, // 会话聊天 @@ -113,6 +113,13 @@ const stateData = { themeIsDark: false, }; +// 会员信息 +if (stateData.userInfo.userid) { + stateData.userId = stateData.userInfo.userid = $A.runNum(stateData.userInfo.userid); + stateData.userToken = stateData.userInfo.token; + stateData.userIsAdmin = $A.inArray("admin", stateData.userInfo.identity); +} + // ServerUrl if (stateData.cacheServerUrl) { window.systemInfo.apiUrl = stateData.cacheServerUrl;