25 Commits

Author SHA1 Message Date
616b0c7509 存档 2025-12-17 18:04:09 +08:00
梁泽军
a40b88c915 Merge branch 'dragon_boat_festival' of https://git.szxgl.cn/liangzejun/palc-newyear2024 into dragon_boat_festival 2025-09-09 10:44:45 +08:00
梁泽军
80272a6830 存档 2025-09-09 10:44:26 +08:00
c458a512bb 'update' 2025-05-26 17:50:11 +08:00
梁泽军
f6e435cece 完成所有切图 2025-05-22 15:51:10 +08:00
梁泽军
6bb2497d7c 完成所有切图 2025-05-22 15:49:25 +08:00
ef44ba761d 'update' 2025-05-22 15:39:52 +08:00
梁泽军
68c4a94916 完成所有切图 2025-05-22 15:14:09 +08:00
124e44bae2 'update' 2025-05-22 15:06:47 +08:00
梁泽军
913e82905b 完成所有切图 2025-05-21 10:45:47 +08:00
梁泽军
e340bc89c6 完成所有切图 2025-05-21 10:42:37 +08:00
梁泽军
749a61f00b 初始化端午项目 2025-05-20 18:28:02 +08:00
梁泽军
d239b3f8fb Merge branch 'summer' of https://git.szxgl.cn/liangzejun/palc-newyear2024 into summer 2025-01-13 10:00:07 +08:00
梁泽军
8f74351ebc 存档 2025-01-13 09:58:49 +08:00
5ffb8d8e76 update 2024-08-30 18:33:11 +08:00
9204daccf2 update 2024-08-09 10:27:55 +08:00
3a20e989b3 update 2024-08-08 15:36:03 +08:00
梁泽军
070a49155a 修改了部分内容 2024-08-08 10:58:37 +08:00
梁泽军
d0d616a598 Merge branch 'summer' of https://git.szxgl.cn/liangzejun/palc-newyear2024 into summer 2024-07-25 10:15:43 +08:00
梁泽军
0b680fe379 整合 2024-07-25 10:15:19 +08:00
d15f739c6c 修改反馈 2024-07-23 16:21:39 +08:00
70c6784cac 更新初版 2024-07-22 15:36:57 +08:00
梁泽军
cc777efdb1 预加载、字体压缩 2024-07-21 16:45:39 +08:00
6ea3f3da78 奖品状态判断 2024-07-19 13:39:30 +08:00
bc1454a0e6 切图完成 2024-07-18 18:31:47 +08:00
107 changed files with 8286 additions and 1597 deletions

View File

@@ -1,7 +1,8 @@
VITE_MODE = fat
VITE_HOST = https://wmm-stg.pingan.com.cn
VITE_CDN = https://cdn.xglpa.com
VITE_CDN = https://cdn.xglpa.com/palc-preview
VITE_FOLDER = /vite-4
VITE_APPID = wxc2bc9f9e8d19b504
VITE_API = /intfgw/data/mmoactivity
VITE_URL = https://w-stg.pingan.com.cn/lckj/pawm-mmo-activity-xgl-frontend/index.html

View File

@@ -5,7 +5,8 @@
<meta charset="UTF-8" />
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<title><%- title%></title>
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
<title><%- title%></title>
</head>
<body>

3853
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -15,25 +15,25 @@
"axios": "^1.6.3",
"gsap": "^3.12.4",
"howler": "^2.2.4",
"pinia": "^2.1.7",
"pinia": "^2.2.0",
"qrcode": "^1.5.3",
"qs": "^6.11.2",
"vant": "^3.6.12",
"vconsole": "^3.15.1",
"vue": "^3.2.41",
"vue": "^3.4.0",
"vue-clipboard3": "^2.0.0",
"weixin-js-sdk": "^1.6.5"
},
"devDependencies": {
"@vant/auto-import-resolver": "^1.0.2",
"@vitejs/plugin-vue": "^3.2.0",
"@vitejs/plugin-vue": "^4.0.0",
"postcss-px-to-viewport-8-plugin": "^1.2.3",
"sass": "^1.68.0",
"sass-loader": "^13.3.2",
"unplugin-auto-import": "^0.17.3",
"unplugin-vue-components": "^0.26.0",
"vite": "^3.2.3",
"vite": "4.5.10",
"vite-plugin-compression": "^0.5.1",
"vite-plugin-html": "^3.2.1"
"vite-plugin-html": "^3.2.2"
}
}

BIN
src.zip Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 247 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 660 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 510 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 749 B

After

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 833 B

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 713 B

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 493 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 507 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 642 B

After

Width:  |  Height:  |  Size: 688 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

View File

