Commit 00ee733a authored by wildfirecode's avatar wildfirecode

1

parent 8a837778
...@@ -32,7 +32,7 @@ export abstract class ABNetManager { ...@@ -32,7 +32,7 @@ export abstract class ABNetManager {
realUrl += net.addUrl; realUrl += net.addUrl;
} }
$.ajax({ window['$'].ajax({
type: net.type, type: net.type,
// url: realUrl + gTime, // url: realUrl + gTime,
url: realUrl, url: realUrl,
......
import { TimeFormat } from "../enum/TimeFormat";
export class GTime {
/**
* 获取当前时间戳
* @returns {number}
*/
public static getTimestamp(): number {
return new Date().getTime();
}
/**
* 传入秒数返回带格式的时间
* @param time 单位秒
* @param type 枚举类型CountDownType
* @param dibit 是否双位
*/
public static formatTime(time: number, type: string = TimeFormat.HMS, dibit = false, suffixs = ['d', 'h', 'm', 's']): string {
let countdown = this.getCountDown(time, type, dibit);
countdown = countdown.map((val, index) => `${val < 10 ? '0' + val : val}${suffixs[index]}`);
return countdown.join('');
}
/**
* 倒计时
* @param time 单位秒
* @param type 枚举类型CountDownType
* @param dibit 是否双位
*/
public static getCountDown(time: number, type: string = TimeFormat.HMS, dibit = false): any[] {
let result: any[] = [];
if (type.indexOf('s') !== -1) {
result.push(time % 60);
}
if (type.indexOf('m') !== -1) {
result.unshift(Math.floor((time % 3600) / 60));
}
if (type.indexOf('h') >= 0) {
if (type == TimeFormat.HMS) {
result.unshift(Math.floor(time / 3600));
}
else {
result.unshift(Math.floor((time % 86400) / 3600));
}
}
if (type.indexOf('d') >= 0) {
result.unshift(Math.floor(time / 86400));
}
if (dibit)
result = result.map((ele) => {
return ele < 10 ? `0${ele}` : ele;
})
return result;
}
}
\ No newline at end of file
import { IData } from 'duiba-tc'; import { IData } from "../../tc/interface/IData";
// import { IData } from "../../tc/interface/IData";
/** /**
*Created by cuiliqiang on 2018/3/12 *Created by cuiliqiang on 2018/3/12
* 数据基类 * 数据基类
......
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
* 奖品信息 * 奖品信息
*/ */
import { LotteryType } from "../../../enum/LotteryType"; import { LotteryType } from "../../../enum/LotteryType";
import { IData } from "duiba-tc"; // import { IData } from "../../../../tc/interface/IData";
import { IExposureData } from "../IExposureData"; import { IExposureData } from "../IExposureData";
import { IData } from "../../../../tc/interface/IData";
export class LotteryData implements IData { export class LotteryData implements IData {
/** /**
......
import { IData } from "duiba-tc";
/** /**
*Created by cuiliqiang on 2018/3/12 *Created by cuiliqiang on 2018/3/12
......
import { GPool } from "duiba-tc"; import { GPool } from '../../../../tc/util/GPool';
import { LotteryData } from "../../common/lottery/LotteryData"; import { LotteryData } from "../../common/lottery/LotteryData";
import { Data } from "../../Data"; import { Data } from "../../Data";
import { IExposureData } from "../../common/IExposureData"; import { IExposureData } from "../../common/IExposureData";
......
import { IData } from "duiba-tc";
/** /**
*Created by cuiliqiang on 2018/3/1 *Created by cuiliqiang on 2018/3/1
*/ */
......
import { IData } from "duiba-tc";
export interface IExtraCfgData { export interface IExtraCfgData {
/** /**
......
import { GetInfoData } from '../getInfo/GetInfoData';
import { IAppData } from './IAppData'; import { IAppData } from './IAppData';
import { IGameData } from './IGameData';
import { IExtraCfgData } from './IExtraCfgData';
import { IDefenseStrategyData } from './IDefenseStrategyData'; import { IDefenseStrategyData } from './IDefenseStrategyData';
import { IExtraCfgData } from './IExtraCfgData';
import { IGameData } from './IGameData';
export interface IGameCfgData { export interface IGameCfgData {
/** /**
* App数据 * App数据
......
import { IData } from "duiba-tc";
import { IRecommendData } from "./IRecommendData"; import { IRecommendData } from "./IRecommendData";
export interface IGameData { export interface IGameData {
/** /**
......
import { IData } from "duiba-tc";
/** /**
*Created by cuiliqiang on 2018/3/1 *Created by cuiliqiang on 2018/3/1
......
import { IData } from "duiba-tc";
/** /**
*Created by cuiliqiang on 2018/3/12 *Created by cuiliqiang on 2018/3/12
......
import { IData } from "duiba-tc";
/** /**
*Created by cuiliqiang on 2018/3/1 *Created by cuiliqiang on 2018/3/1
......
import { IExposureData } from './../../common/IExposureData'; import { IExposureData } from './../../common/IExposureData';
import { GPool } from "duiba-tc"; // import { GPool } from '../../../../tc/util/GPool';
import { GetInfoData } from './../getInfo/GetInfoData'; import { GetInfoData } from './../getInfo/GetInfoData';
import { LotteryData } from './../../common/lottery/LotteryData'; import { LotteryData } from './../../common/lottery/LotteryData';
import { Data } from './../../Data'; import { Data } from './../../Data';
import { GPool } from '../../../../tc/util/GPool';
/** /**
* 获取游戏抽奖结果 * 获取游戏抽奖结果
*/ */
......
import { IData } from "../../../tc/interface/IData"; import { IData } from "../../../tc/interface/IData";
// import { IData } from "duiba-tc"; // import { IData } from "../../../../tc/interface/IData";
//
// import { IData } from "../../../../tc/interface/IData";
/** /**
* 签到信息查询 * 签到信息查询
......
import { IData } from "duiba-tc";
/** /**
*Created by ck on 2018/5/16 *Created by ck on 2018/5/16
*/ */
......
import { IData } from "duiba-tc";
// import { IData } from "../../../../tc/interface/IData";
/** /**
*Created by ck on 2018/8/24 *Created by ck on 2018/8/24
*/ */
export interface IVisitPetData { export interface IVisitPetData {
/** /**
* 宠物唯一标识 * 宠物唯一标识
*/ */
......
// import { IData } from "duiba-tc"; // import { IData } from "../../../../tc/interface/IData";
/** /**
*Created by ck on 2018/5/16 *Created by ck on 2018/5/16
*/ */
......
/** /**
*Created by ck on 2018/5/2 *Created by ck on 2018/5/2
*/ */
// import { IData } from "duiba-tc"; // import { IData } from "../../../../tc/interface/IData";
import { Data } from "../Data"; import { Data } from "../Data";
import { GetHomeInfoData } from "./GetHomeInfoData"; import { GetHomeInfoData } from "./GetHomeInfoData";
......
import { IExposureData } from './../../common/IExposureData'; import { IExposureData } from './../../common/IExposureData';
// import { GPool } from "duiba-tc"; // import { GPool } from '../../../../tc/util/GPool';
import { LotteryData } from "../../common/lottery/LotteryData"; import { LotteryData } from "../../common/lottery/LotteryData";
import { Data } from "../../Data"; import { Data } from "../../Data";
import { GPool } from '../../../../tc/util/GPool'; import { GPool } from '../../../../tc/util/GPool';
......
...@@ -1346,7 +1346,7 @@ export class NetManager extends ABNetManager { ...@@ -1346,7 +1346,7 @@ export class NetManager extends ABNetManager {
realUrl += net.addUrl; realUrl += net.addUrl;
} }
$.ajax({ window['$'].ajax({
type: net.type, type: net.type,
// url: realUrl + gTime, // url: realUrl + gTime,
url: realUrl, url: realUrl,
......
import { DoJoinPlugDrawData } from './../../data/plug/doJoinPlugDraw/DoJoinPlugDrawData'; // import { IExposureData } from '../../data/common/IExposureData';
import { DataManager } from './../../manager/DataManager'; import { IExposureData } from '../../data/common/IExposureData';
import { Model } from './../Model';
import { LotteryData } from '../../data/common/lottery/LotteryData'; import { LotteryData } from '../../data/common/lottery/LotteryData';
import { LotteryType } from '../../enum/LotteryType'; import { LotteryType } from '../../enum/LotteryType';
import { NetManager } from '../../manager/NetManager'; import { NetManager } from '../../manager/NetManager';
import { IExposureData } from '../..'; import { DataManager } from './../../manager/DataManager';
import { Model } from './../Model';
/** /**
* 兑吧活动领域模型 * 兑吧活动领域模型
......
import { DataManager } from './../../manager/DataManager'; import { DataManager } from './../../manager/DataManager';
import { NetManager } from "../../manager/NetManager"; import { NetManager } from "../../manager/NetManager";
import { ActivityModel } from "../common/ActivityModel"; import { ActivityModel } from "../common/ActivityModel";
import { IDynamicData } from '../..'; import { IDynamicData } from '../../data/game/datapash/IDynamicData';
export class GameModel extends ActivityModel { export class GameModel extends ActivityModel {
/** /**
......
import { SignInfoData } from './../../data/pet/SignInfoData'; // import { NetManager } from "../../manager/NetManager"; import { DataManager } from "../../manager/DataManager";
import { PetIndexData } from "../../data/pet/PetIndexData";
import { PetHomeInfoData } from './../../data/pet/PetHomeInfoData'; import { PetHomeInfoData } from './../../data/pet/PetHomeInfoData';
import { SignInfoData } from './../../data/pet/SignInfoData';
import { ActivityModel } from "./ActivityModel"; import { ActivityModel } from "./ActivityModel";
import { NetManager, DataManager } from "../.."; import { NetManager } from "../../manager/NetManager";
import { PetIndexData } from "../../data/pet/PetIndexData"; import { DataManager } from "../../manager/DataManager";
export class SignModel extends ActivityModel { export class SignModel extends ActivityModel {
/** /**
......
import { CustomModel } from './../common/CustomModel';
import { DataManager } from '../../manager/DataManager'; import { DataManager } from '../../manager/DataManager';
import { TwLang } from '../../util/TwLang'; import { TwLang } from '../../util/TwLang';
import { GFun } from "duiba-tc"; import { CustomModel } from './../common/CustomModel';
import { ICustomOptionData, IPlugOptionData } from '../..'; import { GFun } from '../../../tc/util/GFun';
import { ICustomOptionData } from '../../data/custom/ajaxElement/ICustomOptionData';
/** /**
* 自定义活动工具玩法模型 * 自定义活动工具玩法模型
*/ */
......
import { CustomPlayModel } from './CustomPlayModel'; import { CustomPlayModel } from './CustomPlayModel';
import { NetManager } from '../../manager/NetManager';
import { ThroughSubmitData } from '../../data/custom/throughSubmit/ThroughSubmitData';
import { DataManager } from '../../manager/DataManager';
export class CustomPlayThroughModel extends CustomPlayModel { export class CustomPlayThroughModel extends CustomPlayModel {
} }
\ No newline at end of file
import { CustomModel } from './../common/CustomModel'; import { CustomModel } from './../common/CustomModel';
import { LotteryData } from './../../data/common/lottery/LotteryData'; import { LotteryData } from './../../data/common/lottery/LotteryData';
import { DataManager } from './../../manager/DataManager'; import { DataManager } from './../../manager/DataManager';
import { IExposureData } from '../..'; import { IExposureData } from '../../data/common/IExposureData';
// import { IExposureData } from '../../data/common/IExposureData';
export class CustomWinModel extends CustomModel { export class CustomWinModel extends CustomModel {
/** /**
......
import { DataManager } from './../../manager/DataManager'; import { DataManager } from './../../manager/DataManager';
import { GFun } from "duiba-tc"; // import { GFun } from '../../../tc/util/GFun';
import { TwLang } from '../../util/TwLang'; import { TwLang } from '../../util/TwLang';
import { GameModel } from '../common/GameModel'; import { GameModel } from '../common/GameModel';
import { GFun } from '../../../tc/util/GFun';
export class GameEndModel extends GameModel { export class GameEndModel extends GameModel {
/** /**
......
import { GameModel } from '../common/GameModel'; import { GameModel } from '../common/GameModel';
import { DataManager } from './../../manager/DataManager'; import { DataManager } from './../../manager/DataManager';
import { TwLang } from '../../util/TwLang'; import { TwLang } from '../../util/TwLang';
import { GFun } from "duiba-tc"; import { GFun } from '../../../tc/util/GFun';
export class GameLoseModel extends GameModel { export class GameLoseModel extends GameModel {
/** /**
* 剩余次数文案 * 剩余次数文案
...@@ -10,10 +10,10 @@ export class GameLoseModel extends GameModel { ...@@ -10,10 +10,10 @@ export class GameLoseModel extends GameModel {
return DataManager.ins.getInfoData.status.text; return DataManager.ins.getInfoData.status.text;
} }
/** /**
* 排名文案 * 排名文案
* @param str * @param str
*/ */
public getRankTxt(str: string = TwLang.lang_018): string { public getRankTxt(str: string = TwLang.lang_018): string {
return GFun.replace(str, [DataManager.ins.getInfoData.rank]); return GFun.replace(str, [DataManager.ins.getInfoData.rank]);
} }
......
import { GameModel } from '../common/GameModel'; import { GameModel } from '../common/GameModel';
import { DataManager } from '../../manager/DataManager'; import { DataManager } from '../../manager/DataManager';
import { TwLang } from '../../util/TwLang'; import { TwLang } from '../../util/TwLang';
import { GFun } from "duiba-tc"; import { GFun } from '../../../tc/util/GFun';
import { IGameOptionData } from '../..'; import { IGameOptionData } from '../../data/game/getOptions/IGameOptionData';
// import { IGameOptionData } from '../../data/game/getOptions/IGameOptionData';
export class GameOptionModel extends GameModel { export class GameOptionModel extends GameModel {
/** /**
* 活动结束时间 * 活动结束时间
......
import { NetManager } from './../../manager/NetManager'; import { NetManager } from './../../manager/NetManager';
import { DataManager } from './../../manager/DataManager'; import { DataManager } from './../../manager/DataManager';
import { GameModel } from '../common/GameModel'; import { GameModel } from '../common/GameModel';
import { GMath, GCache } from "duiba-tc"; // import { GMath, GCache } from "duiba-tc";
import { IDynamicData } from '../..'; import { IDynamicData } from '../../data/game/datapash/IDynamicData';
import { GMath } from '../../../tc/util/GMath';
import { GCache } from '../../../tc/util/GCache';
// import { IDynamicData } from '../../data/game/datapash/IDynamicData';
export class GamePlayModel extends GameModel { export class GamePlayModel extends GameModel {
/** /**
* 阶段提交次数 * 阶段提交次数
......
import { GameModel } from '../common/GameModel'; import { GameModel } from '../common/GameModel';
import { DataManager } from './../../manager/DataManager'; import { DataManager } from './../../manager/DataManager';
import { TwLang } from '../../util/TwLang'; import { TwLang } from '../../util/TwLang';
import { GFun } from "duiba-tc"; import { GFun } from '../../../tc/util/GFun';
import { IUserData } from '../..'; import { IUserData } from '../../data/game/common/IUserData';
// import { IUserData } from '../../data/game/common/IUserData';
export class GameRealTimeRankModel extends GameModel { export class GameRealTimeRankModel extends GameModel {
/** /**
* 我得排行文案 * 我得排行文案
......
...@@ -4,8 +4,8 @@ import { LotteryData } from '../../data/common/lottery/LotteryData'; ...@@ -4,8 +4,8 @@ import { LotteryData } from '../../data/common/lottery/LotteryData';
import { TwLang } from '../../util/TwLang'; import { TwLang } from '../../util/TwLang';
import { GFun } from '../../../tc/util/GFun'; import { GFun } from '../../../tc/util/GFun';
import { IExposureData } from '../../data/common/IExposureData'; import { IExposureData } from '../../data/common/IExposureData';
// import { GFun } from "duiba-tc"; // import { GFun } from '../../../tc/util/GFun';
// import { IExposureData } from '../..'; // import { IExposureData } from '../../data/common/IExposureData';
export class GameWinModel extends GameModel { export class GameWinModel extends GameModel {
/** /**
......
...@@ -3,7 +3,7 @@ import { DataManager } from './../../manager/DataManager'; ...@@ -3,7 +3,7 @@ import { DataManager } from './../../manager/DataManager';
import { NetManager } from '../../manager/NetManager'; import { NetManager } from '../../manager/NetManager';
import { LotteryData } from '../../data/common/lottery/LotteryData'; import { LotteryData } from '../../data/common/lottery/LotteryData';
import { IExposureData } from '../../data/common/IExposureData'; import { IExposureData } from '../../data/common/IExposureData';
// import { IExposureData } from '../..'; // import { IExposureData } from '../../data/common/IExposureData';
export class PlugWinModel extends ActivityModel { export class PlugWinModel extends ActivityModel {
/** /**
* 奖品数据 * 奖品数据
......
import { DataManager, NetManager } from "duiba-tw"; // ∏import { DataManager, NetManager } from "duiba-tw";
import { DataManager } from "../../../libs/tw/manager/DataManager";
import { NetManager } from "../../../libs/tw/manager/NetManager";
import Loading from "../../loading/Loading"; import Loading from "../../loading/Loading";
export default export default
......
import { NetManager } from "duiba-tw"; // import { NetManager } from "../../../libs/tw/manager/NetManager";
import Loading from "../../loading/Loading"; import Loading from "../../loading/Loading";
import { NetManager } from "../../../libs/tw/manager/NetManager";
/** /**
* 实时排行榜 * 实时排行榜
......
import { INetData } from 'duiba-tc'; // import { INetData } from '../../libs/tc/interface/INetData';
import { NetManager, DataManager, NetName } from 'duiba-tw'; // import { DataManager } from '../../libs/tw/manager/DataManager'; import { NetManager } from '../../libs/tw/manager/NetManager';
import Scene from "../views/Scene"; import { INetData } from '../../libs/tc/interface/INetData';
import PanelCtrl from '../ctrls/panelCtrl'; import PanelCtrl from '../ctrls/panelCtrl';
import { ModuleTypes } from '../types/sceneTypes'; import { ModuleTypes } from '../types/sceneTypes';
import Scene from "../views/Scene";
import { DataManager } from '../../libs/tw/manager/DataManager';
import { NetManager } from '../../libs/tw/manager/NetManager';
const { TouchEvent } = egret; const { TouchEvent } = egret;
export default class PlayScene extends Scene { export default class PlayScene extends Scene {
......
import { NetManager } from 'duiba-tw';
import { DataManager } from 'duiba-tw';
import Panel from "../views/Panel"; import Panel from "../views/Panel";
import { NetManager } from '../../libs/tw/manager/NetManager';
import { DataManager } from "../../libs/tw/manager/DataManager";
export default class RulePanel extends Panel { export default class RulePanel extends Panel {
constructor(){ constructor(){
super() super()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment