Commit 6bac692e authored by AU-Pro-mac's avatar AU-Pro-mac

add new code --10

parent c3eaf564
......@@ -1925,7 +1925,7 @@ var Main = (function () {
return [4, this.loadImageTexturesCsd02(resCanvasList)];
case 2:
_a.sent();
ctrls_1.changeScene(XxlScene_1.XxlScene);
ctrls_1.changeScene(MainScene_2.OpenAni);
return [2];
}
});
......@@ -2546,6 +2546,7 @@ var Root = (function (_super) {
this.goodsContainer.startGoods();
Main_1.GDispatcher.removeEventListener('MatchCompelete', this.gameStart, this);
this.gameStartFlag = true;
this.touchArea.mouseEnable = true;
};
Root.prototype.gameOver = function () {
return __awaiter(this, void 0, void 0, function () {
......@@ -2555,6 +2556,7 @@ var Root = (function (_super) {
case 0:
this.time = 60;
this.gameStartFlag = false;
this.touchArea.mouseEnable = false;
if (!this.userInfo.win)
this.scoreBoard.scoreRight += 3;
this.goodsContainer.removeAllGoods();
......@@ -2589,10 +2591,10 @@ var Root = (function (_super) {
this.scoreBoard.updateScore(score);
};
Root.prototype.createTouchRect = function () {
this.touchArea = Tools_1.Tools.getRect(750, 574, 0xff22ff, 0);
this.touchArea = Tools_1.Tools.getRect(750, 874, 0xff22ff, 0);
this.touchArea.x = 0;
this.touchArea.y = 1050;
this.touchArea.mouseEnable = true;
this.touchArea.y = 750;
this.touchArea.mouseEnable = false;
this.addChild(this.touchArea);
this.touchArea.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this);
this.touchArea.addEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, this);
......@@ -2626,6 +2628,7 @@ var Root = (function (_super) {
this.guide.visible = false;
setTimeout(function () {
ctrls_1.showPanel(MatchingPanel_1.MatchingPanel, _this.userInfo);
_this.guide.removeEventListener(FYGE.MouseEvent.CLICK, _this.guideFunc, _this);
}, 200);
}
else {
......@@ -2681,6 +2684,9 @@ var Catecher = (function (_super) {
__extends(Catecher, _super);
function Catecher(root, dataInfo) {
var _this = _super.call(this) || this;
_this.timerNumer = 60;
_this.lt = 0;
_this.tt = 0;
_this.sum = function (m, n) {
var num = Math.floor(Math.random() * (m - n) + n);
return num;
......@@ -2732,8 +2738,7 @@ var Catecher = (function (_super) {
.to({ x: 424, alpha: 1 }, 100);
};
Catecher.prototype.destroy = function () {
clearInterval(this.timerFunc);
this.timerFunc = null;
this.removeEventListener(FYGE.Event.ENTER_FRAME, this.timerFunc, this);
};
Catecher.prototype.updateScore = function (score) {
var scoreNow = score + this.scoreLeft;
......@@ -2784,26 +2789,39 @@ var Catecher = (function (_super) {
this.userScore_right.updateScore(this.scoreRight);
};
Catecher.prototype.stopTime = function () {
clearInterval(this.timerFunc);
this.timerFunc = null;
this.removeEventListener(FYGE.Event.ENTER_FRAME, this.timerFunc, this);
};
Catecher.prototype.start = function (time) {
var _this = this;
this.scoreLeft = 0;
this.scoreRight = 0;
this.timerNumer = time;
this.updateTime(this.timerNumer);
this.timerFunc = setInterval(function () {
if (_this.timerNumer <= 0) {
_this._root.gameOver();
clearInterval(_this.timerFunc);
_this.timerFunc = null;
_this.updateTime(0);
this.addEventListener(FYGE.Event.ENTER_FRAME, this.timerFunc, this);
};
Catecher.prototype.timerFunc = function () {
if (!this._root.gameStartFlag)
return;
if (this.timerNumer <= 0) {
this._root.gameOver();
this.updateTime(0);
this.lt = this.tt = 0;
this.removeEventListener(FYGE.Event.ENTER_FRAME, this.timerFunc, this);
return;
}
if (this.lt) {
var nt = new Date().getTime();
var dt = nt - this.lt;
this.tt += dt / 1000 >> 0;
var ntt = 60 - this.tt;
if (ntt != this.timerNumer) {
this.timerNumer = ntt;
this.updateTime(this.timerNumer);
this.lt = nt;
}
}
else {
_this.updateTime(--_this.timerNumer);
this.lt = new Date().getTime();
}
}, 1000);
};
Catecher.prototype.updateTime = function (time) {
this.timeText.text = time.toString() + 'S';
......@@ -2837,7 +2855,8 @@ var Catecher = (function (_super) {
c.width = 120;
c.height = 120;
var a = Tools_1.Tools.getCircle(60, 0x000000, 1, 60, 60);
var p = Tools_1.Tools.getSprite(avatar, 0, 0);
var p = FYGE.Sprite.fromUrl(avatar);
p.x = p.y = 0;
p.width = 120;
p.height = 120;
c['updateAvatar'] = function (avatar) { p.texture = RES_1.RES.getRes(avatar); };
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1927,7 +1927,7 @@ var Main = (function () {
return [4, this.loadImageTexturesCsd02(resCanvasList)];
case 2:
_a.sent();
ctrls_1.changeScene(XxlScene_1.XxlScene);
ctrls_1.changeScene(MainScene_2.OpenAni);
return [2];
}
});
......@@ -2548,6 +2548,7 @@ var Root = (function (_super) {
this.goodsContainer.startGoods();
Main_1.GDispatcher.removeEventListener('MatchCompelete', this.gameStart, this);
this.gameStartFlag = true;
this.touchArea.mouseEnable = true;
};
Root.prototype.gameOver = function () {
return __awaiter(this, void 0, void 0, function () {
......@@ -2557,6 +2558,7 @@ var Root = (function (_super) {
case 0:
this.time = 60;
this.gameStartFlag = false;
this.touchArea.mouseEnable = false;
if (!this.userInfo.win)
this.scoreBoard.scoreRight += 3;
this.goodsContainer.removeAllGoods();
......@@ -2591,10 +2593,10 @@ var Root = (function (_super) {
this.scoreBoard.updateScore(score);
};
Root.prototype.createTouchRect = function () {
this.touchArea = Tools_1.Tools.getRect(750, 574, 0xff22ff, 0);
this.touchArea = Tools_1.Tools.getRect(750, 874, 0xff22ff, 0);
this.touchArea.x = 0;
this.touchArea.y = 1050;
this.touchArea.mouseEnable = true;
this.touchArea.y = 750;
this.touchArea.mouseEnable = false;
this.addChild(this.touchArea);
this.touchArea.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this);
this.touchArea.addEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, this);
......@@ -2628,6 +2630,7 @@ var Root = (function (_super) {
this.guide.visible = false;
setTimeout(function () {
ctrls_1.showPanel(MatchingPanel_1.MatchingPanel, _this.userInfo);
_this.guide.removeEventListener(FYGE.MouseEvent.CLICK, _this.guideFunc, _this);
}, 200);
}
else {
......@@ -2683,6 +2686,9 @@ var Catecher = (function (_super) {
__extends(Catecher, _super);
function Catecher(root, dataInfo) {
var _this = _super.call(this) || this;
_this.timerNumer = 60;
_this.lt = 0;
_this.tt = 0;
_this.sum = function (m, n) {
var num = Math.floor(Math.random() * (m - n) + n);
return num;
......@@ -2734,8 +2740,7 @@ var Catecher = (function (_super) {
.to({ x: 424, alpha: 1 }, 100);
};
Catecher.prototype.destroy = function () {
clearInterval(this.timerFunc);
this.timerFunc = null;
this.removeEventListener(FYGE.Event.ENTER_FRAME, this.timerFunc, this);
};
Catecher.prototype.updateScore = function (score) {
var scoreNow = score + this.scoreLeft;
......@@ -2786,26 +2791,39 @@ var Catecher = (function (_super) {
this.userScore_right.updateScore(this.scoreRight);
};
Catecher.prototype.stopTime = function () {
clearInterval(this.timerFunc);
this.timerFunc = null;
this.removeEventListener(FYGE.Event.ENTER_FRAME, this.timerFunc, this);
};
Catecher.prototype.start = function (time) {
var _this = this;
this.scoreLeft = 0;
this.scoreRight = 0;
this.timerNumer = time;
this.updateTime(this.timerNumer);
this.timerFunc = setInterval(function () {
if (_this.timerNumer <= 0) {
_this._root.gameOver();
clearInterval(_this.timerFunc);
_this.timerFunc = null;
_this.updateTime(0);
this.addEventListener(FYGE.Event.ENTER_FRAME, this.timerFunc, this);
};
Catecher.prototype.timerFunc = function () {
if (!this._root.gameStartFlag)
return;
if (this.timerNumer <= 0) {
this._root.gameOver();
this.updateTime(0);
this.lt = this.tt = 0;
this.removeEventListener(FYGE.Event.ENTER_FRAME, this.timerFunc, this);
return;
}
if (this.lt) {
var nt = new Date().getTime();
var dt = nt - this.lt;
this.tt += dt / 1000 >> 0;
var ntt = 60 - this.tt;
if (ntt != this.timerNumer) {
this.timerNumer = ntt;
this.updateTime(this.timerNumer);
this.lt = nt;
}
}
else {
_this.updateTime(--_this.timerNumer);
this.lt = new Date().getTime();
}
}, 1000);
};
Catecher.prototype.updateTime = function (time) {
this.timeText.text = time.toString() + 'S';
......@@ -2839,7 +2857,8 @@ var Catecher = (function (_super) {
c.width = 120;
c.height = 120;
var a = Tools_1.Tools.getCircle(60, 0x000000, 1, 60, 60);
var p = Tools_1.Tools.getSprite(avatar, 0, 0);
var p = FYGE.Sprite.fromUrl(avatar);
p.x = p.y = 0;
p.width = 120;
p.height = 120;
c['updateAvatar'] = function (avatar) { p.texture = RES_1.RES.getRes(avatar); };
......
......@@ -6,8 +6,8 @@ var fs = require("fs");
// fs.readFileSync("./output.js")
// )
// var endPath = 'D:/duibaGame/测试项目0527/taobaominiTest/client/pages/index1/';
var endPath = "C:/Users/Duiba/Desktop/work/雅顿/new_taobao/taobao_mini/client/pages/pagecanvas/"
// var endPath = '/Applications/DUIBA-TAOBAO/YD/new_taobao/taobao_mini/client/pages/pagecanvas/';
// var endPath = "C:/Users/Duiba/Desktop/work/雅顿/new_taobao/taobao_mini/client/pages/pagecanvas"
var endPath = '/Applications/DUIBA-TAOBAO/YD/new_taobao/taobao_mini/client/pages/pagecanvas/';
var version = Math.round(new Date().getTime() / 1000);
......
......@@ -61,6 +61,7 @@ Component({
// if (this.data.missionsList.length !== prevData.missionsList.length) {
// this.setData({ missionsList: this.props.missionsList })
// }
if (this.props.refresh) this.getMissionList()
},
methods: {
......
......@@ -22,6 +22,7 @@
</scroll-view>
</view>
<!-- 倒计时 -->
<!-- 倒计时
<count-down-modal a:if="{{isShowCountdown && task.taskType == 'browseGoods'}}" percent="{{percent}}" usePercent="{{usePercent}}" styleType="{{'01'}}" />
-->
</view>
\ No newline at end of file
......@@ -5,8 +5,8 @@ export function clickStat (activityId, type) {
API.clickStat({activityId: activityId, type: type})
.then(res => {
const { success, message, data } = res
if (!success) { console.warn(res); commonToast(res && res.message) }
if (!success) { console.warn(res) }
else console.log(`%c打点成功--${type}`, 'color:#e06a82;font-size:12px;font-weight:bold;text-shadow:1px 1px rgba(0,0,0,0.2)')
})
.catch(res => { console.warn(res); commonToast(res && res.message); }) || {};
.catch(res => { console.warn(res) }) || {}
}
\ No newline at end of file
......@@ -93,8 +93,8 @@ Page({
},
//任务完成
async onCompleteTask(taskType,itemId) {
console.log(taskType,itemId)
async onCompleteTask(taskType, itemId) {
console.log(taskType, itemId)
const { activityId } = app
switch(taskType) {
case 'collectGoods':
......@@ -111,7 +111,7 @@ Page({
let browsResult = await API.doBrowseGoodsTask({ activityId, itemId }).catch(res => {
res && commonToast(res)
}) || {}
console.log(browsResult)
console.log('%c--------完成浏览任务\n' + '-----yd.doBrowseGoodsTask\n', ConsoleStyle, browsResult.data)
if(browsResult.success) {
commonToast('任务完成')
}
......
......@@ -128,4 +128,4 @@
<newuser-modal a:if="{{newUserModalVisible}}" onModalClose="closeNewUserModal"></newuser-modal>
<rewards-modal a:if="{{rewardsModalVisible}}" onModalClose="closeRewardsModal"></rewards-modal>
<prizes-modal a:if="{{prizesModalVisible}}" onModalClose="closePrizesModal"></prizes-modal>
<mission-modal a:if="{{missionModalVisible}}" onModalClose="closeMissionModal" onRefreshGameInfo="getGameInfo"></mission-modal>
<mission-modal a:if="{{missionModalVisible}}" refresh="{{missionRefresh}}" onModalClose="closeMissionModal" onRefreshGameInfo="getGameInfo"></mission-modal>
......@@ -14,11 +14,8 @@ Page({
},
// 视频地址列表 - 存储播放时常
videoSrcArr: [
{ url: 'https://cloud.video.taobao.com/play/u/20446068/p/1/e/6/t/1/239271757987.mp4', timeStamp: 0, totalTime: 0, completed: false },
{ url: 'https://cloud.video.taobao.com/play/u/20446068/p/1/e/6/t/1/239271757987.mp4', timeStamp: 0, totalTime: 0, completed: false },
{ url: 'https://cloud.video.taobao.com/play/u/20446068/p/1/e/6/t/1/239271757987.mp4', timeStamp: 0, totalTime: 0, completed: false }
],
// 'https://cloud.video.taobao.com/play/u/20446068/p/1/e/6/t/1/239271757987.mp4'
videoSrcArr: [],
// 视频记录 flag
timeStampCountFlag: false,
// 视频记录 ms - 增量
......@@ -172,7 +169,12 @@ Page({
data.videoUrlArr.forEach((item, index) => {
// 获取视频 视频封面 视频小封面
this.videoSrcArr[index] = {
url: item.videoUrl, timeStamp: 0, totalTime: 0, completed: false
// url: item.videoUrl, timeStamp: 0, totalTime: 0, completed: false
// test - code
url: 'https://cloud.video.taobao.com/play/u/20446068/p/1/e/6/t/1/239271757987.mp4', timeStamp: 0, totalTime: 0, completed: false
// test - code
}
this.videoImgSrcSmallArr[index] = item.mainImage
})
......@@ -298,7 +300,10 @@ Page({
onReady() { this.videoCtx = my.createVideoContext('videoCtx') },
// 页面显示
onShow() { if (this.userLogin) this.getGameInfo() },
onShow() {
if (this.userLogin) this.getGameInfo()
this.setData({ missionRefresh: true })
},
// 获取 游戏门票 抽奖次数 今日是否首次登陆
getGameInfo () {
......
......@@ -195,6 +195,9 @@ Page({
// }, 5000);
const { success, data, message } = res;
console.log('%c--------领取实物奖品\n' + '-----yd.receiveObjectPrize\n', ConsoleStyle, data)
if (success && data) {
commonToast('领取成功')
} else {
......
......@@ -2080,8 +2080,6 @@ function sendTbNet(netName, parameter, callback, hideMsg) {
Main_1.GDispatcher.removeEventListener(netName, fun);
var d = e.data;
dataRecord[netName] = d;
if (!hideMsg && !d.success && netName != "mine.getPrizeInfo" && netName != "mine.getUserInfo")
ctrls_1.showToast(d.message || "网络超时");
callback && callback(d.success, d);
resolve(d);
console.log("\n%c[ request ]\n"
......@@ -2550,6 +2548,7 @@ var Root = (function (_super) {
this.goodsContainer.startGoods();
Main_1.GDispatcher.removeEventListener('MatchCompelete', this.gameStart, this);
this.gameStartFlag = true;
this.touchArea.mouseEnable = true;
};
Root.prototype.gameOver = function () {
return __awaiter(this, void 0, void 0, function () {
......@@ -2559,6 +2558,7 @@ var Root = (function (_super) {
case 0:
this.time = 60;
this.gameStartFlag = false;
this.touchArea.mouseEnable = false;
if (!this.userInfo.win)
this.scoreBoard.scoreRight += 3;
this.goodsContainer.removeAllGoods();
......@@ -2593,10 +2593,10 @@ var Root = (function (_super) {
this.scoreBoard.updateScore(score);
};
Root.prototype.createTouchRect = function () {
this.touchArea = Tools_1.Tools.getRect(750, 574, 0xff22ff, 0);
this.touchArea = Tools_1.Tools.getRect(750, 874, 0xff22ff, 0);
this.touchArea.x = 0;
this.touchArea.y = 1050;
this.touchArea.mouseEnable = true;
this.touchArea.y = 750;
this.touchArea.mouseEnable = false;
this.addChild(this.touchArea);
this.touchArea.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, this.onMouseDownArea, this);
this.touchArea.addEventListener(FYGE.MouseEvent.MOUSE_UP, this.onMouseUpArea, this);
......@@ -2630,6 +2630,7 @@ var Root = (function (_super) {
this.guide.visible = false;
setTimeout(function () {
ctrls_1.showPanel(MatchingPanel_1.MatchingPanel, _this.userInfo);
_this.guide.removeEventListener(FYGE.MouseEvent.CLICK, _this.guideFunc, _this);
}, 200);
}
else {
......@@ -2685,6 +2686,9 @@ var Catecher = (function (_super) {
__extends(Catecher, _super);
function Catecher(root, dataInfo) {
var _this = _super.call(this) || this;
_this.timerNumer = 60;
_this.lt = 0;
_this.tt = 0;
_this.sum = function (m, n) {
var num = Math.floor(Math.random() * (m - n) + n);
return num;
......@@ -2736,8 +2740,7 @@ var Catecher = (function (_super) {
.to({ x: 424, alpha: 1 }, 100);
};
Catecher.prototype.destroy = function () {
clearInterval(this.timerFunc);
this.timerFunc = null;
this.removeEventListener(FYGE.Event.ENTER_FRAME, this.timerFunc, this);
};
Catecher.prototype.updateScore = function (score) {
var scoreNow = score + this.scoreLeft;
......@@ -2788,26 +2791,39 @@ var Catecher = (function (_super) {
this.userScore_right.updateScore(this.scoreRight);
};
Catecher.prototype.stopTime = function () {
clearInterval(this.timerFunc);
this.timerFunc = null;
this.removeEventListener(FYGE.Event.ENTER_FRAME, this.timerFunc, this);
};
Catecher.prototype.start = function (time) {
var _this = this;
this.scoreLeft = 0;
this.scoreRight = 0;
this.timerNumer = time;
this.updateTime(this.timerNumer);
this.timerFunc = setInterval(function () {
if (_this.timerNumer <= 0) {
_this._root.gameOver();
clearInterval(_this.timerFunc);
_this.timerFunc = null;
_this.updateTime(0);
this.addEventListener(FYGE.Event.ENTER_FRAME, this.timerFunc, this);
};
Catecher.prototype.timerFunc = function () {
if (!this._root.gameStartFlag)
return;
if (this.timerNumer <= 0) {
this._root.gameOver();
this.updateTime(0);
this.lt = this.tt = 0;
this.removeEventListener(FYGE.Event.ENTER_FRAME, this.timerFunc, this);
return;
}
if (this.lt) {
var nt = new Date().getTime();
var dt = nt - this.lt;
this.tt += dt / 1000 >> 0;
var ntt = 60 - this.tt;
if (ntt != this.timerNumer) {
this.timerNumer = ntt;
this.updateTime(this.timerNumer);
this.lt = nt;
}
}
else {
_this.updateTime(--_this.timerNumer);
this.lt = new Date().getTime();
}
}, 1000);
};
Catecher.prototype.updateTime = function (time) {
this.timeText.text = time.toString() + 'S';
......@@ -2841,7 +2857,8 @@ var Catecher = (function (_super) {
c.width = 120;
c.height = 120;
var a = Tools_1.Tools.getCircle(60, 0x000000, 1, 60, 60);
var p = Tools_1.Tools.getSprite(avatar, 0, 0);
var p = FYGE.Sprite.fromUrl(avatar);
p.x = p.y = 0;
p.width = 120;
p.height = 120;
c['updateAvatar'] = function (avatar) { p.texture = RES_1.RES.getRes(avatar); };
......@@ -4999,6 +5016,7 @@ var FailedPanel = (function (_super) {
playAgainBtn.addEventListener(FYGE.MouseEvent.CLICK, this.back, this);
};
FailedPanel.prototype.back = function () {
this.hidePanel();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
};
return FailedPanel;
......@@ -5091,12 +5109,13 @@ var MatchingPanel = (function (_super) {
leftAvatarBg.y = -25;
lContainer.addChild(leftAvatarBg);
var leftAvatar = FYGE.Sprite.fromUrl(this.data.userImgUrl);
leftAvatar.x = leftAvatarBg.x;
leftAvatar.width = leftAvatar.height = 120;
leftAvatar.x = leftAvatarBg.x + (leftAvatarBg.width - leftAvatar.width >> 1);
leftAvatar.y = -25;
lContainer.addChild(leftAvatar);
var lcircle = Tools_1.Tools.getCircle(50, 0xffff00);
lcircle.x = 232;
lcircle.y = 26;
lcircle.x = leftAvatarBg.x + 52;
lcircle.y = 28;
lContainer.addChild(lcircle);
leftAvatar.mask = lcircle;
var lnickName = Tools_1.Tools.getText(this.data.userName, 30, "#fff", FYGE.TEXT_ALIGN.RIGHT, 180);
......@@ -5114,12 +5133,13 @@ var MatchingPanel = (function (_super) {
rightAvatarBg.y = -25;
rContainer.addChild(rightAvatarBg);
var rightAvatar = FYGE.Sprite.fromUrl(this.data.fakeUserImgUrl);
rightAvatar.x = rightAvatarBg.x;
rightAvatar.width = rightAvatar.height = 120;
rightAvatar.x = rightAvatarBg.x + (rightAvatarBg.width - rightAvatar.width >> 1);
rightAvatar.y = -25;
rContainer.addChild(rightAvatar);
var rcircle = Tools_1.Tools.getCircle(50, 0xffff00);
rcircle.x = right.width - 232;
rcircle.y = 26;
rcircle.x = right.width - 234;
rcircle.y = 28;
rContainer.addChild(rcircle);
rightAvatar.mask = rcircle;
var rnickName = Tools_1.Tools.getText(this.data.fakeUserName, 30, "#fff", FYGE.TEXT_ALIGN.LEFT, 180);
......@@ -5208,6 +5228,7 @@ var SuccessNoAwardPanel = (function (_super) {
playAgainBtn.addEventListener(FYGE.MouseEvent.CLICK, this.back, this);
};
SuccessNoAwardPanel.prototype.back = function () {
this.hidePanel();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
};
return SuccessNoAwardPanel;
......@@ -5283,9 +5304,11 @@ var SuccessPanel = (function (_super) {
seePrizeBtn.addEventListener(FYGE.MouseEvent.CLICK, this.seePrize, this);
};
SuccessPanel.prototype.back = function () {
this.hidePanel();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
};
SuccessPanel.prototype.seePrize = function () {
this.hidePanel();
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.seePrize, {}, function (s, res) { console.log('backToPage'); });
};
return SuccessPanel;
......@@ -15224,7 +15247,7 @@ exports.Star = Star;
Object.defineProperty(exports, "__esModule", { value: true });
exports.config = void 0;
exports.config = {
time: 120,
time: 12,
first: 1000,
second: 2000,
third: 3000,
......@@ -15423,7 +15446,7 @@ var XxlScene = (function (_super) {
this.time.textWidth = 50;
}
this.time.x = Ins_1.Ins.stageW / 2 - this.time.textWidth / 2 - 15;
this.time.y = (timerBg.height >> 1) - (this.time.textHeight >> 1) - 4;
this.time.y = (timerBg.height >> 1) - (this.time.textHeight >> 1) - 8;
this.time.bold = true;
this.time.stroke = 1;
this.time.strokeColor = "#f6787c";
......@@ -15433,14 +15456,15 @@ var XxlScene = (function (_super) {
avatarBg.x = 55;
avatarBg.y = 78 - (avatarBg.height >> 1);
leftUserContainer.addChild(avatarBg);
circle = Tools_1.Tools.getCircle(48, 0xffff00);
circle = Tools_1.Tools.getCircle(49, 0xffff00);
console.log(avatarBg.x, avatarBg.y);
circle.x = 106;
circle.y = 77;
circle.x = 108;
circle.y = 78;
leftUserContainer.addChild(circle);
this.lavatar = FYGE.Sprite.fromUrl(this.userInfo.userImgUrl);
this.lavatar.width = this.lavatar.height = 120;
this.lavatar.mask = circle;
this.lavatar.x = 60;
this.lavatar.x = 50;
this.lavatar.y = 78 - (avatarBg.height >> 1);
leftUserContainer.addChild(this.lavatar);
this.lscore = Tools_1.Tools.getText("0", 30, "#ffffff", FYGE.TEXT_ALIGN.LEFT);
......@@ -15473,11 +15497,12 @@ var XxlScene = (function (_super) {
ravatarBg.x = Ins_1.Ins.stageW - 55 - ravatarBg.width;
ravatarBg.y = 78 - (ravatarBg.width >> 1);
this.rightUserContainer.addChild(ravatarBg);
circle2 = Tools_1.Tools.getCircle(48, 0xffff00);
circle2.x = Ins_1.Ins.stageW - ravatarBg.width - 3;
circle2.y = 77;
circle2 = Tools_1.Tools.getCircle(49, 0xffff00);
circle2.x = Ins_1.Ins.stageW - ravatarBg.width - 2;
circle2.y = 78;
this.rightUserContainer.addChild(circle2);
this.ravatar = FYGE.Sprite.fromUrl(this.userInfo.fakeUserImgUrl);
this.ravatar.width = this.ravatar.height = 120;
this.ravatar.mask = circle2;
this.ravatar.x = Ins_1.Ins.stageW - 50 - ravatarBg.width;
this.ravatar.y = 78 - (ravatarBg.height >> 1);
......@@ -15745,13 +15770,14 @@ var XxlScene = (function (_super) {
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
if (!!this.isGameEnd) return [3, 2];
this.isGameEnd = true;
return [4, TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.getPrizeInfo)];
case 1:
prizeInfo = _a.sent();
if (this.userInfo.win) {
prize = prizeInfo.data;
if (prize.type > 3) {
if (prize.type <= 3) {
ctrls_1.showPanel(SuccessPanel_1.SuccessPanel, prize);
}
else {
......@@ -15761,7 +15787,8 @@ var XxlScene = (function (_super) {
else {
ctrls_1.showPanel(FailedPanel_1.FailedPanel);
}
return [2];
_a.label = 2;
case 2: return [2];
}
});
});
......
......@@ -101,10 +101,12 @@ Page({
return
}
// const { success, data } = await API.lottery({ activityId: this.activityId }).catch(res => {
const { success, data } = await API.drawLotteryPrize({ activityId: this.activityId, prizeDataType: 3 }).catch(res => {
commonToast(res && res.message)
return
}) || {}
console.log('%c--------领取实物奖品\n' + '-----yd.receiveObjectPrize\n', ConsoleStyle, data)
// test code -
// let success = true
......
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