瀏覽代碼

网络模块

甘艺伟 1 周之前
父節點
當前提交
722ba63cfe
共有 51 個文件被更改,包括 1020 次插入94 次删除
  1. 13 0
      assets/bundle/Icons.meta
  2. 3 1
      assets/script/common/xlsConfig.ts
  3. 5 2
      assets/script/data/GameDataCenter.ts
  4. 1 1
      assets/script/data/model/Account/AccountModel.ts
  5. 8 8
      assets/script/data/model/AdVideoModel.ts
  6. 1 1
      assets/script/data/model/ChatModel.ts
  7. 1 1
      assets/script/data/model/DialogModel.ts
  8. 1 1
      assets/script/data/model/GuideModel.ts
  9. 1 1
      assets/script/data/model/LoadingModel.ts
  10. 13 0
      assets/script/data/model/Login.meta
  11. 41 26
      assets/script/data/model/Login/LoginModel.ts
  12. 1 1
      assets/script/data/model/Login/LoginModel.ts.meta
  13. 19 0
      assets/script/data/model/Login/LoginModelData.ts
  14. 10 0
      assets/script/data/model/Login/LoginModelData.ts.meta
  15. 1 1
      assets/script/data/model/PlatformModel.ts
  16. 1 1
      assets/script/data/model/RedDotModel.ts
  17. 6 6
      assets/script/data/model/System/AudioModel.ts
  18. 2 2
      assets/script/data/model/System/SettingModel.ts
  19. 1 1
      assets/script/data/model/System/SystemModel.ts
  20. 2 2
      assets/script/data/model/TaskModel.ts
  21. 1 1
      assets/script/data/model/TimeModel.ts
  22. 1 1
      assets/script/data/model/UserModel.ts
  23. 1 1
      assets/script/data/model/WindowModel.ts
  24. 13 0
      assets/script/frameWork/model.meta
  25. 4 5
      assets/script/frameWork/model/IDataModel.ts
  26. 1 1
      assets/script/frameWork/model/IDataModel.ts.meta
  27. 6 6
      assets/script/logic/fgui/Home/Home/HomeCtrl.ts
  28. 1 1
      assets/script/logic/ui/UIHelp.ts
  29. 1 1
      assets/script/logic/ui/scene/UILoading.ts
  30. 1 1
      assets/script/network/GameServerConfig.ts
  31. 13 0
      assets/script/network/TsrpcNet.ts
  32. 3 2
      assets/script/plat/PlatformBase.ts
  33. 3 2
      assets/script/server/GameServerModel.ts
  34. 29 0
      assets/script/server/LoginServerModel.ts
  35. 10 0
      assets/script/server/LoginServerModel.ts.meta
  36. 13 0
      assets/script/shared/admin.meta
  37. 20 0
      assets/script/shared/admin/PtldeleteQuFu.ts
  38. 10 0
      assets/script/shared/admin/PtldeleteQuFu.ts.meta
  39. 21 0
      assets/script/shared/admin/PtlgetNeed.ts
  40. 10 0
      assets/script/shared/admin/PtlgetNeed.ts.meta
  41. 20 0
      assets/script/shared/admin/PtlgetQuFu.ts
  42. 10 0
      assets/script/shared/admin/PtlgetQuFu.ts.meta
  43. 21 0
      assets/script/shared/admin/PtlupdateQuFu.ts
  44. 10 0
      assets/script/shared/admin/PtlupdateQuFu.ts.meta
  45. 1 1
      assets/script/shared/base.ts
  46. 51 0
      assets/script/shared/player/PtlLogin.ts
  47. 10 0
      assets/script/shared/player/PtlLogin.ts.meta
  48. 561 14
      assets/script/shared/serviceProto.ts
  49. 31 0
      assets/script/shared/user/PtlLogin.ts
  50. 10 0
      assets/script/shared/user/PtlLogin.ts.meta
  51. 2 1
      assets/script/shared/user/PtlLookFuser.ts

+ 13 - 0
assets/bundle/Icons.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "3c244ed5-c0fe-4808-aa1c-4961c96b53c1",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 3 - 1
assets/script/common/xlsConfig.ts

@@ -2,6 +2,8 @@ import GameController from "../GameController"
 import { gameMethod } from "./gameMethod"
 // type for audio.excel
 export type xlsAudioInfo = {id:string,name:string,vol:number}
+// type for chapter.excel
+// type for emitter.excel
 // type for guide.excel
 export type xlsGuideInfo = {id:string,event:string,way:string,variable:number[],ytype:number,condition:number[],type:number,pram:any[],pram1:any[]}
 // type for help.excel