@@ -14,7 +14,7 @@ const { toClipboard } = useClipboard()
const money = ref("1.88");
const code = ref("sss");
const code = ref("PAKJ2025");
const showResult = ref(false);
const hasPrize = ref(false);
@@ -100,7 +100,7 @@ const hide = (event) => {
duration: 0.3,
autoAlpha: 0,
onComplete: () => {
emit("DrawPage", {action:"hide"});
emit("DrawPage", { action: "hide" });
},
});
});
@@ -108,7 +108,7 @@ const hide = (event) => {
const copyFn = (event) => {
let e = event.target;
toClipboard(code.value)
debounceTap(e, async() => {
debounceTap(e, async () => {
Toast(`复制成功:${code.value}`);
});
};
@@ -148,11 +148,16 @@ onMounted(() => {
<div v-show="showResult" class="result-container">
<!-- 有奖品 -->
<div class="draw-has" v-show="hasPrize">
<div class="draw-has-title">恭喜您抽中</div>
<div class="money">¥{{ money }}</div>
<div class="draw-has-text">奖励抽到手快乐马上有</div>
<div class="code-box">
<div class="code">{{ code }}</div>
<div class="copy-btn" @click="copyFn($event)"></div>
<span>兑奖码</span>
<span class="code">{{ code }}</span>
<span class="copy-btn" @click="copyFn($event)"></span>
</div>
<div class="exchange-tips">兑换流程前往微信搜索平安理财服务号公众号发送端午安康获取兑奖链接输入兑换码兑换奖品</div>
<div class="exchnage-tips2">兑换码可在主页面我的奖品 再次查看并复制</div>
<div class="cls-btn" @click="hide($event)"></div>
</div>
<!-- 没有奖品 -->
@@ -163,7 +168,7 @@ onMounted(() => {
</div>
</div>
</template>
</template>
<style lang="scss" scoped>
.DrawPage {
@@ -214,30 +219,58 @@ onMounted(() => {
.draw-has {
position: relative;
@include box(665px, 731px);
@include bg_pos("prize/myPrize-box.png");
@include bg_pos("prize/myPrize-box2.png");
.draw-has-title {
@include pos(390px, 100px, 110px, 140px);
font-size: 40px;
color: #e95b46;
font-weight: 700;
letter-spacing: 3px;
// background-color: aqua;
@include flexCen();
}
.draw-has-text {
@include pos(390px, 100px, 110px, 300px);
font-size: 30px;
color: #e95b46;
font-weight: 700;
letter-spacing: 0;
// background-color: aqua;
@include flexCen();
}
.money {
@include pos(370px, 81px, 139px, 239px);
display: flex;
justify-content: center;
align-items: center;
@include pos(390px, 130px, 110px, 200px);
@include flexCen();
color: #e95b46;
font-weight: 700;
font-size: 58px;
letter-spacing: 4px;
// background-color: rgb(217, 0, 255);
}
.code-box {
@include pos(312px, 52px, 197px, 508px);
@include pos(390px, 52px, 110px, 508px);
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
font-size: 25px;
font-weight: 700;
color: #fff6cc;
span {
height: 77px;
line-height: 65px;
}
.code {
font-size: 25px;
font-weight: 700;
margin-right: 10px;
color: #fff6cc;
}
.copy-btn {
@@ -246,6 +279,31 @@ onMounted(() => {
}
}
.exchange-tips {
@include pos(390px, 152px, 110px, 558px);
display: flex;
flex-direction: row;
align-items: start;
justify-content: flex-start;
font-size: 20px;
// font-weight: 700;
color: #fff6cc;
letter-spacing: 2px;
// background-color: aqua;
}
.exchnage-tips2 {
@include pos(390px, 52px, 110px, 638px);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
font-size: 15px;
// font-weight: 700;
color: #fff6cc;
// background-color: aqua;
}
.cls-btn {
@include pos(82px, 82px, 517px, 114px);
@include bg_pos("prize/cls-btn.png");

View File

@@ -12,7 +12,7 @@ const start = (event) => {
gsap.to(".IndexPage", {
duration: 0.5,
autoAlpha: 0,
onComplete: () => {
onComplete: () => {
emit("IndexPage", { action: "start" });
},
});
@@ -36,47 +36,33 @@ const showRule = (event) => {
onMounted(() => {
gsap.from(".index-bg", { duration: 1, scale: 1.2, autoAlpha: 0 });
gsap.from(".index-bottom-bg", { duration: 1, y: 100, });
gsap.from(".index-windows", { duration: 1, scale: 0.5,autoAlpha:0, });
gsap.from(".index-pet", { duration: 1, y: -50,autoAlpha:0,delay:0.5 });
gsap.from(".index-title", { duration: 1, y: 20, autoAlpha: 0,delay:1 });
gsap.from(".index-fan-1", { duration: 1, x: -220, autoAlpha: 0,delay:0.5 });
gsap.from(".index-fan-3", { duration: 1, x: 220, autoAlpha: 0,delay:0.5 });
gsap.from(".index-fan-2", { duration: 1, x: -220, autoAlpha: 0,delay:0.75 });
gsap.from(".index-fan-4", { duration: 1, x: 220, autoAlpha: 0,delay:0.75 });
gsap.from(".index-logo", { duration: 1, y: 20, autoAlpha: 0,delay:0.75 });
gsap.from(".index-rule-btn", { duration: 1, x: -100, autoAlpha: 0 });
gsap.from(".index-title", { duration: 1, y: 20, autoAlpha: 0, delay: 1 });
gsap.from(".index-time", { duration: 1, x: 40, autoAlpha: 0, delay: 1 });
gsap.from(".index-logo", { duration: 1, y: 20, autoAlpha: 0, delay: 0.75 });
gsap.from(".index-rule-btn", { duration: 1, x: -100, autoAlpha: 0, delay: 1.3 });
gsap.from(".index-prize-btn", {
duration: 1,
x: -100,
autoAlpha: 0,
delay: 0.3,
delay: 1.5,
});
gsap.from(".index-start-btn", {
duration: 1,
y: 30,
autoAlpha: 0,
delay: 0.5,
delay: 1.5,
});
gsap.from(".index-agreement", {
duration: 1,
scale: 0.4,
autoAlpha: 0,
delay: 0.5,
onComplete:()=>{
// gsap.to('.index-cloud',{duration:2,x:-30,repeat:-1,yoyo:true,ease:'none'})
gsap.to('.index-fan-1',{duration:2,x:'-=30',repeat:-1,yoyo:true,ease:'none'})
gsap.to('.index-fan-2',{duration:1.5,x:'-=20',repeat:-1,yoyo:true,ease:'none'})
gsap.to('.index-fan-3',{duration:1.5,y:'+=20',repeat:-1,yoyo:true,ease:'none'})
gsap.to('.index-fan-4',{duration:2,x:'+=20',repeat:-1,yoyo:true,ease:'none'})
gsap.to('.index-pet',{duration:2,y:'-=10',repeat:-1,yoyo:true,ease:'none'})
onComplete: () => {
gsap.to('.index-start-btn', { duration: 1, scale: '0.95', repeat: -1, yoyo: true, ease: 'bounce.out' })
}
});
});
const vcNum = ref(false);
@@ -92,25 +78,21 @@ const showVC = () => {
<div class="IndexPage" @touchmove.prevent>
<div class="index-bg"></div>
<div class="index-container">
<div class="index-fan-1"></div>
<div class="index-fan-2"></div>
<div class="index-fan-3"></div>
<div class="index-fan-4"></div>
<div class="index-logo"></div>
<div class="index-bottom-bg"></div>
<!-- <div class="index-cloud"></div> -->
<div class="index-firework"></div>
<div class="index-windows"></div>
<div class="index-pet"></div>
<div class="index-title" @click="showVC"></div>
<div class="index-rule-btn" @click="showRule($event)"></div>
<div class="index-prize-btn" v-if="userStore.hasPrize" @click="showMyPrize($event)"></div>
<div class="index-time"></div>
<div class="index-rule-btn index-left-btn" @click="showRule($event)">活动规则</div>
<div class="index-prize-btn index-left-btn" v-if="userStore.hasPrize" @click="showMyPrize($event)">我的奖品</div>
<div class="index-start-btn" @click="start"></div>
<div class="index-agreement">
风险提示:本材料由平安理财有限责任公司(以下简称平安理财)制作并提供<span
class="b">本资料内容及观点仅供参考不构成对任何人的投资建议</span>以上产品投资管理机构/管理人为平安理财代理销售机构不承担产品的投资兑付和风险管理的责任以上产品通过代理销售机构渠道销售的产品风险评级应当以代理销售机构最终披露的评级结果为准以上产品为非保本浮动收益理财产品具体以产品说明书或产品公告披露为准产品的业绩比较基准指管理人基于过往投资经验以及对产品存续期投资市场波动的预判而对本产品所设定的投资目标业绩比较基准不是预期收益率不代表产品的未来表现和实际收益不构成对产品收益的承诺<span
class="b">理财产品过往业绩不代表其未来表现不等于理财产品实际收益投资须谨慎过往业绩相关数据已经托管人核对</span><span
class="orange">理财非存款产品有风险投资须谨慎</span>金融消费者不得利用金融产品和服务从事违法活动
<span>风险提示:本材料由平安理财有限责任公司(以下简称平安理财)制作并提供</span>
<span class="b">本资料内容及观点仅供参考不构成对任何人的投资建议</span>
<span>以上产品投资管理机构/管理人为平安理财代理销售机构不承担产品的投资兑付和风险管理的责任以上产品通过代理销售机构渠道销售的产品风险评级应当以代理销售机构最终披露的评级结果为准以上产品为非保本浮动收益理财产品具体以产品说明书或产品公告披露为准产品的业绩比较基准指管理人基于过往投资经验以及对产品存续期投资市场波动的预判而对本产品所设定的投资目标业绩比较基准不是预期收益率不代表产品的未来表现和实际收益不构成对产品收益的承诺</span>
<span class="b">理财产品过往业绩不代表其未来表现不等于理财产品实际收益投资须谨慎过往业绩相关数据已经托管人核对</span><span
class="orange">理财非存款产品有风险投资须谨慎</span>
<span>
金融消费者不得利用金融产品和服务从事违法活动
</span>
</div>
</div>
</div>
@@ -118,9 +100,9 @@ const showVC = () => {
<style lang="scss" scoped>
.IndexPage {
@include pos(100%, 100vh, 0px, 0px);
@include pos(100%, 1624px, 0px, 0px);
overflow: hidden;
background: linear-gradient(135deg, #a11b15, #f80c00);
background: linear-gradient(135deg, #d6d1ca, #e5dccf);
.index-bg {
@include pos(750px, 1624px, 0px, 50%);
@@ -129,106 +111,74 @@ const showVC = () => {
}
.index-container {
@include pos(750px, 1624px, 0px, 50%);
transform: translateY(-50%);
@include pos(750px, 1624px, 0px, 0px);
// transform: translateY(-50%);
.index-bottom-bg{
pointer-events: none;
@include pos(750px, 558px, 0px, 1066px);
@include bg_pos("index/bottom-bg.png");
}
.index-fan-1{
.index-logo {
pointer-events: none;
@include pos(235px, 574px, 0px, 60px);
@include bg_pos("index/fan-1.png");
}
.index-fan-2{
pointer-events: none;
@include pos(316px, 317px, -205px, 405px);
@include bg_pos("index/fan-2.png");
}
.index-logo{
pointer-events: none;
@include pos(632px, 94px, 59px, 267px);
@include pos(632px, 94px, 59px, 266px);
@include bg_pos("index/logo.png");
}
.index-fan-3{
pointer-events: none;
@include pos(370px, 334px, 545px, 910px);
@include bg_pos("index/fan-3.png");
}
.index-fan-4{
pointer-events: none;
@include pos(350px, 205px, 494px, 1011px);
@include bg_pos("index/fan-4.png");
}
.index-cloud{
pointer-events: none;
@include pos(88px, 46px, 621px, 253px);
@include bg_pos("index/cloud.png");
}
.index-firework{
pointer-events: none;
@include pos(120px, 120px, 651px, 474px);
@include bg_pos("index/firework.png");
}
.index-windows{
pointer-events: none;
@include pos(743px, 744px, 3px, 440px);
@include bg_pos("index/windows.png");
}
.index-pet{
pointer-events: none;
@include pos(234px, 386px, 353px, 614px);
@include bg_pos("index/pet-icon.png");
}
.index-title {
// pointer-events: none;
@include pos(542px, 101px, 104px, 369px);
@include pos(593px, 156px, 85px, 387px);
@include bg_pos("index/title.png");
}
.index-time {
@include pos(433px, 58px, 295px, 565px);
@include bg_pos("index/time.png");
}
.index-left-btn {
border: 2px solid rgb(255, 255, 255);
background-color: rgb(243, 87, 4);
box-shadow: 0px 6px 11px 0px rgba(155, 122, 68, 0.4);
font-size: 25px;
display: flex;
align-items: center;
justify-content: center;
padding-left: 20px;
color: #ffffff;
letter-spacing: 1.5px;
border-radius: 21px;
}
.index-rule-btn {
@include pos(184px, 49px, -37px, 506px);
@include bg_pos("index/rule-btn.png");
@include pos(184px, 49px, -37px, 578px);
}
.index-prize-btn {
@include pos(184px, 49px, -37px, 575px);
@include bg_pos("index/prize-btn.png");
@include pos(184px, 49px, -37px, 642px);
}
.index-start-btn {
@include pos(311px, 90px, 220px, 1168px);
@include bg_pos("index/start-btn.png");
@include pos(288px, 93px, 231px, 1097px);
@include bg_pos("index/btn.png");
}
.index-agreement {
font-family: "HarmonyOS_Sans_SC_Regular";
font-family: "FZZY_Regular";
pointer-events: none;
@include pos(736px, 182px, 7px, 1258px);
// background: rgba($color: #f49e6a, $alpha: 0.55);
@include pos(736px, 182px, 7px, 1208px);
font-size: 14px;
text-align: justify;
letter-spacing: 0.1px;
color: #ff8c84;
color: #ffffff;
padding: 10px;
box-sizing: border-box;
border-radius: 10px;
line-height: 20px;
.b {
font-weight: 700;
}
.orange {
color: #fdf9de;
color: #ff7127;
font-weight: 700;
}
}

View File

@@ -40,8 +40,7 @@ onMounted(() => {
Preloader({
name: "内页资源",
imgs: pageImg,
callback: (progress) => {
// console.log('进度:', progress);
callback: (progress) => {
gsap.set(".bar", { width: progress + "%" });
loadNum.value = progress;
},
@@ -66,11 +65,13 @@ onMounted(() => {
<div class="LoadPage" @touchmove.prevent>
<div class="load-bg"></div>
<div class="load-container">
<div class="load-icon"></div>
<div class="load-icon"></div>
<div class="load-box">
<div class="bar"></div>
</div>
<div class="load-num">{{ loadNum }}%</div>
<div class="load-num">
<span class="num">{{ loadNum }}%</span>
</div>
</div>
</div>
</template>
@@ -85,7 +86,8 @@ onMounted(() => {
.load-bg {
@include pos(750px, 100%, 0px, 50%);
transform: translateY(-50%);
@include bg_pos("load/bg.jpg");
background-image: -webkit-linear-gradient(-90deg, #ffffff 15%, #4ebbe5 100%);
}
.load-container {
@@ -93,40 +95,47 @@ onMounted(() => {
@include box(750px, 1180px);
// transform: translateY(-50%);
.load-icon{
@include pos(101px, 55px, 325px, 370px);
.load-icon {
@include pos(409px, 215px,199px, 350px);
@include bg_pos("load/icon.png");
}
.load-box {
@include pos(512px, 35px, 119px, 450px);
border-style: solid;
border-width: 2px;
border-color: #e17c4d;
border-radius: 20px;
padding: 2px;
@include pos(582px, 45px, 83px, 450px);
border-radius: 25px;
padding: 1px;
border: 1px solid rgb(243, 87, 4);
.bar {
@include box(0%, 26px);
@include box(0%, 38px);
border-radius: 20px;
background: linear-gradient( -178deg, rgb(255,184,127) 0%, rgb(255,238,186) 100%);
background-image: -webkit-linear-gradient( -178deg, rgb(255,184,127) 0%, rgb(255,238,186) 100%);
border: 1px solid rgb(255, 255, 255);
background-image: -webkit-linear-gradient(0deg, #f7c86f 0%, #f25501 100%);
}
}
.load-num {
@include pos(750px, 50px, 0px, 511px);
text-align: center;
font-size: 38px;
color: #ffaf5e;
line-height: 40px;
font-weight: 700;
background: linear-gradient(to right, #f2733a, #ffd667);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
// letter-spacing: 2px;
@include pos(235px, 80px, 256px, 511px);
@include flexCen();
.num {
font-size: 40px;
color: #f25501;
font-weight: 700;
/* 文字填充色 */
text-shadow:
-1px -1px 0 #ffffff,
1px -1px 0 #ffffff,
-1px 1px 0 #ffffff,
1px 1px 0 #ffffff;
/* 四个方向阴影叠加 */
}
}
.btn {

View File

@@ -2,27 +2,26 @@
import { debounceTap } from "@/plugins";
import gsap from "gsap";
import { Toast } from "vant";
import useClipboard from 'vue-clipboard3'
import useClipboard from "vue-clipboard3";
import { useMainStore } from "@/store";
import { onMounted } from "vue";
// 页面配置初始化
const emit = defineEmits(["MyPrizePage"]);
const userStore = useMainStore();
const { toClipboard } = useClipboard()
const { toClipboard } = useClipboard();
const money = ref(userStore.prizeMoney);
const code = ref(userStore.prizeCode);
const copyFn = (event) => {
let e = event.target;
toClipboard(code.value)
toClipboard(code.value);
debounceTap(e, () => {
Toast(`复制成功:${code.value}`);
});
};
const hide = (event) => {
let e = event.target;
debounceTap(e, () => {
@@ -49,15 +48,24 @@ onMounted(() => {
<template>
<div class="MyPrizePage">
<div class="myPrize-container">
<div class="myPrize-title">恭喜您抽中</div>
<div class="myPrize-money">¥{{ money }}</div>
<div class="myPrize-text">奖励抽到手快乐马上有</div>
<div class="myPrize-code-box">
<span>兑奖码</span>
<div class="code">{{ code }}</div>
<div class="myPrize-copy-btn" @click="copyFn($event)"></div>
</div>
<div class="exchange-tips">
兑换流程前往微信搜索平安理财服务号公众号发送端午安康获取兑奖链接输入兑换码兑换奖品
</div>
<div class="exchnage-tips2">
兑换码可在主页面我的奖品 再次查看并复制
</div>
<div class="myPrize-cls-btn" @click="hide($event)"></div>
</div>
</div>
</template>
</template>
<style lang="scss" scoped>
.MyPrizePage {
@@ -68,7 +76,27 @@ onMounted(() => {
.myPrize-container {
position: relative;
@include box(665px, 731px);
@include bg_pos("prize/myPrize-box.png");
@include bg_pos("prize/myPrize-box2.png");
.myPrize-title {
@include pos(390px, 100px, 110px, 140px);
font-size: 40px;
color: #e95b46;
font-weight: 700;
letter-spacing: 3px;
// background-color: aqua;
@include flexCen();
}
.myPrize-text {
@include pos(390px, 100px, 110px, 300px);
font-size: 30px;
color: #e95b46;
font-weight: 700;
letter-spacing: 0;
// background-color: aqua;
@include flexCen();
}
.myPrize-money {
@include pos(370px, 81px, 139px, 239px);
@@ -82,10 +110,19 @@ onMounted(() => {
}
.myPrize-code-box {
@include pos(312px, 52px, 197px, 508px);
@include pos(390px, 52px, 110px, 500px);
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
font-size: 25px;
font-weight: 700;
color: #fff6cc;
span {
// height: 77px;
line-height: 65px;
}
.code {
font-size: 25px;
@@ -100,10 +137,35 @@ onMounted(() => {
}
}
.exchange-tips {
@include pos(390px, 152px, 110px, 558px);
display: flex;
flex-direction: row;
align-items: start;
justify-content: flex-start;
font-size: 20px;
// font-weight: 700;
color: #fff6cc;
letter-spacing: 2px;
// background-color: aqua;
}
.exchnage-tips2 {
@include pos(390px, 52px, 110px, 638px);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
font-size: 15px;
// font-weight: 700;
color: #fff6cc;
// background-color: aqua;
}
.myPrize-cls-btn {
@include pos(82px, 82px, 517px, 114px);
@include bg_pos("prize/cls-btn.png");
}
}
}
</style>
</style>

View File

@@ -11,80 +11,71 @@ const emit = defineEmits(["QuestionPage"]);
const userStore = useMainStore();
// 当前题目
const currentId = ref(0); //当前id 0~11
// const currentId = ref(props.questionId); //当前id 0~4
const currentId = ref(0); //当前id 0~3
const questionList = ref(data); //随机打乱题库
const answerList = ref([]); // 答案库统计
const activeId = ref(""); // 当前题目所选答案选项
const showResultBtn = ref(false);
const isChecked = ref(false)
const isChecked = ref(false);
const checkedOption = ref("");
const QaResult = ref(1); //当前答题结果
const correctObj = ref({}); //当前正确选项
// 答题事件
const answerFn = (item, event) => {
let e = event.target.parentElement;
activeId.value = item.aid; //更新选中状态
console.log('选项', item);
debounceTap(e, () => {
let cid = questionList.value[currentId.value].id;
let has = answerList.value.findIndex((obj) => obj.id === cid);
// 答案库中未存在该题的结果则新增,存在则更新最新选项
if (has == -1) {
answerList.value.push({
id: cid,
aid: item.aid,
answer: item.text,
});
} else {
answerList.value[has].aid = item.aid;
answerList.value[has].answer = item.text;
}
gsap.set(".answer-box", { pointerEvents: "none" });
isChecked.value = true;
checkedOption.value = item;
console.log("checkedOption", checkedOption.value);
QaResult.value = item.result;
gsap.set('.option-tips,.analysis', { autoAlpha: 1 })
gsap.set('.answer-box', { pointerEvents: 'none' })
isChecked.value = true
console.log('currentId.value',currentId.value);
if(currentId.value == 2 ){
gsap.set('.create-btn', { display: 'block' })
}else{
gsap.set('.next-btn', { display: 'block' })
}
})
}
// 设置正确选项
correctObj.value = questionList.value[currentId.value].answer.find(
(item) => item.result == 1
);
console.log("correctObj", correctObj.value);
gsap.to(".qp-result ", { duration: 0.5, autoAlpha: 1, delay: 1 });
});
};
// 下一题
const nextQuestion = (event) => {
let e = event.target;
debounceTap(e, () => {
isChecked.value = false
gsap.set('.option-tips,.analysis', { autoAlpha: 0 })
currentId.value++
activeId.value = ''
gsap.set('.answer-box', { pointerEvents: 'initial' })
gsap.set('.next-btn', { display: 'none' })
})
}
gsap.to(".qp-result", {
duration: 0.5,
autoAlpha: 0,
onComplete: () => {
isChecked.value = false;
checkedOption.value = "";
gsap.set(".answer-box", { pointerEvents: "auto" });
currentId.value++;
},
});
});
};
// 查看结果事件
const viewResult = (event) => {
let e = event.target;
debounceTap(e, () => {
// 随机生成海报id
userStore.updatePosterId(getRandomNumber([1, 2, 3]))
gsap.set('.question-box', { pointerEvents: 'none' })
Toast('答题结束')
// 更新海报id
userStore.posterId = currentId.value + 1;
gsap.set(".question-box", { pointerEvents: "none" });
Toast("答题结束");
Toast.loading({
message: '结果生成中',
message: "结果生成中",
duration: 0,
forbidClick: true,
})
});
if (import.meta.env.VITE_MODE != "dev") {
let dev = "dev";
if (dev != "dev") {
// 提交完成记录
subAnswer({}, userStore.token).then((res) => {
console.log("key:", res);
@@ -93,203 +84,205 @@ const viewResult = (event) => {
}
setTimeout(() => {
Toast.clear()
gsap.to('.QuestionPage', {
duration: 0.5, autoAlpha: 0, onComplete: () => {
Toast.clear();
gsap.to(".QuestionPage,.qp-result", {
duration: 0.5,
autoAlpha: 0,
onComplete: () => {
emit("QuestionPage", { action: "showResult" });
}
})
}, 1000)
},
});
}, 1000);
});
} else {
setTimeout(() => {
Toast.clear()
gsap.to('.QuestionPage', {
duration: 0.5, autoAlpha: 0, onComplete: () => {
Toast.clear();
gsap.to(".QuestionPage,.qp-result", {
duration: 0.5,
autoAlpha: 0,
onComplete: () => {
emit("QuestionPage", { action: "showResult" });
}
})
}, 1000)
},
});
}, 1000);
}
})
}
// 从数组中随机生成一个数字
const getRandomNumber = (arr) => {
var randomIndex = Math.floor(Math.random() * arr.length);
return arr[randomIndex];
}
});
};
onMounted(() => {
gsap.from('.question-bg', { duration: 0.5, autoAlpha: 0, })
gsap.from('.question-box', { duration: 0.5, scale: 0.4, autoAlpha: 0, })
gsap.to('.question-lantern-icon', { duration: 5, transformOrigin: '100% 0%', rotation: '10deg', repeat: -1, yoyo: true, ease: 'none' })
gsap.from(".question-bg", { duration: 0.5, autoAlpha: 0 });
gsap.from(".question-box", { duration: 0.5, scale: 0.4, autoAlpha: 0 });
});
const getClass = (item) => {
if (isChecked.value) {
if (checkedOption.value.aid == item.aid) {
return item.result ? "correct" : "incorrect";
}
}
};
</script>
<template>
<div class="QuestionPage" @touchmove.prevent>
<div class="question-bg">
<div class="bottom-fan-1"></div>
<div class="bottom-fan-2"></div>
<div class="question-bottom-bg"></div>
</div>
<div class="question-bg"></div>
<div class="question-container">
<div class="container-fan-1"></div>
<div class="container-fan-2"></div>
<div class="question-box">
<!-- 问题序号 -->
<div class="qa-number">{{ questionList[currentId].id }}</div>
<div class="question-serial">
<div>
<div class="serial-icon"></div>
<div class="serial-text">
{{ ["题目一", "题目二", "题目三", "题目四"][currentId] }}
</div>
</div>
<div class="serial-num">
{{ currentId + 1 }}/{{ questionList.length }}
</div>
</div>
<div class="qa-question-box">
<!-- 问题 -->
<div class="question">
<div class="question-text" v-for="item in questionList[currentId].question" :key="item">
<div
class="question-text"
v-for="item in questionList[currentId].question"
:key="item"
>
{{ item }}
</div>
<div class="question-tips">打一系列产品</div>
</div>
<!-- 选项 -->
<div class="answer-box">
<div class="answer" :class="isChecked ? item.result + '-bg' : ''"
v-for="item in questionList[currentId].answer" :key="item.aid">
<div class="answer-text-box">
<div class="answer-text" v-for="a in item.text" :key="a">
{{ item.aid }}.{{ a }}
</div>
</div>
<div class="option-tips">
<div :class="item.result"></div>
<div
class="answer"
:class="getClass(item)"
v-for="item in questionList[currentId].answer"
:key="item.aid"
>
<div class="answer-text">{{ item.aid }}.{{ item.text }}</div>
<div
class="result-icon"
v-if="isChecked && item.aid == checkedOption.aid"
>
<div
:class="item.result ? 'icon-correct' : 'icon-incorrect'"
></div>
</div>
<!-- 可点击区域 -->
<div class="click-area" @click="answerFn(item, $event)"></div>
</div>
</div>
<!-- 解析 -->
<div class="analysis" >
<div v-for="li in questionList[currentId].analysis" :key="li">{{li}}</div>
</div>
<div class="next-btn" @click="nextQuestion($event)"></div>
<div class="create-btn" @click="viewResult($event)"></div>
<!-- <div class="question-tips" v-for="(t, i) in questionList[currentId].tips" :key="i">
<div v-if='questionList[currentId].tips.length == 1'>
{{ isChecked ? `${['回答错误!', '回答正确!'][checkedOption.result]}` : `提示:${t}` }}
</div>
<div v-else>
{{ isChecked ? `${i == 0 ? ['回答错误', '回答正确'][checkedOption.result] : ''}` : `${i == 0 ? '提示' : ''}${t}` }}
</div>
</div> -->
</div>
<div class="return-btn" @click="nextQuestion($event)"></div>
<div class="create-btn" @click="viewResult($event)"></div>
</div>
<div class="question-lantern-icon"></div>
<div class="question-gold-icon-1"></div>
<div class="question-gold-icon-2"></div>
</div>
<!-- 进度条 -->
<Progress :percentage="(currentId + 1) / 3 * 100" pivot-color="#7232dd" :show-pivot="false"
color="linear-gradient(to right, rgb(255 153 153), rgb(221 50 50))" />
</div>
<div class="qp-result">
<div
class="qp-result-box"
:class="!QaResult ? 'qp-result-box-0' : 'qp-result-box-1'"
>
<div
class="qp-result-icon"
:class="!QaResult ? 'is-incorrect' : ''"
></div>
<div class="qp-result-content">
<div
class="qp-result-text"
:class="!QaResult ? 'text-bg-2' : 'text-bg-1'"
>
{{ QaResult ? "答对啦" : "答错啦" }}
</div>
<div class="qp-tips" v-if="!QaResult">
答案:{{ correctObj.aid }}.{{ correctObj.text }}
</div>
<div class="qp-tips-text">解析{{ questionList[currentId].tips[0] }}</div>
</div>
</div>
<div
class="next-btn"
@click="
currentId == questionList.length - 1
? viewResult($event)
: nextQuestion($event)
"
>
{{ currentId == questionList.length - 1 ? "查看结果" : "下一题" }}
</div>
</div>
</template>
<style lang='scss' scope>
<style lang="scss" scope>
.QuestionPage {
@include pos(100%, 100%, 0px, 0px);
@include pos(100%, 1624px, 0px, 0px);
overflow: hidden;
.question-bg {
@include pos(750px, 1624px, 0px, 50%);
transform: translateY(-50%);
@include bg_pos('qa/bg.jpg');
.question-bottom-bg {
pointer-events: none;
@include box(750px, 393px);
position: absolute;
left: 0px;
bottom: 0px;
@include bg_pos("qa/bottom-bg.png");
}
.bottom-fan-1 {
@include pos(370px, 334px, 545px, 1022px);
@include bg_pos('index/fan-3.png');
}
.bottom-fan-2 {
@include pos(350px, 205px, 494px, 1128px);
@include bg_pos('index/fan-4.png');
}
@include pos(750px, 1624px, 0px, 0px);
background-image: -webkit-linear-gradient(
-90deg,
#ffffff 15%,
#4ebbe5 100%
);
}
.question-container {
@include pos(750px, 1624px, 0px, 50%);
transform: translateY(-50%);
@include pos(750px, 1624px, 0px, 0px);
@include flexCen();
.question-lantern-icon {
// pointer-events: none;
@include pos(349px, 443px, 489px, 49px);
@include bg_pos('qa/lantern-icon.png');
}
.container-fan-1 {
pointer-events: none;
@include pos(235px, 574px, 0px, 60px);
@include bg_pos("index/fan-1.png");
}
.container-fan-2 {
pointer-events: none;
@include pos(316px, 317px, -205px, 405px);
@include bg_pos("index/fan-2.png");
}
background-color: rgba($color: #000000, $alpha: 0.3);
.question-box {
@include pos(656px, 913px, 47px, 339px);
@include bg_pos("qa/question-box.png");
@include pos(727px, 769px, 22px, 308px);
@include bg_pos("qa/paper.png");
.qa-number {
@include pos(100px, 56px, 278px, 89px);
font-size: 40px;
font-style: italic;
color: #c61a1a;
font-weight: 700;
.question-serial {
@include pos(560px, 90px, 110px, 34px);
display: flex;
justify-content: center;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
.serial-text {
color: #ffffff;
font-size: 40px;
}
.serial-num {
font-size: 60px;
padding-right: 20px;
color: transparent;
-webkit-text-stroke: 3px #ffffff; /* 控制描边粗细和颜色 */
text-stroke: 3px #ffffff;
opacity: 0.5;
}
}
.qa-question-box {
@include pos(570px, 700px, 43px, 194px);
@include pos(563px, 660px, 74px, 116px);
display: flex;
flex-direction: column;
// justify-content: space-around;
justify-content: flex-start;
align-items: center;
// 问题样式
.question {
display: flex;
flex-direction: column;
// margin-bottom: 10px;
height: 270px;
justify-content: center;
margin: 40px auto;
.question-text {
width: 100%;
font-family: 'DouyinSansBold';
font-size: 35px;
color: rgb(255, 255, 255);
text-align: center;
padding: 10px;
text-shadow: 0.675px 2.923px 6px rgba(164, 18, 14, 0.004);
// -webkit-transform: matrix( 0.63514641527437,0,0,0.63514641527437,0,0);
}
.question-tips {
font-size: 25px;
width: 100%;
font-family: 'DouyinSansBold';
color: rgb(255, 255, 255);
text-align: center;
padding: 10px;
text-shadow: 0.675px 2.923px 6px rgba(164, 18, 14, 0.004);
font-family: "FZZY_Regular";
font-size: 34px;
color: #55240d;
line-height: 50px;
text-align: justify;
font-weight: 700;
}
}
@@ -298,144 +291,158 @@ onMounted(() => {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
height: 200px;
// 选中状态
.correct-bg {
border: 1px solid rgb(255, 238, 186) !important;
background-image: linear-gradient(177deg, rgb(255, 184, 127) 0%, rgb(255, 238, 186) 100%);
background-image: -webkit-linear-gradient(177deg, rgb(255, 184, 127) 0%, rgb(255, 238, 186) 100%);
.answer-option {
color: #96100f;
}
.answer-text-box {
color: #96100f !important;
}
}
.incorrect-bg {
background-image: -webkit-linear-gradient(177deg, rgb(195, 59, 22) 0%, rgb(209, 84, 51) 100%);
box-shadow: 0px 3px 6px 0px rgba(133, 0, 3, 0.85), inset 0px 2px 5px 0px rgba(236, 74, 42, 0.004);
.answer-option {
color: #ffe2ad;
}
.answer-text-box {
color: #ffe2ad !important;
}
}
justify-content: space-around;
// height: 200px;
// 选项通用样式
.answer {
@include box(476px, 92px);
width: 504px;
position: relative;
border-radius: 47.5px;
border: 2px solid rgb(255, 225, 172);
// margin-bottom: 35px;
justify-content: space-between;
border-radius: 32.5px;
display: flex;
flex-direction: row;
justify-content: space-around;
justify-content: center;
align-items: center;
border: 1px solid #fff;
color: #9e4b00;
background-color: #fff2b9;
margin-bottom: 30px;
padding: 10px 20px;
.answer-text {
font-size: 30px;
line-height: 40px;
@include flexCen();
}
.click-area {
@include pos(476px, 92px, 0px, 0px);
border-radius: 47.5px;
width: 100%;
height: 100%;
border-radius: 32.5px;
position: absolute;
}
.result-icon {
position: absolute;
@include box(504px, 45px);
top: 50%;
transform: translateY(-55%);
left: 460px;
.option-tips {
@include box(60px, 60px);
visibility: hidden;
.correct {
@include box(100%, 100%);
.icon-correct {
@include box(76px, 56px);
@include bg_pos("qa/correct.png");
}
.incorrect {
@include box(100%, 100%);
.icon-incorrect {
@include box(52px, 54px);
@include bg_pos("qa/incorrect.png");
}
}
.answer-text-box {
@include box(335px, 100%);
font-family: 'HarmonyOS_Sans_SC_Regular';
color: #ffe2ad;
font-size: 28px;
display: flex;
flex-direction: column;
justify-content: center;
.answer-text {
width: 100%;
// text-align: center;
padding-left: 40px;
}
}
}
.correct {
color: #ffe8b4;
font-weight: 700;
// background: linear-gradient(-45deg, #facc22, #f83600);
background-color: #f83600;
border: 2px solid #f0d0ad;
// 外发光效果
box-shadow: 0px 5px 10px rgba($color: #0188d5, $alpha: 0.5);
border-radius: 32.5px;
}
.incorrect {
color: #f83600;
font-weight: 700;
}
}
// 解析样式
.analysis {
visibility: hidden;
width: 95%;
font-family: 'HarmonyOS_Sans_SC_Regular';
font-size: 20px;
color: #ffe2ad;
.question-tips {
font-size: 25px;
width: 100%;
font-family: "FZZY_Regular";
color: #ab7133;
text-align: center;
// padding: 20px;
height: 100px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
padding: 5px;
}
.next-btn{
@include box(234px,65px);
@include bg_pos("qa/next-btn.png");
display: none;
}
.create-btn{
@include box(234px,65px);
@include bg_pos("qa/create-btn.png");
display: none;
}
}
}
.question-gold-icon-1 {
pointer-events: none;
@include pos(135px, 128px, 604px, 773px);
@include bg_pos("qa/gold-icon.png");
}
.question-gold-icon-2 {
pointer-events: none;
@include pos(276px, 241px, -70px, 1089px);
@include bg_pos("qa/gold-icon-2.png");
}
}
}
</style>
.qp-result {
@include pos(100%, 1624px, 0px, 0px);
overflow: hidden;
@include flexCen();
background-color: rgba($color: #000000, $alpha: 0.6);
visibility: hidden;
.qp-result-box {
@include box(569px, 526px);
position: relative;
.qp-result-icon {
@include pos(112px, 112px, 223px, -30px);
@include bg_pos("qa/correct-icon.png");
}
.is-incorrect {
@include bg_pos("qa/incorrect-icon.png");
}
.qp-result-content {
@include pos(569px, 430px, 0px, 95px);
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: center;
.qp-result-text {
@include box(319px, 47px);
text-align: center;
width: 100%;
font-size: 35px;
color: #ffffff;
margin: 20px auto;
}
.text-bg-1 {
@include bg_pos("qa/tips-bg.png");
}
.text-bg-2 {
@include bg_pos("qa/tips-bg-2.png");
}
.qp-tips {
width: 80%;
text-align: center;
font-size: 25px;
color: #ff0000;
}
.qp-tips-text {
width: 100%;
padding: 10px 20px;
font-size: 25px;
line-height: 40px;
text-align: justify;
color: #b3640d;
}
}
}
.qp-result-box-1 {
@include bg_pos("qa/result-box.png");
}
.qp-result-box-0 {
@include bg_pos("qa/result-box-2.png");
}
.next-btn {
@include box(190px, 65px);
border: 1px solid #ffffff;
@include flexCen();
font-size: 35px;
color: #ffffff;
border-radius: 31px;
margin-top: 50px;
}
}
</style>

View File

@@ -2,7 +2,7 @@
import { gsap } from "gsap";
import { debounceTap } from "@/plugins";
import { useMainStore } from "@/store";
import { posterCreate } from "@/plugins";
import { Toast } from "vant";
import QRCode from "qrcode";
import { reactive } from "vue";
@@ -10,372 +10,322 @@ import { reactive } from "vue";
// 页面配置初始化
const emit = defineEmits(["ResultPage"]);
const userStore = useMainStore();
const posterId = ref(userStore.posterId); //海报背景id14
const posterId = ref(userStore.posterId); //海报背景id111
const posterImgList = reactive([
new URL(`../assets/images/result/poster-1.jpg`, import.meta.url).href,
new URL(`../assets/images/result/poster-2.jpg`, import.meta.url).href,
new URL(`../assets/images/result/poster-3.jpg`, import.meta.url).href,
new URL(`../assets/images/result/poster-4.jpg`, import.meta.url).href,
])
console.log("海报id", posterId.value);
const posterImgSrc = new URL(
`../assets/images/result/poster.jpg`,
import.meta.url
).href;
// 生成二维码逻辑
const eqcodePic = ref();
onMounted(() => {
console.log('posterId:',posterId.value);
let eqCodeUrl = import.meta.env.VITE_URL;
QRCode.toDataURL(eqCodeUrl)
.then((url) => {
eqcodePic.value = url;
// console.log("eq", eqcodePic.value);
})
.catch((err) => {
console.error(err);
});
gsap.from(".result-bg", {
duration: 0.7,
scale: 1.2,
autoAlpha: 0,
});
gsap.from(".result-larnten-box", {
duration: 0.7,
scale: 1.4,
autoAlpha: 0,
});
gsap.from(".result-larnten", {
duration: 0.7,
scale: 0.7,
autoAlpha: 0,
});
gsap.from(".result-blessing-1", {
duration: 0.7,
y: -30,
autoAlpha: 0,
delay:0.5
});
gsap.from(".result-blessing-2", {
duration: 0.7,
y: -30,
autoAlpha: 0,
delay:0.7
});
gsap.from(".result-product", {
duration: 0.7,
y: -30,
autoAlpha: 0,
delay:1
});
gsap.from(".result-tips", {
duration: 0.7,
y: -30,
autoAlpha: 0,
delay:1.2
});
gsap.from(".create-poster", {
duration: 0.7,
y: -30,
autoAlpha: 0,
delay:1.4,
onComplete:()=>{
// gsap.to('.result-larnten',{duration:5,transformOrigin:'50% 0%',rotation:'10deg',repeat:-1,yoyo:true,ease:'none'})
let gl = gsap.timeline({repeat:-1,yoyo:true})
gl.to('.result-larnten',{duration:1,transformOrigin:'50% 0%',rotation:'3deg',ease:'none'})
gl.to('.result-larnten',{duration:1,transformOrigin:'50% 0%',rotation:'0deg',ease:'none'})
gl.to('.result-larnten',{duration:1,transformOrigin:'50% 0%',rotation:'-3deg',ease:'none'})
// gsap.fo('.result-larnten',{duration:5,transformOrigin:'50% 0%',rotation:'10deg',repeat:-1,yoyo:true,ease:'none'})
}
});
onMounted(async () => {
// 执行任务队列
await executeTasks();
});
// 生成海报逻辑
const createPoster = (event) => {
let e = event.target;
debounceTap(e, () => {
// 海报生成
posterCreate(
{ width: 750, height: 1334 }, //海报尺寸
// 海报素材,按顺序依次渲染
[
// 背景
{
name: "bg",
src: posterImgList[posterId.value-1],
pos: { w: 750, h: 1334, x: 0, y: 0 },
},
// 二维码
{
name: "eqcode",
src: eqcodePic.value,
pos: { w: 164, h: 164, x: 159, y: 1122 },
},
],
);
// 这是新加的函数封装异步任务
const executeTasks = async () => {
console.log("二维码生成中...");
// gsap.to('.posterPop',{duration:0.5,autoAlpha:1})
});
// 生成二维码
const eqCodeUrl = import.meta.env.VITE_URL;
eqcodePic.value = await QRCode.toDataURL(eqCodeUrl);
console.log("生成海报中...");
if (posterImgSrc && eqcodePic.value) {
posterCreate({ width: 750, height: 2502 }, [
{ name: "bg", src: posterImgSrc, pos: { w: 750, h: 2502, x: 0, y: 0 } },
{
name: "eqcode",
src: eqcodePic.value,
pos: { w: 187, h: 187, x: 527, y: 2227 },
},
]);
} else {
Toast.fail({ message: "生成失败" });
emit("ResultPage", { action: "hide" });
}
};
const showPoster = () => {
gsap.to(".posterPop", {
duration: 0.3,
autoAlpha: 1,
});
gsap.from(".poster-title", {
duration: 0.7,
scale: 0.3,
autoAlpha: 0,
});
gsap.from(".poster-box", {
duration: 0.7,
scale: 0.6,
autoAlpha: 0,
});
gsap.from(".save-tips", {
duration: 0.7,
scale: 0.7,
autoAlpha: 0,
delay: 0.3,
});
gsap.from(".go-draw", {
duration: 0.7,
y: -30,
autoAlpha: 0,
delay: 0.5,
});
gsap.from(".go-share", {
duration: 0.7,
y: -30,
autoAlpha: 0,
delay: 0.7,
});
};
// 去抽奖
const goDraw = (event) => {
let e = event.target;
debounceTap(e, () => {
if (userStore.hasDraw) {
emit("ResultPage", { action: "showDraw" });
} else {
Toast("今日暂无抽奖机会");
}
});
let e = event.target;
debounceTap(e, () => {
if (userStore.hasDraw) {
emit("ResultPage", { action: "showDraw" });
} else {
Toast("今日暂无抽奖机会");
}
});
};
// 隐藏海报弹窗
const hidePop = (event) => {
let e = event.target;
debounceTap(e, () => {
gsap.to(".posterPop", { duration: 0.5, autoAlpha: 0 });
let e = event.target;
debounceTap(e, () => {
gsap.to(".posterPop", {
duration: 0.5,
autoAlpha: 0,
onComplete: () => {
emit("ResultPage", { action: "hide" });
},
});
});
};
const hide = (event) => {
let e = event.target;
debounceTap(e, () => {
gsap.to(".posterPop", {
duration: 0.5,
autoAlpha: 0,
onComplete: () => {
emit("ResultPage", { action: "showQuestion" });
},
});
});
};
// 展示分享
const goShare = (event) => {
let e = event.target;
debounceTap(e, () => {
gsap.to(".sharePop", { duration: 0.5, autoAlpha: 1 });
});
let e = event.target;
debounceTap(e, () => {
gsap.to(".sharePop", { duration: 0.5, autoAlpha: 1 });
});
};
// 隐藏分享提示
const hideShare = () => {
gsap.to(".sharePop", { duration: 0.5, autoAlpha: 0 });
gsap.to(".sharePop", { duration: 0.5, autoAlpha: 0 });
};
// 海报生成
const posterCreate = (option, imageArr) => {
let posterUrl = "";
const { width, height } = option;
Toast.loading({
message: "海报生成中",
duration: 0,
forbidClick: true,
});
let mycanvas = document.createElement("canvas"); // 创建一个canvas画布元素
let ctx = mycanvas.getContext("2d");
mycanvas.style.width = `${width}px`; //设置canvas的宽
mycanvas.style.height = `${height}px`; //设置canvas的高
mycanvas.width = width;
mycanvas.height = height;
//Promise对象加载资源
let loader_p = [];
imageArr.map((item) => {
const _p = new Promise((resolve) => {
const img = new Image();
img.crossOrigin = "Anonymous";
img.onload = () => {
resolve(img);
};
img.src = item.src;
});
loader_p.push(_p);
});
//Promise的.all方法当所有预加载的图像加载好的回调函数
Promise.all(loader_p)
.then((imgList) => {
console.log("imgList", imgList);
// 图片素材遍历绘制
imgList.map((item, index) => {
ctx.drawImage(
item,
imageArr[index].pos.x,
imageArr[index].pos.y,
imageArr[index].pos.w,
imageArr[index].pos.h
); //原生canvas的绘制图片方法直接百度搜索 `js drawImage`查看方法的参数
});
//海报绘制完 ,转成图片对象
return mycanvas.toDataURL("image/jpeg", 1);
})
.then((baseURL) => {
//返回的图片地址就是最后海报的地址可以放在DOM显示
let posterImg = document.querySelector("#posterSrc");
posterImg.src = baseURL;
setTimeout(() => {
// 展示海报
showPoster();
Toast.success({ message: "生成成功!" });
}, 500);
})
.catch((error) => {
console.error("生成海报失败");
gsap.to(".posterPop", {
duration: 0.5,
autoAlpha: 0,
onComplete: () => {
emit("ResultPage", { action: "hide" });
},
});
Toast.fail({ message: "生成失败,请重试!" });
});
// return posterUrl
};
</script>
<template>
<div class="ResultPage" @touchmove.prevent>
<div class="result-bg"></div>
<div class="result-container">
<div class="result-larnten-box" :class="'larnten-box-'+posterId"></div>
<div class="result-larnten" :class="'larnten-'+posterId"></div>
<!-- 新年祝福语 -->
<div class="result-blessing-1" :class="'blessing-'+posterId+'-1'"></div>
<div class="result-blessing-2" :class="'blessing-'+posterId+'-2'"></div>
<!-- 产品 -->
<div class="result-product" :class="'product-'+posterId"></div>
<!-- 提示语 -->
<div class="result-tips"></div>
<!-- 生成海报按钮 -->
<div class="create-poster" @click="createPoster($event)"></div>
<div class="posterPop" @touchmove.prevent>
<div class="poster-bg"></div>
<div class="poster-container">
<div class="poster-title"></div>
<div class="poster-box">
<div class="poster">
<img id="posterSrc" src="" alt="" srcset="" />
</div>
<!-- <div class="poster-cls-btn" @click="hide($event)"></div> -->
</div>
<div class="save-tips">*长按保存海报</div>
<div class="btn-box">
<div class="go-draw" @click="goDraw($event)"></div>
<div class="go-share" @click="goShare($event)"></div>
</div>
</div>
<!-- 海报弹窗 -->
<div class="posterPop" @touchmove.prevent>
<div class="cls-btn-box">
<div class="cls-btn" @click="hidePop($event)"></div>
</div>
<div class="poster-box">
<div class="poster" :class="'poster-'+posterId">
<img id="posterSrc" src="" alt="" srcset="">
</div>
</div>
<div class="save-tips">*长按保存海报</div>
<div class="btn-box">
<div class="go-draw" @click="goDraw($event)"></div>
<div class="go-share" @click="goShare($event)"></div>
</div>
</div>
<!-- 分享提示 -->
<div class="sharePop" @click="hideShare">
<div class="tips-pic"></div>
<div class="tips-text">点击右上角分享给你的好友</div>
</div>
</template>
</div>
<!-- 分享提示 -->
<div class="sharePop" @click="hideShare">
<div class="tips-pic"></div>
<div class="tips-text">点击右上角分享给你的好友</div>
</div>
</template>
<style lang="scss" scoped>
.ResultPage {
@include fixed();
background-color: azure;
.result-bg {
@include pos(750px, 1624px, 0px, 50%);
@include bg_pos("result/bg.jpg");
transform: translateY(-50%);
pointer-events: none;
}
.result-container {
@include pos(750px, 1624px, 0px, 50%);
transform: translateY(-50%);
.larnten-box-1{
@include pos(437px, 809px, 283px, 181px);
@include bg_pos("result/larnten-box-1.png");
}
.larnten-box-2{
@include pos(423px, 790px, 304px, 178px);
@include bg_pos("result/larnten-box-2.png");
}
.larnten-box-3{
@include pos(447px, 807px, 280px, 170px);
@include bg_pos("result/larnten-box-3.png");
}
.larnten-1{
@include pos(397px, 787px, 315px, 297px);
@include bg_pos("result/larnten-1.png");
}
.larnten-2{
@include pos(444px, 771px, 306px, 302px);
@include bg_pos("result/larnten-2.png");
}
.larnten-3{
@include pos(472px, 789px, 278px, 285px);
@include bg_pos("result/larnten-3.png");
}
.blessing-1-1{
@include pos(86px, 565px, 70px, 347px);
@include bg_pos("result/blessing-text-1-1.png");
}
.blessing-1-2{
@include pos(82px, 561px, 165px, 347px);
@include bg_pos("result/blessing-text-1-2.png");
}
.blessing-2-1{
@include pos(86px, 563px, 70px, 347px);
@include bg_pos("result/blessing-text-2-1.png");
}
.blessing-2-2{
@include pos(88px, 565px, 165px, 347px);
@include bg_pos("result/blessing-text-2-2.png");
}
.blessing-3-1{
@include pos(86px, 568px, 70px, 347px);
@include bg_pos("result/blessing-text-3-1.png");
}
.blessing-3-2{
@include pos(87px, 563px, 165px, 347px);
@include bg_pos("result/blessing-text-3-2.png");
}
.result-product{
@include pos(619px, 138px, 65px, 1015px);
}
.product-1{
@include bg_pos("result/product-1.png");
}
.product-2{
@include bg_pos("result/product-2.png");
}
.product-3{
@include bg_pos("result/product-3.png");
}
.result-tips{
@include pos(645px, 71px, 52px, 1183px);
@include bg_pos("result/text.png");
}
.create-poster{
@include pos(237px, 80px, 257px, 1284px);
@include bg_pos("result/create-btn.png");
}
}
}
.posterPop {
@include fixed();
@include pos(100%, 1624px, 0px, 0px);
overflow: hidden;
background: linear-gradient(135deg, #d6d1ca, #e5dccf);
visibility: hidden;
.poster-bg {
@include pos(750px, 1624px, 0px, 0px);
// transform: translateY(-50%);
@include bg_pos("index/bg.jpg");
}
.poster-container {
@include pos(750px, 1624px, 0px, 0px);
@include flexCen();
background-color: rgba($color: #000000, $alpha: 0.6);
visibility: hidden;
background-color: rgba($color: #000000, $alpha: 0.3);
.cls-btn-box {
width: 617px;
display: flex;
justify-content: flex-end;
.cls-btn {
@include box(49px, 49px);
@include bg_pos("result/cls-btn.png");
margin-right: -20px;
}
.poster-title {
@include box(592px, 156px);
@include bg_pos("index/title.png");
}
.save-tips {
font-size: 20px;
line-height: 20px;
margin-top: 20px;
color: #fff;
letter-spacing: 2px;
font-size: 20px;
line-height: 20px;
color: #ffffff;
letter-spacing: 2px;
}
.poster-box {
@include box(617px, 881px);
margin-top: 20px;
overflow: hidden;
@include box(720px, 882px);
margin-top: 20px;
overflow: hidden;
position: relative;
.poster {
@include box(100%, 100%);
overflow: hidden;
#posterSrc{
@include box(100%, 100%);
opacity: 0;
}
}
.poster-1{
@include bg_pos("result/preveiw-1.png");
}
.poster-2{
@include bg_pos("result/preveiw-2.png");
}
.poster-3{
@include bg_pos("result/preveiw-3.png");
.poster-cls-btn {
@include pos(53px, 53px, 660px, 10px);
@include bg_pos("result/cls-btn.png");
}
.poster {
@include box(100%, 100%);
overflow: hidden;
@include bg_pos("result/card.png");
#posterSrc {
@include box(100%, 100%);
opacity: 0;
}
}
}
.btn-box {
@include box(489px, 76px);
display: flex;
justify-content: space-between;
margin-top: 20px;
@include box(550px, 91px);
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 20px;
.go-draw {
@include box(226px, 76px);
@include bg_pos("result/go-draw-btn.png");
}
.go-draw {
@include box(243px, 91px);
@include bg_pos("result/go-draw-btn.png");
}
.go-share {
@include box(226px, 76px);
@include bg_pos("result/go-share-btn.png");
}
.go-share {
@include box(243px, 91px);
@include bg_pos("result/go-share-btn.png");
}
}
}
}
.sharePop {
@include fixed();
background-color: rgba($color: #000000, $alpha: 0.54);
visibility: hidden;
@include fixed();
background-color: rgba($color: #000000, $alpha: 0.54);
visibility: hidden;
.tips-pic {
@include pos(100px, 100px, 600px, 100px);
@include bg_pos("result/share-tips.svg");
stroke: #ffffff;
}
.tips-pic {
@include pos(100px, 100px, 600px, 180px);
@include bg_pos("result/share-tips.svg");
stroke: #ffffff;
}
.tips-text {
font-size: 25px;
@include pos(750px, 100px, 0px, 220px);
color: #ffffff;
text-align: right;
}
.tips-text {
font-size: 25px;
@include pos(750px, 100px, 0px, 300px);
color: #ffffff;
text-align: right;
}
}
</style>
</style>

View File

@@ -17,11 +17,11 @@ let scroll = ref()
onMounted(() => {
let wrapper = document.querySelector('.wrapper')
scroll.value = new BScroll(wrapper)
scroll.value = new BScroll(wrapper)
gsap.from(".RulePage", { duration: 0.2, autoAlpha: 0 });
gsap.from(".rule-container", { duration: 0.5, autoAlpha: 0, scale: 0.7 });
gsap.to(".rule-arrow", { duration: 2.5, y: 10,repeat:-1,yoyo:true });
gsap.to(".rule-arrow", { duration: 2.5, y: 10, repeat: -1, yoyo: true });
});
</script>
@@ -32,53 +32,53 @@ onMounted(() => {
<div class="rule-content">
<div class="rule-text-area wrapper">
<div>
<div class="part">
<div>活动时间20242月23225</div>
<div>活动奖励微信红包</div>
</div>
<div class="part">
<div>活动攻略</div>
<div>
1猜灯谜闹元宵活动共设计3道题目全部选择完毕后即可获取测试结果参与抽奖活动
<div class="part">
<div>活动时间20255月29531</div>
<div>活动奖励微信红包</div>
</div>
<div>2活动期间不限制参与测试次数每人每日有1次抽奖机会</div>
</div>
<div class="part">
<div>领奖说明</div>
<div>
1中奖后在中奖页面复制兑换码前往<span class="blod">[平安理财服务号]</span>消息框输入元宵快乐获取兑换链接进入链接输入兑换码兑换奖品如关闭了中奖界面可在首页-[我的奖品] 内查看兑换码
<div class="part">
<div>活动攻略</div>
<div>
1龙舟争渡 稳健为先端午赛龙舟中的投资哲学活动共设计4道题目首页进入后点击进行答题全部答对即可获取专属赛龙舟海报并参与抽奖答错时刷新即可重新回答本题
</div>
<div>2活动期间不限制参与答题次数每人每日有1次抽奖机会</div>
</div>
<div>2成功领奖后奖品将会在24小时内自动到账请耐心等候</div>
<div>3中奖人请在活动结束前进行兑换逾期视为弃权</div>
<div class="part">其他</div>
<div>
<div class="part">
<div>领奖说明</div>
<div>
1中奖后在中奖页面复制兑换码前往<span
class="blod">[平安理财服务号]</span>消息框输入端午安康获取兑换链接进入链接输入兑换码兑换奖品如关闭了中奖界面可在首页-[我的奖品]
内查看兑换码
</div>
<div>2成功领奖后奖品将会在24小时内自动到账请耐心等候</div>
<div>3中奖人请在活动结束前进行兑换逾期视为弃权</div>
</div>
<div class="part">
<div>其他</div>
活动期间如遇到任何问题请在<span class="blod">[平安理财服务号]</span>后台咨询我们会在一个工作日内回复
<div>说明平安理财有权对活动规则进行解释</div>
</div>
<div class="part">说明平安理财有权对活动规则进行解释</div>
<div class="part">
<div>活动说明</div>
<div>
1本活动由平安理财有限责任公司主办为保证活动的公平公正活动结束后主办方将对中奖用户信息进行核对用户若有下列任何一种行为或情况的主办方有权不经另行通知取消其参与活动以及获奖资格收回奖品权益并保留追究其法律责任的权利
</div>
<div>
(2)以任何机器人软件蜘蛛软件爬虫软件刷奖软件或其它任何自动方式不正当手段等参与本活动;同一用户(包含相同手机号相同收货信息相同移动设备号相同IP地址等单日内恶意切换微信账号参加活动扰乱正常抽奖秩序影响活动公平性的
</div>
<div>
(3)有任何违反法律法规诚实信用公序良俗公平公正平安理财平台规则等行为
</div>
<div>
(4)平安理财保留调整暂停和终止本活动的权利并经公告后生效
</div>
<div>
(5)用户参与本活动即视为理解并同意本活动细则在法律法规及监管规定的范围内平安理财有权对活动规则进行解释并根据活动实际情况对本活动的规则进行变动或调整相关变动或调整将公布在规则页面并于公布时即时生效
</div>
</div>
<div class="margin-bottom-area"></div>
</div>
<div class="part">
<div>活动规则</div>
<div>
1本活动由平安理财有限责任公司主办为保证活动的公平公正活动结束后主办方将对中奖用户信息进行核对用户若有下列任何一种行为或情况的主办方有权不经另行通知取消其参与活动以及获奖资格收回奖品权益井保留追究其法律责任的权利:
</div>
<div>
(1) 以任何机器人软件蜘蛛软件爬虫软件刷奖软件或其它任何自动方式不正当手段等参与本活动
</div>
<div>
(2) 同一用户(包含相同手机号相同收货信息相同移动设备号相同IP地址等) 单日内恶意切换微信账号参加活动扰乱正常抽奖秩序影响活动公平性的;
</div>
<div>
(3) 有任何违反法律法规诚实信用公序良俗公平公正平安理财平台规则等行为;
</div>
<div>
2平安理财保留调整暂停和终止本活动的权利并经公告后生效;
</div>
<div>
3用户参与本活动即视为理解并同意本活动细则在法律规定的范围内平安理财有权对活动规则进行解释并根据活动实际情况对本活动的规则进行变动或调整相关变动或调整将公布在规则页面并于公布时即时生效
</div>
</div>
<div class="margin-bottom-area"></div>
</div>
</div>
</div>
<div class="rule-bottom-bg"></div>
@@ -88,35 +88,35 @@ onMounted(() => {
</div>
<div class="rule-cls-btn" @click="hide($event)"></div>
</div>
</template>
</template>
<style lang="scss" scoped>
.RulePage {
@include fixed();
@include flexCen();
background-color: rgba($color: #000000, $alpha: 0.7);
background-color: rgba($color: #000000, $alpha: 0.3);
.rule-container {
position: relative;
@include box(612px, 794px);
@include box(708px, 880px);
overflow: hidden;
.content {
.rule-content {
@include box(612px, 794px);
@include box(708px, 880px);
@include bg_pos("rule/rule-box.png");
position: relative;
overflow: hidden;
.rule-text-area {
@include pos(612px, 676px, 0px, 101px);
@include pos(635px, 709px, 25px, 83px);
overflow: hidden;
// overflow-y: scroll;
padding: 0px 20px;
.part {
color: #a31b15;
color: #a74f00;
font-size: 20px;
line-height: 35px;
margin-top: 30px;
@@ -125,12 +125,12 @@ onMounted(() => {
font-family: 'HarmonyOS_Sans_SC_Regular';
}
.blod{
.blod {
font-weight: 700;
color: #6c0500;
color: #a74f00;
}
.margin-bottom-area{
.margin-bottom-area {
// margin-bottom: 100px;
height: 100px;
}
@@ -138,30 +138,32 @@ onMounted(() => {
}
.rule-arrow {
@include pos(149px, 84px, 231px, 682px);
@include pos(161px, 102px, 262px, 682px);
@include bg_pos("rule/arrow.png");
pointer-events: none;
}
.rule-bottom-bg {
// visibility: hidden;
@include pos(588px, 102px, 12px, 682px);
pointer-events: none;
background-image: -webkit-linear-gradient( 90deg, rgba(255,238,186,0.7) , rgba(255, 255, 255, 0.1) 100%);
// @include pos(685px, 102px, 0px, 712px);
// border-radius: 10px;
// pointer-events: none;
// background-image: -webkit-linear-gradient(90deg, rgba(255, 238, 186, 0.7), rgba(255, 255, 255, 0.1) 100%);
}
.rule-icon {
@include pos(118px, 146px, 511px, 25px);
@include pos(121px, 104px, 501px, 25px);
@include bg_pos("rule/icon.png");
pointer-events: none;
}
}
}
.rule-cls-btn {
@include box(43px, 43px);
@include box(49px, 49px);
@include bg_pos("rule/cls-btn.png");
margin-top: 40px;
margin-top: 0px;
}
}
</style>

View File

@@ -1,98 +1,68 @@
const load = [
'load/icon.png',
'load/bg.jpg',
]
"load/icon.png",
"music-on.png",
"music-off.png",
"share.jpg",
"orientation-icon.png",
];
const page = [
"index/title.png",
"index/time.png",
"index/btn.png",
"index/logo.png",
"index/bg.jpg",
'index/prize-btn.png',
'index/cloud.png',
'index/firework.png',
'index/rule-btn.png',
'index/start-btn.png',
'index/fan-3.png',
'index/title.png',
'index/fan-4.png',
'index/pet-icon.png',
'index/fan-2.png',
'index/fan-1.png',
'index/windows.png',
'index/bottom-bg.png',
'index/bg.jpg',
"prize/tips.png",
"prize/star.png",
"prize/myPrize-box2.png",
"prize/no-prize.png",
"prize/light.png",
"prize/myPrize-box.png",
"prize/draw-text.png",
"prize/cls-btn.png",
"prize/copy-btn.png",
"prize/draw-box.png",
'prize/tips.png',
'prize/cls-btn.png',
'prize/copy-btn.png',
'prize/draw-text.png',
'prize/light.png',
'prize/draw-box.png',
'prize/myPrize-box.png',
'prize/no-prize.png',
'prize/star.png',
"qa/text-bg.png",
"qa/result-box.png",
"qa/incorrect.png",
"qa/paper.png",
"qa/incorrect-icon.png",
"qa/correct-icon.png",
"qa/correct.png",
"qa/result-box-2.png",
"qa/tips-bg.png",
"qa/tips-bg-2.png",
'qa/correct.png',
'qa/gold-icon.png',
'qa/incorrect.png',
'qa/gold-icon-2.png',
'qa/next-btn.png',
'qa/create-btn.png',
'qa/lantern-icon.png',
'qa/question-box.png',
'qa/bottom-bg.png',
'qa/bg.jpg',
"result/poster.jpg",
"result/card.png",
"result/cls-btn.png",
"result/go-draw-btn.png",
"result/go-share-btn.png",
"result/bg.jpg",
'result/tips.png',
'result/product-3.png',
'result/share-tips.svg',
'result/text.png',
'result/larnten-box-1.png',
'result/larnten-box-2.png',
'result/larnten-box-3.png',
'result/poster-1.jpg',
'result/poster-2.jpg',
'result/poster-3.jpg',
'result/preveiw-1.png',
'result/preveiw-2.png',
'result/preveiw-3.png',
'result/product-1.png',
'result/product-2.png',
'result/blessing-text-1-1.png',
'result/blessing-text-1-2.png',
'result/blessing-text-2-1.png',
'result/blessing-text-2-2.png',
'result/blessing-text-3-1.png',
'result/blessing-text-3-2.png',
'result/cls-btn.png',
'result/create-btn.png',
'result/go-draw-btn.png',
'result/go-share-btn.png',
'result/larnten-1.png',
'result/larnten-2.png',
'result/larnten-3.png',
'result/bg.jpg',
'rule/arrow.png',
'rule/cls-btn.png',
'rule/icon.png',
'rule/rule-box.png',
]
"rule/rule-box.png",
"rule/arrow.png",
"rule/cls-btn.png",
"rule/icon.png",
];
// 处理为vite引入图片格式
function imgCreate(url, img) {
let i = new URL(`../assets/images/${url}`, import.meta.url).href
img.push(i)
let i = new URL(`../assets/images/${url}`, import.meta.url).href;
img.push(i);
}
const loadImg = [];
const pageImg = [];
const loadImg = []
const pageImg = []
load.forEach(element => {
imgCreate(element, loadImg)
load.forEach((element) => {
imgCreate(element, loadImg);
});
page.forEach(element => {
imgCreate(element, pageImg)
page.forEach((element) => {
imgCreate(element, pageImg);
});
export { loadImg, pageImg }
export { loadImg, pageImg };

View File

@@ -1,73 +1,78 @@
export const data = [
{
id: 1,
question: [
'兄弟好多个,个个都爱赢',
'目标很合适,止盈有方法',
],
answer: [
{
aid: 'A',
text: [
'灵活策略目标盈',
],
result:'correct',
},
{
aid: 'B',
text: [
'灵活策略目标强',
],
result:'incorrect',
},
],
},
{
id: 2,
question: [
'固收旗舰团,兄弟有志气',
'三个金牛奖,开启财富门',
],
answer: [
{
aid: 'A',
text: [
'启航',
],
result:'correct',
},
{
aid: 'B',
text: [
'远航',
],
result:'incorrect',
},
],
analysis: ['截止2024年2月19日启航','系列历史到期正收益概率100%']
},
{
id: 3,
question: [
'兄弟好多个,口碑都很好',
'考试常满分,稳重不轻浮',
],
answer: [
{
aid: 'A',
text: [
'稳健精选(封闭型)',
],
result:'correct',
},
{
aid: 'B',
text: [
'稳妥精选',
],
result:'incorrect',
},
],
analysis: ['截止2024年2月19日稳健精选系列封闭型','历史到期业绩基准达标率100%']
},
]
{
id: 1,
question: [
"赛龙舟时,鼓手用节奏统一行动,舵手把控方向,划手齐心发力,三者缺一不可。这体现了哪种投资模式?",
],
answer: [
{
aid: "A",
text: "平台化高效协作投资模式,集体智慧",
result: 1,
},
{
aid: "B",
text: "明星基金经理的单打独斗,个人英雄主义",
result: 0,
},
],
tips: [`平安理财采取平台化、模块化的投资模式,通过团队作战能更好协调更优势、更广泛的资源,并最终为客户创造可持续的投资收益,截至 2025 年 5月15日已累计为 1700 万名客户创造1092亿元投资收益。`],
},
{
id: 2,
question: [
"赛龙舟经常会遇上河道弯曲或河流湍急,常常出现翻船风险,为了确保顺利抵达终点,在拐弯及面对急流时所使用的技巧与投资中的哪种情况相符?",
],
answer: [
{
aid: "A",
text: "追求单车变摩托,冒险前进,重仓搏一把",
result: 0,
},
{
aid: "B",
text: "坚持绝对收益目标,严格风险控制,稳健为先",
result: 1,
},
],
tips: [`稳健是资产长期增值的关键平安理财坚持以绝对收益为目标截至2025年5月15日旗下定开/封闭式多个产品线实现历史到期兑付100%正收益(如启航系列、稳健精选系列、启元系列、新安鑫系列、卓越成长系列、卓越稳健系列等)。`],
},
{
id: 3,
question: [
"赛龙舟中,队伍需在发令枪响的瞬间同步起桨,冲刺阶段更需高频划桨。这与下列哪种投资策略相符?",
],
answer: [
{
aid: "A",
text: "精准把握市场机会,适当追求超额收益",
result: 1,
},
{
aid: "B",
text: "一旦配置长期不动,顺其自然随遇而安",
result: 0,
},
],
tips: [`稳健为先的前提下平安理财通过多资产、多策略的能力优势在低利率时代中力争为投资者创造相对不错的超额收益。如鑫享全球动量策略日开180天持有1号A今年以来年`],
},
{
id: 4,
question: [
"赛龙舟通常500米但有一种达到了30公里号称龙舟马拉松。如果说500米赛龙舟对应的是投资中短期主义那么龙舟马拉松对应的是哪种情怀",
],
answer: [
{
aid: "A",
text: "投机主义,左右摇摆或见风使舵",
result: 0,
},
{
aid: "B",
text: "长期主义精神,坚持长期稳健经营理念",
result: 1,
},
],
tips: [`行稳方能致远。长期主义是以长远视角进行决策和行动的价值观,其核心在于追求可持续的价值增长,而非短期利益的最大化。这是平安理财自成立以来一直坚持的投资和经营理念。`],
},
];

View File

@@ -1,12 +1,25 @@
<template>
<div class="home" @click.once="playMusic">
<Index v-if="showIndex" @IndexPage="indexFn"></Index>
<Question v-if="showQuestion" @QuestionPage="questionFn"></Question>
<Result v-if="showResult" @ResultPage="resultFn"></Result>
<MyPrize v-if="showMyPrize" @MyPrizePage="myPrizeFn"></MyPrize>
<Draw v-if="showDraw" @DrawPage="drawFn"></Draw>
<Rule v-if="showRule" @RulePage="ruleFn"></Rule>
<Loading v-if="showLoad" @LoadPage="loadFn"></Loading>
<div class="home" @click.once="firstClick">
<div class="home-container">
<Index v-if="showIndex" @IndexPage="indexFn"></Index>
<Question v-if="showQuestion" @QuestionPage="questionFn"></Question>
<Result v-if="showResult" @ResultPage="resultFn"></Result>
<MyPrize v-if="showMyPrize" @MyPrizePage="myPrizeFn"></MyPrize>
<Draw v-if="showDraw" @DrawPage="drawFn"></Draw>
<Rule v-if="showRule" @RulePage="ruleFn"></Rule>
<Loading v-if="showLoad" @LoadPage="loadFn"></Loading>
<!-- 音乐图标 -->
<div class="music_icon" @click="musicPlay">
<audio
style="display: none; height: 0"
id="bg-music"
autoplay="autoplay"
preload="auto"
:src="musicUrl"
loop="loop"
></audio>
</div>
</div>
</div>
</template>
@@ -19,19 +32,15 @@ import MyPrize from "@/components/MyPrize";
import Draw from "@/components/Draw";
import Result from "@/components/Result";
import Rule from "@/components/Rule";
import {
createBGM,
getQueryString,
screenOrientation,
isAndriod,
fontAdpat,
} from "@/plugins";
import { getQueryString, screenOrientation, fontAdpat } from "@/plugins";
import { authorize, getUserInfo } from "@/api";
import { Toast } from "vant";
import { useMainStore } from "@/store";
const userStore = useMainStore();
const musicUrl = new URL(`@/assets/media/bgm.mp3`, import.meta.url).href;
const showLoad = ref(false);
const loadFn = (item) => {
if (item.action == "hide") {
@@ -87,7 +96,9 @@ const showResult = ref(false);
const resultFn = (item) => {
if (item.action == "hide") {
showResult.value = false;
console.log("hide", showResult.value);
}
if (item.action == "showDraw") {
showDraw.value = true;
}
@@ -107,34 +118,18 @@ onMounted(() => {
let code = getQueryString("code");
let url = import.meta.env.VITE_URL;
let dev = import.meta.env.VITE_MODE;
// let dev = import.meta.env.VITE_MODE;
let dev = "dev";
if (dev != "dev") {
if (code) {
getUserInfo({ code: code }).then((res) => {
if (res.code == 0) {
console.log("我的信息:", res.data);
userStore.updateToken(res.data);
createBGM();
// 开始加载组件
showLoad.value = true;
// ios自动播放音乐
document.addEventListener("DOMContentLoaded", function () {
function audioAutoPlay() {
var audio = document.getElementById("musicBtn");
audio.play();
document.addEventListener(
"WeixinJSBridgeReady",
function () {
WeixinJSBridge.invoke("getNetworkType", {}, function (e) {
audio.play();
});
},
false
);
}
audioAutoPlay();
});
iosMusic(); //自动播放音乐
gsap.set(".music_icon", { autoAlpha: 1 });
return;
} else {
authorize({ scopeType: 1, redirectUri: url }).then((res) => {
@@ -210,29 +205,93 @@ onMounted(() => {
}
} else {
showLoad.value = true;
createBGM();
iosMusic(); //自动播放音乐
gsap.set(".music_icon", { autoAlpha: 1 });
}
});
const playMusic = () => {
var audioEle = document.getElementById("audio");
audioEle.play();
// ios端音乐自动播放
const iosMusic = () => {
// ios自动播放音乐
document.addEventListener("DOMContentLoaded", function () {
function audioAutoPlay() {
var audio = document.getElementById("bg-music");
audio.play();
document.addEventListener(
"WeixinJSBridgeReady",
function () {
WeixinJSBridge.invoke("getNetworkType", {}, function (e) {
audio.play();
});
},
false
);
}
audioAutoPlay();
});
musicBtnAni.fromTo(
".music_icon",
{ rotation: "0" },
{ rotation: "+=360", repeat: -1, duration: 7, ease: "none" }
);
musicBtnAni.play();
};
// 音乐播放
const musicBtnAni = gsap.timeline();
const playStatu = ref(true);
const musicPlay = () => {
let audio = document.getElementById("bg-music");
if (playStatu.value == true) {
musicBtnAni.pause();
audio.pause();
playStatu.value = false;
console.log("暂停");
} else {
musicBtnAni.play();
audio.play();
playStatu.value = true;
console.log("播放");
}
};
const firstClick = () => {
let audio = document.getElementById("bg-music");
musicBtnAni.play();
audio.play();
playStatu.value = true;
console.log("播放");
};
</script>
<style lang="scss" >
<style lang="scss">
#app {
overflow: hidden;
background: linear-gradient(135deg, #a11b15, #f80c00);
background: linear-gradient(135deg, #d6d1ca, #e5dccf);
// font-family: "FZZY_Regular";
}
#__vconsole {
visibility: hidden;
}
#musicBtn {
@include pos(60px, 60px, 50px, 35px);
.music_icon {
@include pos(60px, 60px, 20px, 305px);
@include bg_pos("music-on.png");
z-index: 99;
visibility: hidden;
}
.home {
@include pos(100%, 100vh, 0px, 0px);
overflow: hidden;
.home-container {
@include pos(750px, 1624px, 0px, 50%);
transform: translateY(-50%);
}
}
// 音乐-on样式
@@ -245,12 +304,6 @@ const playMusic = () => {
@include bg_pos("music-off.png");
}
.home {
@include box(750px, 100vh);
overflow: hidden;
margin: 0 auto;
}
.orientationPop {
@include fixed();
@include flexCen();

View File

@@ -19,8 +19,8 @@ app.config.globalProperties.imgUrl = (url) => {
// 微信分享配置
wxShare({
title: '欢乐猜灯谜,喜庆闹元宵',
desc: '猜灯谜、赏花灯,金龙贺岁过“龘”年',
title: '龙舟争渡 稳健为先',
desc: '端午赛龙舟中的投资哲学',
})
// 测试环境开vconsole

Some files were not shown because too many files have changed in this diff Show More