|
@@ -10,6 +10,17 @@ class ChatController extends Controller {
|
|
|
// this.ctx.socket.emit('message', 'test222222222222');
|
|
|
const params = this.ctx.args[0];
|
|
|
// this.ctx.service.message.sendPeerMessage(params);
|
|
|
+ const params_ = JSON.parse(params);
|
|
|
+ const newdata = { roomid: params_.client, userid: params_.token, isonline: '1' };
|
|
|
+ const url = 'http://127.0.0.1:5555/api/onlive/lookuser/updateonline';
|
|
|
+ await this.ctx.curl(url, {
|
|
|
+ method: 'post',
|
|
|
+ headers: {
|
|
|
+ 'content-type': 'application/json',
|
|
|
+ },
|
|
|
+ dataType: 'json',
|
|
|
+ data: newdata,
|
|
|
+ });
|
|
|
console.log(2, params);
|
|
|
}
|
|
|
|