Commit 00ee733a authored by wildfirecode's avatar wildfirecode

1

parent 8a837778
......@@ -32,7 +32,7 @@ export abstract class ABNetManager {
realUrl += net.addUrl;
}
$.ajax({
window['$'].ajax({
type: net.type,
// url: realUrl + gTime,
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
* 数据基类
......
......@@ -3,8 +3,9 @@
* 奖品信息
*/
import { LotteryType } from "../../../enum/LotteryType";
import { IData } from "duiba-tc";
// import { IData } from "../../../../tc/interface/IData";
import { IExposureData } from "../IExposureData";
import { IData } from "../../../../tc/interface/IData";
export class LotteryData implements IData {
/**
......
import { IData } from "duiba-tc";
/**
*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 { Data } from "../../Data";
import { IExposureData } from "../../common/IExposureData";
......
import { IData } from "duiba-tc";
/**
*Created by cuiliqiang on 2018/3/1
*/
......
import { IData } from "duiba-tc";
export interface IExtraCfgData {
/**
......
import { GetInfoData } from '../getInfo/GetInfoData';
import { IAppData } from './IAppData';
import { IGameData } from './IGameData';
import { IExtraCfgData } from './IExtraCfgData';
import { IDefenseStrategyData } from './IDefenseStrategyData';
import { IExtraCfgData } from './IExtraCfgData';
import { IGameData } from './IGameData';
export interface IGameCfgData {
/**
* App数据
......
import { IData } from "duiba-tc";
import { IRecommendData } from "./IRecommendData";
export interface IGameData {
/**
......
import { IData } from "duiba-tc";
/**
*Created by cuiliqiang on 2018/3/1
......
import { IData } from "duiba-tc";
/**
*Created by cuiliqiang on 2018/3/12
......
import { IData } from "duiba-tc";
/**
*Created by cuiliqiang on 2018/3/1
......
import { IExposureData } from './../../common/IExposureData';
import { GPool } from "duiba-tc";
// import { GPool } from '../../../../tc/util/GPool';
import { GetInfoData } from './../getInfo/GetInfoData';
import { LotteryData } from './../../common/lottery/LotteryData';
import { Data } from './../../Data';
import { GPool } from '../../../../tc/util/GPool';
/**
* 获取游戏抽奖结果
*/
......
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
*/
......
import { IData } from "duiba-tc";
// import { IData } from "../../../../tc/interface/IData";
/**
*Created by ck on 2018/8/24
*/
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/2
*/
// import { IData } from "duiba-tc";
// import { IData } from "../../../../tc/interface/IData";
import { Data } from "../Data";
import { GetHomeInfoData } from "./GetHomeInfoData";
......
import { IExposureData } from './../../common/IExposureData';
// import { GPool } from "duiba-tc";
// import { GPool } from '../../../../tc/util/GPool';
import { LotteryData } from "../../common/lottery/LotteryData";
import { Data } from "../../Data";
import { GPool } from '../../../../tc/util/GPool';
......
......@@ -1346,7 +1346,7 @@ export class NetManager extends ABNetManager {
realUrl += net.addUrl;
}
$.ajax({
window['$'].ajax({
type: net.type,
// url: realUrl + gTime,
url: realUrl,
......
import { DoJoinPlugDrawData } from './../../data/plug/doJoinPlugDraw/DoJoinPlugDrawData';
import { DataManager } from './../../manager/DataManager';
import { Model } from './../Model';
// import { IExposureData } from '../../data/common/IExposureData';
import { IExposureData } from '../../data/common/IExposureData';
import { LotteryData } from '../../data/common/lottery/LotteryData';
import { LotteryType } from '../../enum/LotteryType';
import { NetManager } from '../../manager/NetManager';
import { IExposureData } from '../..';
import { DataManager } from './../../manager/DataManager';
import { Model } from './../Model';
/**
* 兑吧活动领域模型
......
import { DataManager } from './../../manager/DataManager';
import { NetManager } from "../../manager/NetManager";
import { ActivityModel } from "../common/ActivityModel";
import { IDynamicData } from '../..';
import { IDynamicData } from '../../data/game/datapash/IDynamicData';
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 { SignInfoData } from './../../data/pet/SignInfoData';
import { ActivityModel } from "./ActivityModel";
import { NetManager, DataManager } from "../..";
import { PetIndexData } from "../../data/pet/PetIndexData";
import { NetManager } from "../../manager/NetManager";
import { DataManager } from "../../manager/DataManager";
export class SignModel extends ActivityModel {
/**
......
import { CustomModel } from './../common/CustomModel';
import { DataManager } from '../../manager/DataManager';
import { TwLang } from '../../util/TwLang';
import { GFun } from "duiba-tc";
import { ICustomOptionData, IPlugOptionData } from '../..';
import { CustomModel } from './../common/CustomModel';
import { GFun } from '../../../tc/util/GFun';
import { ICustomOptionData } from '../../data/custom/ajaxElement/ICustomOptionData';
/**
* 自定义活动工具玩法模型
*/
......
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 {
}
\ No newline at end of file
import { CustomModel } from './../common/CustomModel';
import { LotteryData } from './../../data/common/lottery/LotteryData';
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 {
/**
......
import { DataManager } from './../../manager/DataManager';
import { GFun } from "duiba-tc";
// import { GFun } from '../../../tc/util/GFun';
import { TwLang } from '../../util/TwLang';
import { GameModel } from '../common/GameModel';
import { GFun } from '../../../tc/util/GFun';
export class GameEndModel extends GameModel {
/**
......
import { GameModel } from '../common/GameModel';
import { DataManager } from './../../manager/DataManager';
import { TwLang } from '../../util/TwLang';
import { GFun } from "duiba-tc";
import { GFun } from '../../../tc/util/GFun';
export class GameLoseModel extends GameModel {
/**
* 剩余次数文案
......
import { GameModel } from '../common/GameModel';
import { DataManager } from '../../manager/DataManager';
import { TwLang } from '../../util/TwLang';
import { GFun } from "duiba-tc";
import { IGameOptionData } from '../..';
import { GFun } from '../../../tc/util/GFun';
import { IGameOptionData } from '../../data/game/getOptions/IGameOptionData';
// import { IGameOptionData } from '../../data/game/getOptions/IGameOptionData';
export class GameOptionModel extends GameModel {
/**
* 活动结束时间
......
import { NetManager } from './../../manager/NetManager';
import { DataManager } from './../../manager/DataManager';
import { GameModel } from '../common/GameModel';
import { GMath, GCache } from "duiba-tc";
import { IDynamicData } from '../..';
// import { GMath, GCache } from "duiba-tc";
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 {
/**
* 阶段提交次数
......
import { GameModel } from '../common/GameModel';
import { DataManager } from './../../manager/DataManager';
import { TwLang } from '../../util/TwLang';
import { GFun } from "duiba-tc";
import { IUserData } from '../..';
import { GFun } from '../../../tc/util/GFun';
import { IUserData } from '../../data/game/common/IUserData';
// import { IUserData } from '../../data/game/common/IUserData';
export class GameRealTimeRankModel extends GameModel {
/**
* 我得排行文案
......
......@@ -4,8 +4,8 @@ import { LotteryData } from '../../data/common/lottery/LotteryData';
import { TwLang } from '../../util/TwLang';
import { GFun } from '../../../tc/util/GFun';
import { IExposureData } from '../../data/common/IExposureData';
// import { GFun } from "duiba-tc";
// import { IExposureData } from '../..';
// import { GFun } from '../../../tc/util/GFun';
// import { IExposureData } from '../../data/common/IExposureData';
export class GameWinModel extends GameModel {
/**
......
......@@ -3,7 +3,7 @@ import { DataManager } from './../../manager/DataManager';
import { NetManager } from '../../manager/NetManager';
import { LotteryData } from '../../data/common/lottery/LotteryData';
import { IExposureData } from '../../data/common/IExposureData';
// import { IExposureData } from '../..';
// import { IExposureData } from '../../data/common/IExposureData';
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";
export default
......
import { NetManager } from "duiba-tw";
// import { NetManager } from "../../../libs/tw/manager/NetManager";
import Loading from "../../loading/Loading";
import { NetManager } from "../../../libs/tw/manager/NetManager";
/**
* 实时排行榜
......
import { INetData } from 'duiba-tc';
import { NetManager, DataManager, NetName } from 'duiba-tw';
import Scene from "../views/Scene";
// import { INetData } from '../../libs/tc/interface/INetData';
// import { DataManager } from '../../libs/tw/manager/DataManager'; import { NetManager } from '../../libs/tw/manager/NetManager';
import { INetData } from '../../libs/tc/interface/INetData';
import PanelCtrl from '../ctrls/panelCtrl';
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;
export default class PlayScene extends Scene {
......
import { NetManager } from 'duiba-tw';
import { DataManager } from 'duiba-tw';
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 {
constructor(){
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