mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 14:01:07 +00:00
移除长链接配置
This commit is contained in:
parent
bc2f270259
commit
f6303ef57e
@ -301,19 +301,6 @@ class SystemConfig extends AuthController
|
||||
@copy($from, $toHome);
|
||||
@copy($from, $toPublic);
|
||||
}
|
||||
if (isset($post['admin_port'])) {
|
||||
$res = include(config_path() . 'workerman.php');
|
||||
$old_admin_port = $res['admin']['port'];
|
||||
$old_channel_port = $res['channel']['port'];
|
||||
$admin_port = substr($post['admin_port'], strrpos($post['admin_port'], ":") + 1);
|
||||
$channel_port = substr($post['channel_port'], strrpos($post['channel_port'], ":") + 1);
|
||||
if ($admin_port == '') $admin_port = 999999;
|
||||
if ($channel_port == '') $channel_port = 999999;
|
||||
$info = file_get_contents(config_path() . 'workerman.php');
|
||||
$info = str_replace($old_admin_port, $admin_port, $info);
|
||||
$info = str_replace($old_channel_port, $channel_port, $info);
|
||||
file_put_contents(config_path() . 'workerman.php', $info);
|
||||
}
|
||||
\crmeb\services\CacheService::clear();
|
||||
return app('json')->success('修改成功');
|
||||
|
||||
|
||||
@ -24,10 +24,10 @@ if (!function_exists('getWorkerManUrl')) {
|
||||
*/
|
||||
function getWorkerManUrl()
|
||||
{
|
||||
$ws = sys_config('wss_open', 0) ? 'wss://' : 'ws://';
|
||||
$data['chat'] = $ws . sys_config('chat_port', '');
|
||||
$data['admin'] = $ws . sys_config('admin_port', '');
|
||||
$data['channel'] = $ws . sys_config('channel_port', '');
|
||||
$ws = $_SERVER['HTTPS'] == 'on' ? 'wss://' : 'ws://';
|
||||
$host = $_SERVER['HTTP_HOST'];
|
||||
$data['admin'] = $ws . $host . '/notice';
|
||||
$data['channel'] = $ws . $host . '/msg';
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
crmeb/public/admin/js/app.9db51be2.js
Normal file
1
crmeb/public/admin/js/app.9db51be2.js
Normal file
File diff suppressed because one or more lines are too long
@ -6816,7 +6816,7 @@ CREATE TABLE IF NOT EXISTS `eb_system_config` (
|
||||
|
||||
INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config_tab_id`, `parameter`, `upload_type`, `required`, `width`, `high`, `value`, `info`, `desc`, `sort`, `status`) VALUES
|
||||
(1, 'site_name', 'text', 'input', 26, '', 0, 'required:true', 100, 0, '\"crmeb\"', '网站名称', '网站名称很多地方会显示的,建议认真填写', 10, 1),
|
||||
(2, 'site_url', 'text', 'input', 26, '', 1, 'required:true,url:true', 100, 0, '\"https:\\/\\/demo.crmeb.com\"', '网站地址', '安装自动配置,不要轻易修改,更换会影响网站访问、接口请求、本地文件储存、支付回调、微信授权、支付、小程序图片访问、部分二维码、官方授权等', 9, 1),
|
||||
(2, 'site_url', 'text', 'input', 26, '', 1, 'required:true,url:true', 100, 0, '\"\"', '网站地址', '安装自动配置,不要轻易修改,更换会影响网站访问、接口请求、本地文件储存、支付回调、微信授权、支付、小程序图片访问、部分二维码、官方授权等', 9, 1),
|
||||
(3, 'site_logo', 'upload', 'input', 26, '', 1, '', 0, 0, '\"https:\\/\\/demo43.wuht.net\\/uploads\\/attach\\/2021\\/09\\/20210923\\/cb68258c4eef9d93edb849c215459b6a.png\"', '后台大LOGO', '菜单展开左上角logo,建议尺寸[170*50]', 7, 1),
|
||||
(4, 'site_phone', 'text', 'input', 1, '', 0, '', 100, 0, '\"\"', '联系电话', '联系电话', 0, 0),
|
||||
(5, 'seo_title', 'text', 'input', 26, '', 0, 'required:true', 100, 0, '\"CRMEB\"', 'SEO标题', 'SEO标题', 0, 0),
|
||||
@ -6897,9 +6897,6 @@ INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config
|
||||
(159, 'extract_time', 'text', 'input', 73, '', 0, '', 100, 0, '\"0\"', '冻结时间', '防止用户退款,佣金被提现了,所以需要设置佣金冻结时间(天)', 0, 1),
|
||||
(160, 'store_brokerage_price', 'text', 'input', 72, '', 0, '', 100, 0, '\"100\"', '满额分销最低金额', '满额分销满足金额开通分销权限', 0, 1),
|
||||
(162, 'price_revision_switch', 'radio', 'input', 20, '0=>关闭\n1=>开启', 0, '', 0, 0, '0', '改价短信提醒开关', '改价短信提醒开关', 0, 1),
|
||||
(164, 'wss_open', 'radio', '', 24, '1=>使用https\n0=>使用http', 0, '', 0, 0, '0', '是否使用https', '如果使用https访问必须开启wss,使用http访问关闭wss,建议使用http访问(关闭wss)兼容性更好', 0, 1),
|
||||
(165, 'wss_local_cert', 'upload', '', 24, '', 3, '', 0, 0, '\"\"', 'ssl证书PEM', 'ssl证书.pem格式', 0, 1),
|
||||
(166, 'wss_local_pk', 'upload', '', 24, '', 3, '', 0, 0, '\"\"', 'ssl密钥KEY', 'ssl密钥.key格式', 0, 1),
|
||||
(168, 'site_logo_square', 'upload', 'input', 26, '', 1, '', 0, 0, '\"https:\\/\\/demo43.wuht.net\\/uploads\\/attach\\/2021\\/09\\/20210923\\/510e07c4b0659ec0f7d5865cc7657d78.png\"', '后台小LOGO', '后台菜单缩进小LOGO,尺寸180*180', 6, 1),
|
||||
(170, 'yue_pay_status', 'radio', '', 30, '1=>开启\n2=>关闭', 0, '', 0, 0, '1', '余额支付状态', '余额支付请选择开启或关闭', 0, 1),
|
||||
(171, 'login_logo', 'upload', 'input', 26, '', 1, '', 0, 0, '\"https:\\/\\/demo43.wuht.net\\/uploads\\/attach\\/2021\\/09\\/20210923\\/c8b6f81eb9400d90581d10a4d7e6ec31.png\"', '后台登录页LOGO', '后台登录页LOGO,建议尺寸270x75', 8, 1),
|
||||
@ -6976,8 +6973,6 @@ INSERT INTO `eb_system_config` (`id`, `menu_name`, `type`, `input_type`, `config
|
||||
(353, 'wechat_app_appid', 'text', 'input', 77, '', 0, '', 100, 0, '\"\"', '公众平台开放应用APPID', '公众平台开放应用APPID', 0, 1),
|
||||
(354, 'wechat_app_appsecret', 'text', 'input', 77, '', 0, '', 100, 0, '\"\"', '微信应用appsecret', '微信应用appsecret', 0, 1),
|
||||
(355, 'statistic_script', 'textarea', 'input', 26, '', 1, '', 100, 10, '\"(function() {\\n_s = document.createElement(\'script\');\\n_s.src=\\\"https:\\/\\/chat.crmeb.net\\/customerServer.js\\\"\\n_s.onload = function(){\\nvar option = {\\n openUrl: \'https:\\/\\/chat.crmeb.net\',\\n token: \'e8bcc017f50e55c63b5352c4257c8904\'\\n };\\n var canCustomerServer = new initCustomerServer(option);\\n canCustomerServer.init();\\n\\n}\\ndocument.head.appendChild(_s)\\n})();\"', '统计代码', '统计代码', 0, 1),
|
||||
(356, 'admin_port', 'text', 'input', 24, '', 1, '', 100, 0, '\"\"', '后台监听域名+端口', '后台监听域名+端口(注:不用填写http)', 10, 1),
|
||||
(358, 'channel_port', 'text', 'input', 24, '', 1, '', 100, 0, '\"\"', '内部通讯监听域名+端口', '内部通讯监听域名+端口(注:不用填写http)', 8, 1),
|
||||
(359, 'weixin_ckeck_file', 'upload', 'input', 2, '', 3, '', 0, 0, '\"\"', '微信校验文件', '微信校验文件', 0, 1),
|
||||
(360, 'thumb_big_width', 'text', 'input', 31, '', 0, '', 100, 0, '\"\"', '缩略大图(单位:px):宽', '缩略大图(单位:px):宽', 99, 1),
|
||||
(361, 'thumb_big_height', 'text', 'input', 31, '', 0, '', 100, 0, '\"\"', '缩略大图(单位:px):高', '缩略大图(单位:px):高', 98, 1),
|
||||
@ -7036,7 +7031,6 @@ INSERT INTO `eb_system_config_tab` (`id`, `pid`, `title`, `eng_title`, `status`,
|
||||
(21, 65, '小票打印配置', 'printing_deploy', 1, 0, 'logo-buffer', 0, 0),
|
||||
(22, 0, '应用端配置', 'appconfig', 1, 0, 'ios-analytics', 0, 80),
|
||||
(23, 0, '支付配置', 'pay_config', 1, 0, 'logo-usd', 0, 70),
|
||||
(24, 1, '长链接端口设置', 'systm_wss', 1, 0, 'md-build', 0, 0),
|
||||
(26, 1, '站点配置', 'web_site', 1, 0, '', 0, 100),
|
||||
(27, 5, '商城基础配置', 'store_base', 1, 0, '', 0, 100),
|
||||
(28, 5, '用户充值配置', 'recharge_site', 1, 0, '', 0, 2),
|
||||
|
||||
@ -14,12 +14,12 @@ import {getWorkermanUrl} from '@/api/kefu'
|
||||
import Vue from 'vue';
|
||||
const vm = new Vue;
|
||||
let wsAdminSocketUrl = getCookies('WS_ADMIN_URL') || ''
|
||||
let wsKefuSocketUrl = getCookies('WS_CHAT_URL') || ''
|
||||
// let wsKefuSocketUrl = getCookies('WS_CHAT_URL') || ''
|
||||
getWorkermanUrl().then(res=>{
|
||||
wsAdminSocketUrl = res.data.admin
|
||||
wsKefuSocketUrl = res.data.chat
|
||||
// wsKefuSocketUrl = res.data.chat
|
||||
setCookies('WS_ADMIN_URL',res.data.admin)
|
||||
setCookies('WS_CHAT_URL',res.data.chat)
|
||||
// setCookies('WS_CHAT_URL',res.data.chat)
|
||||
})
|
||||
class wsSocket {
|
||||
constructor (opt) {
|
||||
@ -124,7 +124,7 @@ function createSocket(key) {
|
||||
|
||||
|
||||
export const adminSocket = createSocket(1);
|
||||
export const Socket = createSocket(2);
|
||||
// export const Socket = createSocket(2);
|
||||
//
|
||||
// class Socket {
|
||||
// constructor () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user