diff --git a/bin/centeros/auto-check-install-http.sh b/bin/centeros/auto-check-install-http.sh new file mode 100755 index 0000000..53c9c99 --- /dev/null +++ b/bin/centeros/auto-check-install-http.sh @@ -0,0 +1,102 @@ +#!/bin/bash +######################### +# 提供一键部署http服务环境的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### + +# Function to install Node.js 16 +install_node() { + echo "======>Node.js is not installed. Installing Node.js 16..." + curl -sL https://rpm.nodesource.com/setup_16.x | sudo bash - + sudo yum install -y nodejs + echo "======>Node.js 16 installed" +} + +# Function to install pm2 globally +install_pm2() { + echo "======>pm2 is not installed. Installing pm2 globally..." + sudo npm install -g pm2 + echo "======>pm2 installed" +} + +# Function to install lsof +install_lsof() { + echo "======>lsof is not installed. Installing lsof..." + sudo yum install -y lsof + echo "======>lsof installed" +} + +# Wait for a command to become available +wait_for_command() { + command="$1" + while ! command -v $command &> /dev/null; do + sleep 1 + done +} + +# Step 1: Check if sudo is installed and install if not +if ! command -v sudo &> /dev/null; then + echo "======>sudo is not installed. Installing sudo..." + yum install -y sudo +fi + +# Step 2: Check if curl is installed +if ! command -v curl &> /dev/null; then + echo "======>curl is not installed. Installing curl..." + sudo yum install -y curl +fi + +# Step 3: Check if Node.js is installed and install Node.js 16 if not +if ! command -v node &> /dev/null; then + install_node +else + echo "======>Node.js is already installed" +fi + +# Wait for Node.js to be installed +wait_for_command node + +# Step 4: Output Node.js and npm versions +node_version=$(node -v) +npm_version=$(npm -v) +echo "======>Node.js version: $node_version" +echo "======>npm version: $npm_version" + +# Step 5: Check if pm2 is installed and install it globally if not +if ! command -v pm2 &> /dev/null; then + install_pm2 +else + echo "======>pm2 is already installed" +fi + +# Wait for pm2 to be installed +wait_for_command pm2 + +# Step 6: Check if lsof is installed and install if not +if ! command -v lsof &> /dev/null; then + install_lsof +else + echo "======>lsof is already installed" +fi + +# Step 7: Check if ports 9092 and 8444 are occupied +port_9092_in_use=$(sudo lsof -i :9092 | grep LISTEN | wc -l) +port_8444_in_use=$(sudo lsof -i :8444 | grep LISTEN | wc -l) + +if [ "$port_9092_in_use" -gt 0 ] || [ "$port_8444_in_use" -gt 0 ]; then + echo "======>Port 9092 or 8444 is already in use." + exit 1 +fi + +# Step 8: install npm packages +echo "Ready to install npm packages" +cd ../../svr/ +rm package-lock.json +npm install --registry=https://registry.npmmirror.com + +# Step 9: Run start-http.sh script to start the service +echo "Ready to run auto-start-http.sh" +sleep 1 +/bin/bash ./../bin/ubuntu16/auto-start-http.sh \ No newline at end of file diff --git a/bin/centeros/auto-check-install-https.sh b/bin/centeros/auto-check-install-https.sh new file mode 100755 index 0000000..301e20b --- /dev/null +++ b/bin/centeros/auto-check-install-https.sh @@ -0,0 +1,102 @@ +#!/bin/bash +######################### +# 提供一键部署https服务环境的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### + +# Function to install Node.js 16 +install_node() { + echo "======>Node.js is not installed. Installing Node.js 16..." + curl -sL https://rpm.nodesource.com/setup_16.x | sudo bash - + sudo yum install -y nodejs + echo "======>Node.js 16 installed" +} + +# Function to install pm2 globally +install_pm2() { + echo "======>pm2 is not installed. Installing pm2 globally..." + sudo npm install -g pm2 + echo "======>pm2 installed" +} + +# Function to install lsof +install_lsof() { + echo "======>lsof is not installed. Installing lsof..." + sudo yum install -y lsof + echo "======>lsof installed" +} + +# Wait for a command to become available +wait_for_command() { + command="$1" + while ! command -v $command &> /dev/null; do + sleep 1 + done +} + +# Step 1: Check if sudo is installed and install if not +if ! command -v sudo &> /dev/null; then + echo "======>sudo is not installed. Installing sudo..." + yum install -y sudo +fi + +# Step 2: Check if curl is installed +if ! command -v curl &> /dev/null; then + echo "======>curl is not installed. Installing curl..." + sudo yum install -y curl +fi + +# Step 3: Check if Node.js is installed and install Node.js 16 if not +if ! command -v node &> /dev/null; then + install_node +else + echo "======>Node.js is already installed" +fi + +# Wait for Node.js to be installed +wait_for_command node + +# Step 4: Output Node.js and npm versions +node_version=$(node -v) +npm_version=$(npm -v) +echo "======>Node.js version: $node_version" +echo "======>npm version: $npm_version" + +# Step 5: Check if pm2 is installed and install it globally if not +if ! command -v pm2 &> /dev/null; then + install_pm2 +else + echo "======>pm2 is already installed" +fi + +# Wait for pm2 to be installed +wait_for_command pm2 + +# Step 6: Check if lsof is installed and install if not +if ! command -v lsof &> /dev/null; then + install_lsof +else + echo "======>lsof is already installed" +fi + +# Step 7: Check if ports 9092 and 8444 are occupied +port_9092_in_use=$(sudo lsof -i :9092 | grep LISTEN | wc -l) +port_8444_in_use=$(sudo lsof -i :8444 | grep LISTEN | wc -l) + +if [ "$port_9092_in_use" -gt 0 ] || [ "$port_8444_in_use" -gt 0 ]; then + echo "======>Port 9092 or 8444 is already in use." + exit 1 +fi + +# Step 8: install npm packages +echo "Ready to install npm packages" +cd ../../svr/ +rm package-lock.json +npm install --registry=https://registry.npmmirror.com + +# Step 9: Run start-https.sh script to start the service +echo "Ready to run auto-start-https.sh" +sleep 1 +/bin/bash ./../bin/ubuntu16/auto-start-https.sh \ No newline at end of file diff --git a/bin/centeros/auto-start-http.sh b/bin/centeros/auto-start-http.sh new file mode 100755 index 0000000..fb8e055 --- /dev/null +++ b/bin/centeros/auto-start-http.sh @@ -0,0 +1,17 @@ +#!/bin/bash +######################### +# 提供pm2启动管理http服务的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### + +pm2 start npm --name=tl-rtc-file-api -- run http-api + +sleep 1 + +pm2 start npm --name=tl-rtc-file-socket -- run http-socket + +sleep 1 + +npm run build:pro \ No newline at end of file diff --git a/bin/centeros/auto-start-https.sh b/bin/centeros/auto-start-https.sh new file mode 100755 index 0000000..af8f31d --- /dev/null +++ b/bin/centeros/auto-start-https.sh @@ -0,0 +1,17 @@ +#!/bin/bash +######################### +# 提供pm2启动管理https服务的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### + +pm2 start npm --name=tl-rtc-file-api -- run https-api + +sleep 1 + +pm2 start npm --name=tl-rtc-file-socket -- run https-socket + +sleep 1 + +npm run build:pro \ No newline at end of file diff --git a/bin/centeros/auto-stop.sh b/bin/centeros/auto-stop.sh new file mode 100755 index 0000000..02afe3a --- /dev/null +++ b/bin/centeros/auto-stop.sh @@ -0,0 +1,13 @@ +#!/bin/bash +######################### +# 提供pm2删除停止服务的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### + +pm2 del tl-rtc-file-api + +pm2 del tl-rtc-file-socket + +echo "stop and [tl-rtc-file-api] / [tl-rtc-file-socket] pm2 processes ok" \ No newline at end of file diff --git a/bin/centeros/auto-update-project.sh b/bin/centeros/auto-update-project.sh new file mode 100644 index 0000000..c793fc5 --- /dev/null +++ b/bin/centeros/auto-update-project.sh @@ -0,0 +1,36 @@ +#!/bin/bash +######################### +# 提供一键更新项目代码版本的脚本 +# @auther: iamtsm +# @version: v1.0.0 +######################### + +# Check if the current directory is a Git repository +if [ -d .git ]; then + # The current directory is a Git repository, so we can pull the latest changes + echo "Current directory is a Git repository. Pulling latest changes..." + git pull +else + # The current directory is not a Git repository + echo "Current directory is not a Git repository." + + # Check if Git is installed + if ! command -v git &> /dev/null; then + # Git is not installed, so let's try to install it + echo "Git is not installed. Installing Git..." + sudo yum install -y git + fi + + # Initialize a new Git repository and set the remote URL + echo "Initializing a new Git repository and setting remote URL..." + git init + git remote add origin https://github.com/tl-open-source/tl-rtc-file.git + + # Pull the latest changes from the remote repository (use 'master' branch) + git pull origin master + + # Optionally, you can set the default branch to 'master' + git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master +fi + +echo "Done." diff --git a/bin/ubuntu16/auto-check-install-http.sh b/bin/ubuntu16/auto-check-install-http.sh index 914d06b..56549c1 100755 --- a/bin/ubuntu16/auto-check-install-http.sh +++ b/bin/ubuntu16/auto-check-install-http.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供一键部署http服务环境的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### # Function to install Node.js 16 install_node() { diff --git a/bin/ubuntu16/auto-check-install-https.sh b/bin/ubuntu16/auto-check-install-https.sh index d38fe44..7af3968 100755 --- a/bin/ubuntu16/auto-check-install-https.sh +++ b/bin/ubuntu16/auto-check-install-https.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供一键部署https服务环境的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### # Function to install Node.js 16 install_node() { diff --git a/bin/ubuntu16/auto-start-http.sh b/bin/ubuntu16/auto-start-http.sh index 5ac56ad..fb8e055 100755 --- a/bin/ubuntu16/auto-start-http.sh +++ b/bin/ubuntu16/auto-start-http.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供pm2启动管理http服务的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### pm2 start npm --name=tl-rtc-file-api -- run http-api diff --git a/bin/ubuntu16/auto-start-https.sh b/bin/ubuntu16/auto-start-https.sh index 455f9e1..af8f31d 100755 --- a/bin/ubuntu16/auto-start-https.sh +++ b/bin/ubuntu16/auto-start-https.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供pm2启动管理https服务的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### pm2 start npm --name=tl-rtc-file-api -- run https-api diff --git a/bin/ubuntu16/auto-stop.sh b/bin/ubuntu16/auto-stop.sh index 16911f8..02afe3a 100755 --- a/bin/ubuntu16/auto-stop.sh +++ b/bin/ubuntu16/auto-stop.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供pm2删除停止服务的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### pm2 del tl-rtc-file-api diff --git a/bin/ubuntu16/auto-update-project.sh b/bin/ubuntu16/auto-update-project.sh new file mode 100644 index 0000000..a721d78 --- /dev/null +++ b/bin/ubuntu16/auto-update-project.sh @@ -0,0 +1,37 @@ +#!/bin/bash +######################### +# 提供一键更新项目代码版本的脚本 +# @auther: iamtsm +# @version: v1.0.0 +######################### + +# Check if the current directory is a Git repository +if [ -d .git ]; then + # The current directory is a Git repository, so we can pull the latest changes + echo "Current directory is a Git repository. Pulling latest changes..." + git pull +else + # The current directory is not a Git repository + echo "Current directory is not a Git repository." + + # Check if Git is installed + if ! command -v git &> /dev/null; then + # Git is not installed, so let's try to install it + echo "Git is not installed. Installing Git..." + sudo apt-get update + sudo apt-get install -y git # Adjust this for CentOS or other Linux distributions + fi + + # Initialize a new Git repository and set the remote URL + echo "Initializing a new Git repository and setting remote URL..." + git init + git remote add origin https://github.com/tl-open-source/tl-rtc-file.git + + # Pull the latest changes from the remote repository (use 'master' branch) + git pull origin master + + # Optionally, you can set the default branch to 'master' + git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master +fi + +echo "Done." \ No newline at end of file diff --git a/bin/ubuntu18/auto-check-install-http.sh b/bin/ubuntu18/auto-check-install-http.sh index 914d06b..56549c1 100755 --- a/bin/ubuntu18/auto-check-install-http.sh +++ b/bin/ubuntu18/auto-check-install-http.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供一键部署http服务环境的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### # Function to install Node.js 16 install_node() { diff --git a/bin/ubuntu18/auto-check-install-https.sh b/bin/ubuntu18/auto-check-install-https.sh index d38fe44..7af3968 100755 --- a/bin/ubuntu18/auto-check-install-https.sh +++ b/bin/ubuntu18/auto-check-install-https.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供一键部署https服务环境的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### # Function to install Node.js 16 install_node() { diff --git a/bin/ubuntu18/auto-start-http.sh b/bin/ubuntu18/auto-start-http.sh index 5ac56ad..fb8e055 100755 --- a/bin/ubuntu18/auto-start-http.sh +++ b/bin/ubuntu18/auto-start-http.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供pm2启动管理http服务的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### pm2 start npm --name=tl-rtc-file-api -- run http-api diff --git a/bin/ubuntu18/auto-start-https.sh b/bin/ubuntu18/auto-start-https.sh index 455f9e1..af8f31d 100755 --- a/bin/ubuntu18/auto-start-https.sh +++ b/bin/ubuntu18/auto-start-https.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供pm2启动管理https服务的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### pm2 start npm --name=tl-rtc-file-api -- run https-api diff --git a/bin/ubuntu18/auto-stop.sh b/bin/ubuntu18/auto-stop.sh index 16911f8..02afe3a 100755 --- a/bin/ubuntu18/auto-stop.sh +++ b/bin/ubuntu18/auto-stop.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供pm2删除停止服务的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### pm2 del tl-rtc-file-api diff --git a/bin/ubuntu18/auto-update-project.sh b/bin/ubuntu18/auto-update-project.sh new file mode 100644 index 0000000..a721d78 --- /dev/null +++ b/bin/ubuntu18/auto-update-project.sh @@ -0,0 +1,37 @@ +#!/bin/bash +######################### +# 提供一键更新项目代码版本的脚本 +# @auther: iamtsm +# @version: v1.0.0 +######################### + +# Check if the current directory is a Git repository +if [ -d .git ]; then + # The current directory is a Git repository, so we can pull the latest changes + echo "Current directory is a Git repository. Pulling latest changes..." + git pull +else + # The current directory is not a Git repository + echo "Current directory is not a Git repository." + + # Check if Git is installed + if ! command -v git &> /dev/null; then + # Git is not installed, so let's try to install it + echo "Git is not installed. Installing Git..." + sudo apt-get update + sudo apt-get install -y git # Adjust this for CentOS or other Linux distributions + fi + + # Initialize a new Git repository and set the remote URL + echo "Initializing a new Git repository and setting remote URL..." + git init + git remote add origin https://github.com/tl-open-source/tl-rtc-file.git + + # Pull the latest changes from the remote repository (use 'master' branch) + git pull origin master + + # Optionally, you can set the default branch to 'master' + git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master +fi + +echo "Done." \ No newline at end of file diff --git a/bin/ubuntu20/auto-check-install-http.sh b/bin/ubuntu20/auto-check-install-http.sh index 914d06b..56549c1 100755 --- a/bin/ubuntu20/auto-check-install-http.sh +++ b/bin/ubuntu20/auto-check-install-http.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供一键部署http服务环境的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### # Function to install Node.js 16 install_node() { diff --git a/bin/ubuntu20/auto-check-install-https.sh b/bin/ubuntu20/auto-check-install-https.sh index d38fe44..7af3968 100755 --- a/bin/ubuntu20/auto-check-install-https.sh +++ b/bin/ubuntu20/auto-check-install-https.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供一键部署https服务环境的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### # Function to install Node.js 16 install_node() { diff --git a/bin/ubuntu20/auto-start-http.sh b/bin/ubuntu20/auto-start-http.sh index 5ac56ad..fb8e055 100755 --- a/bin/ubuntu20/auto-start-http.sh +++ b/bin/ubuntu20/auto-start-http.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供pm2启动管理http服务的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### pm2 start npm --name=tl-rtc-file-api -- run http-api diff --git a/bin/ubuntu20/auto-start-https.sh b/bin/ubuntu20/auto-start-https.sh index 455f9e1..af8f31d 100755 --- a/bin/ubuntu20/auto-start-https.sh +++ b/bin/ubuntu20/auto-start-https.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供pm2启动管理https服务的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### pm2 start npm --name=tl-rtc-file-api -- run https-api diff --git a/bin/ubuntu20/auto-stop.sh b/bin/ubuntu20/auto-stop.sh index 16911f8..02afe3a 100755 --- a/bin/ubuntu20/auto-stop.sh +++ b/bin/ubuntu20/auto-stop.sh @@ -1,4 +1,10 @@ #!/bin/bash +######################### +# 提供pm2删除停止服务的脚本 +# 包含api服务,socket服务 +# @auther: iamtsm +# @version: v1.0.0 +######################### pm2 del tl-rtc-file-api diff --git a/bin/ubuntu20/auto-update-project.sh b/bin/ubuntu20/auto-update-project.sh new file mode 100644 index 0000000..a721d78 --- /dev/null +++ b/bin/ubuntu20/auto-update-project.sh @@ -0,0 +1,37 @@ +#!/bin/bash +######################### +# 提供一键更新项目代码版本的脚本 +# @auther: iamtsm +# @version: v1.0.0 +######################### + +# Check if the current directory is a Git repository +if [ -d .git ]; then + # The current directory is a Git repository, so we can pull the latest changes + echo "Current directory is a Git repository. Pulling latest changes..." + git pull +else + # The current directory is not a Git repository + echo "Current directory is not a Git repository." + + # Check if Git is installed + if ! command -v git &> /dev/null; then + # Git is not installed, so let's try to install it + echo "Git is not installed. Installing Git..." + sudo apt-get update + sudo apt-get install -y git # Adjust this for CentOS or other Linux distributions + fi + + # Initialize a new Git repository and set the remote URL + echo "Initializing a new Git repository and setting remote URL..." + git init + git remote add origin https://github.com/tl-open-source/tl-rtc-file.git + + # Pull the latest changes from the remote repository (use 'master' branch) + git pull origin master + + # Optionally, you can set the default branch to 'master' + git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/master +fi + +echo "Done." \ No newline at end of file diff --git a/client/packages/rtc-web/vite.config.ts b/client/packages/rtc-web/vite.config.ts index 403cfb1..2649935 100644 --- a/client/packages/rtc-web/vite.config.ts +++ b/client/packages/rtc-web/vite.config.ts @@ -16,7 +16,7 @@ const pathResolve = (path: string) => resolve(__dirname, path); // https://vitejs.dev/config/ export default defineConfig({ build: { - outDir: resolve(__dirname, '../../../client_dist/rtc-web'), + outDir: resolve(__dirname, '../../dist/rtc-web'), minify: 'terser', emptyOutDir: true, terserOptions: { diff --git a/doc/FAQ.md b/doc/FAQ.md deleted file mode 100644 index 8257214..0000000 --- a/doc/FAQ.md +++ /dev/null @@ -1,25 +0,0 @@ -# 常见问题 - -## - -``` - -``` - -## - -``` - -``` - -## - -``` - -``` - -## - -``` - -``` \ No newline at end of file diff --git a/svr/conf/cfg.json b/svr/conf/cfg.json index a4afb62..061ddd8 100644 --- a/svr/conf/cfg.json +++ b/svr/conf/cfg.json @@ -1,5 +1,5 @@ { - "version": "10.4.7", + "version": "10.4.8", "socket": { "port": "请到 tlrtcfile.env 中进行配置", "host": "请到 tlrtcfile.env 中进行配置" @@ -13,7 +13,7 @@ "router.js" ] }, - "res": { + "res" : { "/": "res/dist/" } } diff --git a/svr/res/css/index.css b/svr/res/css/index.css index 5cd0d0a..28229f1 100644 --- a/svr/res/css/index.css +++ b/svr/res/css/index.css @@ -1178,6 +1178,29 @@ body { color: #79b0e8; } +.layui-util-face ul li img{ + width: 100%; + margin-top: -2px; +} + +.layui-tl-img{ + width: 100px; +} + +body .layui-util-face .layui-layer-content{ + border-radius: 8px; +} + +.layui-util-face ul{ + width: auto; + border-radius: 8px; +} + +#chating_room_tpl_view img, #chating_room_single_tpl_view img, #chating_comm_tpl_view img{ + width: 30px; +} + + /* 500px以下 */ @media screen and (max-width: 500px) { .tl-rtc-file-send-txt-tool-send{ diff --git a/svr/res/index.html b/svr/res/index.html index ca123b1..2cf126e 100644 --- a/svr/res/index.html +++ b/svr/res/index.html @@ -111,7 +111,7 @@ @@ -141,7 +141,7 @@ - + diff --git a/svr/res/js/index.js b/svr/res/js/index.js index 3b9572e..0dfa766 100644 --- a/svr/res/js/index.js +++ b/svr/res/js/index.js @@ -10,6 +10,8 @@ var file = null; // 是否禁用中继 let useTurn = (window.localStorage.getItem("tl-rtc-file-use-relay") || "") === 'true'; +// 是否是自定义ws地址 +let useCustomWsHost = window.localStorage.getItem("tl-rtc-file-custom-ws-host") || ""; axios.get("/api/comm/initData?turn="+useTurn, {}).then((initData) => { let resData = initData.data; @@ -19,6 +21,9 @@ axios.get("/api/comm/initData?turn="+useTurn, {}).then((initData) => { data: function () { let socket = null; if (io) { + if(useCustomWsHost){ + resData.wsHost = useCustomWsHost; + } socket = io(resData.wsHost,{ transports : ['polling', 'websocket'] }); @@ -31,6 +36,8 @@ axios.get("/api/comm/initData?turn="+useTurn, {}).then((initData) => { socket: socket, // socket config: resData.rtcConfig, // rtc配置 options: resData.options, // rtc配置 + wsHost : resData.wsHost, // ws地址 + useCustomWsHost : useCustomWsHost, // 自定义ws地址 showReceiveFile: false, // 展示底部接收文件列表 showSendFile: false, // 展示底部发送文件列表 @@ -677,7 +684,7 @@ axios.get("/api/comm/initData?turn="+useTurn, {}).then((initData) => { success: function (layero, index) { if (window.layedit) { that.txtEditId = layedit.build('chating_room_single_value', { - tool: ['strong', 'italic', 'underline', 'del', '|', 'left', 'center', 'right'], + tool: ['strong', 'italic', 'underline', 'del', '|', 'left', 'center', 'right', 'face'], height: 120 }); } @@ -1354,6 +1361,14 @@ axios.get("/api/comm/initData?turn="+useTurn, {}).then((initData) => { ${this.lang.webrtc_check} +