Merge branch 'master' of http://114.215.101.231:8099/lizhongqiang/temporaryfood
正在显示
3 个修改的文件
包含
2 行增加
和
7 行删除
@@ -97,9 +97,8 @@ class Notify extends Api | @@ -97,9 +97,8 @@ class Notify extends Api | ||
97 | $buymodel->isUpdate(false)->saveAll($data); | 97 | $buymodel->isUpdate(false)->saveAll($data); |
98 | // 给后台发送新订单提醒 | 98 | // 给后台发送新订单提醒 |
99 | $client = new Client(); | 99 | $client = new Client(); |
100 | - $domain = config('socketio.domain'); | ||
101 | $http_port = config('socketio.http_port'); | 100 | $http_port = config('socketio.http_port'); |
102 | - $client->request('POST', $domain . ":{$http_port}/", [ | 101 | + $client->request('POST', request()->domain() . ":{$http_port}/", [ |
103 | 'form_params' => [ | 102 | 'form_params' => [ |
104 | 'type' => 'publish', | 103 | 'type' => 'publish', |
105 | 'content' => '您有新的订单,请注意查收', | 104 | 'content' => '您有新的订单,请注意查收', |
@@ -367,7 +367,7 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form','/assets | @@ -367,7 +367,7 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form','/assets | ||
367 | $(document).ready(function () { | 367 | $(document).ready(function () { |
368 | var uid=$('.orders').attr('data-uid'); | 368 | var uid=$('.orders').attr('data-uid'); |
369 | // 连接服务端 | 369 | // 连接服务端 |
370 | - var socket = io('http://'+document.domain+':2120'); | 370 | + var socket = io(document.domain+':2120'); |
371 | // 连接后登录 | 371 | // 连接后登录 |
372 | socket.on('connect', function(){ | 372 | socket.on('connect', function(){ |
373 | socket.emit('login', uid); | 373 | socket.emit('login', uid); |
-
请 注册 或 登录 后发表评论