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

add new code

parent e5bc3adb
......@@ -15318,12 +15318,6 @@ var XxlScene = (function (_super) {
this.addChild(this.bg);
this.x = (Ins_1.Ins.stageW - 750) >> 1;
this.y = (Ins_1.Ins.stageH - 1624) >> 1;
this.backBtn = Tools_1.Tools.getSprite(resCanvasList_1.default['334aff33-1a9e-4277-aafe-3d9f22eab3d5'].url, 0, 20 + 1624 / 2 - this.stage.viewRect.height / 2);
this.backBtn.mouseEnable = true;
this.backBtn.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, function () {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
}, this);
this.addChild(this.backBtn);
this.topContainer = new FYGE.Container();
this.topContainer.y = 220;
this.addChild(this.topContainer);
......@@ -15474,6 +15468,12 @@ var XxlScene = (function (_super) {
i = _a[_i];
expendHexIndices.push.apply(expendHexIndices, i);
}
this.backBtn = Tools_1.Tools.getSprite(resCanvasList_1.default['334aff33-1a9e-4277-aafe-3d9f22eab3d5'].url, 0, 20 + 1624 / 2 - this.stage.viewRect.height / 2);
this.backBtn.mouseEnable = true;
this.backBtn.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, function () {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
}, this);
this.addChild(this.backBtn);
for (_b = 0, expendHexIndices_1 = expendHexIndices; _b < expendHexIndices_1.length; _b++) {
i = expendHexIndices_1[_b];
p = { x: that.getPositionByIndex(i).x, y: that.getPositionByIndex(i).y };
......
This diff is collapsed.
......@@ -15320,12 +15320,6 @@ var XxlScene = (function (_super) {
this.addChild(this.bg);
this.x = (Ins_1.Ins.stageW - 750) >> 1;
this.y = (Ins_1.Ins.stageH - 1624) >> 1;
this.backBtn = Tools_1.Tools.getSprite(resCanvasList_1.default['334aff33-1a9e-4277-aafe-3d9f22eab3d5'].url, 0, 20 + 1624 / 2 - this.stage.viewRect.height / 2);
this.backBtn.mouseEnable = true;
this.backBtn.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, function () {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
}, this);
this.addChild(this.backBtn);
this.topContainer = new FYGE.Container();
this.topContainer.y = 220;
this.addChild(this.topContainer);
......@@ -15476,6 +15470,12 @@ var XxlScene = (function (_super) {
i = _a[_i];
expendHexIndices.push.apply(expendHexIndices, i);
}
this.backBtn = Tools_1.Tools.getSprite(resCanvasList_1.default['334aff33-1a9e-4277-aafe-3d9f22eab3d5'].url, 0, 20 + 1624 / 2 - this.stage.viewRect.height / 2);
this.backBtn.mouseEnable = true;
this.backBtn.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, function () {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
}, this);
this.addChild(this.backBtn);
for (_b = 0, expendHexIndices_1 = expendHexIndices; _b < expendHexIndices_1.length; _b++) {
i = expendHexIndices_1[_b];
p = { x: that.getPositionByIndex(i).x, y: that.getPositionByIndex(i).y };
......
......@@ -286,7 +286,6 @@
.video_hide {
position: fixed;
z-index: 40;
width: 120rpx;
height: 48rpx;
top: 80rpx;
......@@ -300,6 +299,20 @@
height: 100%;
}
.video_replay {
position: fixed;
z-index: 200;
width: 100rpx;
height: 100rpx;
top: calc(50% - 50rpx);
right: calc(50% - 50rpx);
}
.video_replay_img {
width: 100%;
height: 100%;
}
.video_block {
width: 430rpx;
height: 408rpx;
......@@ -373,10 +386,10 @@
width: 83rpx;
height: 84rpx;
opacity: 1;
top: 128rpx;
top: 64rpx;
left: -123rpx;
position: absolute;
padding: 30rpx;
padding: 94rpx 30rpx 114rpx 30rpx;
box-sizing: content-box;
}
.video_btn_right {
......@@ -384,10 +397,10 @@
width: 83rpx;
height: 84rpx;
opacity: 1;
top: 128rpx;
top: 64rpx;
right: -123rpx;
position: absolute;
padding: 30rpx;
padding: 94rpx 30rpx 114rpx 30rpx;
box-sizing: content-box;
z-index: 99;
}
......
......@@ -22,9 +22,7 @@
<view class="video_wrapper" a:if="{{videoShow}}">
<view class="video_wrapper_mask"></view>
<!--
-->
<video
id="videoCtx"
class="video"
......@@ -53,6 +51,11 @@
<image class="video_hide_img" src="{{resList['1410be2a-7ab5-4c3b-bada-3541bdeeeb0a'].url}}" mode="aspectFill" />
</view>
<!-- 重新播放按钮 -->
<view a:if="{{ videoReplayIcon }}" class="video_replay" onTap="onVideoReplay">
<image class="video_replay_img" src="{{resList['1a37baca-db9c-4e06-8bd3-e8bd78c72b1d'].url}}" mode="aspectFill" />
</view>
<!-- 视频部分 -->
<view hidden="{{videoBottom_timeout}}" class="video_block {{ videoBottom ? 'block_opciaty0' : ''}}">
<view class="video_block_wrapper" onTap="videoShowFunc" >
......
......@@ -50,6 +50,8 @@ Page({
videoBottom_timeout: false,
// 视频变大
videoShow: false,
// 视频重播按钮
videoReplayIcon: false,
// ------ 视频 配置 ------ //
videoSrc: '',
showAllControls: true,
......@@ -85,6 +87,7 @@ Page({
prizesModalVisible: false,
missionModalVisible: false,
gameZindex: -1,
isIos: false,
ticketNum: 0,
drawNum: 0,
......@@ -126,6 +129,9 @@ Page({
this.onAnimationLoadOver()
let sysInfo = await getSystemInfo()
this.setData({
isIos: sysInfo.platform === 'iOS' ? true : false
})
// 设置 导航栏
if (sysInfo.statusBarHeight + sysInfo.titleBarHeight + sysInfo.windowHeight > sysInfo.screenHeight + 4 && sysInfo.platform === 'iOS') {
console.log('%csysInfo', ConsoleStyle, sysInfo)
......@@ -460,10 +466,10 @@ Page({
},
// 用户今日首次进入
userFirstInToday () {
// userFirstInToday () {
// 自动播放视频
// this.videoShowFunc()
},
// },
// 分享
onShareAppMessage() {
......@@ -475,7 +481,7 @@ Page({
},
// 页面加载完成
onReady() { this.videoCtx = my.createVideoContext('videoCtx') },
onReady() {},
// 页面显示
onShow() {
......@@ -620,13 +626,25 @@ Page({
// video - onEnded
onEnded(e) {
this.videoRecord(this.data.videoActiveIndex)
this.setData({ videoReplayIcon: true })
// 观看超过 14000ms 15s
if (this.videoSrcArr[this.data.videoActiveIndex].timeStamp >= 14000) {
this.videoWatchCompleted = true
console.log('---- 视频播放结束, videoWatchCompleted:', this.videoWatchCompleted, e)
console.log('---- 视频播放结束, videoWatchCompleted:', this.videoWatchCompleted)
}
},
onVideoReplay (e) {
console.log(e)
// this.videoCtx.seek(1)
let url = this.videoSrcArr[this.data.videoActiveIndex].url
let t = new Date()
this.setData({
videoSrc: url + '?a=' + t.getTime(),
videoReplayIcon: false
})
},
// video - onPlayError
onPlayError(err) { console.warn('---- 视频播放错误', err) },
......@@ -645,7 +663,8 @@ Page({
this.videoRecord(this.data.videoActiveIndex)
console.log('videoHideFunc', this.videoSrcArr)
this.setData({
videoShow: false
videoShow: false,
videoReplayIcon: false
})
// 观看超过 14000ms 15s
if ((this.videoSrcArr[this.data.videoActiveIndex].timeStamp >= 14000 || this.videoWatchCompleted) && !this.videoSrcArr[this.data.videoActiveIndex].completed) {
......@@ -656,6 +675,7 @@ Page({
this.videoSrcArr.forEach((item) => {
item.timeStamp = 0
})
this.videoCtx = null
},
// video - 观看视频领奖
......@@ -690,11 +710,12 @@ Page({
// video - 展示视频
videoShowFunc() {
this.videoCtx = my.createVideoContext('videoCtx')
this.setData({ videoShow: true })
clickStat(app.activityId, 'video')
setTimeout(() => {
this.videoCtx.play()
}, 400)
}, 500)
},
// video - onLoading
......
......@@ -15320,12 +15320,6 @@ var XxlScene = (function (_super) {
this.addChild(this.bg);
this.x = (Ins_1.Ins.stageW - 750) >> 1;
this.y = (Ins_1.Ins.stageH - 1624) >> 1;
this.backBtn = Tools_1.Tools.getSprite(resCanvasList_1.default['334aff33-1a9e-4277-aafe-3d9f22eab3d5'].url, 0, 20 + 1624 / 2 - this.stage.viewRect.height / 2);
this.backBtn.mouseEnable = true;
this.backBtn.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, function () {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
}, this);
this.addChild(this.backBtn);
this.topContainer = new FYGE.Container();
this.topContainer.y = 220;
this.addChild(this.topContainer);
......@@ -15476,6 +15470,12 @@ var XxlScene = (function (_super) {
i = _a[_i];
expendHexIndices.push.apply(expendHexIndices, i);
}
this.backBtn = Tools_1.Tools.getSprite(resCanvasList_1.default['334aff33-1a9e-4277-aafe-3d9f22eab3d5'].url, 0, 20 + 1624 / 2 - this.stage.viewRect.height / 2);
this.backBtn.mouseEnable = true;
this.backBtn.addEventListener(FYGE.MouseEvent.MOUSE_DOWN, function () {
TaoBaoNet_1.sendTbNet(TaoBaoNet_1.TbNetName.backToPage, {}, function (s, res) { console.log('backToPage'); });
}, this);
this.addChild(this.backBtn);
for (_b = 0, expendHexIndices_1 = expendHexIndices; _b < expendHexIndices_1.length; _b++) {
i = expendHexIndices_1[_b];
p = { x: that.getPositionByIndex(i).x, y: that.getPositionByIndex(i).y };
......
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