Commit cf414373 authored by AU-Pro-mac's avatar AU-Pro-mac

change

parent 3170eebe
...@@ -2556,7 +2556,9 @@ var Root = (function (_super) { ...@@ -2556,7 +2556,9 @@ var Root = (function (_super) {
var userInfoRes; var userInfoRes;
return __generator(this, function (_a) { return __generator(this, function (_a) {
switch (_a.label) { switch (_a.label) {
case 0: return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getUserInfo, {})]; case 0:
Main_1.GDispatcher.removeEventListener('gameReset', this.gameAgain, this);
return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getUserInfo, {})];
case 1: case 1:
userInfoRes = _a.sent(); userInfoRes = _a.sent();
this.userInfo = userInfoRes.data; this.userInfo = userInfoRes.data;
...@@ -2594,6 +2596,7 @@ var Root = (function (_super) { ...@@ -2594,6 +2596,7 @@ var Root = (function (_super) {
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('backToPage'); });
return [2]; return [2];
} }
Main_1.GDispatcher.addEventListener('gameReset', this.gameAgain, this);
if (!(this.userInfo.win && this.scoreBoard.scoreLeft)) return [3, 2]; if (!(this.userInfo.win && this.scoreBoard.scoreLeft)) return [3, 2];
return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getPrizeInfo)]; return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getPrizeInfo)];
case 1: case 1:
...@@ -2671,10 +2674,13 @@ var Root = (function (_super) { ...@@ -2671,10 +2674,13 @@ var Root = (function (_super) {
this.initUi(); this.initUi();
}; };
Root.prototype.dispose = function () { Root.prototype.dispose = function () {
var _this = this;
this.goodsContainer.destroy(); this.goodsContainer.destroy();
this.scoreBoard.destroy(); this.scoreBoard.destroy();
this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this); this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this);
this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, 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);
}; };
return Root; return Root;
}(FYGE.Container)); }(FYGE.Container));
...@@ -15094,11 +15100,11 @@ exports.Star = Star; ...@@ -15094,11 +15100,11 @@ exports.Star = Star;
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.config = void 0; exports.config = void 0;
exports.config = { exports.config = {
time: 120, time: 12,
first: 1000, first: 1000,
second: 2000, second: 2000,
third: 3000, third: 3000,
score: [10, 10, 10, 10, 10], score: [1000, 10, 10, 10, 10],
difficulty: 3, difficulty: 3,
circleRes: ['2a747211-0210-4215-86a2-a6955b37c45b', '7d1ec658-9371-4d52-b4d7-e75d04037daf', '6a1345f6-969c-4969-8bfb-f4de637df34d', '2e12a9ec-46be-487f-a9cd-550dd0af3746', 'b022fbdd-8607-435a-a205-19fc3b5123eb'] circleRes: ['2a747211-0210-4215-86a2-a6955b37c45b', '7d1ec658-9371-4d52-b4d7-e75d04037daf', '6a1345f6-969c-4969-8bfb-f4de637df34d', '2e12a9ec-46be-487f-a9cd-550dd0af3746', 'b022fbdd-8607-435a-a205-19fc3b5123eb']
}; };
......
This diff is collapsed.
...@@ -2558,7 +2558,9 @@ var Root = (function (_super) { ...@@ -2558,7 +2558,9 @@ var Root = (function (_super) {
var userInfoRes; var userInfoRes;
return __generator(this, function (_a) { return __generator(this, function (_a) {
switch (_a.label) { switch (_a.label) {
case 0: return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getUserInfo, {})]; case 0:
Main_1.GDispatcher.removeEventListener('gameReset', this.gameAgain, this);
return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getUserInfo, {})];
case 1: case 1:
userInfoRes = _a.sent(); userInfoRes = _a.sent();
this.userInfo = userInfoRes.data; this.userInfo = userInfoRes.data;
...@@ -2596,6 +2598,7 @@ var Root = (function (_super) { ...@@ -2596,6 +2598,7 @@ var Root = (function (_super) {
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('backToPage'); });
return [2]; return [2];
} }
Main_1.GDispatcher.addEventListener('gameReset', this.gameAgain, this);
if (!(this.userInfo.win && this.scoreBoard.scoreLeft)) return [3, 2]; if (!(this.userInfo.win && this.scoreBoard.scoreLeft)) return [3, 2];
return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getPrizeInfo)]; return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getPrizeInfo)];
case 1: case 1:
...@@ -2673,10 +2676,13 @@ var Root = (function (_super) { ...@@ -2673,10 +2676,13 @@ var Root = (function (_super) {
this.initUi(); this.initUi();
}; };
Root.prototype.dispose = function () { Root.prototype.dispose = function () {
var _this = this;
this.goodsContainer.destroy(); this.goodsContainer.destroy();
this.scoreBoard.destroy(); this.scoreBoard.destroy();
this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this); this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this);
this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, 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);
}; };
return Root; return Root;
}(FYGE.Container)); }(FYGE.Container));
...@@ -15096,11 +15102,11 @@ exports.Star = Star; ...@@ -15096,11 +15102,11 @@ exports.Star = Star;
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.config = void 0; exports.config = void 0;
exports.config = { exports.config = {
time: 120, time: 12,
first: 1000, first: 1000,
second: 2000, second: 2000,
third: 3000, third: 3000,
score: [10, 10, 10, 10, 10], score: [1000, 10, 10, 10, 10],
difficulty: 3, difficulty: 3,
circleRes: ['2a747211-0210-4215-86a2-a6955b37c45b', '7d1ec658-9371-4d52-b4d7-e75d04037daf', '6a1345f6-969c-4969-8bfb-f4de637df34d', '2e12a9ec-46be-487f-a9cd-550dd0af3746', 'b022fbdd-8607-435a-a205-19fc3b5123eb'] circleRes: ['2a747211-0210-4215-86a2-a6955b37c45b', '7d1ec658-9371-4d52-b4d7-e75d04037daf', '6a1345f6-969c-4969-8bfb-f4de637df34d', '2e12a9ec-46be-487f-a9cd-550dd0af3746', 'b022fbdd-8607-435a-a205-19fc3b5123eb']
}; };
......
...@@ -124,6 +124,9 @@ export default class Root extends FYGE.Container { ...@@ -124,6 +124,9 @@ export default class Root extends FYGE.Container {
// 再来一局 // 再来一局
async gameAgain () { async gameAgain () {
// 取消监听再来一局
GDispatcher.removeEventListener('gameReset', this.gameAgain, this)
const userInfoRes = await sendTbNet(TbNetName.getUserInfo, {}) const userInfoRes = await sendTbNet(TbNetName.getUserInfo, {})
this.userInfo = userInfoRes.data this.userInfo = userInfoRes.data
console.log('CSD-GAME this.userInfo:', userInfoRes.data) console.log('CSD-GAME this.userInfo:', userInfoRes.data)
...@@ -159,7 +162,11 @@ export default class Root extends FYGE.Container { ...@@ -159,7 +162,11 @@ export default class Root extends FYGE.Container {
return return
} }
// 正常结束 - 由自组建调用 // 正常结束 - 由子组件调用
// 监听再来一局
GDispatcher.addEventListener('gameReset', this.gameAgain, this)
if (this.userInfo.win && this.scoreBoard.scoreLeft) { if (this.userInfo.win && this.scoreBoard.scoreLeft) {
//胜利 //胜利
const prizeInfo = await sendTbNet(TbNetName.getPrizeInfo) const prizeInfo = await sendTbNet(TbNetName.getPrizeInfo)
...@@ -244,6 +251,9 @@ export default class Root extends FYGE.Container { ...@@ -244,6 +251,9 @@ export default class Root extends FYGE.Container {
this.scoreBoard.destroy() this.scoreBoard.destroy()
this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this) this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this)
this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, this) this.touchArea.removeEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, this)
this.backBtn.removeEventListener(FYGE.MouseEvent.MOUSE_DOWN, () => { this.gameOver('back') }, this)
// 取消监听再来一局
GDispatcher.removeEventListener('gameReset', this.gameAgain, this)
// throw new Error("Method not implemented.") // throw new Error("Method not implemented.")
} }
} }
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
width: 176rpx; width: 176rpx;
height: 77rpx; height: 77rpx;
position: absolute; position: absolute;
top: -40rpx; top: -56rpx;
left: 7rpx; left: 7rpx;
} }
......
...@@ -180,7 +180,6 @@ Component({ ...@@ -180,7 +180,6 @@ Component({
content: '门票消耗完了!\n快去做任务吧~', content: '门票消耗完了!\n快去做任务吧~',
confirmCallback: () => { confirmCallback: () => {
this.closeCommonModalT1() this.closeCommonModalT1()
this.back()
}, },
btnImg: '//yun.duiba.com.cn/spark/assets/好的按钮.948e42751245099e12fef8ad2617d746f6370863.png' }) btnImg: '//yun.duiba.com.cn/spark/assets/好的按钮.948e42751245099e12fef8ad2617d746f6370863.png' })
return return
...@@ -368,7 +367,6 @@ Component({ ...@@ -368,7 +367,6 @@ Component({
commonModalDataT1: { title, content, btnImg }, commonModalDataT1: { title, content, btnImg },
confirmCommonModalT1: () => { confirmCommonModalT1: () => {
confirmCallback() confirmCallback()
this.closeCommonModalT1()
} }
}) })
}, },
...@@ -376,7 +374,7 @@ Component({ ...@@ -376,7 +374,7 @@ Component({
// 通用弹层 - 关闭 - T1 // 通用弹层 - 关闭 - T1
closeCommonModalT1() { closeCommonModalT1() {
this.setData({ commonModalVisibleT1: false }); this.setData({ commonModalVisibleT1: false });
this.getGameInfo() this.back()
}, },
gameStartInfo_test (){ gameStartInfo_test (){
...@@ -398,7 +396,6 @@ Component({ ...@@ -398,7 +396,6 @@ Component({
content: '门票消耗完了!\n快去做任务吧~', content: '门票消耗完了!\n快去做任务吧~',
confirmCallback: () => { confirmCallback: () => {
this.closeCommonModalT1() this.closeCommonModalT1()
this.back()
}, },
btnImg: '//yun.duiba.com.cn/spark/assets/好的按钮.948e42751245099e12fef8ad2617d746f6370863.png' }) btnImg: '//yun.duiba.com.cn/spark/assets/好的按钮.948e42751245099e12fef8ad2617d746f6370863.png' })
return return
......
// 分享配置 // 分享配置
export let SHARE_CONFIG = { export let SHARE_CONFIG = {
title: '【集美!一起去雅顿乐园赢伊丽莎白金胶】', title: '【集美!一起赢清空购物车大奖了】',
desc: '【集美!一起去雅顿乐园赢伊丽莎白金胶】', desc: '快来雅顿乐园玩游戏赢大奖',
imageUrl: 'https://isv.alibabausercontent.com/00000000/imgextra/i2/676606897/O1CN01eNrwLl20osHoB4Y7d_!!676606897-2-isvtu-00000000.png', // 分享图片URL imageUrl: 'https://isv.alibabausercontent.com/00000000/imgextra/i2/676606897/O1CN01eNrwLl20osHoB4Y7d_!!676606897-2-isvtu-00000000.png', // 分享图片URL
path: '/pages/homePage/homePage' path: '/pages/homePage/homePage'
}; };
......
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