Commit 916e2121 by 曾经

小程序 音乐 退出关闭

模板1  动画
parent 5929d874
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>game-h5</title><link rel="stylesheet" href="//at.alicdn.com/t/font_2844902_uelk5f2sikk.css"><link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"><link href="css/chunk-0d838931.be25db0a.css" rel="prefetch"><link href="css/chunk-1c6fffe8.6d3d760a.css" rel="prefetch"><link href="css/chunk-232b4d3a.f303bf59.css" rel="prefetch"><link href="css/chunk-2410ce38.dc0ab0ec.css" rel="prefetch"><link href="css/chunk-3e566bce.48f52058.css" rel="prefetch"><link href="css/chunk-4323df0c.b7f06c60.css" rel="prefetch"><link href="css/chunk-59c0f4d5.0e6c0212.css" rel="prefetch"><link href="css/chunk-5b606ee5.97973e1a.css" rel="prefetch"><link href="css/chunk-6128095e.0e3f4eb8.css" rel="prefetch"><link href="css/chunk-67525272.4fb8d824.css" rel="prefetch"><link href="css/chunk-71639305.f21c9ef5.css" rel="prefetch"><link href="css/chunk-96cb89bc.54cb0139.css" rel="prefetch"><link href="css/chunk-eaf6149a.ddc97886.css" rel="prefetch"><link href="js/chunk-0d838931.ec57dba8.js" rel="prefetch"><link href="js/chunk-1c6fffe8.0a0ff104.js" rel="prefetch"><link href="js/chunk-232b4d3a.0de7db55.js" rel="prefetch"><link href="js/chunk-2410ce38.1cd193b3.js" rel="prefetch"><link href="js/chunk-3566c97c.576fe036.js" rel="prefetch"><link href="js/chunk-3e566bce.9fe4df18.js" rel="prefetch"><link href="js/chunk-4323df0c.0ace80d7.js" rel="prefetch"><link href="js/chunk-4aa552e1.7fa49fe3.js" rel="prefetch"><link href="js/chunk-59c0f4d5.df925f78.js" rel="prefetch"><link href="js/chunk-5b606ee5.18abf6d2.js" rel="prefetch"><link href="js/chunk-6128095e.1ed309de.js" rel="prefetch"><link href="js/chunk-67525272.5e53640a.js" rel="prefetch"><link href="js/chunk-71639305.bd00205c.js" rel="prefetch"><link href="js/chunk-72be1171.dce6850f.js" rel="prefetch"><link href="js/chunk-96cb89bc.da058b9a.js" rel="prefetch"><link href="js/chunk-eaf6149a.67d4b8f6.js" rel="prefetch"><link href="js/app.bcf36e3e.js" rel="preload" as="script"><link href="js/chunk-vendors.37f2d3ab.js" rel="preload" as="script"></head><body><noscript><strong>We're sorry but game-h5 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js"></script><script src="//web-1251519181.file.myqcloud.com/lib/axios/0.18.0/index.min.js"></script><script src="//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js"></script><script src="https://unpkg.com/element-ui/lib/index.js"></script><script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script><script src="js/chunk-vendors.37f2d3ab.js"></script><script src="js/app.bcf36e3e.js"></script></body></html> <!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>game-h5</title><link rel="stylesheet" href="//at.alicdn.com/t/font_2844902_uelk5f2sikk.css"><link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css"><link href="css/chunk-0d838931.be25db0a.css" rel="prefetch"><link href="css/chunk-1c6fffe8.6d3d760a.css" rel="prefetch"><link href="css/chunk-2410ce38.dc0ab0ec.css" rel="prefetch"><link href="css/chunk-3111aba8.9d547414.css" rel="prefetch"><link href="css/chunk-3e566bce.48f52058.css" rel="prefetch"><link href="css/chunk-4323df0c.b7f06c60.css" rel="prefetch"><link href="css/chunk-59c0f4d5.0e6c0212.css" rel="prefetch"><link href="css/chunk-5b606ee5.97973e1a.css" rel="prefetch"><link href="css/chunk-6128095e.0e3f4eb8.css" rel="prefetch"><link href="css/chunk-67525272.4fb8d824.css" rel="prefetch"><link href="css/chunk-71639305.f21c9ef5.css" rel="prefetch"><link href="css/chunk-880ce566.dc4cdcb8.css" rel="prefetch"><link href="css/chunk-bac2052a.aa4f4d02.css" rel="prefetch"><link href="js/chunk-0d838931.ec57dba8.js" rel="prefetch"><link href="js/chunk-1c6fffe8.0a0ff104.js" rel="prefetch"><link href="js/chunk-2410ce38.1cd193b3.js" rel="prefetch"><link href="js/chunk-3111aba8.e2690bfb.js" rel="prefetch"><link href="js/chunk-3566c97c.576fe036.js" rel="prefetch"><link href="js/chunk-3e566bce.9fe4df18.js" rel="prefetch"><link href="js/chunk-4323df0c.0ace80d7.js" rel="prefetch"><link href="js/chunk-4aa552e1.7fa49fe3.js" rel="prefetch"><link href="js/chunk-59c0f4d5.df925f78.js" rel="prefetch"><link href="js/chunk-5b606ee5.18abf6d2.js" rel="prefetch"><link href="js/chunk-6128095e.1ed309de.js" rel="prefetch"><link href="js/chunk-67525272.5e53640a.js" rel="prefetch"><link href="js/chunk-71639305.bd00205c.js" rel="prefetch"><link href="js/chunk-72be1171.dce6850f.js" rel="prefetch"><link href="js/chunk-880ce566.cadd78ca.js" rel="prefetch"><link href="js/chunk-bac2052a.8e2e7ebb.js" rel="prefetch"><link href="js/app.d25958db.js" rel="preload" as="script"><link href="js/chunk-vendors.37f2d3ab.js" rel="preload" as="script"></head><body><noscript><strong>We're sorry but game-h5 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js"></script><script src="//web-1251519181.file.myqcloud.com/lib/axios/0.18.0/index.min.js"></script><script src="//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js"></script><script src="https://unpkg.com/element-ui/lib/index.js"></script><script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script><script src="js/chunk-vendors.37f2d3ab.js"></script><script src="js/app.d25958db.js"></script></body></html>
\ No newline at end of file \ No newline at end of file
...@@ -19,9 +19,7 @@ ...@@ -19,9 +19,7 @@
<div class="integral" v-else-if="rule.integral"> <div class="integral" v-else-if="rule.integral">
{{ rule.integral || 0 }}积分/次 {{ rule.integral || 0 }}积分/次
</div> </div>
<div class="integral" v-else-if="rule.inviteNum"> <div class="integral" v-else-if="rule.inviteNum">邀请好友助力参与</div>
邀请好友助力参与
</div>
<swiper <swiper
class="swiper-class" class="swiper-class"
...@@ -30,16 +28,23 @@ ...@@ -30,16 +28,23 @@
:autoplay="swiperOptions.autoplay" :autoplay="swiperOptions.autoplay"
v-if="game.bulletFlag && barrageList && barrageList.length > 3" v-if="game.bulletFlag && barrageList && barrageList.length > 3"
> >
<swiper-slide v-for="item in barrageList" :key="item"> <swiper-slide v-for="item in barrageList.length * 2" :key="item">
<div class="swiper-item"> <div
class="swiper-item"
v-if="item % 2 == 0 && barrageList[item] && barrageList[item]"
>
<img src="./images/tips_bg.png" /> <img src="./images/tips_bg.png" />
<span>恭喜 {{ item.memberName }} 获得 {{ item.prizeName }}</span> <span
>恭喜 {{ barrageList[item / 2].memberName }} 获得
{{ barrageList[item / 2].prizeName }}</span
>
</div> </div>
</swiper-slide> </swiper-slide>
</swiper> </swiper>
<div class="box-box"> <div class="box-box">
<img <img
:class="clickIndex == index ? 'active' : ''"
v-for="(item, index) in boxList" v-for="(item, index) in boxList"
:key="item" :key="item"
:src=" :src="
...@@ -171,10 +176,11 @@ export default { ...@@ -171,10 +176,11 @@ export default {
RewardFailDialog, RewardFailDialog,
ShareSelectDialog, ShareSelectDialog,
ShareImgDialog, ShareImgDialog,
AlertDialog AlertDialog,
}, },
data() { data() {
return { return {
clickIndex: -1,
showOpenBoxDialog: false, showOpenBoxDialog: false,
showRewardDialog: false, showRewardDialog: false,
showRewardFailDialog: false, showRewardFailDialog: false,
...@@ -182,7 +188,7 @@ export default { ...@@ -182,7 +188,7 @@ export default {
showShareImgDialog: false, showShareImgDialog: false,
alertOptions: {}, alertOptions: {},
shareConditionObj: {}, shareConditionObj: {},
list: [], barrageList: [],
boxList: [ boxList: [
{ {
left: "calc(51% - 47px)", left: "calc(51% - 47px)",
...@@ -225,7 +231,7 @@ export default { ...@@ -225,7 +231,7 @@ export default {
direction: "vertical", direction: "vertical",
loop: true, loop: true,
autoplay: { autoplay: {
delay: 2000, delay: 1000,
stopOnLastSlide: false, stopOnLastSlide: false,
disableOnInteraction: true, disableOnInteraction: true,
}, },
...@@ -263,6 +269,12 @@ export default { ...@@ -263,6 +269,12 @@ export default {
}, },
false false
); );
document.addEventListener("visibilitychange", ()=> {
if(document.hidden){
this.isPlay = false;
this.audio.pause();
}
});
} }
this.getGame(); this.getGame();
this.getGameRule(); this.getGameRule();
...@@ -271,23 +283,25 @@ export default { ...@@ -271,23 +283,25 @@ export default {
this.getGamePlayBarrage(); this.getGamePlayBarrage();
this.lookBuryPoint(); this.lookBuryPoint();
}, },
mounted(){ mounted() {
this.manager.startPolling(); this.manager.startPolling();
}, },
destroyed(){ destroyed() {
this.manager.stopPolling(); this.manager.stopPolling();
this.audio.pause();
document.removeEventListener("visibilitychange");
}, },
methods: { methods: {
lookBuryPoint(){ lookBuryPoint() {
let query = this.$route.query; let query = this.$route.query;
if(query.memberId){ if (query.memberId) {
shareEvent({ shareEvent({
enterpriseId: query.enterpriseId || '', enterpriseId: query.enterpriseId || "",
memberId: query.memberId || '', memberId: query.memberId || "",
relationType: 'game', relationType: "game",
relationId: query.gameId || '', relationId: query.gameId || "",
event: 2 event: 2,
}) });
} }
}, },
async getGame() { async getGame() {
...@@ -316,14 +330,14 @@ export default { ...@@ -316,14 +330,14 @@ export default {
enterpriseId: this.enterpriseId, enterpriseId: this.enterpriseId,
}); });
let gameRuleConditionList = rule.gameRuleConditionList || []; let gameRuleConditionList = rule.gameRuleConditionList || [];
gameRuleConditionList.map((item)=>{ gameRuleConditionList.map((item) => {
let obj = JSON.parse(item.conditionJson); let obj = JSON.parse(item.conditionJson);
if(+obj.type == 11 || +obj.type == 12){ if (+obj.type == 11 || +obj.type == 12) {
this.shareConditionObj = obj; this.shareConditionObj = obj;
} }
}) });
this.rule = rule; this.rule = rule;
window.wx.miniProgram.postMessage({ window.wx.miniProgram.postMessage({
data: { data: {
shareTitle: rule.shareRuleDesc, shareTitle: rule.shareRuleDesc,
...@@ -354,16 +368,24 @@ export default { ...@@ -354,16 +368,24 @@ export default {
this.currentIntegral = currentIntegral; this.currentIntegral = currentIntegral;
}, },
clickBox(index) { clickBox(index) {
let prizeStyleList = this.game.gameExt.prizeStyleList; if(this.clickIndex != -1){
let itemIndex = prizeStyleList.length > index ? index : 0; return;
let boxItem = prizeStyleList[itemIndex];
this.showOpenBoxDialog = true;
this.openBoxData = boxItem;
if(this.playNumberObj.playNumber == 0 && this.rule.integral){
this.openBoxTitle = `每次参与游戏消耗${ this.rule.integral }积分${ this.playNumberObj.playNumberFlag ? '或参与次数' : '' }`
}else{
this.openBoxTitle = "";
} }
this.clickIndex = index;
setTimeout(() => {
let prizeStyleList = this.game.gameExt.prizeStyleList;
let itemIndex = prizeStyleList.length > index ? index : 0;
let boxItem = prizeStyleList[itemIndex];
this.showOpenBoxDialog = true;
this.openBoxData = boxItem;
if (this.playNumberObj.playNumber == 0 && this.rule.integral) {
this.openBoxTitle = `每次参与游戏消耗${this.rule.integral}积分${
this.playNumberObj.playNumberFlag ? "或参与次数" : ""
}`;
} else {
this.openBoxTitle = "";
}
}, 500);
}, },
toGameRule() { toGameRule() {
this.$router.push({ this.$router.push({
...@@ -405,12 +427,12 @@ export default { ...@@ -405,12 +427,12 @@ export default {
this.manager.shareWx({ this.manager.shareWx({
title: options.shareTitle, title: options.shareTitle,
imageUrl: options.shareCard, imageUrl: options.shareCard,
path: `/pages/page-transit/page-transit-qy?scene=${ linkId }`, path: `/pages/page-transit/page-transit-qy?scene=${linkId}`,
}) });
}, },
async sharePyq() { async sharePyq() {
let options = this.shareConditionObj; let options = this.shareConditionObj;
let result = await getGameShareQrCodeUrl({ let result = await getGameShareQrCodeUrl({
gameId: this.gameId, gameId: this.gameId,
enterpriseId: this.enterpriseId, enterpriseId: this.enterpriseId,
...@@ -427,8 +449,8 @@ export default { ...@@ -427,8 +449,8 @@ export default {
}, },
clickAdImg() { clickAdImg() {
window.wx.miniProgram.navigateTo({ window.wx.miniProgram.navigateTo({
url: '/' + this.game.gameExt.adsLinkUrl, url: "/" + this.game.gameExt.adsLinkUrl,
}) });
}, },
async open() { async open() {
let gameRes = await this.manager.play(); let gameRes = await this.manager.play();
...@@ -445,6 +467,13 @@ export default { ...@@ -445,6 +467,13 @@ export default {
this.getIntegral(); this.getIntegral();
}, },
}, },
watch:{
showOpenBoxDialog(n){
if(!n){
this.clickIndex = -1;
}
}
}
}; };
</script> </script>
...@@ -536,7 +565,7 @@ export default { ...@@ -536,7 +565,7 @@ export default {
border-radius: 8px; border-radius: 8px;
border: 1px solid white; border: 1px solid white;
background: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.3);
color: #21252B; color: #21252b;
font-size: 12px; font-size: 12px;
} }
...@@ -579,49 +608,68 @@ export default { ...@@ -579,49 +608,68 @@ export default {
@keyframes box-animation { @keyframes box-animation {
from { from {
transform: translate(0, -50%); transform: translate(0, -100px);
} }
to { to {
transform: translate(0, 0); transform: translate(0, 0);
} }
} }
@keyframes box-active-animation{
from {
transform: translate(0, 0) scale(1);
}
to {
transform: translate(-50%, -50%) scale(1.5);
left: 50%;
z-index: 10;
}
}
.box-box img { .box-box img {
position: absolute; position: absolute;
transform: translate(0, -50%); transform: translate(0, -100px);
width: 95px; width: 95px;
height: 95px; height: 95px;
animation-timing-function: ease-in; animation-timing-function: linear;
animation-name: box-animation; animation-name: box-animation;
animation-duration: 1s; animation-duration: 0.2s;
animation-fill-mode: forwards; animation-fill-mode: forwards;
animation-iteration-count: 1; animation-iteration-count: 1;
} }
.box-box img:nth-child(1) { .box-box img:nth-child(9) {
animation-delay: 0s; animation-delay: 0s;
} }
.box-box img:nth-child(2) { .box-box img:nth-child(8) {
animation-delay: 0.1s; animation-delay: 0.05s;
} }
.box-box img:nth-child(3) { .box-box img:nth-child(6) {
animation-delay: 0.2s; animation-delay: 0.1s;
} }
.box-box img:nth-child(4) { .box-box img:nth-child(7) {
animation-delay: 0.3s; animation-delay: 0.15s;
} }
.box-box img:nth-child(5) { .box-box img:nth-child(5) {
animation-delay: 0.4s; animation-delay: 0.20s;
} }
.box-box img:nth-child(6) { .box-box img:nth-child(3) {
animation-delay: 0.5s; animation-delay: 0.25s;
} }
.box-box img:nth-child(7) { .box-box img:nth-child(4) {
animation-delay: 0.6s; animation-delay: 0.30s;
} }
.box-box img:nth-child(8) { .box-box img:nth-child(2) {
animation-delay: 0.7s; animation-delay: 0.35s;
} }
.box-box img:nth-child(9) { .box-box img:nth-child(1) {
animation-delay: 0.8s; animation-delay: 0.40s;
}
.box-box img.active{
animation-timing-function: ease-in;
animation-name: box-active-animation;
animation-duration: 0.3s;
/* animation-fill-mode: forwards; */
animation-iteration-count: 1;
animation-delay: 0s;
} }
.points-count-box { .points-count-box {
...@@ -639,12 +687,12 @@ export default { ...@@ -639,12 +687,12 @@ export default {
font-family: DINAlternate-Bold, DINAlternate; font-family: DINAlternate-Bold, DINAlternate;
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
color: #38BCCC; color: #38bccc;
line-height: 23px; line-height: 23px;
position: relative; position: relative;
z-index: 2; z-index: 2;
} }
.text-box .text.number{ .text-box .text.number {
font-size: 40px; font-size: 40px;
line-height: 20px; line-height: 20px;
} }
...@@ -689,7 +737,7 @@ export default { ...@@ -689,7 +737,7 @@ export default {
width: 38px; width: 38px;
height: 38px; height: 38px;
border-radius: 50%; border-radius: 50%;
background: #21252B; background: #21252b;
box-shadow: inset 0px 3px 2px 0px rgba(243, 243, 243, 0.4); box-shadow: inset 0px 3px 2px 0px rgba(243, 243, 243, 0.4);
} }
.share-box .icon .iconfont { .share-box .icon .iconfont {
......
...@@ -30,10 +30,16 @@ ...@@ -30,10 +30,16 @@
:autoplay="swiperOptions.autoplay" :autoplay="swiperOptions.autoplay"
v-if="game.bulletFlag && barrageList && barrageList.length > 3" v-if="game.bulletFlag && barrageList && barrageList.length > 3"
> >
<swiper-slide v-for="item in barrageList" :key="item"> <swiper-slide v-for="item in barrageList.length * 2" :key="item">
<div class="swiper-item"> <div
class="swiper-item"
v-if="item % 2 == 0 && barrageList[item] && barrageList[item]"
>
<img src="./images/tips_bg.png" /> <img src="./images/tips_bg.png" />
<span>恭喜 {{ item.memberName }} 获得 {{ item.prizeName }}</span> <span
>恭喜 {{ barrageList[item / 2].memberName }} 获得
{{ barrageList[item / 2].prizeName }}</span
>
</div> </div>
</swiper-slide> </swiper-slide>
</swiper> </swiper>
...@@ -181,7 +187,7 @@ export default { ...@@ -181,7 +187,7 @@ export default {
showShareImgDialog: false, showShareImgDialog: false,
shareConditionObj: {}, shareConditionObj: {},
alertOptions: {}, alertOptions: {},
list: [], barrageList: [],
boxList: [ boxList: [
{ {
left: "calc(23% - 47px)", left: "calc(23% - 47px)",
...@@ -262,6 +268,12 @@ export default { ...@@ -262,6 +268,12 @@ export default {
}, },
false false
); );
document.addEventListener("visibilitychange", ()=> {
if(document.hidden){
this.isPlay = false;
this.audio.pause();
}
});
} }
this.getGame(); this.getGame();
this.getGameRule(); this.getGameRule();
...@@ -275,6 +287,8 @@ export default { ...@@ -275,6 +287,8 @@ export default {
}, },
destroyed(){ destroyed(){
this.manager.stopPolling(); this.manager.stopPolling();
this.audio.pause();
document.removeEventListener("visibilitychange");
}, },
methods: { methods: {
lookBuryPoint(){ lookBuryPoint(){
......
...@@ -19,9 +19,7 @@ ...@@ -19,9 +19,7 @@
<div class="integral" v-else-if="rule.integral"> <div class="integral" v-else-if="rule.integral">
{{ rule.integral || 0 }}积分/次 {{ rule.integral || 0 }}积分/次
</div> </div>
<div class="integral" v-else-if="rule.inviteNum"> <div class="integral" v-else-if="rule.inviteNum">邀请好友助力参与</div>
邀请好友助力参与
</div>
<swiper <swiper
class="swiper-class" class="swiper-class"
...@@ -30,10 +28,16 @@ ...@@ -30,10 +28,16 @@
:autoplay="swiperOptions.autoplay" :autoplay="swiperOptions.autoplay"
v-if="game.bulletFlag && barrageList && barrageList.length > 3" v-if="game.bulletFlag && barrageList && barrageList.length > 3"
> >
<swiper-slide v-for="item in barrageList" :key="item"> <swiper-slide v-for="item in barrageList.length * 2" :key="item">
<div class="swiper-item"> <div
class="swiper-item"
v-if="item % 2 == 0 && barrageList[item] && barrageList[item]"
>
<img src="./images/tips_bg.png" /> <img src="./images/tips_bg.png" />
<span>恭喜 {{ item.memberName }} 获得 {{ item.prizeName }}</span> <span
>恭喜 {{ barrageList[item / 2].memberName }} 获得
{{ barrageList[item / 2].prizeName }}</span
>
</div> </div>
</swiper-slide> </swiper-slide>
</swiper> </swiper>
...@@ -181,7 +185,7 @@ export default { ...@@ -181,7 +185,7 @@ export default {
showShareImgDialog: false, showShareImgDialog: false,
shareConditionObj: {}, shareConditionObj: {},
alertOptions: {}, alertOptions: {},
list: [], barrageList: [],
boxList: [ boxList: [
{ {
left: "calc(24% - 50px)", left: "calc(24% - 50px)",
...@@ -206,7 +210,7 @@ export default { ...@@ -206,7 +210,7 @@ export default {
{ {
left: "calc(77% - 50px)", left: "calc(77% - 50px)",
top: "338px", top: "338px",
} },
], ],
swiperOptions: { swiperOptions: {
direction: "vertical", direction: "vertical",
...@@ -250,6 +254,12 @@ export default { ...@@ -250,6 +254,12 @@ export default {
}, },
false false
); );
document.addEventListener("visibilitychange", ()=> {
if(document.hidden){
this.isPlay = false;
this.audio.pause();
}
});
} }
this.getGame(); this.getGame();
this.getGameRule(); this.getGameRule();
...@@ -258,23 +268,25 @@ export default { ...@@ -258,23 +268,25 @@ export default {
this.getGamePlayBarrage(); this.getGamePlayBarrage();
this.lookBuryPoint(); this.lookBuryPoint();
}, },
mounted(){ mounted() {
this.manager.startPolling(); this.manager.startPolling();
}, },
destroyed(){ destroyed() {
this.manager.stopPolling(); this.manager.stopPolling();
this.audio.pause();
document.removeEventListener("visibilitychange");
}, },
methods: { methods: {
lookBuryPoint(){ lookBuryPoint() {
let query = this.$route.query; let query = this.$route.query;
if(query.memberId){ if (query.memberId) {
shareEvent({ shareEvent({
enterpriseId: query.enterpriseId || '', enterpriseId: query.enterpriseId || "",
memberId: query.memberId || '', memberId: query.memberId || "",
relationType: 'game', relationType: "game",
relationId: query.gameId || '', relationId: query.gameId || "",
event: 2 event: 2,
}) });
} }
}, },
async getGame() { async getGame() {
...@@ -303,12 +315,12 @@ export default { ...@@ -303,12 +315,12 @@ export default {
enterpriseId: this.enterpriseId, enterpriseId: this.enterpriseId,
}); });
let gameRuleConditionList = rule.gameRuleConditionList || []; let gameRuleConditionList = rule.gameRuleConditionList || [];
gameRuleConditionList.map((item)=>{ gameRuleConditionList.map((item) => {
let obj = JSON.parse(item.conditionJson); let obj = JSON.parse(item.conditionJson);
if(+obj.type == 11 || +obj.type == 12){ if (+obj.type == 11 || +obj.type == 12) {
this.shareConditionObj = obj; this.shareConditionObj = obj;
} }
}) });
this.rule = rule; this.rule = rule;
window.wx.miniProgram.postMessage({ window.wx.miniProgram.postMessage({
data: { data: {
...@@ -345,9 +357,11 @@ export default { ...@@ -345,9 +357,11 @@ export default {
let boxItem = prizeStyleList[itemIndex]; let boxItem = prizeStyleList[itemIndex];
this.showOpenBoxDialog = true; this.showOpenBoxDialog = true;
this.openBoxData = boxItem; this.openBoxData = boxItem;
if(this.playNumberObj.playNumber == 0 && this.rule.integral){ if (this.playNumberObj.playNumber == 0 && this.rule.integral) {
this.openBoxTitle = `每次参与游戏消耗${ this.rule.integral }积分${ this.playNumberObj.playNumberFlag ? '或参与次数' : '' }` this.openBoxTitle = `每次参与游戏消耗${this.rule.integral}积分${
}else{ this.playNumberObj.playNumberFlag ? "或参与次数" : ""
}`;
} else {
this.openBoxTitle = ""; this.openBoxTitle = "";
} }
}, },
...@@ -391,8 +405,8 @@ export default { ...@@ -391,8 +405,8 @@ export default {
this.manager.shareWx({ this.manager.shareWx({
title: options.shareTitle, title: options.shareTitle,
imageUrl: options.shareCard, imageUrl: options.shareCard,
path: `/pages/page-transit/page-transit-qy?scene=${ linkId }`, path: `/pages/page-transit/page-transit-qy?scene=${linkId}`,
}) });
}, },
async sharePyq() { async sharePyq() {
let options = this.shareConditionObj; let options = this.shareConditionObj;
...@@ -412,8 +426,8 @@ export default { ...@@ -412,8 +426,8 @@ export default {
}, },
clickAdImg() { clickAdImg() {
window.wx.miniProgram.navigateTo({ window.wx.miniProgram.navigateTo({
url: '/' + this.game.gameExt.adsLinkUrl, url: "/" + this.game.gameExt.adsLinkUrl,
}) });
}, },
async open() { async open() {
let gameRes = await this.manager.play(); let gameRes = await this.manager.play();
...@@ -521,7 +535,7 @@ export default { ...@@ -521,7 +535,7 @@ export default {
border-radius: 8px; border-radius: 8px;
border: 1px solid white; border: 1px solid white;
background: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.3);
color: #21252B; color: #21252b;
font-size: 12px; font-size: 12px;
} }
...@@ -578,6 +592,7 @@ export default { ...@@ -578,6 +592,7 @@ export default {
animation-timing-function: ease-in; animation-timing-function: ease-in;
animation-name: box-animation; animation-name: box-animation;
animation-duration: 1s; animation-duration: 1s;
-webkit-animation-duration: 1s;
animation-fill-mode: forwards; animation-fill-mode: forwards;
animation-iteration-count: 1; animation-iteration-count: 1;
} }
...@@ -624,13 +639,13 @@ export default { ...@@ -624,13 +639,13 @@ export default {
font-family: DINAlternate-Bold, DINAlternate; font-family: DINAlternate-Bold, DINAlternate;
font-size: 20px; font-size: 20px;
font-weight: 600; font-weight: 600;
color: #FFFFFF; color: #ffffff;
line-height: 23px; line-height: 23px;
position: relative; position: relative;
z-index: 2; z-index: 2;
} }
.text-box .text.number{ .text-box .text.number {
font-size: 40px; font-size: 40px;
line-height: 20px; line-height: 20px;
} }
...@@ -676,11 +691,11 @@ export default { ...@@ -676,11 +691,11 @@ export default {
width: 38px; width: 38px;
height: 38px; height: 38px;
border-radius: 50%; border-radius: 50%;
background: #21252B; background: #21252b;
box-shadow: inset 0px 3px 2px 0px rgba(243, 243, 243, 0.4); box-shadow: inset 0px 3px 2px 0px rgba(243, 243, 243, 0.4);
} }
.share-box .icon .iconfont { .share-box .icon .iconfont {
background-image: -webkit-linear-gradient(180deg, #A7FAF6 0%, #D5F8E6 100%); background-image: -webkit-linear-gradient(180deg, #a7faf6 0%, #d5f8e6 100%);
-webkit-background-clip: text; -webkit-background-clip: text;
......
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