@@ -26,9 +28,9 @@ export type xlsPackageInfo = {id:string,group:string,plat:string,wayhttp:string,
 export class XlsConfig {
     xlsAudioInfo: xlsAudioInfo[]
     xlsPackageInfo: xlsPackageInfo[]
-    xlsLanguageSeverHouduan: xlsLanguageSeverHouduan[]
     xlsGuideInfo: xlsGuideInfo[]
     xlsMathInfo: xlsMathInfo[]
+    xlsLanguageSeverHouduan: xlsLanguageSeverHouduan[]
     xlsItemKind: xlsItemKind[]
     xlsItemMoney: xlsItemMoney[]
     xlsLanguageClientText: xlsLanguageClientText[]

+ 5 - 2
assets/script/data/GameDataCenter.ts

@@ -1,11 +1,12 @@
 import { SevBack } from "../common/Xys";
 import { GameServerModel } from "../server/GameServerModel";
+import { LoginServerModel } from "../server/LoginServerModel";
 import AccountModel from "./model/Account/AccountModel";
 import DialogModel from "./model/DialogModel";
 import GuideModel from "./model/GuideModel";
-import IDataModel from "./model/IDataModel";
+import IDataModel from "../frameWork/model/IDataModel";
 import LoadingModel from "./model/LoadingModel";
-import LoginModel from "./model/LoginModel";
+import LoginModel from "./model/Login/LoginModel";
 import PlatformModel from "./model/PlatformModel";
 import RedDotModel from "./model/RedDotModel";
 import { AudioModel } from "./model/System/AudioModel";
@@ -38,6 +39,7 @@ class GameDataCenter {
     task: TaskModel;
     dialog: DialogModel;
     gameServer: GameServerModel;
+    loginServer: LoginServerModel;
     constructor() {
         if (CC_PREVIEW) window["gdc"] = this;
     }
@@ -66,6 +68,7 @@ class GameDataCenter {
         this.window = this.newModel(WindowModel)
         this.loading = this.newModel(LoadingModel)
         this.time = this.newModel(TimeModel)
+        this.loginServer = this.newModel(LoginServerModel);
 
         this.initLoadRspModel()
     }

+ 1 - 1
assets/script/data/model/Account/AccountModel.ts

@@ -1,4 +1,4 @@
-import IDataModel from "../IDataModel";
+import IDataModel from "../../../frameWork/model/IDataModel";
 import UIHelp from "../../../logic/ui/UIHelp";
 import EventMng from "../../../manager/EventMng";
 import { GameEvent } from "../../const/EventConst";

+ 8 - 8
assets/script/data/model/AdVideoModel.ts

@@ -10,11 +10,11 @@ import HttpRequest from "../../network/HttpRequest";
 import ThinkingDataMgr from "../../utils/ThinkingDataMgr";
 import { AD_VIDEO_STRING, HdBanBenFuLiCard, HdPriCardKey, PlatformType } from "../const/TypeConst";
 import GameDataCenter from "../GameDataCenter";
-import IDataModel from "./IDataModel";
+import IDataModel from "../../frameWork/model/IDataModel";
 
 export default class AdVideoModel extends IDataModel {
     // private curAd: Kind11XiadanPram
-    private seeSuccCallback: (isSucc: boolean,sevBack?:SevBack) => void
+    private seeSuccCallback: (isSucc: boolean, sevBack?: SevBack) => void
     private adOrderId: string
 
     // 是否开启广告功能
@@ -23,7 +23,7 @@ export default class AdVideoModel extends IDataModel {
         super('adVideo');
     }
     doSevback(result: SevBack): void {
-        
+
     }
     setAdOpen() {
         // 无配置,走正常开启广告入口
@@ -39,8 +39,8 @@ export default class AdVideoModel extends IDataModel {
      * @param dc 档次ID
      * @param callback 看完广告的回调
      */
-    sendSeeVideo(kid: string, order11Id: string, adkey: string, callback: (isSucc: boolean,sevBack?:SevBack) => void = () => {}) {
-        
+    sendSeeVideo(kid: string, order11Id: string, adkey: string, callback: (isSucc: boolean, sevBack?: SevBack) => void = () => { }) {
+
         this.seeSuccCallback = callback
 
         // 开始看广告
@@ -76,15 +76,15 @@ export default class AdVideoModel extends IDataModel {
         // 通知一下
         this.send(Kind11Success.url, param, (result: SevBack) => {
             if (result.type == 1) {
-                this.seeSuccCallback(true,result);
+                this.seeSuccCallback(true, result);
             }
         })
     }
-    
+
     // 淘宝 下单成功通知看广告
     onTaoBaoXiadanSucc() {
         let param: TaobaoKind11RwdPram = {
-            
+
         }
         // 通知一下
         this.send(TaobaoKind11Rwd.url, param, (result: SevBack) => {

+ 1 - 1
assets/script/data/model/ChatModel.ts

@@ -9,7 +9,7 @@ import GameMath from "../../utils/GameMath";
 import { ChatEvent } from "../const/EventConst";
 import { OpenType, RedUtilType, TeamChallengeType } from "../const/TypeConst";
 import GameDataCenter from "../GameDataCenter";
-import IDataModel from "./IDataModel";
+import IDataModel from "../../frameWork/model/IDataModel";
 
 export default class ChatModel extends IDataModel {
 	// chatCd: number = 0 // 下一次可聊天的时间戳

+ 1 - 1
assets/script/data/model/DialogModel.ts

@@ -2,7 +2,7 @@
 import { SevBack } from "../../common/Xys";
 import { DayTipsKey } from "../const/TypeConst";
 import GameDataCenter from "../GameDataCenter";
-import IDataModel from "./IDataModel"
+import IDataModel from "../../frameWork/model/IDataModel"
 
 export default class DialogModel extends IDataModel {
     constructor() {

+ 1 - 1
assets/script/data/model/GuideModel.ts

@@ -1,7 +1,7 @@
 import { default as Gamecfg, default as gameCfg } from "../../common/gameCfg";
 import { GuideDoGuide, GuideDoGuidePram, GuideSkipGuides, GuideSkipGuidesPram } from "../../common/Xyc";
 import GameDataCenter from "../GameDataCenter";
-import IDataModel from "./IDataModel";
+import IDataModel from "../../frameWork/model/IDataModel";
 import { SevBack } from "../../common/Xys";
 import { gameMethod } from "../../common/gameMethod";
 import EventMng from "../../manager/EventMng";

+ 1 - 1
assets/script/data/model/LoadingModel.ts

@@ -4,7 +4,7 @@ import EventMng from "../../manager/EventMng";
 import AssetsBundleMgr from "../../utils/AssetsBundleMgr";
 import { LoadEvent } from "../const/EventConst";
 import { InGame } from "../const/TypeConst";
-import IDataModel from "./IDataModel";
+import IDataModel from "../../frameWork/model/IDataModel";
 import ResSprite from "../../frameWork/compment/ResSprite";
 import FguiLoadMgr from "../../frameWork/fgui/FguiLoadMgr";
 import { RedUtil } from "../../frameWork/fgui/RedUtil";

+ 13 - 0
assets/script/data/model/Login.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "c161220e-653b-4cb0-a137-6d482d7cd21f",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 41 - 26
assets/script/data/model/LoginModel.ts → assets/script/data/model/Login/LoginModel.ts

@@ -1,19 +1,21 @@
-import Gamecfg from "../../common/gameCfg";
-import { gameMethod } from "../../common/gameMethod";
-import { MailRwdAll, PlayerLoginPlayer, PlayerLoginPlayerPram, PlayerLoginUser, PlayerLoginUserPram } from "../../common/Xyc";
-import { SevBack } from "../../common/Xys";
-import Config from "../../Config";
-import { RedUtil } from "../../frameWork/fgui/RedUtil";
-import GameController from "../../GameController";
-import EventMng from "../../manager/EventMng";
-import ThinkingDataMgr from "../../utils/ThinkingDataMgr";
-import { GameEvent, LoadEvent } from "../const/EventConst";
-import { DayTipsKey, GameErrCode, PlatformType, ReportRoleType } from "../const/TypeConst";
-import GameDataCenter from "../GameDataCenter";
-import IDataModel from "./IDataModel";
+import Gamecfg from "../../../common/gameCfg";
+import { gameMethod } from "../../../common/gameMethod";
+import { MailRwdAll, PlayerLoginPlayer, PlayerLoginPlayerPram, PlayerLoginUser, PlayerLoginUserPram } from "../../../common/Xyc";
+import { SevBack } from "../../../common/Xys";
+import Config from "../../../Config";
+import GameController from "../../../GameController";
+import EventMng from "../../../manager/EventMng";
+import { ReqLogin } from "../../../shared/player/PtlLogin";
+import { ResLogin } from "../../../shared/user/PtlLogin";
+import ThinkingDataMgr from "../../../utils/ThinkingDataMgr";
+import { GameEvent, LoadEvent } from "../../const/EventConst";
+import { DayTipsKey, GameErrCode, PlatformType, ReportRoleType } from "../../const/TypeConst";
+import GameDataCenter from "../../GameDataCenter";
+import IDataModel from "../../../frameWork/model/IDataModel";
+import { LoginModelData } from "./LoginModelData";
 
 
-export default class LoginModel extends IDataModel {
+export default class LoginModel extends LoginModelData {
     KEY_ACCOUNT = 'login';
     KEY_POLICY = 'policy_agree';
     KEY_LAST_LOGIN_TIME = 'KEY_LAST_LOGIN_TIME';
@@ -50,23 +52,36 @@ export default class LoginModel extends IDataModel {
         return this.Query(this.KEY_ACCOUNT, '');
     }
     // 账号登录
-    sendLoginGame(param: PlayerLoginPlayerPram) {
-        this.sendLogin(PlayerLoginPlayer.url, param, (result: SevBack) => {
-            if (result.type == 1) {
-                EventMng.emit(GameEvent.LOGIN_ACCOUNT_SUCC);
-            } else {
-                if (gameMethod.isEmpty(result.win) || gameMethod.isEmpty(result.win.msgOut)) {
-                    GameDataCenter.plat.showErrDialog(GameErrCode.errGameLoginPlayer)
-                    EventMng.emit(GameEvent.LOGIN_ACCOUNT_FAIL);
+    async sendLoginGame(param: ReqLogin) {
+        let ret = await GameDataCenter.loginServer.ReqApi("player/Login", param);
+        if (ret.isSucc) {
+            CC_PREVIEW && console.log("玩家登录成功", ret);
+            for (let key in ret.res) {
+                if (typeof this[key] != "undefined") {
+                    console.error("未定义字段!", key);
+                } else {
+                    this[key] = ret.res[key]
                 }
             }
-        })
+            EventMng.emit(GameEvent.LOGIN_ACCOUNT_SUCC);
+        } else {
+            if (gameMethod.isEmpty(ret.err) || gameMethod.isEmpty(ret.err.message)) {
+                GameDataCenter.plat.showErrDialog(GameErrCode.errGameLoginPlayer)
+                EventMng.emit(GameEvent.LOGIN_ACCOUNT_FAIL);
+            }
+        }
     }
     // 点击进入游戏按钮,并进入游戏
-    sendEnterGame(sid: string) {
-        // if (gameMethod.isEmpty(sid)) {
-        //     sid = GameDataCenter.sevBack.playerInfo.sid
+    async sendEnterGame(sid: string) {
+        // let ret = await GameDataCenter.loginServer.ReqApi("user/Login", {
+        //     uid: GameDataCenter.sevBack.playerInfo.uid,
+        //     sid: sid,
+        //     token: GameDataCenter.sevBack.playerInfo.token
+        // });
+        // if (ret.isSucc) {
+
         // }
+
         let param: PlayerLoginUserPram = {
             uid: GameDataCenter.sevBack.playerInfo.uid,
             sid: sid,

+ 1 - 1
assets/script/data/model/LoginModel.ts.meta → assets/script/data/model/Login/LoginModel.ts.meta

@@ -1,6 +1,6 @@
 {
   "ver": "1.1.0",
-  "uuid": "58f595c5-f78b-4946-bdf4-ddc529cd1c63",
+  "uuid": "f4d5bf4d-762e-4e87-94ad-3810506b3228",
   "importer": "typescript",
   "isPlugin": false,
   "loadPluginInWeb": true,

+ 19 - 0
assets/script/data/model/Login/LoginModelData.ts

@@ -0,0 +1,19 @@
+
+import { qufuInfo, ResLoginList } from "../../../shared/player/PtlLogin";
+import IDataModel from "../../../frameWork/model/IDataModel";
+
+
+/**
+ * 定义 Model 的数据
+ */
+export class LoginModelData extends IDataModel {
+    uid: string; //uid
+    sid: string; //最后一次登陆区服
+    list: { [sid: string]: ResLoginList }; //每个区最多一个角色
+    token: string; //账号登陆验证码
+    //区服列表
+    qufuList: {
+        [sid: string]: qufuInfo
+    }
+    wsUrl: string //ws地址
+}

+ 10 - 0
assets/script/data/model/Login/LoginModelData.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "8e966855-fe88-4409-8e85-47c99cecae1e",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 1 - 1
assets/script/data/model/PlatformModel.ts

@@ -20,7 +20,7 @@ import { I18n } from "../../utils/I18nUtil";
 import WechatUserBtn from "../../utils/WechatUserBtn";
 import { GameErrCode, InGame, PlatformType, PlatUserInfo } from "../const/TypeConst";
 import GameDataCenter from "../GameDataCenter";
-import IDataModel from "./IDataModel";
+import IDataModel from "../../frameWork/model/IDataModel";
 export default class PlatformModel extends IDataModel {
     instance: PlatformBase
     type: PlatformType

+ 1 - 1
assets/script/data/model/RedDotModel.ts

@@ -4,7 +4,7 @@ import { UserRed, UserRedPram } from "../../common/Xyc";
 import EventMng from "../../manager/EventMng";
 import GameDataCenter from "../GameDataCenter";
 import { GameEvent } from "../const/EventConst";
-import IDataModel from "./IDataModel";
+import IDataModel from "../../frameWork/model/IDataModel";
 import { RedUtil } from "../../frameWork/fgui/RedUtil";
 import { SevBack } from "../../common/Xys";
 

+ 6 - 6
assets/script/data/model/System/AudioModel.ts

@@ -3,7 +3,7 @@ import { gameMethod } from "../../../common/gameMethod"
 import AssetsBundleMgr from "../../../utils/AssetsBundleMgr"
 import { AudioConst } from "../../const/TypeConst"
 import GameDataCenter from "../../GameDataCenter"
-import IDataModel from "../IDataModel"
+import IDataModel from "../../../frameWork/model/IDataModel"
 
 export class AudioModel extends IDataModel {
     bgmID: string
@@ -22,7 +22,7 @@ export class AudioModel extends IDataModel {
         if (id == AudioConst.empty) { return }
         if (!GameDataCenter.setting.setting.musicOn) { return }
         if (GameDataCenter.setting.setting.musicVol == 0) { return }
-        
+
         // 安全检查音乐是否正在播放
         let isMusicPlaying = false;
         try {
@@ -32,9 +32,9 @@ export class AudioModel extends IDataModel {
         } catch (e) {
             console.log("检查音乐播放状态出错:", e)
         }
-        
+
         if (this.bgmID == id && isMusicPlaying) { return }
-        
+
         let cfg = Gamecfg.audioInfo.getItem(id)
         if (cfg == null || gameMethod.isEmpty(cfg.name)) { return }
         if (this.bgmName == cfg.name) {
@@ -86,7 +86,7 @@ export class AudioModel extends IDataModel {
             console.log("停止音乐出错:", e)
         }
     }
-    
+
     // 关掉音效
     stopAllEffects() {
         try {
@@ -111,7 +111,7 @@ export class AudioModel extends IDataModel {
             console.log("暂停音乐出错:", e)
         }
     }
-    
+
     // 继续音乐
     resumeMusic() {
         try {

+ 2 - 2
assets/script/data/model/System/SettingModel.ts

@@ -1,7 +1,7 @@
 import UIHelp from "../../../logic/ui/UIHelp"
 import { AudioConst, PlatformType } from "../../const/TypeConst"
 import GameDataCenter from "../../GameDataCenter"
-import IDataModel from "../IDataModel"
+import IDataModel from "../../../frameWork/model/IDataModel"
 
 const SETTING = "SETTING"
 export class SettingModel extends IDataModel {
@@ -36,7 +36,7 @@ export class SettingModel extends IDataModel {
             // if (UIHelp.IsShowingUI(UIBattleFieldView)) {
             //     GameDataCenter.audio.playMusic(AudioConst.bgm_fight)
             // } else {
-                GameDataCenter.audio.playMusic(AudioConst.bgm_base)
+            GameDataCenter.audio.playMusic(AudioConst.bgm_base)
             // }
         } else {
             GameDataCenter.audio.stopMusic()

+ 1 - 1
assets/script/data/model/System/SystemModel.ts

@@ -4,7 +4,7 @@ import UIHelp from "../../../logic/ui/UIHelp";
 import { I18n } from "../../../utils/I18nUtil";
 import { PlatformType } from "../../const/TypeConst";
 import GameDataCenter from "../../GameDataCenter";
-import IDataModel from "../IDataModel";
+import IDataModel from "../../../frameWork/model/IDataModel";
 
 export default class SystemModel extends IDataModel {
     is_open_music: boolean = false;

+ 2 - 2
assets/script/data/model/TaskModel.ts

@@ -11,7 +11,7 @@ import { I18n } from "../../utils/I18nUtil";
 import { GuideEvent, HomeEvent, TaskMainEvent, UserEvent } from "../const/EventConst";
 import { eMapType, eXiuXing, GuideType, OpenType, TaskKind, WeekGuideId } from "../const/TypeConst";
 import GameDataCenter from "../GameDataCenter";
-import IDataModel from "./IDataModel";
+import IDataModel from "../../frameWork/model/IDataModel";
 
 export default class TaskModel extends IDataModel {
 	readonly GuanQiaNum = 5;
@@ -55,5 +55,5 @@ export default class TaskModel extends IDataModel {
 			}
 		}
 	}
-	
+
 }

+ 1 - 1
assets/script/data/model/TimeModel.ts

@@ -6,7 +6,7 @@ import EventMng from "../../manager/EventMng";
 import { TimeEvent, UserEvent } from "../const/EventConst";
 import { InGame } from "../const/TypeConst";
 import GameDataCenter from "../GameDataCenter";
-import IDataModel from "./IDataModel";
+import IDataModel from "../../frameWork/model/IDataModel";
 
 export default class TimeModel extends IDataModel {
     is_open_music: boolean = false;

+ 1 - 1
assets/script/data/model/UserModel.ts

@@ -6,7 +6,7 @@ import EventMng from "../../manager/EventMng";
 import GameController from "../../GameController";
 import GameDataCenter from "../GameDataCenter";
 import Gamecfg from "../../common/gameCfg";
-import IDataModel from "./IDataModel";
+import IDataModel from "../../frameWork/model/IDataModel";
 import Load from "../../utils/Load";
 import NativeManager from "../../utils/NativeManager";
 import UIHelp from "../../logic/ui/UIHelp";

+ 1 - 1
assets/script/data/model/WindowModel.ts

@@ -9,7 +9,7 @@ import UIHelp, { DialogParams } from "../../logic/ui/UIHelp";
 import { I18n } from "../../utils/I18nUtil";
 import { InGame, ItemKind } from "../const/TypeConst";
 import GameDataCenter from "../GameDataCenter";
-import IDataModel from "./IDataModel";
+import IDataModel from "../../frameWork/model/IDataModel";
 
 
 export default class WindowModel extends IDataModel {

+ 13 - 0
assets/script/frameWork/model.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "bcd38049-ced8-4872-9e22-3d8a62b6981c",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 4 - 5
assets/script/data/model/IDataModel.ts → assets/script/frameWork/model/IDataModel.ts

@@ -1,7 +1,6 @@
-import EventMng from "../../manager/EventMng";
-import GameController from "../../GameController";
-import { SevBack } from "../../common/Xys";
 import { gameMethod } from "../../common/gameMethod";
+import { SevBack } from "../../common/Xys";
+import GameController from "../../GameController";
 
 export default class IDataModel {
     protected modelName: string = 'default';
@@ -60,7 +59,7 @@ export default class IDataModel {
         cc.sys.localStorage.setItem(`model_${this.modelName}`, JSON.stringify(this._dLocalData));
     }
 
-    public getModelName(){
+    public getModelName() {
         return this.modelName
     }
 
@@ -80,7 +79,7 @@ export default class IDataModel {
      * @param deal(1)   处理回传的sevback  1:处理通用回调   2:处理通用回调(不处理弹窗) 3:不处理通用回调
      *                  待业务处理后,执行network.dealLeftSevback即可处理未处理的事件
      */
-    send(url: string, param: Object = {}, cb1?: (sev: SevBack) => void, cb2?: (sev: SevBack) => void, deal: number = 1, needWait:boolean = false) {
+    send(url: string, param: Object = {}, cb1?: (sev: SevBack) => void, cb2?: (sev: SevBack) => void, deal: number = 1, needWait: boolean = false) {
         GameController.network.send(url, param, cb1, cb2, deal, needWait)
     }
     /**

+ 1 - 1
assets/script/data/model/IDataModel.ts.meta → assets/script/frameWork/model/IDataModel.ts.meta

@@ -1,6 +1,6 @@
 {
   "ver": "1.1.0",
-  "uuid": "2995b35c-ff81-47ba-9229-3e8453ad907d",
+  "uuid": "bc3f927d-36e9-4827-a65b-cc0d419321e9",
   "importer": "typescript",
   "isPlugin": false,
   "loadPluginInWeb": true,

+ 6 - 6
assets/script/logic/fgui/Home/Home/HomeCtrl.ts

@@ -34,12 +34,12 @@ export class HomeCtrl extends FguiViewCtrl<HomeVM> {
         this.AddListeners();
         GameDataCenter.gameServer.Init();
         await GameDataCenter.gameServer.Connect();
-        let ret = await GameDataCenter.gameServer.ReqApi("player/Info", { content: '测试一下' });
-        if (ret.isSucc) {
-            console.log('成功');
-        } else {
-            console.log('失败');
-        }
+        // let ret = await GameDataCenter.gameServer.ReqApi("player/Info", { content: '测试一下' });
+        // if (ret.isSucc) {
+        //     console.log('成功');
+        // } else {
+        //     console.log('失败');
+        // }
         let bgResSprite = this.VM.BgRoot.node.getComponent(ResSprite);
         if (!bgResSprite) {
             bgResSprite = this.VM.BgRoot.node.addComponent(ResSprite);

+ 1 - 1
assets/script/logic/ui/UIHelp.ts

@@ -7,7 +7,7 @@ import EventMng from "../../manager/EventMng";
 import UIBase, { BASE_POP, UIClass } from "./UIBase";
 import { PayProductParam } from "../../data/const/TypeConst";
 import FguiMgr from "../../frameWork/fgui/FguiMgr";
-import IDataModel from "../../data/model/IDataModel";
+import IDataModel from "../../frameWork/model/IDataModel";
 import { I18n } from "../../utils/I18nUtil";
 import { uiCommon } from "../../utils/UICommon";
 import { eg } from "../../frameWork/eg";

+ 1 - 1
assets/script/logic/ui/scene/UILoading.ts

@@ -102,6 +102,7 @@ export default class UILoading extends cc.Component {
 				// ThinkingDataMgr.TDInit();
 				GameDataCenter.loading.jsonLoadSucc = true
 				this.ui.btnEnter.active = this.isLoginAccountSuccess
+				GameDataCenter.loginServer.Init();
 				GameDataCenter.loading.checkEnterGame()
 			} else {
 				console.log("解析失败")
@@ -262,7 +263,6 @@ export default class UILoading extends cc.Component {
 		this.ui.gToggle.active = false
 		GameDataCenter.login.sendEnterGame(this.enterGameSid)
 
-
 		this.loginTipTime = 16
 		this.onTimeCd()
 	}

+ 1 - 1
assets/script/network/GameServerConfig.ts

@@ -3,7 +3,7 @@
 /** 游戏服务器配置,给客户端读取使用 */
 export class GameServerConfig {
     public static isLocalServer: boolean = false;
-    public LOGIN_SERVER: string = "http://106.55.54.28:7001";
+    public static LOGIN_SERVER: string = "http://106.55.54.28:7001";
     /** 游戏服务器地址 */
     // public static GAME_SERVER = 'wss://localcc.xmsgame.com:6000';
     public static GAME_SERVER = 'ws://106.55.54.28:7000';

+ 13 - 0
assets/script/network/TsrpcNet.ts

@@ -17,6 +17,19 @@ export class TsrpcNet {
     constructor() {
     }
 
+    /** 创建连接登录服务器 Http 客户端 */
+    createLoginServer(serverUrl: string) {
+        let hcGate = new (cc.sys.platform == cc.sys.WECHAT_GAME ? HttpClient_Miniapp : HttpClient_Browser)(ServiceProtoRoom, {
+            server: serverUrl,
+            json: ShareConfig.json,
+            logger: console
+        });
+        this.flowClientApi(hcGate);
+        this.flowAuth(hcGate);
+        return hcGate;
+    }
+
+
     /**
      *  创建连接房间服务器 Websocket 客户端
      * @param serverUrl 服务器地址

+ 3 - 2
assets/script/plat/PlatformBase.ts

@@ -6,6 +6,7 @@ import { AD_VIDEO_KEY, PayProductParam, ReportRoleType, PlatFormDevType } from "
 import GameDataCenter from "../data/GameDataCenter";
 import GameController from "../GameController";
 import EventMng from "../manager/EventMng";
+import { ReqLogin } from "../shared/player/PtlLogin";
 import ThinkingDataMgr from "../utils/ThinkingDataMgr";
 import IPlatform from "./IPlatform";
 export default class PlatformBase implements IPlatform {
@@ -27,9 +28,9 @@ export default class PlatformBase implements IPlatform {
     }
     login(inviter: string = ""): void {
         let packageCfg = Gamecfg.packageInfo.getItem(Config.pid)
-        let param: PlayerLoginPlayerPram = {
+        let param: ReqLogin = {
             pid: Config.pid, //分包ID
-            openid: this.openId, //登陆唯一标识
+            openId: this.openId, //登陆唯一标识
             lang: "cn", //语言
             plat: packageCfg.plat, //登陆平台
             parms: this.loginParams,

+ 3 - 2
assets/script/server/GameServerModel.ts

@@ -4,7 +4,7 @@ import { GameServerConfig } from "../network/GameServerConfig";
 import { HttpClient as HttpClient_Browser, WsClient as WsClient_Browser } from 'tsrpc-browser';
 import { HttpClient as HttpClient_Miniapp, WsClient as WsClient_Miniapp } from 'tsrpc-miniapp';
 import { serviceProto as ServiceProtoRoom, ServiceType, ServiceType as ServiceTypeRoom } from "../shared/serviceProto";
-import IDataModel from "../data/model/IDataModel";
+import IDataModel from "../frameWork/model/IDataModel";
 import UIHelp, { DialogParams } from "../logic/ui/UIHelp";
 import GameController from "../GameController";
 import { I18n } from "../utils/I18nUtil";
@@ -14,8 +14,9 @@ import EventMng from "../manager/EventMng";
 
 /** 游戏服 */
 export class GameServerModel extends IDataModel {
+
     /** 连接房间服务器 Websocket 客户端 */
-    wscRoom: WsClient_Browser<ServiceTypeRoom> = null!;
+    wscRoom: WsClient_Miniapp<ServiceTypeRoom> | WsClient_Browser<ServiceTypeRoom> = null!;
     /** 重连次数 */
     reconnectCnt: number = 0;
     async Init() {

+ 29 - 0
assets/script/server/LoginServerModel.ts

@@ -0,0 +1,29 @@
+import { eg } from "../frameWork/eg";
+import { GameServerConfig } from "../network/GameServerConfig";
+
+import { HttpClient as HttpClient_Browser, WsClient as WsClient_Browser } from 'tsrpc-browser';
+import { HttpClient as HttpClient_Miniapp, WsClient as WsClient_Miniapp } from 'tsrpc-miniapp';
+import { serviceProto as ServiceProtoRoom, ServiceType, ServiceType as ServiceTypeRoom } from "../shared/serviceProto";
+import IDataModel from "../frameWork/model/IDataModel";
+import UIHelp, { DialogParams } from "../logic/ui/UIHelp";
+
+
+/** 游戏服 */
+export class LoginServerModel extends IDataModel {
+    /** 连接网关服务器 Http 客户端 */
+    hcGate: HttpClient_Miniapp<ServiceTypeRoom> | HttpClient_Browser<ServiceTypeRoom> = null!;
+    Init() {
+        this.hcGate = eg.tspcNet.createLoginServer(GameServerConfig.LOGIN_SERVER);
+    }
+
+    /** 请求api */
+    public async ReqApi<T extends string & keyof ServiceType['api']>(apiName: T, req: ServiceType['api'][T]['req']) {
+        let ret = await this.hcGate.callApi(apiName, req);
+        if (!ret.isSucc) {
+            console.error(ret.err);
+        }
+        return ret;
+    }
+
+
+}

+ 10 - 0
assets/script/server/LoginServerModel.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "23448db0-2f8f-4f3a-8366-39a0a94e22d1",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 13 - 0
assets/script/shared/admin.meta

@@ -0,0 +1,13 @@
+{
+  "ver": "1.1.3",
+  "uuid": "3e6ad8ea-bfc9-43e1-9131-7df57760d0d9",
+  "importer": "folder",
+  "isBundle": false,
+  "bundleName": "",
+  "priority": 1,
+  "compressionType": {},
+  "optimizeHotUpdate": {},
+  "inlineSpriteFrames": {},
+  "isRemoteBundle": {},
+  "subMetas": {}
+}

+ 20 - 0
assets/script/shared/admin/PtldeleteQuFu.ts

@@ -0,0 +1,20 @@
+
+
+import { BaseRequest, BaseResponse } from '../base';
+
+// 定义请求参数
+export interface ReqdeleteQuFu extends BaseRequest {
+    sid: string;
+}
+
+// 定义返回字段
+export interface ResdeleteQuFu extends BaseResponse {
+    order10Back:any
+}
+
+export const conf = {
+    connet: "http"
+}
+
+
+

+ 10 - 0
assets/script/shared/admin/PtldeleteQuFu.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "3909967d-42e4-43fa-880b-46d69fac67d0",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 21 - 0
assets/script/shared/admin/PtlgetNeed.ts

@@ -0,0 +1,21 @@
+
+
+import { BaseRequest, BaseResponse } from '../base';
+
+// 定义请求参数
+export interface ReqgetNeed extends BaseRequest {
+    stime:number
+    timeInterval:number
+}
+
+// 定义返回字段
+export interface ResgetNeed extends BaseResponse {
+    order10Back:any
+}
+
+export const conf = {
+    connet: "http"
+}
+
+
+

+ 10 - 0
assets/script/shared/admin/PtlgetNeed.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "01710ffd-8453-4b16-aa17-1546f1e6912b",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 20 - 0
assets/script/shared/admin/PtlgetQuFu.ts

@@ -0,0 +1,20 @@
+
+
+import { BaseRequest, BaseResponse } from '../base';
+
+// 定义请求参数
+export interface ReqgetQuFu extends BaseRequest {
+    // 例如: name: string;
+}
+
+// 定义返回字段
+export interface ResgetQuFu extends BaseResponse {
+    order10Back:any
+}
+
+export const conf = {
+    connet: "http"
+}
+
+
+

+ 10 - 0
assets/script/shared/admin/PtlgetQuFu.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "f05fe351-0bd4-414b-ae29-6e6a7751850c",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 21 - 0
assets/script/shared/admin/PtlupdateQuFu.ts

@@ -0,0 +1,21 @@
+
+
+import { BaseRequest, BaseResponse } from '../base';
+
+// 定义请求参数
+export interface RequpdateQuFu extends BaseRequest {
+    sid: string;
+    param: { [key: string]: any };
+}
+
+// 定义返回字段
+export interface ResupdateQuFu extends BaseResponse {
+    order10Back:any
+}
+
+export const conf = {
+    connet: "http"
+}
+
+
+

+ 10 - 0
assets/script/shared/admin/PtlupdateQuFu.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "d7087cf4-f08b-42dd-ae6d-f3588eba9f7d",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 1 - 1
assets/script/shared/base.ts

@@ -3,7 +3,7 @@ export interface BaseRequest {
 }
 
 export interface BaseResponse {
-    
+
 }
 
 export interface BaseMessage {

+ 51 - 0
assets/script/shared/player/PtlLogin.ts

@@ -0,0 +1,51 @@
+
+import { BaseRequest, BaseResponse } from '../base';
+
+// 定义请求参数
+export interface ReqLogin extends BaseRequest {
+    pid:string //分包ID
+	openId:string //登陆唯一标识
+	lang:string //语言
+	plat:string //登陆平台
+	device:string //登陆设备
+	parms:string[] //其他参数
+}
+
+// 定义返回字段
+export interface ResLogin extends BaseResponse {
+	uid: string; //uid
+    sid: string; //最后一次登陆区服
+    list: { [sid: string]: ResLoginList}; //每个区最多一个角色
+    token: string; //账号登陆验证码
+	//区服列表
+	qufuList:{
+		[sid:string]:qufuInfo
+	}
+	wsUrl:string //ws地址
+}
+
+export interface ResLoginList {
+	uuid: string; //角色ID
+	name: string;
+	level: number; //等级
+	lastlogin: number; //最后一次登录时间
+}
+
+//区服信息
+export interface qufuInfo {
+    sid: string; //区服ID
+    name: string; //名字
+    sName: string; //所属区服大区
+    openAt: number; //开服时间
+    status: string; //状态 1新服 2拥挤 3爆满 4维护
+    heid: string; //合服ID
+    suofu: string; //锁服
+    skin: string; //皮肤
+}
+
+export const conf = {
+    connet: "http"
+}
+
+
+

+ 10 - 0
assets/script/shared/player/PtlLogin.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "bd8819a7-12e1-4fc0-83cd-f0c408157cce",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 561 - 14
assets/script/shared/serviceProto.ts

@@ -1,12 +1,37 @@
 import { ServiceProto } from 'tsrpc-proto';
-import { ReqInfo, ResInfo } from './player/PtlInfo';
+import { ReqdeleteQuFu, ResdeleteQuFu } from './admin/PtldeleteQuFu';
+import { ReqgetNeed, ResgetNeed } from './admin/PtlgetNeed';
+import { ReqgetQuFu, ResgetQuFu } from './admin/PtlgetQuFu';
+import { RequpdateQuFu, ResupdateQuFu } from './admin/PtlupdateQuFu';
+import { ReqLogin, ResLogin } from './player/PtlLogin';
+import { ReqLogin as ReqLogin_1, ResLogin as ResLogin_1 } from './user/PtlLogin';
 import { ReqLookFuser, ResLookFuser } from './user/PtlLookFuser';
 
 export interface ServiceType {
     api: {
-        "player/Info": {
-            req: ReqInfo,
-            res: ResInfo
+        "admin/deleteQuFu": {
+            req: ReqdeleteQuFu,
+            res: ResdeleteQuFu
+        },
+        "admin/getNeed": {
+            req: ReqgetNeed,
+            res: ResgetNeed
+        },
+        "admin/getQuFu": {
+            req: ReqgetQuFu,
+            res: ResgetQuFu
+        },
+        "admin/updateQuFu": {
+            req: RequpdateQuFu,
+            res: ResupdateQuFu
+        },
+        "player/Login": {
+            req: ReqLogin,
+            res: ResLogin
+        },
+        "user/Login": {
+            req: ReqLogin_1,
+            res: ResLogin_1
         },
         "user/LookFuser": {
             req: ReqLookFuser,
@@ -19,14 +44,54 @@ export interface ServiceType {
 }
 
 export const serviceProto: ServiceProto<ServiceType> = {
-    "version": 4,
+    "version": 8,
     "services": [
         {
-            "id": 0,
-            "name": "player/Info",
+            "id": 5,
+            "name": "admin/deleteQuFu",
+            "type": "api",
+            "conf": {
+                "connet": "http"
+            }
+        },
+        {
+            "id": 6,
+            "name": "admin/getNeed",
+            "type": "api",
+            "conf": {
+                "connet": "http"
+            }
+        },
+        {
+            "id": 7,
+            "name": "admin/getQuFu",
             "type": "api",
             "conf": {
-                "needLogin": true
+                "connet": "http"
+            }
+        },
+        {
+            "id": 8,
+            "name": "admin/updateQuFu",
+            "type": "api",
+            "conf": {
+                "connet": "http"
+            }
+        },
+        {
+            "id": 3,
+            "name": "player/Login",
+            "type": "api",
+            "conf": {
+                "connet": "http"
+            }
+        },
+        {
+            "id": 4,
+            "name": "user/Login",
+            "type": "api",
+            "conf": {
+                "connet": "ws"
             }
         },
         {
@@ -34,12 +99,12 @@ export const serviceProto: ServiceProto<ServiceType> = {
             "name": "user/LookFuser",
             "type": "api",
             "conf": {
-                "needLogin": true
+                "connet": "ws"
             }
         }
     ],
     "types": {
-        "player/PtlInfo/ReqInfo": {
+        "admin/PtldeleteQuFu/ReqdeleteQuFu": {
             "type": "Interface",
             "extends": [
                 {
@@ -53,7 +118,7 @@ export const serviceProto: ServiceProto<ServiceType> = {
             "properties": [
                 {
                     "id": 0,
-                    "name": "content",
+                    "name": "sid",
                     "type": {
                         "type": "String"
                     }
@@ -63,7 +128,7 @@ export const serviceProto: ServiceProto<ServiceType> = {
         "base/BaseRequest": {
             "type": "Interface"
         },
-        "player/PtlInfo/ResInfo": {
+        "admin/PtldeleteQuFu/ResdeleteQuFu": {
             "type": "Interface",
             "extends": [
                 {
@@ -77,9 +142,9 @@ export const serviceProto: ServiceProto<ServiceType> = {
             "properties": [
                 {
                     "id": 0,
-                    "name": "ret",
+                    "name": "order10Back",
                     "type": {
-                        "type": "String"
+                        "type": "Any"
                     }
                 }
             ]
@@ -87,6 +152,488 @@ export const serviceProto: ServiceProto<ServiceType> = {
         "base/BaseResponse": {
             "type": "Interface"
         },
+        "admin/PtlgetNeed/ReqgetNeed": {
+            "type": "Interface",
+            "extends": [
+                {
+                    "id": 0,
+                    "type": {
+                        "type": "Reference",
+                        "target": "base/BaseRequest"
+                    }
+                }
+            ],
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "stime",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 1,
+                    "name": "timeInterval",
+                    "type": {
+                        "type": "Number"
+                    }
+                }
+            ]
+        },
+        "admin/PtlgetNeed/ResgetNeed": {
+            "type": "Interface",
+            "extends": [
+                {
+                    "id": 0,
+                    "type": {
+                        "type": "Reference",
+                        "target": "base/BaseResponse"
+                    }
+                }
+            ],
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "order10Back",
+                    "type": {
+                        "type": "Any"
+                    }
+                }
+            ]
+        },
+        "admin/PtlgetQuFu/ReqgetQuFu": {
+            "type": "Interface",
+            "extends": [
+                {
+                    "id": 0,
+                    "type": {
+                        "type": "Reference",
+                        "target": "base/BaseRequest"
+                    }
+                }
+            ]
+        },
+        "admin/PtlgetQuFu/ResgetQuFu": {
+            "type": "Interface",
+            "extends": [
+                {
+                    "id": 0,
+                    "type": {
+                        "type": "Reference",
+                        "target": "base/BaseResponse"
+                    }
+                }
+            ],
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "order10Back",
+                    "type": {
+                        "type": "Any"
+                    }
+                }
+            ]
+        },
+        "admin/PtlupdateQuFu/RequpdateQuFu": {
+            "type": "Interface",
+            "extends": [
+                {
+                    "id": 0,
+                    "type": {
+                        "type": "Reference",
+                        "target": "base/BaseRequest"
+                    }
+                }
+            ],
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "sid",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 1,
+                    "name": "param",
+                    "type": {
+                        "type": "Interface",
+                        "indexSignature": {
+                            "keyType": "String",
+                            "type": {
+                                "type": "Any"
+                            }
+                        }
+                    }
+                }
+            ]
+        },
+        "admin/PtlupdateQuFu/ResupdateQuFu": {
+            "type": "Interface",
+            "extends": [
+                {
+                    "id": 0,
+                    "type": {
+                        "type": "Reference",
+                        "target": "base/BaseResponse"
+                    }
+                }
+            ],
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "order10Back",
+                    "type": {
+                        "type": "Any"
+                    }
+                }
+            ]
+        },
+        "player/PtlLogin/ReqLogin": {
+            "type": "Interface",
+            "extends": [
+                {
+                    "id": 0,
+                    "type": {
+                        "type": "Reference",
+                        "target": "base/BaseRequest"
+                    }
+                }
+            ],
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "pid",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 1,
+                    "name": "openId",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 2,
+                    "name": "lang",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 3,
+                    "name": "plat",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 4,
+                    "name": "device",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 5,
+                    "name": "parms",
+                    "type": {
+                        "type": "Array",
+                        "elementType": {
+                            "type": "String"
+                        }
+                    }
+                }
+            ]
+        },
+        "player/PtlLogin/ResLogin": {
+            "type": "Interface",
+            "extends": [
+                {
+                    "id": 0,
+                    "type": {
+                        "type": "Reference",
+                        "target": "base/BaseResponse"
+                    }
+                }
+            ],
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "uid",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 1,
+                    "name": "sid",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 2,
+                    "name": "list",
+                    "type": {
+                        "type": "Interface",
+                        "indexSignature": {
+                            "keyType": "String",
+                            "type": {
+                                "type": "Reference",
+                                "target": "player/PtlLogin/ResLoginList"
+                            }
+                        }
+                    }
+                },
+                {
+                    "id": 3,
+                    "name": "token",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 4,
+                    "name": "qufuList",
+                    "type": {
+                        "type": "Interface",
+                        "indexSignature": {
+                            "keyType": "String",
+                            "type": {
+                                "type": "Reference",
+                                "target": "player/PtlLogin/qufuInfo"
+                            }
+                        }
+                    }
+                },
+                {
+                    "id": 5,
+                    "name": "wsUrl",
+                    "type": {
+                        "type": "String"
+                    }
+                }
+            ]
+        },
+        "player/PtlLogin/ResLoginList": {
+            "type": "Interface",
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "uuid",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 1,
+                    "name": "name",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 2,
+                    "name": "level",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 3,
+                    "name": "lastlogin",
+                    "type": {
+                        "type": "Number"
+                    }
+                }
+            ]
+        },
+        "player/PtlLogin/qufuInfo": {
+            "type": "Interface",
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "sid",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 1,
+                    "name": "name",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 2,
+                    "name": "sName",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 3,
+                    "name": "openAt",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 4,
+                    "name": "status",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 5,
+                    "name": "heid",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 6,
+                    "name": "suofu",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 7,
+                    "name": "skin",
+                    "type": {
+                        "type": "String"
+                    }
+                }
+            ]
+        },
+        "user/PtlLogin/ReqLogin": {
+            "type": "Interface",
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "sid",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 1,
+                    "name": "uid",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 2,
+                    "name": "token",
+                    "type": {
+                        "type": "String"
+                    }
+                }
+            ]
+        },
+        "user/PtlLogin/ResLogin": {
+            "type": "Interface",
+            "properties": [
+                {
+                    "id": 0,
+                    "name": "sid",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 1,
+                    "name": "name",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 2,
+                    "name": "head",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 3,
+                    "name": "wxhead",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 4,
+                    "name": "sex",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 5,
+                    "name": "level",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 6,
+                    "name": "regtime",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 7,
+                    "name": "loginTime",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 8,
+                    "name": "lastlogin",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 9,
+                    "name": "lang",
+                    "type": {
+                        "type": "String"
+                    }
+                },
+                {
+                    "id": 10,
+                    "name": "iscz",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 11,
+                    "name": "rmbcz",
+                    "type": {
+                        "type": "Number"
+                    }
+                },
+                {
+                    "id": 12,
+                    "name": "power",
+                    "type": {
+                        "type": "Number"
+                    }
+                }
+            ]
+        },
         "user/PtlLookFuser/ReqLookFuser": {
             "type": "Interface",
             "extends": [

+ 31 - 0
assets/script/shared/user/PtlLogin.ts

@@ -0,0 +1,31 @@
+import { BaseRequest, BaseResponse } from '../base';
+
+// 角色登录
+export interface ReqLogin {
+    sid:string;//区服ID
+    uid:string;//账号ID
+    token:string;//账号登录下发的token
+}
+
+// 角色信息返回
+export interface ResLogin {
+    sid: string; //所属分区
+    name: string; //名字
+    head: string; //头像
+    wxhead: string; //微信头像
+    sex: number; //0女1男
+    level: number; //等级
+    regtime: number; //注册时间
+    loginTime: number; //登录时间
+    lastlogin: number; //最后一次操作时间
+    lang: string; //语言
+    iscz: number; //现金点消耗  +  RMB购买其他礼包(购买现金点除外)
+    rmbcz: number;//RMB购买
+    power: number; //战力
+}
+
+export const conf = {
+    connet: "ws"
+}
+
+

+ 10 - 0
assets/script/shared/user/PtlLogin.ts.meta

@@ -0,0 +1,10 @@
+{
+  "ver": "1.1.0",
+  "uuid": "58a2cfbf-9960-4eca-a552-bf2e2af561b8",
+  "importer": "typescript",
+  "isPlugin": false,
+  "loadPluginInWeb": true,
+  "loadPluginInNative": true,
+  "loadPluginInEditor": false,
+  "subMetas": {}
+}

+ 2 - 1
assets/script/shared/user/PtlLookFuser.ts

@@ -11,5 +11,6 @@ export interface ResLookFuser extends BaseResponse {
 }
 
 export const conf = {
-    needLogin: true
+    connet: "ws"
 }
+