Commit f463ea4a authored by wildfirecode13's avatar wildfirecode13

1

parents
Pipeline #280776 failed with stages
in 0 seconds
兑吧业务框架
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tc_1 = require("duiba-tc");
var Img = /** @class */ (function (_super) {
__extends(Img, _super);
function Img() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* 更新图片
* @param url 地址
* @param type 类型big大图
* @param x x坐标
* @param y y坐标
* @param w 宽
* @param h 高
* @param mask 遮罩
*/
Img.prototype.updateData = function (url, x, y, w, h, mask) {
var _this = this;
//加载奖品图片
duiba_tc_1.GFun.loadImage(url, function (image) {
_this.bitmapData = image;
_this.x = x;
_this.y = y;
var scaleXX = w / _this.bitmapData.width;
var scaleYY = h / _this.bitmapData.height;
_this.scaleX = scaleXX;
_this.scaleY = scaleYY;
if (!_this.mask && mask) {
_this.mask = mask;
}
});
};
return Img;
}(annie.Bitmap));
exports.Img = Img;
//# sourceMappingURL=Img.js.map
\ No newline at end of file
{"version":3,"file":"Img.js","sourceRoot":"","sources":["../../src/components/Img.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAgC;AAGhC;IAAyB,uBAAY;IAArC;;IAmDA,CAAC;IAzBG;;;;;;;;;OASG;IACI,wBAAU,GAAjB,UAAkB,GAAW,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,IAAkB;QAA7F,iBAcC;QAbG,QAAQ;QACR,eAAI,CAAC,SAAS,CAAC,GAAG,EAAE,UAAC,KAAK;YACtB,KAAI,CAAC,UAAU,GAAG,KAAK,CAAC;YACxB,KAAI,CAAC,CAAC,GAAG,CAAC,CAAC;YACX,KAAI,CAAC,CAAC,GAAG,CAAC,CAAC;YACX,IAAM,OAAO,GAAW,CAAC,GAAC,KAAI,CAAC,UAAU,CAAC,KAAK,CAAC;YAChD,IAAM,OAAO,GAAW,CAAC,GAAC,KAAI,CAAC,UAAU,CAAC,MAAM,CAAC;YACjD,KAAI,CAAC,MAAM,GAAG,OAAO,CAAC;YACtB,KAAI,CAAC,MAAM,GAAG,OAAO,CAAC;YACtB,IAAI,CAAC,KAAI,CAAC,IAAI,IAAI,IAAI,EAAE;gBACpB,KAAI,CAAC,IAAI,GAAG,IAAI,CAAC;aACpB;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IACL,UAAC;AAAD,CAAC,AAnDD,CAAyB,KAAK,CAAC,MAAM,GAmDpC;AAnDY,kBAAG"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tl_1 = require("duiba-tl");
/**
*Created by cuiliqiang on 2018/3/19
* 简易列表
*/
var List = /** @class */ (function (_super) {
__extends(List, _super);
/**
* 构造函数
* @param {any} itemClass 列表项
* @param {any} skinName 列表项皮肤
* @param {number} gap 列表项间隔
* @param {boolean} isVertical 是否是纵向
*/
function List(itemClass, gap, isVertical) {
if (isVertical === void 0) { isVertical = true; }
var _this = _super.call(this) || this;
/**
* 列表项实例数组
*/
_this.items = [];
_this.itemClass = itemClass;
_this.gap = gap;
_this.isVertical = isVertical;
return _this;
}
List.prototype.updateData = function (data) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
//新增项的坐标
var currentY = 0;
var currentX = 0;
var len = data.length;
var i = 0;
for (i; i < len; i++) {
//按照索引到数组里查询,没有责创建一个
var item = this.items[i];
if (!item) {
item = new this.itemClass();
this.items.push(item);
}
//刷新内部数据
item.initData.apply(item, [i, data[i]].concat(args));
if (!item.parent) {
duiba_tl_1.StageManager.ins.addChild(item, this);
}
item.x = currentX;
item.y = currentY;
//强制刷新否则无法获取宽高
item.update();
//设置下项的坐标
if (this.isVertical) {
currentY += item.height + this.gap;
}
else {
currentX += item.width + this.gap;
}
}
len = this.items.length;
if (data.length < len) {
for (i = data.length; i < len; i++) {
if (this.items[i].parent) {
duiba_tl_1.StageManager.ins.removeChild(this.items[i]);
}
}
}
};
return List;
}(annie.Sprite));
exports.List = List;
//# sourceMappingURL=List.js.map
\ No newline at end of file
{"version":3,"file":"List.js","sourceRoot":"","sources":["../../src/components/List.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAwC;AAGxC;;;GAGG;AAEH;IAA0B,wBAAY;IAqBlC;;;;;;OAMG;IACH,cAAY,SAAc,EAAE,GAAW,EAAE,UAAiB;QAAjB,2BAAA,EAAA,iBAAiB;QAA1D,YACI,iBAAO,SAIV;QAjBD;;WAEG;QACK,WAAK,GAAW,EAAE,CAAC;QAWvB,KAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,KAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,KAAI,CAAC,UAAU,GAAG,UAAU,CAAC;;IACjC,CAAC;IAEM,yBAAU,GAAjB,UAAkB,IAAW;QAAE,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,6BAAO;;QAClC,QAAQ;QACR,IAAI,QAAQ,GAAG,CAAC,CAAC;QACjB,IAAI,QAAQ,GAAG,CAAC,CAAC;QAEjB,IAAI,GAAG,GAAW,IAAI,CAAC,MA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BAAY,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC/C;aACJ;SACJ;IACL,CAAC;IACL,WAAC;AAAD,CAAC,AA1ED,CAA0B,KAAK,CAAC,MAAM,GA0ErC;AA1EY,oBAAI"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Item_1 = require("./Item");
var Img_1 = require("../Img");
/**
* 活动工具奖品列表项
*/
var CustomOptionItem = /** @class */ (function (_super) {
__extends(CustomOptionItem, _super);
function CustomOptionItem() {
return _super !== null && _super.apply(this, arguments) || this;
}
CustomOptionItem.prototype.initData = function (id, optionData) {
_super.prototype.initData.call(this, id);
if (!optionData) {
return;
}
this.optionData = optionData;
this.updateOptionImg();
this.updateOptionNameTxt();
};
/**
* 更新奖品图片
*/
CustomOptionItem.prototype.updateOptionImg = function () {
if (!this.optionImg) {
this.optionImg = new Img_1.Img();
this.addChild(this.optionImg);
}
this.optionImg.updateData(this.optionData.logo, this.ix, this.iy, this.iw, this.ih);
};
/**
* 更新奖品名字文案
*/
CustomOptionItem.prototype.updateOptionNameTxt = function () {
if (this.view.optionNameTxt) {
this.view.optionNameTxt.text = this.optionData.name;
}
};
return CustomOptionItem;
}(Item_1.Item));
exports.CustomOptionItem = CustomOptionItem;
//# sourceMappingURL=CustomOptionItem.js.map
\ No newline at end of file
{"version":3,"file":"CustomOptionItem.js","sourceRoot":"","sources":["../../../src/components/item/CustomOptionItem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,+BAA8B;AAC9B,8BAA6B;AAE7B;;GAEG;AACH;IAAsC,oCAAI;IAA1C;;IAwDA,CAAC;IA7BU,mCAAQ,GAAf,UAAgB,EAAU,EAAE,UAA6B;QACrD,iBAAM,QAAQ,YAAC,EAAE,CAAC,CAAC;QACnB,IAAI,CAAC,UAAU,EAAE;YACb,OAAO;SACV;QACD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC/B,CAAC;IAED;;OAEG;IACO,0CAAe,GAAzB;QACI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACjB,IAAI,CAAC,SAAS,GAAG,IAAI,SAAG,EAAE,CAAC;YAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACjC;QACD,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IACxF,CAAC;IAED;;OAEG;IACO,8CAAmB,GAA7B;QACI,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;SACvD;IACL,CAAC;IACL,uBAAC;AAAD,CAAC,AAxDD,CAAsC,WAAI,GAwDzC;AAxDY,4CAAgB"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Img_1 = require("./../Img");
var List_1 = require("./../List");
var Item_1 = require("./Item");
var duiba_tl_1 = require("duiba-tl");
/**
*Created by cuiliqiang on 2018/3/20
* 活动结束排行榜列表项
*/
var GameEndRankItem = /** @class */ (function (_super) {
__extends(GameEndRankItem, _super);
function GameEndRankItem() {
return _super.call(this) || this;
}
GameEndRankItem.prototype.initUI = function () {
_super.prototype.initUI.call(this);
this.list = new List_1.List(this.itemClass, this.gap);
duiba_tl_1.StageManager.ins.addChild(this.list, this.view);
this.list.x = this.lx;
this.list.y = this.ly;
this.optionImg = new Img_1.Img();
duiba_tl_1.StageManager.ins.addChild(this.optionImg, this.view);
};
GameEndRankItem.prototype.initData = function (id, rankData) {
_super.prototype.initData.call(this, id);
if (!rankData) {
return;
}
this.rankData = rankData;
this.updateRankTxt();
this.updateOptionImg();
this.updateUserList();
};
/**
* 更新排行文案
*/
GameEndRankItem.prototype.updateRankTxt = function () {
if (this.view.nameTxt) {
this.view.nameTxt.text = this.rankData.name + ":";
}
};
/**
* 更新奖品图片
*/
GameEndRankItem.prototype.updateOptionImg = function () {
this.optionImg.updateData(this.rankData.imageUrl, this.ix, this.iy, this.iw, this.ih);
};
/**
* 更新用户列表
*/
GameEndRankItem.prototype.updateUserList = function () {
this.list.updateData(this.rankData.users);
};
return GameEndRankItem;
}(Item_1.Item));
exports.GameEndRankItem = GameEndRankItem;
//# sourceMappingURL=GameEndRankItem.js.map
\ No newline at end of file
{"version":3,"file":"GameEndRankItem.js","sourceRoot":"","sources":["../../../src/components/item/GameEndRankItem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gCAA+B;AAC/B,kCAAiC;AACjC,+BAA8B;AAE9B,qCAAwC;AACxC;;;GAGG;AACH;IAAqC,mCAAI;IAwDrC;eACI,iBAAO;IACX,CAAC;IAEM,gCAAM,GAAb;QACI,iBAAM,M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;IAC1F,CAAC;IAED;;OAEG;IACO,wCAAc,GAAxB;QACI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,CAAC;IAEL,sBAAC;AAAD,CAAC,AAzGD,CAAqC,WAAI,GAyGxC;AAzGY,0CAAe"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var WxLang_1 = require("./../../util/WxLang");
var Img_1 = require("./../Img");
var Item_1 = require("./Item");
var duiba_tl_1 = require("duiba-tl");
var duiba_tc_1 = require("duiba-tc");
/**
*Created by cuiliqiang on 2018/3/19
* 奖品列表项
*/
var GameOptionItem = /** @class */ (function (_super) {
__extends(GameOptionItem, _super);
function GameOptionItem() {
return _super.call(this) || this;
}
GameOptionItem.prototype.initData = function (id, gameOptionData) {
_super.prototype.initData.call(this, id);
if (!gameOptionData) {
return;
}
this.gameOptionData = gameOptionData;
this.updateOptionImg();
this.updateScopeTxt();
this.updateDescTxt();
this.updateOptionNameTxt();
};
/**
* 更新奖品图片
*/
GameOptionItem.prototype.updateOptionImg = function () {
if (!this.optionImg) {
this.optionImg = new Img_1.Img();
duiba_tl_1.StageManager.ins.addChild(this.optionImg, this.view);
}
this.optionImg.updateData(this.gameOptionData.logo, this.ix, this.iy, this.iw, this.ih);
};
/**
* 更新排名范围文案
*/
GameOptionItem.prototype.updateScopeTxt = function () {
if (this.view.scopeTxt) {
if (window["specialName"]) {
this.view.scopeTxt.text = window["specialName"];
}
else {
//自动开奖
if (this.gameOptionData.autoOpen) {
this.view.scopeTxt.text = WxLang_1.WxLang.lang_005;
}
else {
this.view.scopeTxt.text = duiba_tc_1.GFun.replace(WxLang_1.WxLang.lang_006, [this.gameOptionData.scope]);
}
}
}
};
/**
* 更新奖品描述文案
*/
GameOptionItem.prototype.updateDescTxt = function () {
if (this.view.descTxt) {
this.view.descTxt.text = this.gameOptionData.description;
}
};
/**
* 更新奖品名字文案
*/
GameOptionItem.prototype.updateOptionNameTxt = function () {
if (this.view.nameTxt) {
this.view.nameTxt.text = this.gameOptionData.name;
}
};
return GameOptionItem;
}(Item_1.Item));
exports.GameOptionItem = GameOptionItem;
//# sourceMappingURL=GameOptionItem.js.map
\ No newline at end of file
{"version":3,"file":"GameOptionItem.js","sourceRoot":"","sources":["../../../src/components/item/GameOptionItem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,8CAA6C;AAC7C,gCAA+B;AAC/B,+BAA8B;AAE9B,qCAAwC;AACxC,qCAAgC;AAChC;;;GAGG;AACH;IAAoC,kCAAI;IA2BpC;eACI,iBAAO;IACX,CAAC;IAEM,iCAAQ,GAAf,UAAgB,EAAU,EAAE,cAA+B;QACvD,iBAAM,QAAQ,YAAC,EAAE,CAAC,CAAC;QACnB,IAAI,CAAC,cAAc,EAAE;YACjB,OAAO;SACV;QACD,IAAI,CAAC,cAAc,GAAG,cAAc,CAAC;QACrC,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAC/B,CAAC;IAED;;OAEG;IACO,wCAAe,GAAzB;QACI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACjB,IAAI,CAAC,SAAS,GAAG,IAAI,SAAG,EAAE,CAAC;YAC3B,uBAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA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var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var Item_1 = require("./Item");
var duiba_tw_1 = require("duiba-tw");
var duiba_tl_1 = require("duiba-tl");
/**
*Created by cuiliqiang on 2018/3/20
* 用户信息列表项
*/
var GameUserItem = /** @class */ (function (_super) {
__extends(GameUserItem, _super);
function GameUserItem() {
return _super !== null && _super.apply(this, arguments) || this;
}
GameUserItem.prototype.initUI = function () {
_super.prototype.initUI.call(this);
if (this.cl) {
this.bg = duiba_tl_1.CreateFactory.createRect(this.cl, 1, 0, 0, this.bw, this.bh);
this.bg.alpha = 0.7;
duiba_tl_1.StageManager.ins.addChild(this.bg, this, 0);
}
this.unitName = '';
};
GameUserItem.prototype.initData = function (id, userData) {
_super.prototype.initData.call(this, id);
if (!userData) {
return;
}
this.userData = userData;
this.updateMyRankBg();
this.updateRankTxt();
this.updateConsumerIdTxt();
this.updateNickNameTxt();
this.updateScoreTxt();
};
/**
* 更新我得排行状态
*/
GameUserItem.prototype.updateMyRankBg = function () {
if (this.cl) {
if (this.userData.rank == duiba_tw_1.DataManager.ins.getInfoData.rank) {
this.bg.visible = true;
}
else {
this.bg.visible = false;
}
}
};
/**
* 更新排行文案
*/
GameUserItem.prototype.updateRankTxt = function () {
if (this.view.rankTxt) {
this.view.rankTxt.text = this.userData.rank;
}
};
/**
* 更新用户ID文案
*/
GameUserItem.prototype.updateConsumerIdTxt = function () {
if (this.view.cidTxt) {
this.view.cidTxt.text = this.userData.cid;
}
};
/**
* 更新用户昵称文案
*/
GameUserItem.prototype.updateNickNameTxt = function () {
if (this.view.nickNameTxt) {
this.view.nickNameTxt.text = this.userData.nickName ? this.userData.nickName : this.userData.cid;
}
};
/**
* 更新用户成绩文案
*/
GameUserItem.prototype.updateScoreTxt = function () {
if (this.view.scoreTxt) {
this.view.scoreTxt.text = this.userData.maxScore + this.unitName;
}
};
return GameUserItem;
}(Item_1.Item));
exports.GameUserItem = GameUserItem;
//# sourceMappingURL=GameUserItem.js.map
\ No newline at end of file
{"version":3,"file":"GameUserItem.js","sourceRoot":"","sources":["../../../src/components/item/GameUserItem.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+BAA8B;AAC9B,qCAAkD;AAClD,qCAAuD;AAEvD;;;GAGG;AACH;IAAkC,gCAAI;IAAtC;;IAoGA,CAAC;IAvEU,6BAAM,GAAb;QACI,iBAAM,MAAM,WAAE,CAAC;QACf,IAAI,IAAI,CAAC,EAAE,EAAE;YACT,IAAI,CAAC,EAAE,GAAG,wBAAa,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;YACvE,IAAI,CAAC,EAAE,CAAC,KAAK,GAAG,GAAG,CAAC;YACpB,uBAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;SAC/C;QACD,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;IACvB,CAAC;IAEM,+BAAQ,GAAf,UAAgB,EAAU,EAAE,QAAmB;QAC3C,iBAAM,QAAQ,YAAC,EAAE,CAAC,CAAC;QACnB,IAAI,CAAC,QAAQ,EAAE;YACX,OAAO;SACV;QACD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,IAAI,CA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AC,QAAQ,CAAC;SACpE;IACL,CAAC;IACL,mBAAC;AAAD,CAAC,AApGD,CAAkC,WAAI,GAoGrC;AApGY,oCAAY"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tl_1 = require("duiba-tl");
/**
* 列表项
*/
var Item = /** @class */ (function (_super) {
__extends(Item, _super);
function Item() {
return _super.call(this) || this;
}
Item.prototype.initUI = function () {
if (typeof (this.skinClass) === 'string') {
this.skinClass = eval(this.skinClass);
}
this.view = new this.skinClass();
duiba_tl_1.StageManager.ins.addChild(this.view, this);
};
Item.prototype.initData = function (id) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
};
return Item;
}(annie.Sprite));
exports.Item = Item;
//# sourceMappingURL=Item.js.map
\ No newline at end of file
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../src/components/item/Item.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAwC;AACxC;;GAEG;AACH;IAA0B,wBAAY;IAiBlC;eACI,iBAAO;IACX,CAAC;IAEM,qBAAM,GAAb;QACI,IAAI,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,QAAQ,EAAE;YACtC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACzC;QACD,IAAI,CAAC,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;QACjC,uBAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC/C,CAAC;IAEM,uBAAQ,GAAf,UAAgB,EAAU;QAAE,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,6BAAO;;QAC/B,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACd,IAAI,CAAC,MAAM,EAAE,CAAC;YACd,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;SACtB;IACL,CAAC;IACL,WAAC;AAAD,CAAC,AAnCD,CAA0B,KAAK,CAAC,MAAM,GAmCrC;AAnCY,oBAAI"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
*Created by cuiliqiang on 2018/3/13
*/
var ModuleName;
(function (ModuleName) {
//游戏规则面板
ModuleName["RULE_PANEL"] = "RulePanel";
//分享面板
ModuleName["SHARE_PANEL"] = "SharePanel";
//未中奖面板
ModuleName["LOSE_PANEL"] = "LosePanel";
//开始场景
ModuleName["GAME_START_SCENE"] = "GameStartScene";
//游戏玩法场景
ModuleName["GAME_PLAY_SCENE"] = "GamePlayScene";
//活动结束场景
ModuleName["GAME_END_SCENE"] = "GameEndScene";
//中奖信息场景
ModuleName["GAME_WINNER_SCENE"] = "GameWinnerScene";
//活动奖品面板
ModuleName["GAME_OPTION_PANEL"] = "GameOptionPanel";
//游戏未中奖
ModuleName["GAME_LOSE_PANEL"] = "GameLosePanel";
//游戏中奖面板
ModuleName["GAME_WIN_PANEL"] = "GameWinPanel";
//排行榜面板
ModuleName["GAME_END_RANK_PANEL"] = "GameEndRankPanel";
//实时排行榜面板
ModuleName["GAME_REAL_TIME_RANK_PANEL"] = "GameRealTimeRankPanel";
//引导场景
ModuleName["GAME_GUIDE_SCENE"] = "GameGuideScene";
//自定义活动工具玩法场景
ModuleName["CUSTOM_PLAY_SCENE"] = "CustomPlayScene";
//自定义活动工具中奖面板
ModuleName["CUSTOM_WIN_PANEL"] = "CustomWinPanel";
//自定义活动工具未中奖面板
ModuleName["CUSTOM_LOSE_PANEL"] = "CustomLosePanel";
//自定义活动工具奖品详情面板
ModuleName["CUSTOM_OPTION_INFO_PANEL"] = "CustomOptionInfoPanel";
//插件抽奖面板
ModuleName["PLUG_PANEL"] = "PlugPanel";
//插件中奖面板
ModuleName["PLUG_WIN_PANEL"] = "PlugWinPanel";
//插件未中奖面板
ModuleName["PLUG_LOSE_PANEL"] = "PlugLosePanel";
//签到养成领养面板
ModuleName["SIGN_ADOPTE_PANEL"] = "SignAdoptePanel";
//签到养成领养面板
ModuleName["SIGN_PLAY_SCENE"] = "SignPlayScene";
})(ModuleName = exports.ModuleName || (exports.ModuleName = {}));
//# sourceMappingURL=ModuleName.js.map
\ No newline at end of file
{"version":3,"file":"ModuleName.js","sourceRoot":"","sources":["../../src/enum/ModuleName.ts"],"names":[],"mappings":";;AAAA;;GAEG;AACH,IAAY,UA8CX;AA9CD,WAAY,UAAU;IAClB,QAAQ;IACR,sCAAwB,CAAA;IACxB,MAAM;IACN,wCAA0B,CAAA;IAC1B,OAAO;IACP,sCAAwB,CAAA;IACxB,MAAM;IACN,iDAAmC,CAAA;IACnC,QAAQ;IACR,+CAAiC,CAAA;IACjC,QAAQ;IACR,6CAA+B,CAAA;IAC/B,QAAQ;IACR,mDAAqC,CAAA;IACrC,QAAQ;IACR,mDAAqC,CAAA;IACrC,OAAO;IACP,+CAAiC,CAAA;IACjC,QAAQ;IACR,6CAA+B,CAAA;IAC/B,OAAO;IACP,sDAAwC,CAAA;IACxC,SAAS;IACT,iEAAmD,CAAA;IACnD,MAAM;IACN,iDAAmC,CAAA;IACnC,aAAa;IACb,mDAAqC,CAAA;IACrC,aAAa;IACb,iDAAmC,CAAA;IACnC,cAAc;IACd,mDAAqC,CAAA;IACrC,eAAe;IACf,gEAAkD,CAAA;IAClD,QAAQ;IACR,sCAAwB,CAAA;IACxB,QAAQ;IACR,6CAA+B,CAAA;IAC/B,SAAS;IACT,+CAAiC,CAAA;IAEjC,UAAU;IACV,mDAAqC,CAAA;IACrC,UAAU;IACV,+CAAiC,CAAA;AACrC,CAAC,EA9CW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QA8CrB"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var ActivityModule_1 = require("./module/common/ActivityModule");
exports.ActivityModule = ActivityModule_1.ActivityModule;
var WxLang_1 = require("./util/WxLang");
exports.WxLang = WxLang_1.WxLang;
var ModuleName_1 = require("./enum/ModuleName");
exports.ModuleName = ModuleName_1.ModuleName;
var Item_1 = require("./components/item/Item");
exports.Item = Item_1.Item;
var Img_1 = require("./components/Img");
exports.Img = Img_1.Img;
var List_1 = require("./components/List");
exports.List = List_1.List;
var RuleModule_1 = require("./module/common/RuleModule");
exports.RuleModule = RuleModule_1.RuleModule;
var ShareModule_1 = require("./module/common/ShareModule");
exports.ShareModule = ShareModule_1.ShareModule;
var GameEndModule_1 = require("./module/game/GameEndModule");
exports.GameEndModule = GameEndModule_1.GameEndModule;
var GameEndRankModule_1 = require("./module/game/GameEndRankModule");
exports.GameEndRankModule = GameEndRankModule_1.GameEndRankModule;
var GamePlayModule_1 = require("./module/game/GamePlayModule");
exports.GamePlayModule = GamePlayModule_1.GamePlayModule;
var GameGuideModule_1 = require("./module/game/GameGuideModule");
exports.GameGuideModule = GameGuideModule_1.GameGuideModule;
var GameOptionModule_1 = require("./module/game/GameOptionModule");
exports.GameOptionModule = GameOptionModule_1.GameOptionModule;
var GameLoseModule_1 = require("./module/game/GameLoseModule");
exports.GameLoseModule = GameLoseModule_1.GameLoseModule;
var GameWinModule_1 = require("./module/game/GameWinModule");
exports.GameWinModule = GameWinModule_1.GameWinModule;
var GameRealTimeRankModule_1 = require("./module/game/GameRealTimeRankModule");
exports.GameRealTimeRankModule = GameRealTimeRankModule_1.GameRealTimeRankModule;
var GameStartModule_1 = require("./module/game/GameStartModule");
exports.GameStartModule = GameStartModule_1.GameStartModule;
var GameWinnerModule_1 = require("./module/game/GameWinnerModule");
exports.GameWinnerModule = GameWinnerModule_1.GameWinnerModule;
var GameEndRankItem_1 = require("./components/item/GameEndRankItem");
exports.GameEndRankItem = GameEndRankItem_1.GameEndRankItem;
var GameOptionItem_1 = require("./components/item/GameOptionItem");
exports.GameOptionItem = GameOptionItem_1.GameOptionItem;
var GameUserItem_1 = require("./components/item/GameUserItem");
exports.GameUserItem = GameUserItem_1.GameUserItem;
var CustomOptionInfoModule_1 = require("./module/custom/CustomOptionInfoModule");
exports.CustomOptionInfoModule = CustomOptionInfoModule_1.CustomOptionInfoModule;
var CustomPlayModule_1 = require("./module/custom/CustomPlayModule");
exports.CustomPlayModule = CustomPlayModule_1.CustomPlayModule;
var CustomWinModule_1 = require("./module/custom/CustomWinModule");
exports.CustomWinModule = CustomWinModule_1.CustomWinModule;
var CustomOptionItem_1 = require("./components/item/CustomOptionItem");
exports.CustomOptionItem = CustomOptionItem_1.CustomOptionItem;
var PlugModule_1 = require("./module/plug/PlugModule");
exports.PlugModule = PlugModule_1.PlugModule;
var PlugWinModule_1 = require("./module/plug/PlugWinModule");
exports.PlugWinModule = PlugWinModule_1.PlugWinModule;
var SignPlayModule_1 = require("./module/sign/SignPlayModule");
exports.SignPlayModule = SignPlayModule_1.SignPlayModule;
var SignAdopteModule_1 = require("./module/sign/SignAdopteModule");
exports.SignAdopteModule = SignAdopteModule_1.SignAdopteModule;
//# sourceMappingURL=index.js.map
\ No newline at end of file
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,iEAAgE;AAgClB,yBAhCrC,+BAAc,CAgCqC;AA/B5D,wCAAuC;AAmDnC,iBAnDK,eAAM,CAmDL;AAlDV,gDAA+C;AA4C3C,qBA5CK,uBAAU,CA4CL;AA3Cd,+CAA8C;AA6B1C,eA7BK,WAAI,CA6BL;AA5BR,wCAAuC;AA4B7B,cA5BD,SAAG,CA4BC;AA3Bb,0CAAyC;AA2B1B,eA3BN,WAAI,CA2BM;AA1BnB,yDAAwD;AA0BnC,qBA1BZ,uBAAU,CA0BY;AAzB/B,2DAA0D;AAyBzB,sBAzBxB,yBAAW,CAyBwB;AAxB5C,6DAA4D;AA2BxD,wBA3BK,6BAAa,CA2BL;AA1BjB,qEAAoE;AA0BjD,4BA1BV,qCAAiB,CA0BU;AAzBpC,+DAA8D;AAyBxB,yBAzB7B,+BAAc,CAyB6B;AAxBpD,iEAAgE;AAwBV,0BAxB7C,iCAAe,CAwB6C;AAvBrE,mEAAkE;AAuBK,2BAvB9D,mCAAgB,CAuB8D;AAtBvF,+DAA8D;AAuB1D,yBAvBK,+BAAc,CAuBL;AAtBlB,6DAA4D;AAsBxC,wBAtBX,6BAAa,CAsBW;AArBjC,+EAA8E;AAqB3C,iCArB1B,+CAAsB,CAqB0B;AApBzD,iEAAgE;AAoBL,0BApBlD,iCAAe,CAoBkD;AAnB1E,mEAAkE;AAmBU,2BAnBnE,mCAAgB,CAmBmE;AAlB5F,qEAAoE;AAmBhE,0BAnBK,iCAAe,CAmBL;AAlBnB,mEAAkE;AAkB7C,yBAlBZ,+BAAc,CAkBY;AAjBnC,+DAA8D;AAiBzB,uBAjB5B,2BAAY,CAiB4B;AAhBjD,iFAAgF;AAmB5E,iCAnBK,+CAAsB,CAmBL;AAlB1B,qEAAoE;AAkBxC,2BAlBnB,mCAAgB,CAkBmB;AAjB5C,mEAAkE;AAiBpB,0BAjBrC,iCAAe,CAiBqC;AAhB7D,uEAAsE;AAgBP,2BAhBtD,mCAAgB,CAgBsD;AAf/E,uDAAsD;AAkBlD,qBAlBK,uBAAU,CAkBL;AAjBd,6DAA4D;AAiB5C,wBAjBP,6BAAa,CAiBO;AAhB7B,+DAA8D;AAsBxC,yBAtBb,+BAAc,CAsBa;AArBpC,mEAAkE;AAqB9D,2BArBK,mCAAgB,CAqBL"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tl_1 = require("duiba-tl");
var duiba_tw_1 = require("duiba-tw");
var Img_1 = require("../../components/Img");
/**
* 中奖面板
*/
var ActivityModule = /** @class */ (function (_super) {
__extends(ActivityModule, _super);
function ActivityModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
ActivityModule.prototype.initModel = function () {
this.model = new duiba_tw_1.ActivityModel();
};
ActivityModule.prototype.initUI = function () {
_super.prototype.initUI.call(this);
this.initImg();
};
/**
* 初始化奖品图片
*/
ActivityModule.prototype.initImg = function () {
this.optionImg = new Img_1.Img();
duiba_tl_1.StageManager.ins.addChild(this.optionImg, this.view);
};
ActivityModule.prototype.updateData = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
_super.prototype.updateData.call(this);
this.updateOptionNameTxt();
this.updateOptionImg();
this.model.showLog();
};
/**
* 更新奖品名字文案
*/
ActivityModule.prototype.updateOptionNameTxt = function () {
if (this.view.optionNameTxt) {
this.view.optionNameTxt.text = this.model.optionName;
}
};
/**
* 更新图片
*/
ActivityModule.prototype.updateOptionImg = function () {
var size = this.model.optionImgSize;
this.optionImg.updateData(this.model.optionImg, this.data.uiCfg['ix_' + size], this.data.uiCfg['iy_' + size], this.data.uiCfg['iw_' + size], this.data.uiCfg['ih_' + size], this.data.uiCfg['mask_' + size]);
};
ActivityModule.prototype.addEvent = function () {
_super.prototype.addEvent.call(this);
this.addClick(this.view.useBtn, this.onClick_useBtn);
this.addClick(this.optionImg, this.onClick_useBtn);
};
ActivityModule.prototype.onClick_useBtn = function (e) {
this.delayEnable(this.view.useBtn, 5000);
this.model.onUse();
};
ActivityModule.prototype.removeEvent = function () {
_super.prototype.removeEvent.call(this);
this.removeClick(this.view.useBtn);
this.removeClick(this.optionImg);
};
return ActivityModule;
}(duiba_tl_1.PanelModule));
exports.ActivityModule = ActivityModule;
//# sourceMappingURL=ActivityModule.js.map
\ No newline at end of file
{"version":3,"file":"ActivityModule.js","sourceRoot":"","sources":["../../../src/module/common/ActivityModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAqD;AACrD,qCAAyC;AACzC,4CAA2C;AAE3C;;GAEG;AACH;IAAoC,kCAAW;IAA/C;;IA2EA,CAAC;IAhEa,kCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,wBAAa,EAAE,CAAC;IACrC,CAAC;IAES,+BAAM,GAAhB;QACI,iBAAM,MAAM,WAAE,CAAC;QACf,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED;;OAEG;IACO,gCAAO,GAAjB;QACI,IAAI,CAAC,SAAS,GAAG,IAAI,SAAG,EAAE,CAAC;QAC3B,uBAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;IAEM,mCAAU,GAAjB;QAAkB,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACrB,iBAAM,UAAU,WAAE,CAAC;QACnB,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;IACzB,CAAC;IAED;;OAEG;IACO,4CAAmB,GAA7B;QACI,IAAI,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;YACzB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC;SACxD;IACL,CAAC;IAED;;OAEG;IACO,wCAAe,GAAzB;QACI,IAAM,IAAI,GAAW,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;QAC9C,IAAI,CAAC,SAAS,CAAC,UAAU,CACrB,IAAI,CAAC,KAAK,CAAC,SAAS,EACpB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,EAC7B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,EAC7B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,EAC7B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,EAC7B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAClC,CAAC;IACN,CAAC;IAES,iCAAQ,GAAlB;QACI,iBAAM,QAAQ,WAAE,CAAC;QACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;QACrD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;IACvD,CAAC;IAEO,uCAAc,GAAtB,UAAuB,CAAmB;QACtC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QACzC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACvB,CAAC;IAES,oCAAW,GAArB;QACI,iBAAM,WAAW,WAAE,CAAC;QACpB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACnC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACrC,CAAC;IACL,qBAAC;AAAD,CAAC,AA3ED,CAAoC,sBAAW,GA2E9C;AA3EY,wCAAc"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tw_1 = require("duiba-tw");
var duiba_tl_1 = require("duiba-tl");
var WxLang_1 = require("../../util/WxLang");
/**
*Created by cuiliqiang on 2018/3/13
* 规则面板
*/
var RuleModule = /** @class */ (function (_super) {
__extends(RuleModule, _super);
function RuleModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
RuleModule.prototype.initModel = function () {
this.model = new duiba_tw_1.RuleModel();
};
RuleModule.prototype.initUI = function () {
_super.prototype.initUI.call(this);
//创建悬浮的html元素(canvas 对文本支持比较差,我们用源生的html文本)
this.section = document.createElement('section');
this.section.id = "rule";
this.section.style.overflowX = "hidden";
this.section.style.overflowY = "auto";
this.section.style.width = this.data.uiCfg.ow + "px";
this.section.style.height = this.data.uiCfg.oh + "px";
this.section.style.lineHeight = this.data.uiCfg.lh + "px";
this.section.style.fontFamily = WxLang_1.WxLang.lang_003;
this.section.style.fontSize = this.data.uiCfg.fs + 'px';
this.section.style.color = this.data.uiCfg.fc;
// document.body.appendChild(this.section);
//创建Floatview 把我们要悬浮的元素封装进去
this.rule = new annie.FloatDisplay();
duiba_tl_1.StageManager.ins.addChild(this.rule, this.view);
this.rule.x = this.data.uiCfg.ox;
this.rule.y = this.data.uiCfg.oy;
};
RuleModule.prototype.updateData = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
_super.prototype.updateData.call(this);
this.rule.init(this.section);
this.section.innerHTML = this.model.ruleTxt;
};
RuleModule.prototype.onClick_closeBtn = function (e) {
this.rule.delElement();
_super.prototype.onClick_closeBtn.call(this, e);
};
return RuleModule;
}(duiba_tl_1.PanelModule));
exports.RuleModule = RuleModule;
//# sourceMappingURL=RuleModule.js.map
\ No newline at end of file
{"version":3,"file":"RuleModule.js","sourceRoot":"","sources":["../../../src/module/common/RuleModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAqC;AACrC,qCAAqD;AACrD,4CAA2C;AAC3C;;;GAGG;AACH;IAAgC,8BAAW;IAA3C;;IAkDA,CAAC;IAnCa,8BAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,oBAAS,EAAE,CAAC;IACjC,CAAC;IAES,2BAAM,GAAhB;QACI,iBAAM,MAAM,WAAE,CAAC;QACf,2CAA2C;QAC3C,IAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QACjD,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,MAAM,CAAC;QACzB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;QACxC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;QACtC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC;QACrD,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC;QACtD,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC;QAC1D,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,GAAG,eAAM,CAAC,QAAQ,CAAC;QAChD,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC;QACxD,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9C,2CAA2C;QAC3C,2BAA2B;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;QACrC,uBAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAChD,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IACrC,CAAC;IAEM,+BAAU,GAAjB;QAAkB,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACrB,iBAAM,UAAU,WAAE,CAAC;QACnB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAC7B,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;IAChD,CAAC;IAES,qCAAgB,GAA1B,UAA2B,CAAmB;QAC1C,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;QACvB,iBAAM,gBAAgB,YAAC,CAAC,CAAC,CAAC;IAC9B,CAAC;IACL,iBAAC;AAAD,CAAC,AAlDD,CAAgC,sBAAW,GAkD1C;AAlDY,gCAAU"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tl_1 = require("duiba-tl");
/**
*Created by cuiliqiang on 2018/3/20
* 微信分享面板
*/
var ShareModule = /** @class */ (function (_super) {
__extends(ShareModule, _super);
function ShareModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
ShareModule.prototype.addEvent = function () {
_super.prototype.addEvent.call(this);
this.addClick(this, this.onClick_closeBtn);
};
ShareModule.prototype.removeEvent = function () {
_super.prototype.removeEvent.call(this);
this.removeClick(this);
};
return ShareModule;
}(duiba_tl_1.PanelModule));
exports.ShareModule = ShareModule;
//# sourceMappingURL=ShareModule.js.map
\ No newline at end of file
{"version":3,"file":"ShareModule.js","sourceRoot":"","sources":["../../../src/module/common/ShareModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAuC;AAEvC;;;GAGG;AACH;IAAiC,+BAAW;IAA5C;;IAUA,CAAC;IATa,8BAAQ,GAAlB;QACI,iBAAM,QAAQ,WAAE,CAAC;QACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAC/C,CAAC;IAES,iCAAW,GAArB;QACI,iBAAM,WAAW,WAAE,CAAC;QACpB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IACL,kBAAC;AAAD,CAAC,AAVD,CAAiC,sBAAW,GAU3C;AAVY,kCAAW"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tl_1 = require("duiba-tl");
/**
*
*/
var CustomOptionInfoModule = /** @class */ (function (_super) {
__extends(CustomOptionInfoModule, _super);
function CustomOptionInfoModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
CustomOptionInfoModule.prototype.updateData = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
};
return CustomOptionInfoModule;
}(duiba_tl_1.Module));
exports.CustomOptionInfoModule = CustomOptionInfoModule;
//# sourceMappingURL=CustomOptionInfoModule.js.map
\ No newline at end of file
{"version":3,"file":"CustomOptionInfoModule.js","sourceRoot":"","sources":["../../../src/module/custom/CustomOptionInfoModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAkC;AAClC;;GAEG;AACH;IAA4C,0CAAM;IAAlD;;IAIA,CAAC;IAHU,2CAAU,GAAjB;QAAkB,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;IAEzB,CAAC;IACL,6BAAC;AAAD,CAAC,AAJD,CAA4C,iBAAM,GAIjD;AAJY,wDAAsB"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ModuleName_1 = require("./../../enum/ModuleName");
var duiba_tl_1 = require("duiba-tl");
var duiba_tw_1 = require("duiba-tw");
var CustomPlayModule = /** @class */ (function (_super) {
__extends(CustomPlayModule, _super);
function CustomPlayModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
CustomPlayModule.prototype.initModel = function () {
this.model = new duiba_tw_1.CustomPlayModel();
};
CustomPlayModule.prototype.initUI = function () {
_super.prototype.initUI.call(this);
this.initList();
};
/**
* 创建奖品列表
*/
CustomPlayModule.prototype.initList = function () {
this.list = new annieUI.ScrollList(this.data.uiCfg.itemClass, this.data.uiCfg.iw, this.data.uiCfg.ih, this.data.uiCfg.lw, this.data.uiCfg.lh, this.data.uiCfg.isVertical, this.data.uiCfg.cols);
this.list.x = this.data.uiCfg.lx;
this.list.y = this.data.uiCfg.ly;
duiba_tl_1.StageManager.ins.addChild(this.list, this.view);
};
CustomPlayModule.prototype.updateData = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
this.updateCountTxt();
this.updateList();
};
/**
* 更新奖品列表
*/
CustomPlayModule.prototype.updateList = function () {
this.list.updateData(this.model.optionList, true);
};
/**
* 更新剩余次数文案
*/
CustomPlayModule.prototype.updateCountTxt = function () {
if (this.view.countTxt) {
this.view.countTxt.text = this.model.countTxt;
}
};
CustomPlayModule.prototype.onClick_customDoJoinBtn = function (e) {
this.enableMouseEvt(false);
this.model.customDoJoin(this.customDoJoin_result.bind(this), this.model.getCustomOrderStatus);
};
CustomPlayModule.prototype.customDoJoin_result = function (success) {
this.enableMouseEvt(true);
if (!success) {
return;
}
var moduleName;
if (this.model.plugIsWinning) {
moduleName = ModuleName_1.ModuleName.CUSTOM_WIN_PANEL;
}
else {
moduleName = ModuleName_1.ModuleName.CUSTOM_LOSE_PANEL;
}
duiba_tl_1.ModuleManager.ins.openModule(moduleName);
};
CustomPlayModule.prototype.onClick_ruleBtn = function (e) {
this.delayEnable(this.view.ruleBtn, 2000);
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.RULE_PANEL, this.model.rule);
};
CustomPlayModule.prototype.onClick_recordBtn = function (e) {
this.delayEnable(this.view.recordBtn, 5000);
window.location.href = duiba_tw_1.TwFun.getRecordUrl('00');
};
CustomPlayModule.prototype.addEvent = function () {
_super.prototype.addEvent.call(this);
if (this.view.customDoJoinBtn) {
this.addClick(this.view.customDoJoinBtn, this.onClick_customDoJoinBtn);
}
if (this.view.ruleBtn) {
this.addClick(this.view.ruleBtn, this.onClick_ruleBtn);
}
if (this.view.recordBtn) {
this.addClick(this.view.recordBtn, this.onClick_recordBtn);
}
};
CustomPlayModule.prototype.removeEvent = function () {
_super.prototype.addEvent.call(this);
if (this.view.customDoJoinBtn) {
this.removeClick(this.view.customDoJoinBtn);
}
if (this.view.ruleBtn) {
this.removeClick(this.view.ruleBtn);
}
if (this.view.recordBtn) {
this.removeClick(this.view.recordBtn);
}
};
return CustomPlayModule;
}(duiba_tl_1.Module));
exports.CustomPlayModule = CustomPlayModule;
//# sourceMappingURL=CustomPlayModule.js.map
\ No newline at end of file
{"version":3,"file":"CustomPlayModule.js","sourceRoot":"","sources":["../../../src/module/custom/CustomPlayModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAAqD;AACrD,qCAA+D;AAC/D,qCAAkD;AAElD;IAAsC,oCAAM;IAA5C;;IAqHA,CAAC;IA1Ga,oCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,0BAAe,EAAE,CAAC;IACvC,CAAC;IAES,iCAAM,GAAhB;QACI,iBAAM,MAAM,WAAE,CAAC;QACf,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;IAED;;OAEG;IACO,mCAAQ,GAAlB;QACI,IAAI,CAAC,IAAI,GAAG,IAAI,OAAO,CAAC,UAAU,CAC9B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EACzB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAClB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAClB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAClB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAClB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAC1B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CACvB,CAAC;QACF,IAAI,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AAI,CAAC,eAAe,EAAE;YAC3B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;SAC/C;QAED,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACvC;QAED,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACrB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACzC;IACL,CAAC;IACL,uBAAC;AAAD,CAAC,AArHD,CAAsC,iBAAM,GAqH3C;AArHY,4CAAgB"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tw_1 = require("duiba-tw");
var CustomWinModule = /** @class */ (function (_super) {
__extends(CustomWinModule, _super);
function CustomWinModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
CustomWinModule.prototype.initModel = function () {
this.model = new duiba_tw_1.CustomWinModel();
};
return CustomWinModule;
}(duiba_tw_1.ActivityModel));
exports.CustomWinModule = CustomWinModule;
//# sourceMappingURL=CustomWinModule.js.map
\ No newline at end of file
{"version":3,"file":"CustomWinModule.js","sourceRoot":"","sources":["../../../src/module/custom/CustomWinModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAyD;AAEzD;IAAqC,mCAAa;IAAlD;;IAMA,CAAC;IAHa,mCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,yBAAc,EAAE,CAAC;IACtC,CAAC;IACL,sBAAC;AAAD,CAAC,AAND,CAAqC,wBAAa,GAMjD;AANY,0CAAe"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tl_1 = require("duiba-tl");
var duiba_tw_1 = require("duiba-tw");
var ModuleName_1 = require("../../enum/ModuleName");
var WxLang_1 = require("../../util/WxLang");
/**
*Created by cuiliqiang on 2018/3/16
* 游戏结束场景
*/
var GameEndModule = /** @class */ (function (_super) {
__extends(GameEndModule, _super);
function GameEndModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
GameEndModule.prototype.initModel = function () {
this.model = new duiba_tw_1.GameEndModel();
};
GameEndModule.prototype.updateData = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
this.updateStatusTxt();
this.updateScoreTxt();
};
/**
* 更新活动状态文案
* @param str
*/
GameEndModule.prototype.updateStatusTxt = function (str) {
if (str === void 0) { str = WxLang_1.WxLang.lang_004; }
if (this.view.statusTxt) {
this.view.statusTxt.text = str;
}
};
/**
* 更新积分文案
*/
GameEndModule.prototype.updateScoreTxt = function () {
if (this.view.scoreTxt) {
this.view.scoreTxt.text = this.model.getScoreTxt();
}
};
GameEndModule.prototype.addEvent = function () {
//兑换记录
if (this.view.recordBtn) {
this.addClick(this.view.recordBtn, this.onClick_recordBtn);
}
//活动规则
if (this.view.ruleBtn) {
this.addClick(this.view.ruleBtn, this.onClick_ruleBtn);
}
//活动奖品
if (this.view.optionBtn) {
this.addClick(this.view.optionBtn, this.onClick_optionBtn);
}
};
GameEndModule.prototype.onClick_recordBtn = function (e) {
this.delayEnable(this.view.recordBtn, 5000);
window.location.href = duiba_tw_1.TwFun.getRecordUrl('00');
};
GameEndModule.prototype.onClick_ruleBtn = function (e) {
this.enableMouseEvt(false);
this.model.getRule(this.getRule_result.bind(this));
};
GameEndModule.prototype.getRule_result = function (success) {
this.enableMouseEvt(true);
if (!success) {
return;
}
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.RULE_PANEL);
};
GameEndModule.prototype.onClick_optionBtn = function (e) {
this.enableMouseEvt(false);
this.model.getOptions(this.getOptions_result.bind(this));
};
GameEndModule.prototype.getOptions_result = function (success) {
this.enableMouseEvt(true);
if (!success) {
return;
}
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.GAME_OPTION_PANEL);
};
GameEndModule.prototype.removeEvent = function () {
if (this.view.recordBtn) {
this.removeClick(this.view.recordBtn);
}
if (this.view.ruleBtn) {
this.removeClick(this.view.ruleBtn);
}
if (this.view.prizeBtn) {
this.removeClick(this.view.prizeBtn);
}
};
return GameEndModule;
}(duiba_tl_1.Module));
exports.GameEndModule = GameEndModule;
//# sourceMappingURL=GameEndModule.js.map
\ No newline at end of file
{"version":3,"file":"GameEndModule.js","sourceRoot":"","sources":["../../../src/module/game/GameEndModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAiD;AACjD,qCAA+C;AAC/C,oDAAmD;AACnD,4CAA2C;AAE3C;;;GAGG;AACH;IAAmC,iCAAM;IAAzC;;IA+FA,CAAC;IAzFa,iCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,uBAAY,EAAE,CAAC;IACpC,CAAC;IAEM,kCAAU,GAAjB;QAAkB,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACrB,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,cAAc,EAAE,CAAC;IAC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;AA/FY,sCAAa"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var List_1 = require("./../../components/List");
var duiba_tw_1 = require("duiba-tw");
var duiba_tl_1 = require("duiba-tl");
/**
*Created by cuiliqiang on 2018/3/19
* 活动结束排行榜场景
*/
var GameEndRankModule = /** @class */ (function (_super) {
__extends(GameEndRankModule, _super);
function GameEndRankModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
GameEndRankModule.prototype.initModel = function () {
this.model = new duiba_tw_1.GameEndRankModel();
};
GameEndRankModule.prototype.initUI = function () {
_super.prototype.initUI.call(this);
this.initList();
};
/**
* 初始化列表
*/
GameEndRankModule.prototype.initList = function () {
this.scrollPage = new annieUI.ScrollPage(this.data.uiCfg.sw, this.data.uiCfg.sh, 4943, this.data.uiCfg.isVertical);
duiba_tl_1.StageManager.ins.addChild(this.scrollPage, this.view);
this.scrollPage.x = this.data.uiCfg.sx;
this.scrollPage.y = this.data.uiCfg.sy;
this.list = new List_1.List(this.data.uiCfg.itemClass, this.data.uiCfg.gap, this.data.uiCfg.isVertical);
duiba_tl_1.StageManager.ins.addChild(this.list, this.scrollPage.view);
};
GameEndRankModule.prototype.updateData = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
_super.prototype.updateData.call(this);
this.updateRankList();
};
/**
* 更新排行榜列表
*/
GameEndRankModule.prototype.updateRankList = function () {
this.list.updateData(this.model.rankList);
this.scrollPage.maxDistance = this.list.height;
};
return GameEndRankModule;
}(duiba_tl_1.PanelModule));
exports.GameEndRankModule = GameEndRankModule;
//# sourceMappingURL=GameEndRankModule.js.map
\ No newline at end of file
{"version":3,"file":"GameEndRankModule.js","sourceRoot":"","sources":["../../../src/module/game/GameEndRankModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gDAA+C;AAC/C,qCAA4C;AAC5C,qCAAqD;AACrD;;;GAGG;AACH;IAAuC,qCAAW;IAAlD;;IAiDA,CAAC;IAjCa,qCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,2BAAgB,EAAE,CAAC;IACxC,CAAC;IAES,kCAAM,GAAhB;QACI,iBAAM,MAAM,WAAE,CAAC;QACf,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;IAED;;OAEG;IACO,oCAAQ,GAAlB;QACI,IAAI,CAAC,UAAU,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACnH,uBAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACvC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACvC,IAAI,CAAC,IAAI,GAAG,IAAI,WAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACjG,uBAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAC/D,CAAC;IAEM,sCAAU,GAAjB;QAAkB,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACrB,iBAAM,UAAU,WAAE,CAAC;QACnB,IAAI,CAAC,cAAc,EAAE,CAAC;IAC1B,CAAC;IAED;;OAEG;IACO,0CAAc,GAAxB;QACI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QAC1C,IAAI,CAAC,UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;IACnD,CAAC;IACL,wBAAC;AAAD,CAAC,AAjDD,CAAuC,sBAAW,GAiDjD;AAjDY,8CAAiB"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ModuleName_1 = require("./../../enum/ModuleName");
var duiba_tl_1 = require("duiba-tl");
var duiba_tc_1 = require("duiba-tc");
/**
*Created by cuiliqiang on 2018/3/19
* 引导面板
*/
var GameGuideModule = /** @class */ (function (_super) {
__extends(GameGuideModule, _super);
function GameGuideModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
GameGuideModule.prototype.updateData = function (totalFrames) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
_super.prototype.updateData.call(this);
this.maxStep = totalFrames || 1;
this.currStep = 1;
};
/**
* 引导是否完成
*/
GameGuideModule.prototype.isComplete = function () {
if (this.currStep >= this.maxStep) {
duiba_tc_1.GCache.writeCache('guide', 'true');
return true;
}
return false;
};
GameGuideModule.prototype.onClick_sureBtn = function (e) {
this.currStep++;
if (this.isComplete()) {
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.GAME_PLAY_SCENE);
}
else {
this.view.gotoAndStop(this.currStep);
}
};
GameGuideModule.prototype.addEvent = function () {
_super.prototype.addEvent.call(this);
if (this.view.sureBtn) {
this.addClick(this.view.sureBtn, this.onClick_sureBtn);
}
};
GameGuideModule.prototype.removeEvent = function () {
_super.prototype.removeEvent.call(this);
if (this.view.sureBtn) {
this.removeClick(this.view.sureBtn);
}
};
return GameGuideModule;
}(duiba_tl_1.Module));
exports.GameGuideModule = GameGuideModule;
//# sourceMappingURL=GameGuideModule.js.map
\ No newline at end of file
{"version":3,"file":"GameGuideModule.js","sourceRoot":"","sources":["../../../src/module/game/GameGuideModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sDAAqD;AACrD,qCAAiD;AACjD,qCAAkC;AAClC;;;GAGG;AACH;IAAqC,mCAAM;IAA3C;;IAkDA,CAAC;IAvCU,oCAAU,GAAjB,UAAkB,WAAmB;QAAE,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,6BAAO;;QAC1C,iBAAM,UAAU,WAAE,CAAC;QACnB,IAAI,CAAC,OAAO,GAAG,WAAW,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC;IACtB,CAAC;IAED;;OAEG;IACI,oCAAU,GAAjB;QACI,IAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,OAAO,EAAE;YAC9B,iBAAM,CAAC,UAAU,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YACnC,OAAO,IAAI,CAAC;SACf;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;IAES,yCAAe,GAAzB,UAA0B,CAAmB;QACzC,IAAI,CAAC,QAAQ,EAAG,CAAC;QACjB,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE;YACnB,wBAAa,CAAC,GAAG,CAAC,UAAU,CAAC,uBAAU,CAAC,eAAe,CAAC,CAAC;SAC5D;aAAM;YACH,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACxC;IACL,CAAC;IAES,kCAAQ,GAAlB;QACI,iBAAM,QAAQ,WAAE,CAAC;QACjB,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;SAC1D;IACL,CAAC;IAES,qCAAW,GAArB;QACI,iBAAM,WAAW,WAAE,CAAC;QACpB,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACvC;IACL,CAAC;IACL,sBAAC;AAAD,CAAC,AAlDD,CAAqC,iBAAM,GAkD1C;AAlDY,0CAAe"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tw_1 = require("duiba-tw");
var duiba_tl_1 = require("duiba-tl");
var ModuleName_1 = require("../../enum/ModuleName");
/**
*Created by cuiliqiang on 2018/3/16
* 游戏结束弹窗
*/
var GameLoseModule = /** @class */ (function (_super) {
__extends(GameLoseModule, _super);
function GameLoseModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
GameLoseModule.prototype.initModel = function () {
this.model = new duiba_tw_1.GameLoseModel();
};
GameLoseModule.prototype.updateData = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
_super.prototype.updateData.call(this);
this.updateCountTxt();
this.updateRankTxt();
this.updateCurrScoreTxt();
this.updateMaxScoreTxt();
};
/**
* 更新剩余次数文案
*/
GameLoseModule.prototype.updateCountTxt = function () {
if (this.view.costTxt) {
this.view.costTxt = this.model.costTxt;
}
};
/**
* 更新排行文案
*/
GameLoseModule.prototype.updateRankTxt = function () {
if (this.view.rankTxt) {
this.view.rankTxt.text = this.model.getRankTxt();
}
};
/**
* 更新当前积分文案
*/
GameLoseModule.prototype.updateCurrScoreTxt = function () {
if (this.view.currScoreTxt) {
this.view.currScoreTxt.text = this.model.getCurrScoreTxt();
}
};
/**
* 更新最高积分文案
*/
GameLoseModule.prototype.updateMaxScoreTxt = function () {
if (this.view.maxScoreTxt) {
this.view.maxScoreTxt.text = this.model.getMaxScoreTxt();
}
};
GameLoseModule.prototype.onClick_againBtn = function (e) {
this.enableMouseEvt(false);
this.model.doStart(this.doStart_result.bind(this), true);
};
GameLoseModule.prototype.doStart_result = function (success) {
this.enableMouseEvt(true);
if (!success) {
return;
}
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.GAME_PLAY_SCENE);
};
GameLoseModule.prototype.onClick_closeBtn = function (e) {
this.enableMouseEvt(false);
this.model.getInfo(this.getInfo_result.bind(this));
};
GameLoseModule.prototype.getInfo_result = function () {
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.GAME_START_SCENE);
this.enableMouseEvt(true);
};
GameLoseModule.prototype.addEvent = function () {
_super.prototype.addEvent.call(this);
if (this.view.againBtn) {
this.addClick(this.view.againBtn, this.onClick_againBtn);
}
};
GameLoseModule.prototype.removeEvent = function () {
_super.prototype.removeEvent.call(this);
if (this.view.againBtn) {
this.removeClick(this.view.againBtn);
}
};
return GameLoseModule;
}(duiba_tl_1.PanelModule));
exports.GameLoseModule = GameLoseModule;
//# sourceMappingURL=GameLoseModule.js.map
\ No newline at end of file
{"version":3,"file":"GameLoseModule.js","sourceRoot":"","sources":["../../../src/module/game/GameLoseModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAyC;AACzC,qCAAsD;AACtD,oDAAmD;AAEnD;;;GAGG;AACH;IAAoC,kCAAW;IAA/C;;IA0FA,CAAC;IApFa,kCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,wBAAa,EAAE,CAAC;IACrC,CAAC;IAEM,mCAAU,GAAjB;QAAkB,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACrB,iBAAM,UAAU,WAAE,CAAC;QACnB,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAED;;OAEG;IACO,uCAAc,GAAxB;QACI,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;SAC1C;IACL,CAAC;IAED;;OAEG;IACO,sCAAa,GAAvB;QACI,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;SACpD;IACL,CAAC;IAED;;OAEG;IACO,2CAAkB,GAA5B;QACI,IAAI,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACxB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC;SAC9D;IACL,CAAC;IAED;;OAEG;IACO,0CAA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IAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACnB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACxC;IACL,CAAC;IACL,qBAAC;AAAD,CAAC,AA1FD,CAAoC,sBAAW,GA0F9C;AA1FY,wCAAc"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tw_1 = require("duiba-tw");
var duiba_tl_1 = require("duiba-tl");
/**
*Created by cuiliqiang on 2018/3/19
* 活动奖品面板
*/
var GameOptionModule = /** @class */ (function (_super) {
__extends(GameOptionModule, _super);
function GameOptionModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
GameOptionModule.prototype.initModel = function () {
this.model = new duiba_tw_1.GameOptionModel();
};
GameOptionModule.prototype.initUI = function () {
_super.prototype.initUI.call(this);
this.initList();
};
GameOptionModule.prototype.initList = function () {
this.list = new annieUI.ScrollList(this.data.uiCfg.itemClass, this.data.uiCfg.iw, this.data.uiCfg.ih, this.data.uiCfg.lw, this.data.uiCfg.lh, this.data.uiCfg.isVertical, this.data.uiCfg.cols);
this.list.x = this.data.uiCfg.lx;
this.list.y = this.data.uiCfg.ly;
duiba_tl_1.StageManager.ins.addChild(this.list, this.view);
};
GameOptionModule.prototype.updateData = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
_super.prototype.updateData.call(this);
this.updateEndTimeTxt();
this.updateOptionList();
};
/**
* 更新活动结束时间文案
*/
GameOptionModule.prototype.updateEndTimeTxt = function () {
if (this.view.endTimeTxt) {
this.view.endTimeTxt.text = this.model.getEndTimeTxt();
}
};
/**
* 更新奖品列表
*/
GameOptionModule.prototype.updateOptionList = function () {
this.list.updateData(this.model.optionList, true);
};
return GameOptionModule;
}(duiba_tl_1.PanelModule));
exports.GameOptionModule = GameOptionModule;
//# sourceMappingURL=GameOptionModule.js.map
\ No newline at end of file
{"version":3,"file":"GameOptionModule.js","sourceRoot":"","sources":["../../../src/module/game/GameOptionModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAA2C;AAC3C,qCAAqD;AACrD;;;GAGG;AACH;IAAsC,oCAAW;IAAjD;;IAwDA,CAAC;IA7Ca,oCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,0BAAe,EAAE,CAAC;IACvC,CAAC;IAEM,iCAAM,GAAb;QACI,iBAAM,MAAM,WAAE,CAAC;QACf,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;IAES,mCAAQ,GAAlB;QACI,IAAI,CAAC,IAAI,GAAG,IAAI,OAAO,CAAC,UAAU,CAC9B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EACzB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAClB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAClB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAClB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,EAClB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAC1B,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CACvB,CAAC;QACF,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACjC,uBAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,CAAC;IAEM,qCAAU,GAAjB;QAAkB,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACrB,iBAAM,UAAU,WAAE,CAAC;QACnB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,gBAAgB,EAAE,CAAC;IAC5B,CAAC;IAED;;OAEG;IACO,2CAAgB,GAA1B;QACI,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;YACtB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;SAC1D;IACL,CAAC;IAED;;OAEG;IACO,2CAAgB,GAA1B;QACI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACtD,CAAC;IACL,uBAAC;AAAD,CAAC,AAxDD,CAAsC,sBAAW,GAwDhD;AAxDY,4CAAgB"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ModuleName_1 = require("../../enum/ModuleName");
var duiba_tl_1 = require("duiba-tl");
var duiba_tw_1 = require("duiba-tw");
var duiba_tc_1 = require("duiba-tc");
/**
*Created by cuiliqiang on 2018/3/26
* 游戏场景
*/
var GamePlayModule = /** @class */ (function (_super) {
__extends(GamePlayModule, _super);
function GamePlayModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
GamePlayModule.prototype.initModel = function () {
this.model = new duiba_tw_1.GamePlayModel();
};
GamePlayModule.prototype.updateData = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
};
GamePlayModule.prototype.resetGame = function () {
this.model.update();
};
GamePlayModule.prototype.show = function () {
_super.prototype.show.call(this);
this.resetGame();
};
/**
* 更新游戏积分
* @param type 1 增加, 2 减少, 3重置
* @param score 分值
*/
GamePlayModule.prototype.updateScore = function (type, score) {
if (type == 1) {
this.score += score;
}
else if (type == 2) {
this.score -= score;
this.score = Math.max(0, this.score);
}
else {
this.score = score;
}
this.datapash();
};
/**
* 阶段性提交
*/
GamePlayModule.prototype.datapash = function () {
if (this.model.checkDatapash(this.score)) {
this.model.datapash();
}
};
GamePlayModule.prototype.onMouseDown = function (e) {
var dynamic = { a: 'md', t: duiba_tc_1.GTime.getTimestamp(), x: e.stageX, y: e.stageY };
this.model.addDynamic(dynamic);
};
GamePlayModule.prototype.onMouseUp = function (e) {
var dynamic = { a: 'mu', t: duiba_tc_1.GTime.getTimestamp(), x: e.stageX, y: e.stageY };
this.model.addDynamic(dynamic);
};
GamePlayModule.prototype.addEvent = function () {
_super.prototype.addEvent.call(this);
this.view.addEventListener(annie.MouseEvent.MOUSE_DOWN, this.mouseDownBind = this.onMouseDown.bind(this));
this.view.addEventListener(annie.MouseEvent.MOUSE_UP, this.mouseUpBind = this.onMouseUp.bind(this));
};
GamePlayModule.prototype.removeEvent = function () {
_super.prototype.removeEvent.call(this);
this.view.removeEventListener(annie.MouseEvent.MOUSE_DOWN, this.mouseDownBind);
this.view.removeEventListener(annie.MouseEvent.MOUSE_UP, this.mouseUpBind);
};
GamePlayModule.prototype.gameOver = function () {
this.enableMouseEvt(true);
this.removeEvent();
this.model.cacheMaxScore(this.score);
this.model.submit(this.submit_result.bind(this), this.score);
};
GamePlayModule.prototype.submit_result = function (success) {
this.enableMouseEvt(true);
if (!success) {
return;
}
var moduleName;
if (this.model.gameIsWinning) {
moduleName = ModuleName_1.ModuleName.GAME_WIN_PANEL;
}
else {
moduleName = ModuleName_1.ModuleName.GAME_LOSE_PANEL;
}
duiba_tl_1.ModuleManager.ins.openModule(moduleName);
};
return GamePlayModule;
}(duiba_tl_1.Module));
exports.GamePlayModule = GamePlayModule;
//# sourceMappingURL=GamePlayModule.js.map
\ No newline at end of file
{"version":3,"file":"GamePlayModule.js","sourceRoot":"","sources":["../../../src/module/game/GamePlayModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,oDAAmD;AACnD,qCAAiD;AACjD,qCAAuD;AACvD,qCAAiC;AACjC;;;GAGG;AACH;IAAoC,kCAAM;IAA1C;;IAqGA,CAAC;IApFa,kCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,wBAAa,EAAE,CAAC;IACrC,CAAC;IAEM,mCAAU,GAAjB;QAAkB,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;IACzB,CAAC;IAES,kCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;IACxB,CAAC;IAES,6BAAI,GAAd;QACI,iBAAM,IAAI,WAAE,CAAC;QACb,IAAI,CAAC,SAAS,EAAE,CAAC;IACrB,CAAC;IAED;;;;OAIG;IACO,oCAAW,GAArB,UAAsB,IAAY,EAAE,KAAa;QAC7C,IAAI,IAAI,IAAI,CAAC,EAAE;YACX,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC;SACvB;aAAM,IAAI,IAAI,IAAI,CAAC,EAAE;YAClB,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC;YACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;SACxC;aAAM;YACH,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;SACtB;QACD,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,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AAC,KAAK,CAAC,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QAC/E,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;IAC/E,CAAC;IAES,iCAAQ,GAAlB;QACI,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC1B,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACrC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACjE,CAAC;IAES,sCAAa,GAAvB,UAAwB,OAAgB;QACpC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC1B,IAAG,CAAC,OAAO,EAAE;YACT,OAAO;SACV;QACD,IAAI,UAAkB,CAAC;QACvB,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;YAC1B,UAAU,GAAG,uBAAU,CAAC,cAAc,CAAC;SAC1C;aAAM;YACH,UAAU,GAAG,uBAAU,CAAC,eAAe,CAAC;SAC3C;QACD,wBAAa,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IACL,qBAAC;AAAD,CAAC,AArGD,CAAoC,iBAAM,GAqGzC;AArGY,wCAAc"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tw_1 = require("duiba-tw");
var duiba_tl_1 = require("duiba-tl");
/**
*Created by cuiliqiang on 2018/3/21
* 实时排行榜面板
*/
var GameRealTimeRankModule = /** @class */ (function (_super) {
__extends(GameRealTimeRankModule, _super);
function GameRealTimeRankModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
GameRealTimeRankModule.prototype.initModel = function () {
this.model = new duiba_tw_1.GameRealTimeRankModel();
};
GameRealTimeRankModule.prototype.updateData = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
_super.prototype.updateData.call(this);
this.updateMyRankTxt();
this.updateRankList();
};
/**
* 更新我得排行文案
*/
GameRealTimeRankModule.prototype.updateMyRankTxt = function () {
if (this.view.myRankTxt) {
this.view.myRankTxt.text = this.model.getRankTxt();
}
};
/**
* 更新排行列表
*/
GameRealTimeRankModule.prototype.updateRankList = function () {
if (this.model.userList) {
if (this.list) {
duiba_tl_1.StageManager.ins.removeChild(this.list);
}
this.list = new annieUI.ScrollList(this.data.uiCfg.itemClass, this.data.uiCfg.iw, this.data.uiCfg.ih, this.data.uiCfg.lw, this.data.uiCfg.lh, this.data.uiCfg.isVertical);
duiba_tl_1.StageManager.ins.addChild(this.list, this.view);
this.list.x = this.data.uiCfg.lx;
this.list.y = this.data.uiCfg.ly;
this.list.updateData(this.model.userList, true);
}
};
return GameRealTimeRankModule;
}(duiba_tl_1.PanelModule));
exports.GameRealTimeRankModule = GameRealTimeRankModule;
//# sourceMappingURL=GameRealTimeRankModule.js.map
\ No newline at end of file
{"version":3,"file":"GameRealTimeRankModule.js","sourceRoot":"","sources":["../../../src/module/game/GameRealTimeRankModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAiD;AACjD,qCAAqD;AAErD;;;GAGG;AACH;IAA4C,0CAAW;IAAvD;;IAoDA,CAAC;IAzCa,0CAAS,GAAnB;QACI,IAAI,CA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AAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;SACnD;IACL,CAAC;IACL,6BAAC;AAAD,CAAC,AApDD,CAA4C,sBAAW,GAoDtD;AApDY,wDAAsB"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tl_1 = require("duiba-tl");
var duiba_tw_1 = require("duiba-tw");
var ModuleName_1 = require("../../enum/ModuleName");
var duiba_tc_1 = require("duiba-tc");
/**
* 开始游戏场景
*/
var GameStartModule = /** @class */ (function (_super) {
__extends(GameStartModule, _super);
function GameStartModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
GameStartModule.prototype.initModel = function () {
this.model = new duiba_tw_1.GameStartModel();
};
/**
* 更新页面
*/
GameStartModule.prototype.updateData = function () {
this.updateCountTxt();
this.updateStartBtnStatus();
this.updateExemptionTxt();
};
/**
* 更新次数文案
*/
GameStartModule.prototype.updateCountTxt = function () {
if (this.view.countTxt) {
this.view.countTxt.text = this.model.countTxt;
}
};
/**
* 更新开始按钮状态
*/
GameStartModule.prototype.updateStartBtnStatus = function () {
if (this.view.startBtn) {
var enable = this.model.startBtnEnable;
this.view.startBtn.mouseEnable = enable;
if (enable) {
this.view.startBtn.gotoAndStop(1);
}
else {
this.view.startBtn.gotoAndStop(3);
}
}
};
/**
* 更新免责文案
*/
GameStartModule.prototype.updateExemptionTxt = function () {
if (this.view.exemptionTxt) {
if (duiba_tc_1.GFun.isIOS) {
this.view.exemptionTxt.visible = true;
}
else {
this.view.exemptionTxt.visible = false;
}
}
};
GameStartModule.prototype.addEvent = function () {
_super.prototype.addEvent.call(this);
//兑换记录
if (this.view.recordBtn) {
this.addClick(this.view.recordBtn, this.onClick_recordBtn);
}
//活动规则
if (this.view.ruleBtn) {
this.addClick(this.view.ruleBtn, this.onClick_ruleBtn);
}
//活动奖品
if (this.view.optionBtn) {
this.addClick(this.view.optionBtn, this.onClick_optionBtn);
}
//开始游戏
if (this.view.startBtn) {
this.addClick(this.view.startBtn, this.onClick_startBtn);
}
//实时排行榜
if (this.view.realTimeRankBtn) {
this.addClick(this.view.realTimeRankBtn, this.onClick_realTimeRankBtn);
}
};
GameStartModule.prototype.onClick_recordBtn = function (e) {
this.delayEnable(this.view.recordBtn, 5000);
window.location.href = duiba_tw_1.TwFun.getRecordUrl('00');
};
GameStartModule.prototype.onClick_ruleBtn = function (e) {
this.enableMouseEvt(false);
this.model.getRule(this.getRule_result.bind(this));
};
GameStartModule.prototype.getRule_result = function (success) {
this.enableMouseEvt(true);
if (!success) {
return;
}
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.RULE_PANEL);
};
GameStartModule.prototype.onClick_optionBtn = function (e) {
this.enableMouseEvt(false);
this.model.getOptions(this.getOptions_result.bind(this));
};
GameStartModule.prototype.getOptions_result = function (success) {
this.enableMouseEvt(true);
if (!success) {
return;
}
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.GAME_OPTION_PANEL);
};
GameStartModule.prototype.onClick_startBtn = function (e) {
this.enableMouseEvt(false);
this.model.doStart(this.doStart_result.bind(this), false);
};
GameStartModule.prototype.doStart_result = function (success) {
this.enableMouseEvt(true);
if (!success) {
return;
}
var module = duiba_tl_1.ModuleManager.ins.getModule(ModuleName_1.ModuleName.GAME_GUIDE_SCENE);
if (duiba_tc_1.GCache.readCache('guide') || !module) {
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.GAME_PLAY_SCENE);
}
else {
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.GAME_GUIDE_SCENE);
}
};
GameStartModule.prototype.onClick_realTimeRankBtn = function (e) {
this.enableMouseEvt(false);
this.model.realtimerank(this.realtimerank_result.bind(this));
};
GameStartModule.prototype.realtimerank_result = function (success) {
this.enableMouseEvt(true);
if (!success) {
return;
}
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.GAME_REAL_TIME_RANK_PANEL);
};
GameStartModule.prototype.removeEvent = function () {
_super.prototype.removeEvent.call(this);
if (this.view.recordBtn) {
this.removeClick(this.view.recordBtn);
}
if (this.view.ruleBtn) {
this.removeClick(this.view.ruleBtn);
}
if (this.view.prizeBtn) {
this.removeClick(this.view.prizeBtn);
}
if (this.view.startBtn) {
this.removeClick(this.view.startBtn);
}
if (this.view.realTimeRankBtn) {
this.removeClick(this.view.realTimeRankBtn);
}
};
return GameStartModule;
}(duiba_tl_1.Module));
exports.GameStartModule = GameStartModule;
//# sourceMappingURL=GameStartModule.js.map
\ No newline at end of file
{"version":3,"file":"GameStartModule.js","sourceRoot":"","sources":["../../../src/module/game/GameStartModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAA8D;AAC9D,qCAAiD;AACjD,oDAAmD;AACnD,qCAAkE;AAElE;;GAEG;AACH;IAAqC,mCAAM;IAA3C;;IAwKA,CAAC;IAlKa,mCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,yBAAc,EAAE,CAAC;IACtC,CAAC;IAED;;OAEG;IACI,oCAAU,GAAjB;QACI,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC9B,CAAC;IAED;;OAEG;IACO,wCAAc,GAAxB;QACI,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACpB,IAAI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CAAC,IAAI,CAAC,CAAC;QAC1B,IAAG,CAAC,OAAO,EAAE;YACT,OAAO;SACV;QACD,wBAAa,CAAC,GAAG,CAAC,UAAU,CAAC,uBAAU,CAAC,yBAAyB,CAAC,CAAC;IACvE,CAAC;IAES,qCAAW,GAArB;QACI,iBAAM,WAAW,WAAE,CAAC;QACpB,IAAI,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACrB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACzC;QAED,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACvC;QAED,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACxC;QAED,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACxC;QAED,IAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE;YAC1B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;SAC/C;IACL,CAAC;IACL,sBAAC;AAAD,CAAC,AAxKD,CAAqC,iBAAM,GAwK1C;AAxKY,0CAAe"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ActivityModule_1 = require("./../common/ActivityModule");
var ModuleName_1 = require("../../enum/ModuleName");
var duiba_tw_1 = require("duiba-tw");
var duiba_tl_1 = require("duiba-tl");
/**
*Created by cuiliqiang on 2018/3/16
* 游戏结束中奖面板
*/
var GameWinModule = /** @class */ (function (_super) {
__extends(GameWinModule, _super);
function GameWinModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
GameWinModule.prototype.initModel = function () {
this.model = new duiba_tw_1.GameWinModel();
};
GameWinModule.prototype.updateData = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
_super.prototype.updateData.call(this);
this.updateCountTxt();
this.updateRankTxt();
this.updateCurrScoreTxt();
this.updateMaxScoreTxt();
};
/**
* 更新剩余次数文案
*/
GameWinModule.prototype.updateCountTxt = function () {
if (this.view.costTxt) {
this.view.costTxt = this.model.costTxt;
}
};
/**
* 更新排行文案
*/
GameWinModule.prototype.updateRankTxt = function () {
if (this.view.rankTxt) {
this.view.rankTxt.text = this.model.getRankTxt();
}
};
/**
* 更新当前积分文案
*/
GameWinModule.prototype.updateCurrScoreTxt = function () {
if (this.view.currScoreTxt) {
this.view.currScoreTxt.text = this.model.getCurrScoreTxt();
}
};
/**
* 更新最高积分文案
*/
GameWinModule.prototype.updateMaxScoreTxt = function () {
if (this.view.maxScoreTxt) {
this.view.maxScoreTxt.text = this.model.getMaxScoreTxt();
}
};
GameWinModule.prototype.onClick_againBtn = function (e) {
this.enableMouseEvt(false);
this.model.doStart(this.doStart_result.bind(this));
};
GameWinModule.prototype.doStart_result = function () {
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.GAME_PLAY_SCENE);
this.enableMouseEvt(true);
};
GameWinModule.prototype.onClick_closeBtn = function (e) {
this.enableMouseEvt(false);
this.model.getInfo(this.getInfo_result.bind(this));
};
GameWinModule.prototype.getInfo_result = function () {
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.GAME_START_SCENE);
this.enableMouseEvt(true);
};
GameWinModule.prototype.addEvent = function () {
_super.prototype.addEvent.call(this);
if (this.view.againBtn) {
this.addClick(this.view.againBtn, this.onClick_againBtn);
}
};
GameWinModule.prototype.removeEvent = function () {
_super.prototype.removeEvent.call(this);
if (this.view.againBtn) {
this.removeClick(this.view.againBtn);
}
};
return GameWinModule;
}(ActivityModule_1.ActivityModule));
exports.GameWinModule = GameWinModule;
//# sourceMappingURL=GameWinModule.js.map
\ No newline at end of file
{"version":3,"file":"GameWinModule.js","sourceRoot":"","sources":["../../../src/module/game/GameWinModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAA4D;AAC5D,oDAAmD;AACnD,qCAAmD;AACnD,qCAAyC;AAEzC;;;GAGG;AACH;IAAmC,iCAAc;IAAjD;;IAuFA,CAAC;IAjFa,iCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,uBAAY,EAAE,CAAC;IACpC,CAAC;IAEM,kCAAU,GAAjB;QAAkB,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACrB,iBAAM,UAAU,WAAE,CAAC;QACnB,IAAI,CAAC,cAAc,EAAE,CAAC;QACtB,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAED;;OAEG;IACO,sCAAc,GAAxB;QACI,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;SAC1C;IACL,CAAC;IAED;;OAEG;IACO,qCAAa,GAAvB;QACI,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YACnB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;SACpD;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Q,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;SAC5D;IACL,CAAC;IAES,mCAAW,GAArB;QACI,iBAAM,WAAW,WAAE,CAAC;QACpB,IAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;YACnB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACxC;IACL,CAAC;IACL,oBAAC;AAAD,CAAC,AAvFD,CAAmC,+BAAc,GAuFhD;AAvFY,sCAAa"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tw_1 = require("duiba-tw");
var duiba_tl_1 = require("duiba-tl");
var ModuleName_1 = require("../../enum/ModuleName");
var duiba_tw_2 = require("duiba-tw");
/**
*Created by cuiliqiang on 2018/3/20
* 用户中奖及排行信息
*/
var GameWinnerModule = /** @class */ (function (_super) {
__extends(GameWinnerModule, _super);
function GameWinnerModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
GameWinnerModule.prototype.initModel = function () {
this.model = new duiba_tw_2.GameWinnerModel();
};
GameWinnerModule.prototype.updateData = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
this.updateRankTxt();
this.updateOptionTxt();
this.updateCidTxt();
};
/**
* 更新排行榜文案
*/
GameWinnerModule.prototype.updateRankTxt = function () {
if (this.view.rankTxt) {
this.view.rankTxt.text = this.model.getRankTxt();
}
};
/**
* 更新奖品文案
*/
GameWinnerModule.prototype.updateOptionTxt = function () {
if (this.view.optionTxt) {
this.view.optionTxt.text = this.model.getOptionTxt();
}
};
/**
* 更新用户ID文案
*/
GameWinnerModule.prototype.updateCidTxt = function () {
if (this.view.cidTxt) {
this.view.cidTxt.text = this.model.getConsumerTxt();
}
};
GameWinnerModule.prototype.addEvent = function () {
//兑换记录
if (this.view.recordBtn) {
this.addClick(this.view.recordBtn, this.onClick_recordBtn);
}
//活动规则
if (this.view.ruleBtn) {
this.addClick(this.view.ruleBtn, this.onClick_ruleBtn);
}
//活动奖品
if (this.view.optionBtn) {
this.addClick(this.view.optionBtn, this.onClick_optionBtn);
}
//排行榜
if (this.view.rankBtn) {
this.addClick(this.view.rankBtn, this.onClick_rankBtn);
}
};
GameWinnerModule.prototype.onClick_recordBtn = function (e) {
this.delayEnable(this.view.recordBtn, 5000);
window.location.href = duiba_tw_1.TwFun.getRecordUrl('00');
};
GameWinnerModule.prototype.onClick_ruleBtn = function (e) {
this.enableMouseEvt(false);
this.model.getRule(this.getRule_result.bind(this));
};
GameWinnerModule.prototype.getRule_result = function (success) {
this.enableMouseEvt(true);
if (!success) {
return;
}
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.RULE_PANEL);
};
GameWinnerModule.prototype.onClick_optionBtn = function (e) {
this.enableMouseEvt(false);
this.model.getOptions(this.getOptions_result.bind(this));
};
GameWinnerModule.prototype.getOptions_result = function (success) {
this.enableMouseEvt(true);
if (!success) {
return;
}
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.GAME_OPTION_PANEL);
};
GameWinnerModule.prototype.onClick_rankBtn = function (e) {
this.delayEnable(this.view.rankBtn, 2000);
duiba_tl_1.ModuleManager.ins.openModule(ModuleName_1.ModuleName.GAME_END_RANK_PANEL, this.model.rankList);
};
GameWinnerModule.prototype.removeEvent = function () {
if (this.view.recordBtn) {
this.removeClick(this.view.recordBtn);
}
if (this.view.ruleBtn) {
this.removeClick(this.view.ruleBtn);
}
if (this.view.optionBtn) {
this.removeClick(this.view.optionBtn);
}
if (this.view.rankBtn) {
this.removeClick(this.view.rankBtn);
}
};
return GameWinnerModule;
}(duiba_tl_1.Module));
exports.GameWinnerModule = GameWinnerModule;
//# sourceMappingURL=GameWinnerModule.js.map
\ No newline at end of file
{"version":3,"file":"GameWinnerModule.js","sourceRoot":"","sources":["../../../src/module/game/GameWinnerModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAiC;AACjC,qCAAiD;AACjD,oDAAmD;AACnD,qCAA2C;AAE3C;;;GAGG;AACH;IAAsC,oCAAM;IAA5C;;IAsHA,CAAC;IAhHa,oCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,0BAAe,EAAE,CAAC;IACvC,CAAC;IAEM,qCAAU,GAAjB;QAAkB,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;QACrB,IAAI,CAAC,aAAa,EAAE,CAAC;QACrB,IAAI,CAAC,eAAe,EAAE,CAAC;QACvB,IAAI,CAAC,YAAY,EAAE,CAAC;IACxB,CAAC;IAED;;OAEG;IACO,wCAAa,GAAvB;QACI,IAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE;YAClB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;SACpD;IACL,CAAC;IAED;;OAEG;IACO,0CAAe,GAAzB;QACI,IAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACpB,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;SACxD;IACL,CAAC;IAED;;OAEG;IACO,uCAAY,GAAtB;QACI,IAAG,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;YACjB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,CAA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AAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACvC;IACL,CAAC;IACL,uBAAC;AAAD,CAAC,AAtHD,CAAsC,iBAAM,GAsH3C;AAtHY,4CAAgB"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tw_1 = require("duiba-tw");
var ModuleName_1 = require("./../../enum/ModuleName");
var duiba_tl_1 = require("duiba-tl");
var PlugModule = /** @class */ (function (_super) {
__extends(PlugModule, _super);
function PlugModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
PlugModule.prototype.initModel = function () {
this.model = new duiba_tw_1.ActivityModel();
};
PlugModule.prototype.updateData = function (plugId) {
var args = [];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
_super.prototype.updateData.call(this);
this.plugId = plugId;
};
PlugModule.prototype.onClick_doJoinBtn = function (e) {
this.enableMouseEvt(false);
this.model.plugDoJoin(this.doJoin_result, this.plugId);
};
PlugModule.prototype.doJoin_result = function (success) {
this.enableMouseEvt(true);
if (!success) {
return;
}
var moduleName;
if (this.model.plugIsWinning) {
moduleName = ModuleName_1.ModuleName.PLUG_WIN_PANEL;
}
else {
moduleName = ModuleName_1.ModuleName.PLUG_LOSE_PANEL;
}
duiba_tl_1.ModuleManager.ins.openModule(moduleName);
};
PlugModule.prototype.addEvent = function () {
_super.prototype.addEvent.call(this);
if (this.view.doJoinBtn) {
this.addClick(this.view.doJoinBtn, this.onClick_doJoinBtn);
}
};
PlugModule.prototype.removeEvent = function () {
_super.prototype.removeEvent.call(this);
if (this.view.doJoinBtn) {
this.removeClick(this.view.doJoinBtn);
}
};
return PlugModule;
}(duiba_tl_1.PanelModule));
exports.PlugModule = PlugModule;
//# sourceMappingURL=PlugModule.js.map
\ No newline at end of file
{"version":3,"file":"PlugModule.js","sourceRoot":"","sources":["../../../src/module/plug/PlugModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAyC;AACzC,sDAAqD;AACrD,qCAAsD;AACtD;IAAgC,8BAAW;IAA3C;;IAoDA,CAAC;IAzCa,8BAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,wBAAa,EAAE,CAAC;IACrC,CAAC;IAEM,+BAAU,GAAjB,UAAkB,MAAc;QAAE,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,6BAAO;;QACrC,iBAAM,UAAU,WAAE,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAES,sCAAiB,GAA3B,UAA4B,CAAmB;QAC3C,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IAC3D,CAAC;IAES,kCAAa,GAAvB,UAAwB,OAAgB;QACpC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC1B,IAAG,CAAC,OAAO,EAAE;YACT,OAAO;SACV;QACD,IAAI,UAAkB,CAAC;QACvB,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE;YAC1B,UAAU,GAAG,uBAAU,CAAC,cAAc,CAAC;SAC1C;aAAM;YACH,UAAU,GAAG,uBAAU,CAAC,eAAe,CAAC;SAC3C;QACD,wBAAa,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;IAES,6BAAQ,GAAlB;QACI,iBAAM,QAAQ,WAAE,CAAC;QACjB,IAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACpB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC;SAC9D;IACL,CAAC;IAES,gCAAW,GAArB;QACI,iBAAM,WAAW,WAAE,CAAC;QACpB,IAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACpB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACzC;IACL,CAAC;IACL,iBAAC;AAAD,CAAC,AApDD,CAAgC,sBAAW,GAoD1C;AApDY,gCAAU"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var ActivityModule_1 = require("./../common/ActivityModule");
var duiba_tw_1 = require("duiba-tw");
var PlugWinModule = /** @class */ (function (_super) {
__extends(PlugWinModule, _super);
function PlugWinModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
PlugWinModule.prototype.initModel = function () {
this.model = new duiba_tw_1.PlugWinModel();
};
return PlugWinModule;
}(ActivityModule_1.ActivityModule));
exports.PlugWinModule = PlugWinModule;
//# sourceMappingURL=PlugWinModule.js.map
\ No newline at end of file
{"version":3,"file":"PlugWinModule.js","sourceRoot":"","sources":["../../../src/module/plug/PlugWinModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAA4D;AAC5D,qCAAwC;AAExC;IAAmC,iCAAc;IAAjD;;IASA,CAAC;IAHa,iCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,uBAAY,EAAE,CAAC;IACpC,CAAC;IACL,oBAAC;AAAD,CAAC,AATD,CAAmC,+BAAc,GAShD;AATY,sCAAa"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tl_1 = require("duiba-tl");
var duiba_tc_1 = require("duiba-tc");
var duiba_tw_1 = require("duiba-tw");
/**
* 宠物领养场景
*/
var SignAdopteModule = /** @class */ (function (_super) {
__extends(SignAdopteModule, _super);
function SignAdopteModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
SignAdopteModule.prototype.initModel = function () {
this.model = new duiba_tw_1.SignAdopteModel();
};
SignAdopteModule.prototype.show = function () {
_super.prototype.show.call(this);
this.resetGame();
};
SignAdopteModule.prototype.resetGame = function () {
};
/**
* 更新页面
*/
SignAdopteModule.prototype.updateData = function () {
_super.prototype.updateData.call(this);
this.updateExemptionTxt();
};
/**
* 更新免责文案
*/
SignAdopteModule.prototype.updateExemptionTxt = function () {
if (this.view.exemptionTxt) {
if (duiba_tc_1.GFun.isIOS) {
this.view.exemptionTxt.visible = true;
}
else {
this.view.exemptionTxt.visible = false;
}
}
};
/**
* 领养
*/
SignAdopteModule.prototype.onClick_adopte = function () {
this.enableMouseEvt(false); //鼠标禁用,防止连点连发接口
this.model.petAdopte(this.adopt_result.bind(this));
};
/**
* 领养回调
* @param data
*/
SignAdopteModule.prototype.adopt_result = function (success) {
this.enableMouseEvt(true); //接口返回,鼠标可点击
if (!success) {
return;
}
// DataManager.ins.signCfgData.petIndex.petHomeInfo.update(data);//更新宠物数据
};
SignAdopteModule.prototype.addEvent = function () {
_super.prototype.addEvent.call(this);
//领养
if (this.view.sureBtn) {
this.addClick(this.view.sureBtn, this.onClick_adopte);
}
};
SignAdopteModule.prototype.removeEvent = function () {
_super.prototype.removeEvent.call(this);
if (this.view.sureBtn) {
this.removeClick(this.view.sureBtn);
}
};
return SignAdopteModule;
}(duiba_tl_1.Module));
exports.SignAdopteModule = SignAdopteModule;
//# sourceMappingURL=SignAdopteModule.js.map
\ No newline at end of file
{"version":3,"file":"SignAdopteModule.js","sourceRoot":"","sources":["../../../src/module/sign/SignAdopteModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAkC;AAClC,qCAAgC;AAChC,qCAA2C;AAE3C;;GAEG;AACH;IAAsC,oCAAM;IAA5C;;IAwEA,CAAC;IAnEa,oCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,0BAAe,EAAE,CAAC;IACvC,CAAC;IAES,+BAAI,GAAd;QACI,iBAAM,IAAI,WAAE,CAAC;QACb,IAAI,CAAC,SAAS,EAAE,CAAC;IACrB,CAAC;IAES,oCAAS,GAAnB;IAEA,CAAC;IAED;;OAEG;IACI,qCAAU,GAAjB;QACI,iBAAM,UAAU,WAAE,CAAC;QACnB,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC9B,CAAC;IAED;;OAEG;IACO,6CAAkB,GAA5B;QACI,IAAI,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE;YACxB,IAAI,eAAI,CAAC,KAAK,EAAE;gBACZ,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,GAAG,IAAI,CAAC;aACzC;iBAAM;gBACH,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,GAAG,KAAK,CAAC;aAC1C;SACJ;IACL,CAAC;IAED;;OAEG;IACO,yCAAc,GAAxB;QACI,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAA,eAAe;QAC1C,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACvD,CAAC;IACD;;;OAGG;IACO,uCAAY,GAAtB,UAAuB,OAAgB;QACnC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAA,YAAY;QACtC,IAAG,CAAC,OAAO,EAAE;YACT,OAAO;SACV;QACD,yEAAyE;IAC7E,CAAC;IAES,mCAAQ,GAAlB;QACI,iBAAM,QAAQ,WAAE,CAAC;QACjB,IAAI;QACJ,IAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAC;YACjB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,CAAC;SACzD;IACL,CAAC;IAES,sCAAW,GAArB;QACI,iBAAM,WAAW,WAAE,CAAC;QACpB,IAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAC;YACjB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;SACvC;IACL,CAAC;IACL,uBAAC;AAAD,CAAC,AAxED,CAAsC,iBAAM,GAwE3C;AAxEY,4CAAgB"}
\ No newline at end of file
"use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
}
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
var duiba_tl_1 = require("duiba-tl");
var duiba_tw_1 = require("duiba-tw");
/**
*Created by ck on 2018/7/2
* 游戏场景
*/
var SignPlayModule = /** @class */ (function (_super) {
__extends(SignPlayModule, _super);
function SignPlayModule() {
return _super !== null && _super.apply(this, arguments) || this;
}
SignPlayModule.prototype.initModel = function () {
this.model = new duiba_tw_1.SignPlayModel();
};
SignPlayModule.prototype.updateData = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
};
SignPlayModule.prototype.resetGame = function () {
};
SignPlayModule.prototype.show = function () {
_super.prototype.show.call(this);
this.resetGame();
};
SignPlayModule.prototype.addEvent = function () {
_super.prototype.addEvent.call(this);
};
SignPlayModule.prototype.removeEvent = function () {
_super.prototype.removeEvent.call(this);
};
return SignPlayModule;
}(duiba_tl_1.Module));
exports.SignPlayModule = SignPlayModule;
//# sourceMappingURL=SignPlayModule.js.map
\ No newline at end of file
{"version":3,"file":"SignPlayModule.js","sourceRoot":"","sources":["../../../src/module/sign/SignPlayModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAkC;AAClC,qCAAyC;AACzC;;;GAGG;AACH;IAAoC,kCAAM;IAA1C;;IA6BA,CAAC;IAvBa,kCAAS,GAAnB;QACI,IAAI,CAAC,KAAK,GAAG,IAAI,wBAAa,EAAE,CAAC;IACrC,CAAC;IAEM,mCAAU,GAAjB;QAAkB,cAAO;aAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;YAAP,yBAAO;;IACzB,CAAC;IAES,kCAAS,GAAnB;IAEA,CAAC;IAES,6BAAI,GAAd;QACI,iBAAM,IAAI,WAAE,CAAC;QACb,IAAI,CAAC,SAAS,EAAE,CAAC;IACrB,CAAC;IAES,iCAAQ,GAAlB;QACI,iBAAM,QAAQ,WAAE,CAAC;IACrB,CAAC;IAES,oCAAW,GAArB;QACI,iBAAM,WAAW,WAAE,CAAC;IACxB,CAAC;IACL,qBAAC;AAAD,CAAC,AA7BD,CAAoC,iBAAM,GA6BzC;AA7BY,wCAAc"}
\ No newline at end of file
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var WxLang = /** @class */ (function () {
function WxLang() {
}
// public static lang_001 = '确定';
// public static lang_002 = '取消';
WxLang.lang_003 = '微软雅黑';
WxLang.lang_004 = '系统正在处理中奖名单';
WxLang.lang_005 = '阳光普照';
WxLang.lang_006 = '第{0}名';
return WxLang;
}());
exports.WxLang = WxLang;
//# sourceMappingURL=WxLang.js.map
\ No newline at end of file
{"version":3,"file":"WxLang.js","sourceRoot":"","sources":["../../src/util/WxLang.ts"],"names":[],"mappings":";;AAAA;IAAA;IAOA,CAAC;IANG,iCAAiC;IACjC,iCAAiC;IACnB,eAAQ,GAAG,MAAM,CAAC;IAClB,eAAQ,GAAG,YAAY,CAAC;IACxB,eAAQ,GAAG,MAAM,CAAC;IAClB,eAAQ,GAAG,OAAO,CAAC;IACrC,aAAC;CAAA,AAPD,IAOC;AAPY,wBAAM"}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
{
"name": "duiba-wx",
"version": "1.0.43",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@types/jquery": {
"version": "3.3.4",
"resolved": "http://registry.npm.taobao.org/@types/jquery/download/@types/jquery-3.3.4.tgz",
"integrity": "sha1-8YUPuacAQaFKzk+Bp+14LbhUgxc="
},
"duiba-tc": {
"version": "git+ssh://git@gitlab2.dui88.com:clq/tc.git#67205f79f8d9c8a17023003d0a1f2b518f680034",
"from": "git+ssh://git@gitlab2.dui88.com:clq/tc.git#1.0",
"requires": {
"@types/jquery": "^3.3.1"
}
},
"duiba-tl": {
"version": "git+ssh://git@gitlab2.dui88.com:clq/tl.git#ae2d80b3f47c958e284e54593477642482631d7e",
"from": "git+ssh://git@gitlab2.dui88.com:clq/tl.git#1.0",
"requires": {
"duiba-tc": "git+ssh://git@gitlab2.dui88.com:clq/tc.git#daaf0437045f8666c96c1a4dca83fe33ae04d695"
},
"dependencies": {
"duiba-tc": {
"version": "git+ssh://git@gitlab2.dui88.com:clq/tc.git#daaf0437045f8666c96c1a4dca83fe33ae04d695",
"from": "git+ssh://git@gitlab2.dui88.com:clq/tc.git#1.0",
"requires": {
"@types/jquery": "^3.3.1"
}
}
}
},
"duiba-tw": {
"version": "git+ssh://git@gitlab2.dui88.com:clq/tw.git#d023d76adbb097f785c352d915646c3065a3fc7b",
"from": "git+ssh://git@gitlab2.dui88.com:clq/tw.git#1.0",
"requires": {
"duiba-tc": "git+ssh://git@gitlab2.dui88.com:clq/tc.git#67205f79f8d9c8a17023003d0a1f2b518f680034"
},
"dependencies": {
"duiba_tc": {
"version": "git+ssh://git@gitlab2.dui88.com:clq/tc.git#67205f79f8d9c8a17023003d0a1f2b518f680034",
"from": "git+ssh://git@gitlab2.dui88.com:clq/tc.git#67205f79f8d9c8a17023003d0a1f2b518f680034",
"requires": {
"@types/jquery": "^3.3.1"
}
}
}
}
}
}
{
"name": "duiba-wx",
"version": "1.0.43",
"description": "基于annieJs的兑吧活动组件库",
"main": "dist/index.js",
"types": "types/index.d.ts",
"scripts": {},
"author": "",
"license": "ISC",
"dependencies": {
"duiba-tc": "git+ssh://git@gitlab2.dui88.com:clq/tc.git#1.0",
"duiba-tw": "git+ssh://git@gitlab2.dui88.com:clq/tw.git#1.0",
"duiba-tl": "git+ssh://git@gitlab2.dui88.com:clq/tl.git#1.0"
}
}
import { GFun } from 'duiba-tc';
import { StageManager } from 'duiba-tl';
export class Img extends annie.Bitmap {
/**
* 奖品图片
*/
private img: annie.Bitmap;
/**
* 图片地址
*/
private url: string;
/**
* 图片x坐标
*/
private six: number;
/**
* 图片y坐标
*/
private siy: number;
/**
* 图片宽度
*/
private siw: number;
/**
* 图片高度
*/
private sih: number;
/**
* 更新图片
* @param url 地址
* @param type 类型big大图
* @param x x坐标
* @param y y坐标
* @param w 宽
* @param h 高
* @param mask 遮罩
*/
public updateData(url: string, x: number, y: number, w: number, h: number, mask?: annie.Shape): void {
//加载奖品图片
GFun.loadImage(url, (image) => {
this.bitmapData = image;
this.x = x;
this.y = y;
const scaleXX: number = w/this.bitmapData.width;
const scaleYY: number = h/this.bitmapData.height;
this.scaleX = scaleXX;
this.scaleY = scaleYY;
if (!this.mask && mask) {
this.mask = mask;
}
});
}
}
\ No newline at end of file
import { StageManager } from 'duiba-tl';
import { Item } from "./item/Item";
/**
*Created by cuiliqiang on 2018/3/19
* 简易列表
*/
export class List extends annie.Sprite {
/**
* 列表项
*/
private itemClass: any;
/**
* 列表项间隔
*/
private gap: number;
/**
* 是否是纵向
*/
private isVertical: boolean;
/**
* 列表项实例数组
*/
private items: Item[] = [];
/**
* 构造函数
* @param {any} itemClass 列表项
* @param {any} skinName 列表项皮肤
* @param {number} gap 列表项间隔
* @param {boolean} isVertical 是否是纵向
*/
constructor(itemClass: any, gap: number, isVertical = true) {
super();
this.itemClass = itemClass;
this.gap = gap;
this.isVertical = isVertical;
}
public updateData(data: any[], ...args): void {
//新增项的坐标
let currentY = 0;
let currentX = 0;
let len: number = data.length;
let i = 0;
for (i; i < len; i++) {
//按照索引到数组里查询,没有责创建一个
let item: Item = this.items[i];
if (!item) {
item = new this.itemClass();
this.items.push(item);
}
//刷新内部数据
item.initData.apply(item, [i, data[i]].concat(args));
if (!item.parent) {
StageManager.ins.addChild(item, this);
}
item.x = currentX;
item.y = currentY;
//强制刷新否则无法获取宽高
item.update();
//设置下项的坐标
if (this.isVertical) {
currentY += item.height + this.gap;
} else {
currentX += item.width + this.gap;
}
}
len = this.items.length;
if (data.length < len) {
for (i = data.length; i < len; i++) {
if (this.items[i].parent) {
StageManager.ins.removeChild(this.items[i]);
}
}
}
}
}
\ No newline at end of file
import { ICustomOptionData } from "duiba-tw";
import { Item } from "./Item";
import { Img } from "../Img";
/**
* 活动工具奖品列表项
*/
export class CustomOptionItem extends Item {
/**
* 奖品图片
*/
protected optionImg: Img;
/**
* img x坐标
*/
protected ix: number;
/**
* img y坐标
*/
protected iy: number;
/**
* img 宽度
*/
protected iw: number;
/**
* img 高度
*/
protected ih: number;
/**
* 奖品数据
*/
protected optionData: ICustomOptionData;
public initData(id: number, optionData: ICustomOptionData): void {
super.initData(id);
if (!optionData) {
return;
}
this.optionData = optionData;
this.updateOptionImg();
this.updateOptionNameTxt();
}
/**
* 更新奖品图片
*/
protected updateOptionImg(): void {
if (!this.optionImg) {
this.optionImg = new Img();
this.addChild(this.optionImg);
}
this.optionImg.updateData(this.optionData.logo, this.ix, this.iy, this.iw, this.ih);
}
/**
* 更新奖品名字文案
*/
protected updateOptionNameTxt(): void {
if (this.view.optionNameTxt) {
this.view.optionNameTxt.text = this.optionData.name;
}
}
}
\ No newline at end of file
import { Img } from './../Img';
import { List } from './../List';
import { Item } from './Item';
import { IRankData } from "duiba-tw";
import { StageManager } from "duiba-tl";
/**
*Created by cuiliqiang on 2018/3/20
* 活动结束排行榜列表项
*/
export class GameEndRankItem extends Item {
/**
* 用户列表
*/
private list: List;
/**
* 奖品图片
*/
private optionImg: Img;
/**
* 列表项Class
*/
protected itemClass: any;
/**
* 列表x坐标
*/
protected lx: number;
/**
* 列表y坐标
*/
protected ly: number;
/**
* 列表项间隔
*/
protected gap: number;
/**
* img x 坐标
*/
protected ix: number;
/**
* img y 坐标
*/
protected iy: number;
/**
* img 宽度
*/
protected iw: number;
/**
* img 高度
*/
protected ih: number;
/**
* 排行数据
*/
protected rankData: IRankData;
constructor() {
super();
}
public initUI(): void {
super.initUI();
this.list = new List(this.itemClass, this.gap);
StageManager.ins.addChild(this.list, this.view);
this.list.x = this.lx;
this.list.y = this.ly;
this.optionImg = new Img();
StageManager.ins.addChild(this.optionImg, this.view);
}
public initData(id: number, rankData: IRankData): void {
super.initData(id);
if (!rankData) {
return;
}
this.rankData = rankData;
this.updateRankTxt();
this.updateOptionImg();
this.updateUserList();
}
/**
* 更新排行文案
*/
protected updateRankTxt(): void {
if (this.view.nameTxt) {
this.view.nameTxt.text = this.rankData.name + ":";
}
}
/**
* 更新奖品图片
*/
protected updateOptionImg(): void {
this.optionImg.updateData(this.rankData.imageUrl, this.ix, this.iy, this.iw, this.ih);
}
/**
* 更新用户列表
*/
protected updateUserList(): void {
this.list.updateData(this.rankData.users);
}
}
\ No newline at end of file
import { WxLang } from './../../util/WxLang';
import { Img } from './../Img';
import { Item } from './Item';
import { IGameOptionData } from "duiba-tw";
import { StageManager } from "duiba-tl";
import { GFun } from "duiba-tc";
/**
*Created by cuiliqiang on 2018/3/19
* 奖品列表项
*/
export class GameOptionItem extends Item {
/**
* 奖品图片
*/
protected optionImg: Img;
/**
* 图片x坐标
*/
protected ix: number;
/**
* 图片y坐标
*/
protected iy: number;
/**
* 图片宽度
*/
protected iw: number;
/**
* 图片高度
*/
protected ih: number;
/**
* 奖品数据
*/
protected gameOptionData: IGameOptionData;
constructor() {
super();
}
public initData(id: number, gameOptionData: IGameOptionData): void {
super.initData(id);
if (!gameOptionData) {
return;
}
this.gameOptionData = gameOptionData;
this.updateOptionImg();
this.updateScopeTxt();
this.updateDescTxt();
this.updateOptionNameTxt();
}
/**
* 更新奖品图片
*/
protected updateOptionImg(): void {
if (!this.optionImg) {
this.optionImg = new Img();
StageManager.ins.addChild(this.optionImg, this.view)
}
this.optionImg.updateData(this.gameOptionData.logo, this.ix, this.iy, this.iw, this.ih);
}
/**
* 更新排名范围文案
*/
protected updateScopeTxt(): void {
if (this.view.scopeTxt) {
if (window["specialName"]) {
this.view.scopeTxt.text = window["specialName"];
} else {
//自动开奖
if (this.gameOptionData.autoOpen) {
this.view.scopeTxt.text = WxLang.lang_005;
} else {
this.view.scopeTxt.text = GFun.replace(WxLang.lang_006, [this.gameOptionData.scope]);
}
}
}
}
/**
* 更新奖品描述文案
*/
protected updateDescTxt(): void {
if (this.view.descTxt) {
this.view.descTxt.text = this.gameOptionData.description;
}
}
/**
* 更新奖品名字文案
*/
protected updateOptionNameTxt(): void {
if (this.view.nameTxt) {
this.view.nameTxt.text = this.gameOptionData.name;
}
}
}
\ No newline at end of file
import { Item } from './Item';
import { IUserData, DataManager } from "duiba-tw";
import { CreateFactory, StageManager } from "duiba-tl";
/**
*Created by cuiliqiang on 2018/3/20
* 用户信息列表项
*/
export class GameUserItem extends Item {
public id: number;
/**
* 背景
*/
protected bg: annie.Shape;
/**
* 背景宽度
*/
protected bw: number;
/**
* 背景高度
*/
protected bh: number;
/**
* 背景颜色
*/
protected cl: string;
/**
* 分数单位
*/
protected unitName: string;
/**
* 用户数据
*/
protected userData: IUserData;
public initUI(): void {
super.initUI();
if (this.cl) {
this.bg = CreateFactory.createRect(this.cl, 1, 0, 0, this.bw, this.bh);
this.bg.alpha = 0.7;
StageManager.ins.addChild(this.bg, this, 0);
}
this.unitName = '';
}
public initData(id: number, userData: IUserData): void {
super.initData(id);
if (!userData) {
return;
}
this.userData = userData;
this.updateMyRankBg();
this.updateRankTxt();
this.updateConsumerIdTxt();
this.updateNickNameTxt();
this.updateScoreTxt();
}
/**
* 更新我得排行状态
*/
protected updateMyRankBg(): void {
if (this.cl) {
if (this.userData.rank == DataManager.ins.getInfoData.rank) {
this.bg.visible = true;
} else {
this.bg.visible = false;
}
}
}
/**
* 更新排行文案
*/
protected updateRankTxt(): void {
if (this.view.rankTxt) {
this.view.rankTxt.text = this.userData.rank;
}
}
/**
* 更新用户ID文案
*/
protected updateConsumerIdTxt(): void {
if (this.view.cidTxt) {
this.view.cidTxt.text = this.userData.cid;
}
}
/**
* 更新用户昵称文案
*/
protected updateNickNameTxt(): void {
if (this.view.nickNameTxt) {
this.view.nickNameTxt.text = this.userData.nickName ? this.userData.nickName : this.userData.cid;
}
}
/**
* 更新用户成绩文案
*/
protected updateScoreTxt(): void {
if (this.view.scoreTxt) {
this.view.scoreTxt.text = this.userData.maxScore + this.unitName;
}
}
}
\ No newline at end of file
import { StageManager } from "duiba-tl";
/**
* 列表项
*/
export class Item extends annie.Sprite implements annieUI.IScrollListItem {
public id: number;
public data: number;
/**
* 皮肤Class
*/
protected skinClass: any;
/**
* 是否初始化完成
*/
protected isInit: boolean;
/**
* 显示对象
*/
protected view: any;
constructor() {
super();
}
public initUI(): void {
if (typeof (this.skinClass) === 'string') {
this.skinClass = eval(this.skinClass);
}
this.view = new this.skinClass();
StageManager.ins.addChild(this.view, this);
}
public initData(id: number, ...args): void {
if (!this.isInit) {
this.initUI();
this.isInit = true;
}
}
}
\ No newline at end of file
/**
*Created by cuiliqiang on 2018/3/13
*/
export enum ModuleName {
//游戏规则面板
RULE_PANEL = 'RulePanel',
//分享面板
SHARE_PANEL = 'SharePanel',
//未中奖面板
LOSE_PANEL = 'LosePanel',
//开始场景
GAME_START_SCENE = 'GameStartScene',
//游戏玩法场景
GAME_PLAY_SCENE = 'GamePlayScene',
//活动结束场景
GAME_END_SCENE = 'GameEndScene',
//中奖信息场景
GAME_WINNER_SCENE = 'GameWinnerScene',
//活动奖品面板
GAME_OPTION_PANEL = 'GameOptionPanel',
//游戏未中奖
GAME_LOSE_PANEL = 'GameLosePanel',
//游戏中奖面板
GAME_WIN_PANEL = 'GameWinPanel',
//排行榜面板
GAME_END_RANK_PANEL = 'GameEndRankPanel',
//实时排行榜面板
GAME_REAL_TIME_RANK_PANEL = 'GameRealTimeRankPanel',
//引导场景
GAME_GUIDE_SCENE = 'GameGuideScene',
//自定义活动工具玩法场景
CUSTOM_PLAY_SCENE = 'CustomPlayScene',
//自定义活动工具中奖面板
CUSTOM_WIN_PANEL = 'CustomWinPanel',
//自定义活动工具未中奖面板
CUSTOM_LOSE_PANEL = 'CustomLosePanel',
//自定义活动工具奖品详情面板
CUSTOM_OPTION_INFO_PANEL = 'CustomOptionInfoPanel',
//插件抽奖面板
PLUG_PANEL = 'PlugPanel',
//插件中奖面板
PLUG_WIN_PANEL = 'PlugWinPanel',
//插件未中奖面板
PLUG_LOSE_PANEL = 'PlugLosePanel',
//签到养成领养面板
SIGN_ADOPTE_PANEL = 'SignAdoptePanel',
//签到养成领养面板
SIGN_PLAY_SCENE = 'SignPlayScene'
}
import { ActivityModule } from './module/common/ActivityModule';
import { WxLang } from './util/WxLang';
import { ModuleName } from './enum/ModuleName';
import { Item } from "./components/item/Item";
import { Img } from "./components/Img";
import { List } from "./components/List";
import { RuleModule } from "./module/common/RuleModule";
import { ShareModule } from "./module/common/ShareModule";
import { GameEndModule } from "./module/game/GameEndModule";
import { GameEndRankModule } from "./module/game/GameEndRankModule";
import { GamePlayModule } from "./module/game/GamePlayModule";
import { GameGuideModule } from "./module/game/GameGuideModule";
import { GameOptionModule } from "./module/game/GameOptionModule";
import { GameLoseModule } from "./module/game/GameLoseModule";
import { GameWinModule } from "./module/game/GameWinModule";
import { GameRealTimeRankModule } from "./module/game/GameRealTimeRankModule";
import { GameStartModule } from "./module/game/GameStartModule";
import { GameWinnerModule } from "./module/game/GameWinnerModule";
import { GameEndRankItem } from "./components/item/GameEndRankItem";
import { GameOptionItem } from "./components/item/GameOptionItem";
import { GameUserItem } from "./components/item/GameUserItem";
import { CustomOptionInfoModule } from "./module/custom/CustomOptionInfoModule";
import { CustomPlayModule } from "./module/custom/CustomPlayModule";
import { CustomWinModule } from "./module/custom/CustomWinModule";
import { CustomOptionItem } from "./components/item/CustomOptionItem";
import { PlugModule } from "./module/plug/PlugModule";
import { PlugWinModule } from "./module/plug/PlugWinModule";
import { SignPlayModule } from "./module/sign/SignPlayModule";
import { SignAdopteModule } from "./module/sign/SignAdopteModule";
export {
//公用组件
Item, Img, List, RuleModule, ShareModule, ActivityModule,
//游戏业务组件
GameEndModule, GameEndRankModule, GamePlayModule, GameGuideModule, GameOptionModule,
GameLoseModule, GameWinModule, GameRealTimeRankModule, GameStartModule, GameWinnerModule,
GameEndRankItem, GameOptionItem, GameUserItem,
//自定义活动工具业务组件
CustomOptionInfoModule, CustomPlayModule, CustomWinModule, CustomOptionItem,
//插件业务组件
PlugModule, PlugWinModule,
//枚举
ModuleName,
//签到养成
SignAdopteModule, SignPlayModule,
//工具
WxLang
}
\ No newline at end of file
import { StageManager, PanelModule } from "duiba-tl";
import { ActivityModel } from "duiba-tw";
import { Img } from "../../components/Img";
/**
* 中奖面板
*/
export class ActivityModule extends PanelModule {
/**
* 奖品图片
*/
protected optionImg: Img;
/**
* 数据
*/
protected model: ActivityModel;
protected initModel(): void {
this.model = new ActivityModel();
}
protected initUI(): void {
super.initUI();
this.initImg();
}
/**
* 初始化奖品图片
*/
protected initImg(): void {
this.optionImg = new Img();
StageManager.ins.addChild(this.optionImg, this.view);
}
public updateData(...args): void {
super.updateData();
this.updateOptionNameTxt();
this.updateOptionImg();
this.model.showLog();
}
/**
* 更新奖品名字文案
*/
protected updateOptionNameTxt(): void {
if (this.view.optionNameTxt) {
this.view.optionNameTxt.text = this.model.optionName;
}
}
/**
* 更新图片
*/
protected updateOptionImg(): void {
const size: string = this.model.optionImgSize;
this.optionImg.updateData(
this.model.optionImg,
this.data.uiCfg['ix_' + size],
this.data.uiCfg['iy_' + size],
this.data.uiCfg['iw_' + size],
this.data.uiCfg['ih_' + size],
this.data.uiCfg['mask_' + size],
);
}
protected addEvent(): void {
super.addEvent();
this.addClick(this.view.useBtn, this.onClick_useBtn);
this.addClick(this.optionImg, this.onClick_useBtn);
}
private onClick_useBtn(e: annie.MouseEvent): void {
this.delayEnable(this.view.useBtn, 5000);
this.model.onUse();
}
protected removeEvent(): void {
super.removeEvent();
this.removeClick(this.view.useBtn);
this.removeClick(this.optionImg);
}
}
\ No newline at end of file
import { RuleModel } from "duiba-tw";
import { PanelModule, StageManager } from "duiba-tl";
import { WxLang } from "../../util/WxLang";
/**
*Created by cuiliqiang on 2018/3/13
* 规则面板
*/
export class RuleModule extends PanelModule {
/**
* html section 对象
*/
protected section: any;
/**
* 规则容器
*/
protected rule: annie.FloatDisplay;
/**
* 数据
*/
protected model: RuleModel;
protected initModel(): void {
this.model = new RuleModel();
}
protected initUI(): void {
super.initUI();
//创建悬浮的html元素(canvas 对文本支持比较差,我们用源生的html文本)
this.section = document.createElement('section');
this.section.id = "rule";
this.section.style.overflowX = "hidden";
this.section.style.overflowY = "auto";
this.section.style.width = this.data.uiCfg.ow + "px";
this.section.style.height = this.data.uiCfg.oh + "px";
this.section.style.lineHeight = this.data.uiCfg.lh + "px";
this.section.style.fontFamily = WxLang.lang_003;
this.section.style.fontSize = this.data.uiCfg.fs + 'px';
this.section.style.color = this.data.uiCfg.fc;
// document.body.appendChild(this.section);
//创建Floatview 把我们要悬浮的元素封装进去
this.rule = new annie.FloatDisplay();
StageManager.ins.addChild(this.rule, this.view);
this.rule.x = this.data.uiCfg.ox;
this.rule.y = this.data.uiCfg.oy;
}
public updateData(...args): void {
super.updateData();
this.rule.init(this.section);
this.section.innerHTML = this.model.ruleTxt;
}
protected onClick_closeBtn(e: annie.MouseEvent): void {
this.rule.delElement();
super.onClick_closeBtn(e);
}
}
\ No newline at end of file
import { PanelModule } from "duiba-tl";
/**
*Created by cuiliqiang on 2018/3/20
* 微信分享面板
*/
export class ShareModule extends PanelModule {
protected addEvent(): void {
super.addEvent();
this.addClick(this, this.onClick_closeBtn);
}
protected removeEvent(): void {
super.removeEvent();
this.removeClick(this);
}
}
\ No newline at end of file
import { Module } from "duiba-tl";
/**
*
*/
export class CustomOptionInfoModule extends Module {
public updateData(...args): void {
}
}
\ No newline at end of file
import { ModuleName } from './../../enum/ModuleName';
import { Module, StageManager, ModuleManager } from "duiba-tl";
import { CustomPlayModel, TwFun } from "duiba-tw";
export class CustomPlayModule extends Module {
/**
* 奖品列表
*/
protected list: annieUI.ScrollList;
/**
* 数据
*/
protected model: CustomPlayModel;
protected initModel(): void {
this.model = new CustomPlayModel();
}
protected initUI(): void {
super.initUI();
this.initList();
}
/**
* 创建奖品列表
*/
protected initList(): void {
this.list = new annieUI.ScrollList(
this.data.uiCfg.itemClass,
this.data.uiCfg.iw,
this.data.uiCfg.ih,
this.data.uiCfg.lw,
this.data.uiCfg.lh,
this.data.uiCfg.isVertical,
this.data.uiCfg.cols
);
this.list.x = this.data.uiCfg.lx;
this.list.y = this.data.uiCfg.ly;
StageManager.ins.addChild(this.list, this.view);
}
public updateData(...args): void {
this.updateCountTxt();
this.updateList();
}
/**
* 更新奖品列表
*/
protected updateList(): void {
this.list.updateData(this.model.optionList, true);
}
/**
* 更新剩余次数文案
*/
protected updateCountTxt(): void {
if (this.view.countTxt) {
this.view.countTxt.text = this.model.countTxt;
}
}
protected onClick_customDoJoinBtn(e: annie.MouseEvent): void {
this.enableMouseEvt(false);
this.model.customDoJoin(this.customDoJoin_result.bind(this), this.model.getCustomOrderStatus);
}
protected customDoJoin_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
let moduleName: string;
if (this.model.plugIsWinning) {
moduleName = ModuleName.CUSTOM_WIN_PANEL;
} else {
moduleName = ModuleName.CUSTOM_LOSE_PANEL;
}
ModuleManager.ins.openModule(moduleName);
}
protected onClick_ruleBtn(e: annie.MouseEvent): void {
this.delayEnable(this.view.ruleBtn, 2000);
ModuleManager.ins.openModule(ModuleName.RULE_PANEL, this.model.rule);
}
protected onClick_recordBtn(e: annie.MouseEvent): void {
this.delayEnable(this.view.recordBtn, 5000);
window.location.href = TwFun.getRecordUrl('00');
}
protected addEvent(): void {
super.addEvent();
if (this.view.customDoJoinBtn) {
this.addClick(this.view.customDoJoinBtn, this.onClick_customDoJoinBtn);
}
if (this.view.ruleBtn) {
this.addClick(this.view.ruleBtn, this.onClick_ruleBtn);
}
if (this.view.recordBtn) {
this.addClick(this.view.recordBtn, this.onClick_recordBtn);
}
}
protected removeEvent(): void {
super.addEvent();
if (this.view.customDoJoinBtn) {
this.removeClick(this.view.customDoJoinBtn);
}
if (this.view.ruleBtn) {
this.removeClick(this.view.ruleBtn);
}
if (this.view.recordBtn) {
this.removeClick(this.view.recordBtn);
}
}
}
\ No newline at end of file
import { CustomWinModel, ActivityModel } from "duiba-tw";
export class CustomWinModule extends ActivityModel {
protected model: CustomWinModel;
protected initModel(): void {
this.model = new CustomWinModel();
}
}
\ No newline at end of file
import { Module, ModuleManager } from "duiba-tl";
import { GameEndModel, TwFun } from "duiba-tw";
import { ModuleName } from "../../enum/ModuleName";
import { WxLang } from "../../util/WxLang";
/**
*Created by cuiliqiang on 2018/3/16
* 游戏结束场景
*/
export class GameEndModule extends Module {
/**
* 数据
*/
protected model: GameEndModel;
protected initModel(): void {
this.model = new GameEndModel();
}
public updateData(...args): void {
this.updateStatusTxt();
this.updateScoreTxt();
}
/**
* 更新活动状态文案
* @param str
*/
protected updateStatusTxt(str: string = WxLang.lang_004): void {
if (this.view.statusTxt) {
this.view.statusTxt.text = str;
}
}
/**
* 更新积分文案
*/
protected updateScoreTxt(): void {
if (this.view.scoreTxt) {
this.view.scoreTxt.text = this.model.getScoreTxt();
}
}
protected addEvent(): void {
//兑换记录
if (this.view.recordBtn) {
this.addClick(this.view.recordBtn, this.onClick_recordBtn);
}
//活动规则
if (this.view.ruleBtn) {
this.addClick(this.view.ruleBtn, this.onClick_ruleBtn);
}
//活动奖品
if (this.view.optionBtn) {
this.addClick(this.view.optionBtn, this.onClick_optionBtn);
}
}
protected onClick_recordBtn(e: annie.MouseEvent): void {
this.delayEnable(this.view.recordBtn, 5000);
window.location.href = TwFun.getRecordUrl('00');
}
protected onClick_ruleBtn(e: annie.MouseEvent): void {
this.enableMouseEvt(false);
this.model.getRule(this.getRule_result.bind(this));
}
protected getRule_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
ModuleManager.ins.openModule(ModuleName.RULE_PANEL);
}
protected onClick_optionBtn(e: annie.MouseEvent): void {
this.enableMouseEvt(false);
this.model.getOptions(this.getOptions_result.bind(this));
}
protected getOptions_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
ModuleManager.ins.openModule(ModuleName.GAME_OPTION_PANEL);
}
protected removeEvent(): void {
if (this.view.recordBtn) {
this.removeClick(this.view.recordBtn);
}
if (this.view.ruleBtn) {
this.removeClick(this.view.ruleBtn);
}
if (this.view.prizeBtn) {
this.removeClick(this.view.prizeBtn);
}
}
}
\ No newline at end of file
import { List } from './../../components/List';
import { GameEndRankModel } from "duiba-tw";
import { StageManager, PanelModule } from "duiba-tl";
/**
*Created by cuiliqiang on 2018/3/19
* 活动结束排行榜场景
*/
export class GameEndRankModule extends PanelModule {
/**
* 滚动组件
*/
private scrollPage: annieUI.ScrollPage;
/**
* 排行列表
*/
private list: List;
/**
* 数据
*/
protected model: GameEndRankModel;
protected initModel(): void {
this.model = new GameEndRankModel();
}
protected initUI(): void {
super.initUI();
this.initList();
}
/**
* 初始化列表
*/
protected initList(): void {
this.scrollPage = new annieUI.ScrollPage(this.data.uiCfg.sw, this.data.uiCfg.sh, 4943, this.data.uiCfg.isVertical);
StageManager.ins.addChild(this.scrollPage, this.view);
this.scrollPage.x = this.data.uiCfg.sx;
this.scrollPage.y = this.data.uiCfg.sy;
this.list = new List(this.data.uiCfg.itemClass, this.data.uiCfg.gap, this.data.uiCfg.isVertical);
StageManager.ins.addChild(this.list, this.scrollPage.view);
}
public updateData(...args): void {
super.updateData();
this.updateRankList();
}
/**
* 更新排行榜列表
*/
protected updateRankList(): void {
this.list.updateData(this.model.rankList);
this.scrollPage.maxDistance = this.list.height;
}
}
\ No newline at end of file
import { ModuleName } from './../../enum/ModuleName';
import { Module, ModuleManager } from "duiba-tl";
import { GCache } from "duiba-tc";
/**
*Created by cuiliqiang on 2018/3/19
* 引导面板
*/
export class GameGuideModule extends Module {
/**
* 当前步骤
*/
protected currStep: number;
/**
* 最大步骤
*/
protected maxStep: number;
public updateData(totalFrames: number, ...args): void {
super.updateData();
this.maxStep = totalFrames || 1;
this.currStep = 1;
}
/**
* 引导是否完成
*/
public isComplete(): boolean {
if(this.currStep >= this.maxStep) {
GCache.writeCache('guide', 'true');
return true;
}
return false;
}
protected onClick_sureBtn(e: annie.MouseEvent): void {
this.currStep ++;
if (this.isComplete()) {
ModuleManager.ins.openModule(ModuleName.GAME_PLAY_SCENE);
} else {
this.view.gotoAndStop(this.currStep);
}
}
protected addEvent(): void {
super.addEvent();
if (this.view.sureBtn) {
this.addClick(this.view.sureBtn, this.onClick_sureBtn);
}
}
protected removeEvent(): void {
super.removeEvent();
if (this.view.sureBtn) {
this.removeClick(this.view.sureBtn);
}
}
}
\ No newline at end of file
import { GameLoseModel } from "duiba-tw";
import { ModuleManager, PanelModule } from "duiba-tl";
import { ModuleName } from "../../enum/ModuleName";
/**
*Created by cuiliqiang on 2018/3/16
* 游戏结束弹窗
*/
export class GameLoseModule extends PanelModule {
/**
* 数据
*/
protected model: GameLoseModel;
protected initModel(): void {
this.model = new GameLoseModel();
}
public updateData(...args): void {
super.updateData();
this.updateCountTxt();
this.updateRankTxt();
this.updateCurrScoreTxt();
this.updateMaxScoreTxt();
}
/**
* 更新剩余次数文案
*/
protected updateCountTxt(): void {
if (this.view.costTxt) {
this.view.costTxt = this.model.costTxt;
}
}
/**
* 更新排行文案
*/
protected updateRankTxt(): void {
if (this.view.rankTxt) {
this.view.rankTxt.text = this.model.getRankTxt();
}
}
/**
* 更新当前积分文案
*/
protected updateCurrScoreTxt(): void {
if (this.view.currScoreTxt) {
this.view.currScoreTxt.text = this.model.getCurrScoreTxt();
}
}
/**
* 更新最高积分文案
*/
protected updateMaxScoreTxt(): void {
if (this.view.maxScoreTxt) {
this.view.maxScoreTxt.text = this.model.getMaxScoreTxt();
}
}
protected onClick_againBtn(e: annie.MouseEvent): void {
this.enableMouseEvt(false);
this.model.doStart(this.doStart_result.bind(this), true);
}
protected doStart_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
ModuleManager.ins.openModule(ModuleName.GAME_PLAY_SCENE);
}
protected onClick_closeBtn(e: annie.MouseEvent): void {
this.enableMouseEvt(false);
this.model.getInfo(this.getInfo_result.bind(this));
}
protected getInfo_result(): void {
ModuleManager.ins.openModule(ModuleName.GAME_START_SCENE);
this.enableMouseEvt(true);
}
protected addEvent(): void {
super.addEvent();
if(this.view.againBtn) {
this.addClick(this.view.againBtn, this.onClick_againBtn);
}
}
protected removeEvent(): void {
super.removeEvent();
if(this.view.againBtn) {
this.removeClick(this.view.againBtn);
}
}
}
\ No newline at end of file
import { GameOptionModel } from "duiba-tw";
import { StageManager, PanelModule } from "duiba-tl";
/**
*Created by cuiliqiang on 2018/3/19
* 活动奖品面板
*/
export class GameOptionModule extends PanelModule {
/**
* 奖品列表
*/
private list: annieUI.ScrollList;
/**
* 数据
*/
protected model: GameOptionModel;
protected initModel(): void {
this.model = new GameOptionModel();
}
public initUI(): void {
super.initUI();
this.initList();
}
protected initList(): void {
this.list = new annieUI.ScrollList(
this.data.uiCfg.itemClass,
this.data.uiCfg.iw,
this.data.uiCfg.ih,
this.data.uiCfg.lw,
this.data.uiCfg.lh,
this.data.uiCfg.isVertical,
this.data.uiCfg.cols
);
this.list.x = this.data.uiCfg.lx;
this.list.y = this.data.uiCfg.ly;
StageManager.ins.addChild(this.list, this.view);
}
public updateData(...args): void {
super.updateData();
this.updateEndTimeTxt();
this.updateOptionList();
}
/**
* 更新活动结束时间文案
*/
protected updateEndTimeTxt(): void {
if (this.view.endTimeTxt) {
this.view.endTimeTxt.text = this.model.getEndTimeTxt();
}
}
/**
* 更新奖品列表
*/
protected updateOptionList(): void {
this.list.updateData(this.model.optionList, true);
}
}
\ No newline at end of file
import { ModuleName } from '../../enum/ModuleName';
import { Module, ModuleManager } from "duiba-tl";
import { GamePlayModel, IDynamicData } from "duiba-tw";
import { GTime } from "duiba-tc";
/**
*Created by cuiliqiang on 2018/3/26
* 游戏场景
*/
export class GamePlayModule extends Module {
/**
* 监听回调
*/
private mouseDownBind: Function;
private mouseUpBind: Function;
/**
* 游戏得分
*/
protected score: number;
/**
* 数据
*/
protected model: GamePlayModel;
protected initModel(): void {
this.model = new GamePlayModel();
}
public updateData(...args): void {
}
protected resetGame(): void {
this.model.update();
}
protected show(): void {
super.show();
this.resetGame();
}
/**
* 更新游戏积分
* @param type 1 增加, 2 减少, 3重置
* @param score 分值
*/
protected updateScore(type: number, score: number): void {
if (type == 1) {
this.score += score;
} else if (type == 2) {
this.score -= score;
this.score = Math.max(0, this.score);
} else {
this.score = score;
}
this.datapash();
}
/**
* 阶段性提交
*/
protected datapash(): void {
if (this.model.checkDatapash(this.score)) {
this.model.datapash();
}
}
protected onMouseDown(e: annie.MouseEvent): void {
const dynamic: IDynamicData = { a: 'md', t: GTime.getTimestamp(), x: e.stageX, y: e.stageY };
this.model.addDynamic(dynamic);
}
protected onMouseUp(e: annie.MouseEvent): void {
const dynamic: IDynamicData = { a: 'mu', t: GTime.getTimestamp(), x: e.stageX, y: e.stageY };
this.model.addDynamic(dynamic);
}
protected addEvent(): void {
super.addEvent();
this.view.addEventListener(annie.MouseEvent.MOUSE_DOWN, this.mouseDownBind = this.onMouseDown.bind(this));
this.view.addEventListener(annie.MouseEvent.MOUSE_UP, this.mouseUpBind = this.onMouseUp.bind(this));
}
protected removeEvent(): void {
super.removeEvent();
this.view.removeEventListener(annie.MouseEvent.MOUSE_DOWN, this.mouseDownBind);
this.view.removeEventListener(annie.MouseEvent.MOUSE_UP, this.mouseUpBind);
}
protected gameOver(): void {
this.enableMouseEvt(true);
this.removeEvent();
this.model.cacheMaxScore(this.score);
this.model.submit(this.submit_result.bind(this), this.score);
}
protected submit_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
let moduleName: string;
if (this.model.gameIsWinning) {
moduleName = ModuleName.GAME_WIN_PANEL;
} else {
moduleName = ModuleName.GAME_LOSE_PANEL;
}
ModuleManager.ins.openModule(moduleName);
}
}
\ No newline at end of file
import { GameRealTimeRankModel } from "duiba-tw";
import { StageManager, PanelModule } from "duiba-tl";
/**
*Created by cuiliqiang on 2018/3/21
* 实时排行榜面板
*/
export class GameRealTimeRankModule extends PanelModule {
/**
* 用户列表
*/
private list: annieUI.ScrollList;
/**
* 数据
*/
protected model: GameRealTimeRankModel;
protected initModel(): void {
this.model = new GameRealTimeRankModel();
}
public updateData(...args): void {
super.updateData();
this.updateMyRankTxt();
this.updateRankList();
}
/**
* 更新我得排行文案
*/
protected updateMyRankTxt(): void {
if(this.view.myRankTxt) {
this.view.myRankTxt.text = this.model.getRankTxt();
}
}
/**
* 更新排行列表
*/
protected updateRankList(): void {
if(this.model.userList) {
if(this.list) {
StageManager.ins.removeChild(this.list);
}
this.list = new annieUI.ScrollList(
this.data.uiCfg.itemClass,
this.data.uiCfg.iw,
this.data.uiCfg.ih,
this.data.uiCfg.lw,
this.data.uiCfg.lh,
this.data.uiCfg.isVertical
);
StageManager.ins.addChild(this.list, this.view);
this.list.x = this.data.uiCfg.lx;
this.list.y = this.data.uiCfg.ly;
this.list.updateData(this.model.userList, true);
}
}
}
\ No newline at end of file
import { Module, ModuleManager, PanelModule } from "duiba-tl";
import { GameStartModel, TwFun } from "duiba-tw";
import { ModuleName } from '../../enum/ModuleName';
import { IModuleData, GCache, GFun, GDispatcher } from "duiba-tc";
/**
* 开始游戏场景
*/
export class GameStartModule extends Module {
/**
* 数据
*/
protected model: GameStartModel;
protected initModel(): void {
this.model = new GameStartModel();
}
/**
* 更新页面
*/
public updateData(): void {
this.updateCountTxt();
this.updateStartBtnStatus();
this.updateExemptionTxt();
}
/**
* 更新次数文案
*/
protected updateCountTxt(): void {
if (this.view.countTxt) {
this.view.countTxt.text = this.model.countTxt;
}
}
/**
* 更新开始按钮状态
*/
protected updateStartBtnStatus(): void {
if (this.view.startBtn) {
const enable: boolean = this.model.startBtnEnable;
this.view.startBtn.mouseEnable = enable;
if (enable) {
this.view.startBtn.gotoAndStop(1);
} else {
this.view.startBtn.gotoAndStop(3);
}
}
}
/**
* 更新免责文案
*/
protected updateExemptionTxt(): void {
if (this.view.exemptionTxt) {
if (GFun.isIOS) {
this.view.exemptionTxt.visible = true;
} else {
this.view.exemptionTxt.visible = false;
}
}
}
protected addEvent(): void {
super.addEvent();
//兑换记录
if (this.view.recordBtn) {
this.addClick(this.view.recordBtn, this.onClick_recordBtn);
}
//活动规则
if (this.view.ruleBtn) {
this.addClick(this.view.ruleBtn, this.onClick_ruleBtn);
}
//活动奖品
if (this.view.optionBtn) {
this.addClick(this.view.optionBtn, this.onClick_optionBtn);
}
//开始游戏
if (this.view.startBtn) {
this.addClick(this.view.startBtn, this.onClick_startBtn);
}
//实时排行榜
if(this.view.realTimeRankBtn) {
this.addClick(this.view.realTimeRankBtn, this.onClick_realTimeRankBtn);
}
}
protected onClick_recordBtn(e: annie.MouseEvent): void {
this.delayEnable(this.view.recordBtn, 5000);
window.location.href = TwFun.getRecordUrl('00');
}
protected onClick_ruleBtn(e: annie.MouseEvent): void {
this.enableMouseEvt(false);
this.model.getRule(this.getRule_result.bind(this));
}
protected getRule_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
ModuleManager.ins.openModule(ModuleName.RULE_PANEL);
}
protected onClick_optionBtn(e: annie.MouseEvent): void {
this.enableMouseEvt(false);
this.model.getOptions(this.getOptions_result.bind(this));
}
protected getOptions_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
ModuleManager.ins.openModule(ModuleName.GAME_OPTION_PANEL);
}
protected onClick_startBtn(e: annie.MouseEvent): void {
this.enableMouseEvt(false);
this.model.doStart(this.doStart_result.bind(this), false);
}
protected doStart_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
const module: IModuleData = ModuleManager.ins.getModule(ModuleName.GAME_GUIDE_SCENE);
if(GCache.readCache('guide') || !module) {
ModuleManager.ins.openModule(ModuleName.GAME_PLAY_SCENE);
} else {
ModuleManager.ins.openModule(ModuleName.GAME_GUIDE_SCENE);
}
}
protected onClick_realTimeRankBtn(e: annie.MouseEvent): void {
this.enableMouseEvt(false);
this.model.realtimerank(this.realtimerank_result.bind(this));
}
protected realtimerank_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
ModuleManager.ins.openModule(ModuleName.GAME_REAL_TIME_RANK_PANEL);
}
protected removeEvent(): void {
super.removeEvent();
if (this.view.recordBtn) {
this.removeClick(this.view.recordBtn);
}
if (this.view.ruleBtn) {
this.removeClick(this.view.ruleBtn);
}
if (this.view.prizeBtn) {
this.removeClick(this.view.prizeBtn);
}
if (this.view.startBtn) {
this.removeClick(this.view.startBtn);
}
if(this.view.realTimeRankBtn) {
this.removeClick(this.view.realTimeRankBtn);
}
}
}
This diff is collapsed.
This diff is collapsed.
import { ActivityModel } from "duiba-tw";
import { ModuleName } from './../../enum/ModuleName';
import { ModuleManager, PanelModule } from "duiba-tl";
export class PlugModule extends PanelModule {
/**
* 插件ID
*/
protected plugId: number;
/**
* 数据
*/
protected model: ActivityModel;
protected initModel(): void {
this.model = new ActivityModel();
}
public updateData(plugId: number, ...args): void {
super.updateData();
this.plugId = plugId;
}
protected onClick_doJoinBtn(e: annie.MouseEvent): void {
this.enableMouseEvt(false);
this.model.plugDoJoin(this.doJoin_result, this.plugId);
}
protected doJoin_result(success: boolean): void {
this.enableMouseEvt(true);
if(!success) {
return;
}
let moduleName: string;
if (this.model.plugIsWinning) {
moduleName = ModuleName.PLUG_WIN_PANEL;
} else {
moduleName = ModuleName.PLUG_LOSE_PANEL;
}
ModuleManager.ins.openModule(moduleName);
}
protected addEvent(): void {
super.addEvent();
if(this.view.doJoinBtn) {
this.addClick(this.view.doJoinBtn, this.onClick_doJoinBtn);
}
}
protected removeEvent(): void {
super.removeEvent();
if(this.view.doJoinBtn) {
this.removeClick(this.view.doJoinBtn);
}
}
}
\ No newline at end of file
import { ActivityModule } from './../common/ActivityModule';
import { PlugWinModel } from "duiba-tw";
export class PlugWinModule extends ActivityModule {
/**
* 数据
*/
protected model: PlugWinModel;
protected initModel(): void {
this.model = new PlugWinModel();
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
export class WxLang {
// public static lang_001 = '确定';
// public static lang_002 = '取消';
public static lang_003 = '微软雅黑';
public static lang_004 = '系统正在处理中奖名单';
public static lang_005 = '阳光普照';
public static lang_006 = '第{0}名';
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
{
"defaultSeverity": "error",
"extends": [
// "tslint:recommended"
"./tslint-config"
],
"jsRules": {},
"rules": {},
"rulesDirectory": []
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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