Commit 3db49fcc authored by AU-Pro-mac's avatar AU-Pro-mac

add new code

parent c7f39477
......@@ -2556,6 +2556,7 @@ var Root = (function (_super) {
Root.prototype.gameAgain = function () {
return __awaiter(this, void 0, void 0, function () {
var userInfoRes;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
......@@ -2568,7 +2569,8 @@ var Root = (function (_super) {
userInfoRes = _a.sent();
this.userInfo = userInfoRes.data;
console.log('CSD-GAME this.userInfo:', userInfoRes.data);
if (this.userInfo.noGameTime && this.userInfo.noGameTime === 1) {
if (this.userInfo.noGameTime && this.userInfo.noGameTime == 1) {
Main_1.GDispatcher.addEventListener("outCallBackToPage", function () { _this.gameOver('back'); }, this);
return [2];
}
else {
......@@ -2596,7 +2598,8 @@ var Root = (function (_super) {
this.goodsContainer.removeAllGoods();
this.scoreBoard.stopTime();
if (type === 'back') {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
Main_1.GDispatcher.removeEventListener('gameReset', this.gameAgain, this);
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('back_To_Page'); });
return [2];
}
if (!(this.userInfo.win && this.scoreBoard.scoreLeft)) return [3, 2];
......@@ -2636,7 +2639,7 @@ var Root = (function (_super) {
this.touchArea.addEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, this);
};
Root.prototype.backToPage = function () {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('back_To_Page'); });
};
Root.prototype.onMouseDownArea = function (e) {
if (this.gameStartFlag) {
......@@ -2684,7 +2687,7 @@ var Root = (function (_super) {
this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this);
this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, this);
this.backBtn.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, function () { _this.gameOver('back'); }, this);
Main_1.GDispatcher.removeEventListener('gameReset', this.gameAgain, this);
Main_1.GDispatcher.removeEventListener("outCallBackToPage", function () { _this.gameOver('back'); });
};
return Root;
}(FYGE.Container));
......@@ -15114,7 +15117,7 @@ exports.Star = Star;
Object.defineProperty(exports, "__esModule", { value: true });
exports.config = void 0;
exports.config = {
time: 120,
time: 30,
first: 1000,
second: 2000,
third: 3000,
......
......@@ -3,7 +3,7 @@
<view a:if="{{gameType === 0}}" class="page-game-cover"></view>
<canvas disable-scroll="true" id="canvas" type="2d" class="canvas" onTouchStart="onMouseEvent" onTouchMove="onMouseEvent" onTouchEnd="onMouseEvent" onReady="onCanvasReady">
</canvas>
<common-modal-t1 class="page-pop" a:if="{{commonModalVisibleT1}}" data="{{commonModalDataT1}}" onModalClose="closeCommonModalT1" onModalConfirm="confirmCommonModalT1" />
<common-modal-t1 class="page-pop" a:if="{{commonModalVisibleT1}}" data="{{commonModalDataT1}}" onModalClose="closeCommonModalT1" onModalConfirm="closeCommonModalT1" />
</view>
<!-- <rule-modal a:if="{{ruleModalVisible}}" onModalClose="closeRuleModal"><text>{{rule}}</text></rule-modal> -->
\ No newline at end of file
......@@ -180,9 +180,6 @@ Component({
this.showCommonMoadalT1({
title: '门票不足',
content: '门票消耗完了!\n快去做任务吧~',
confirmCallback: () => {
this.closeCommonModalT1()
},
btnImg: '//yun.duiba.com.cn/spark/assets/好的按钮.948e42751245099e12fef8ad2617d746f6370863.png' })
return
}
......@@ -347,9 +344,7 @@ Component({
}
},
closeRuleModal() {
this.setData({ ruleModalVisible: false })
},
closeRuleModal() { this.setData({ ruleModalVisible: false }) },
// 取 随机数
sum (m, n) {
......@@ -362,23 +357,17 @@ Component({
showCommonMoadalT1 ({
title = 'test- title',
content = 'test- content',
confirmCallback = () => {},
btnImg = '//yun.duiba.com.cn/spark/assets/32d8536184c3539c0d9655d03c1b60f3d5e1f60a.png' }) {
this.setData({
commonModalVisibleT1: true,
commonModalDataT1: { title, content, btnImg },
confirmCommonModalT1: () => {
confirmCallback()
}
commonModalDataT1: { title, content, btnImg }
})
},
confirmCommonModalT1 () { this.data.confirmCommonModalT1() },
// 通用弹层 - 关闭 - T1
closeCommonModalT1() {
console.log('%ccloseCommonModal function inside', ConsoleStyle)
this.postMessage('mine.outCallBackToPage')
this.main.dispatchGlobalEvent('outCallBackToPage')
this.setData({ commonModalVisibleT1: false })
},
......@@ -399,10 +388,6 @@ Component({
this.showCommonMoadalT1({
title: '门票不足',
content: '门票消耗完了!\n快去做任务吧~',
confirmCallback: () => {
console.log('%ccloseCommonModal agument function', ConsoleStyle)
this.closeCommonModalT1()
},
btnImg: '//yun.duiba.com.cn/spark/assets/好的按钮.948e42751245099e12fef8ad2617d746f6370863.png' })
return
}
......
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