删除 YouleNexus 内嵌 .git,统一由根仓库唯一管理。提交: - projects/ 旧 H5 模板 Game_Surface_3 与各子游戏源码 - cocoscreator_projects/YouleNexus 工程 + cocos-creator-mcp 扩展源码 - CLAUDE.md、.mcp.json 等配置 library/temp/node_modules/dist 等缓存由 .gitignore 排除。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
95 lines
2.2 KiB
JavaScript
95 lines
2.2 KiB
JavaScript
var eqw_Net=eqw_Net||{};
|
|
|
|
eqw_Net.App="youle";
|
|
eqw_Net.Route="erqiwang";
|
|
eqw_Net.RpcList={};
|
|
eqw_Net.RpcList.fapai="fapai";
|
|
eqw_Net.RpcList.jiaofen="jiaofen";
|
|
eqw_Net.RpcList.shangzhuang="shangzhuang";
|
|
eqw_Net.RpcList.get_player_grade2 = "get_player_grade2";
|
|
eqw_Net.RpcList.xuanzhu="xuanzhu";
|
|
eqw_Net.RpcList.touxiang="touxiang";
|
|
eqw_Net.RpcList.maipai="maipai";
|
|
eqw_Net.RpcList.chupai="chupai";
|
|
eqw_Net.RpcList.chupai1="chupai1";
|
|
eqw_Net.RpcList.chupai2="chupai2";
|
|
eqw_Net.RpcList.chupai3="chupai3";
|
|
eqw_Net.RpcList.jiesuan="jiesuan";
|
|
eqw_Net.RpcList.zhunbei="zhunbei";
|
|
|
|
eqw_Net._SendData=function(_app,_route,_rpc,_data){
|
|
var _msg={};
|
|
_msg.data={};
|
|
_msg.app=_app;
|
|
_msg.route=_route;
|
|
_msg.rpc=_rpc;
|
|
_msg.data=_data;
|
|
console.log("二七王发送数据:"+JSON.stringify(_msg));
|
|
try{
|
|
Net.ws_tcp.send(JSON.stringify(_msg));
|
|
}catch(e){
|
|
alert(e);
|
|
//alert(e.lineNumber);
|
|
alert(e.message);
|
|
}
|
|
}
|
|
|
|
eqw_Net.ReceiveData=function(_msg){
|
|
// console.log("二七王收到数据:"+JSON.stringify(_msg));
|
|
if(min_ExitsFunction(eqw_Desk[_msg.rpc])){
|
|
//eqw_Net[_msg.rpc](_msg);
|
|
eqw_Desk[_msg.rpc](_msg);
|
|
}
|
|
}
|
|
//发牌
|
|
eqw_Net.Send_fapai=function(_data){
|
|
this._SendData(this.App,this.Route,this.RpcList.fapai,_data);
|
|
}
|
|
//叫分
|
|
eqw_Net.Send_jiaofen=function(_data){
|
|
this._SendData(this.App,this.Route,this.RpcList.jiaofen,_data);
|
|
}
|
|
//上庄
|
|
eqw_Net.Send_shangzhuang=function(_data){
|
|
this._SendData(this.App,this.Route,this.RpcList.shangzhuang,_data);
|
|
}
|
|
//选主
|
|
eqw_Net.Send_xuanzhu=function(_data){
|
|
this._SendData(this.App,this.Route,this.RpcList.xuanzhu,_data);
|
|
}
|
|
//埋牌
|
|
eqw_Net.Send_maipai=function(_data){
|
|
this._SendData(this.App,this.Route,this.RpcList.maipai,_data);
|
|
}
|
|
//出牌1
|
|
eqw_Net.Send_chupai=function(_data){
|
|
this._SendData(this.App,this.Route,this.RpcList.chupai,_data);
|
|
}
|
|
//准备
|
|
eqw_Net.Send_zhunbei=function(_data){
|
|
this._SendData(this.App,this.Route,this.RpcList.zhunbei,_data);
|
|
}
|
|
//准备
|
|
eqw_Net.Send_get_player_grade2=function(_data){
|
|
this._SendData(this.App,this.Route,this.RpcList.get_player_grade2,_data);
|
|
}
|
|
//投降
|
|
eqw_Net.Send_touxiang=function(_data){
|
|
Utl.startLoad();
|
|
this._SendData(this.App,this.Route,this.RpcList.touxiang,_data);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|