update
This commit is contained in:
@@ -119,21 +119,21 @@ watch(() => props.show, async (newVal) => {
|
||||
shakeTimeline.play()
|
||||
|
||||
//TODO: 延时测试,上限删掉
|
||||
await Sleep(2000)
|
||||
// await Sleep(2000)
|
||||
|
||||
shakeTimeline.pause()
|
||||
// const lottteryResult = await Request("lottery/draw", { pool: 'game', consume_type: 'points' })
|
||||
const lottteryResult = await Request("lottery/draw", { pool: 'game', consume_type: 'points' })
|
||||
// TODO: 测试数据
|
||||
const lottteryResult = {
|
||||
res: { status: 200 },
|
||||
json: {
|
||||
id: 0,
|
||||
code: "HEIGAI_42_GPJ_500ML",
|
||||
prize_code: 'HEIGAI_42_GPJ_500ML',
|
||||
coupon_type: "scene",
|
||||
name: "泸州老窖的一瓶酒"
|
||||
}
|
||||
}
|
||||
// const lottteryResult = {
|
||||
// res: { status: 200 },
|
||||
// json: {
|
||||
// id: 0,
|
||||
// code: "HEIGAI_42_GPJ_500ML",
|
||||
// prize_code: 'HEIGAI_42_GPJ_500ML',
|
||||
// coupon_type: "scene",
|
||||
// name: "泸州老窖的一瓶酒"
|
||||
// }
|
||||
// }
|
||||
|
||||
if (lottteryResult.res.status !== 200) {
|
||||
emit('close')
|
||||
|
||||
@@ -77,7 +77,8 @@ let mergeId = '';
|
||||
// 切换边框状态
|
||||
const toggleBorder = (item, index) => {
|
||||
activeBorders.value = activeBorders.value.map(() => false);
|
||||
|
||||
// 如果没有打榜,点击切换图片时,把当前背景图赋值给globalStore.result_url做为最新的背景图
|
||||
globalStore.result_url = item.result_url;
|
||||
activeBorders.value[index] = true;
|
||||
mergeId = item.id;
|
||||
};
|
||||
@@ -95,6 +96,7 @@ const handleDabangClick = () => {
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
ElMessage.success('打榜成功!');
|
||||
displayZhuli.value = true;
|
||||
console.log('Success:', data);
|
||||
globalStore.chartsBattle = true;
|
||||
return { success: true, data };
|
||||
|
||||
@@ -9,7 +9,6 @@ import Haibao from "@/libs/haibao";
|
||||
import mask from "../assets/images/haibao-mask.png";
|
||||
import haibaoCoverBorder from "../assets/images/haibao-cover.png";
|
||||
import bg from "../assets/images/haibao-bg.png"
|
||||
import userPicture from "../assets/images/home-bg.png"; //TODO: globalStore.result_url 这里得图片后面要换成用户参榜的图片
|
||||
|
||||
defineProps({
|
||||
show: true
|
||||
@@ -101,14 +100,14 @@ const handleHaibao = async () => {
|
||||
})
|
||||
})
|
||||
}
|
||||
let userPictureVal = userPicture;
|
||||
const getBackgroundImage = () => {
|
||||
if (globalStore.result_url) {
|
||||
return userPictureVal = globalStore.result_url;
|
||||
} else {
|
||||
return userPictureVal;
|
||||
}
|
||||
};
|
||||
// let userPictureVal = userPicture;
|
||||
// const getBackgroundImage = () => {
|
||||
// if (globalStore.result_url) {
|
||||
// return userPictureVal = globalStore.result_url;
|
||||
// } else {
|
||||
// return userPictureVal;
|
||||
// }
|
||||
// };
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -173,7 +172,7 @@ const getBackgroundImage = () => {
|
||||
|
||||
.fullsection {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
top: 25vw;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
@@ -185,6 +184,7 @@ const getBackgroundImage = () => {
|
||||
|
||||
.haibao {
|
||||
position: relative;
|
||||
top: -25vw;
|
||||
width: 70vw;
|
||||
height: 119.444444vw;
|
||||
background-image: url("../assets/images/haibao-cover.webp");
|
||||
|
||||
Reference in New Issue
Block a user