update
This commit is contained in:
@@ -31,6 +31,34 @@ const lotteryShow = ref(false)
|
|||||||
const lotteryType = ref("draw")
|
const lotteryType = ref("draw")
|
||||||
const lotteryNoticeData = ref(null)
|
const lotteryNoticeData = ref(null)
|
||||||
|
|
||||||
|
//分享进来
|
||||||
|
const fromShare = async () => {
|
||||||
|
const fromId = getParam("fromid")
|
||||||
|
if (!fromId) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const userinfos = Storage.get("userinfos")
|
||||||
|
if (fromId === userinfos.invite_code) {
|
||||||
|
weui.alert("不能接受自己的邀请哦~")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const inviteInfos = await Request("invite/info", { invite_code: fromId, type: "mapai" }, "GET")
|
||||||
|
if (inviteInfos.res.status == 200) {
|
||||||
|
const isHelp = inviteInfos.json.helps.find(v => v.id === inviteInfos.json.id)
|
||||||
|
console.log(isHelp)
|
||||||
|
if (!isHelp) {
|
||||||
|
const result = await Request("invite/help", { invite_code: fromId, type: "mapai" })
|
||||||
|
if (result.res.status == 200) {
|
||||||
|
weui.alert("受邀成功!")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
weui.alert("您已接受过其他好友邀请,每人只能受邀一次哦~")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 初始化全局音频实例
|
// 初始化全局音频实例
|
||||||
const initGlobalAudio = () => {
|
const initGlobalAudio = () => {
|
||||||
if (!globalStore.globalAudio) {
|
if (!globalStore.globalAudio) {
|
||||||
@@ -289,20 +317,20 @@ const initUserGameInfos = async (refresh_official, refresh_cap_scan) => {
|
|||||||
globalToastEvent.emit(ToastType.MOUNTED)
|
globalToastEvent.emit(ToastType.MOUNTED)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const getNotice = async () => {
|
// const getNotice = async () => {
|
||||||
const result = await Request('notice/latest', {}, "GET")
|
// const result = await Request('notice/latest', {}, "GET")
|
||||||
if (result?.json?.notification) {
|
// if (result?.json?.notification) {
|
||||||
lotteryType.value = 'notice'
|
// lotteryType.value = 'notice'
|
||||||
lotteryNoticeData.value = result.json.notification
|
// lotteryNoticeData.value = result.json.notification
|
||||||
lotteryShow.value = true
|
// lotteryShow.value = true
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
const handleLoginSuccess = async () => {
|
const handleLoginSuccess = async () => {
|
||||||
console.log("已登录")
|
console.log("已登录")
|
||||||
loginShow.value = false
|
loginShow.value = false
|
||||||
|
await fromShare()
|
||||||
// await initUserGameInfos(true, true)
|
// await initUserGameInfos(true, true)
|
||||||
await getNotice()
|
// await getNotice()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLogin()) {
|
if (isLogin()) {
|
||||||
@@ -347,10 +375,6 @@ globalToastEvent.on(ToastType.SHOW_SWIPER, () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const ruleShow = ref(false)
|
const ruleShow = ref(false)
|
||||||
globalToastEvent.on(ToastType.SHOW_RULE, () => {
|
globalToastEvent.on(ToastType.SHOW_RULE, () => {
|
||||||
ruleShow.value = true
|
ruleShow.value = true
|
||||||
@@ -367,6 +391,9 @@ const getUserLottery = async () => {
|
|||||||
const result = await Request("lottery", { pool: "all" }, "GET")
|
const result = await Request("lottery", { pool: "all" }, "GET")
|
||||||
if (result.res.status === 200) {
|
if (result.res.status === 200) {
|
||||||
prizelist.value = result.json.lottery_logs.length > 0 ? result.json.lottery_logs : []
|
prizelist.value = result.json.lottery_logs.length > 0 ? result.json.lottery_logs : []
|
||||||
|
if(prizelist.value.length===0){
|
||||||
|
weui.alert("您还没有中奖")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//TODO 上线换成上面的
|
//TODO 上线换成上面的
|
||||||
// prizelist.value = [
|
// prizelist.value = [
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
<div class="lottery-card" ref="cardRef">
|
<div class="lottery-card" ref="cardRef">
|
||||||
<div class="lottery-prize" :style="prizeBackgroundImg">
|
<div class="lottery-prize" :style="prizeBackgroundImg">
|
||||||
<div class="lottery-layer" ref="layerRef">
|
<div class="lottery-layer" ref="layerRef">
|
||||||
<<<<<<< Updated upstream
|
|
||||||
|
|
||||||
|
|
||||||
<div class="lottery-mask-image" ref="maskBgRef" >
|
<div class="lottery-mask-image" ref="maskBgRef" >
|
||||||
@@ -25,27 +24,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
=======
|
|
||||||
<!-- 底层:中奖图片(被遮罩层盖住,主要用于语义与对齐) -->
|
|
||||||
<div class="lottery-image" :class="'USER_' + activePrizeData.prize_code" ></div>
|
|
||||||
|
|
||||||
<!-- 中层:遮罩层背景(默认完全遮住中奖图) -->
|
|
||||||
<div class="lottery-mask-image" ref="maskBgRef" ></div>
|
|
||||||
|
|
||||||
<!-- 顶层:通过 mask-img.png 显示中奖图片的一小块,并自动放大揭晓 -->
|
|
||||||
<div
|
|
||||||
class="lottery-reveal lottery-image"
|
|
||||||
ref="revealRef"
|
|
||||||
v-show="activePrizeData.prize_code !== 'NO'"
|
|
||||||
></div>
|
|
||||||
|
|
||||||
<!-- 可视化的 mask(否则用户看不到 mask-img.png 本身) -->
|
|
||||||
<!-- <div
|
|
||||||
class="lottery-mask-visual"
|
|
||||||
:class="revealDone ? 'reveal-done' : ''"
|
|
||||||
v-show="activePrizeData.prize_code !== 'NO'"
|
|
||||||
></div> -->
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="lottery-title-no"
|
class="lottery-title-no"
|
||||||
@@ -64,7 +42,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</ModalTransition>
|
</ModalTransition>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -401,11 +378,7 @@ onUnmounted(() => {
|
|||||||
z-index: 3;
|
z-index: 3;
|
||||||
|
|
||||||
/* CSS Mask(WebKit + 标准) */
|
/* CSS Mask(WebKit + 标准) */
|
||||||
<<<<<<< Updated upstream
|
|
||||||
-webkit-mask-image: url("../assets/images/new/mask-img.webp");
|
-webkit-mask-image: url("../assets/images/new/mask-img.webp");
|
||||||
=======
|
|
||||||
-webkit-mask-image: url("../assets/images/new/mask-img.png");
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
-webkit-mask-repeat: no-repeat;
|
-webkit-mask-repeat: no-repeat;
|
||||||
-webkit-mask-position: center;
|
-webkit-mask-position: center;
|
||||||
-webkit-mask-size: var(--maskSize) var(--maskSize);
|
-webkit-mask-size: var(--maskSize) var(--maskSize);
|
||||||
@@ -413,13 +386,9 @@ onUnmounted(() => {
|
|||||||
mask-image: url("../assets/images/new/mask-img.webp");
|
mask-image: url("../assets/images/new/mask-img.webp");
|
||||||
mask-repeat: no-repeat;
|
mask-repeat: no-repeat;
|
||||||
mask-position: center;
|
mask-position: center;
|
||||||
<<<<<<< Updated upstream
|
|
||||||
mask-size: var(--maskSize) var(--maskSize);
|
mask-size: var(--maskSize) var(--maskSize);
|
||||||
/* -webkit-clip-path: circle(calc(var(--maskSize) * 0.5) at 50% 50%);
|
/* -webkit-clip-path: circle(calc(var(--maskSize) * 0.5) at 50% 50%);
|
||||||
clip-path: circle(calc(var(--maskSize) * 0.5) at 50% 50%); */
|
clip-path: circle(calc(var(--maskSize) * 0.5) at 50% 50%); */
|
||||||
=======
|
|
||||||
mask-size: var(--maskSize) var(--maskSize);
|
|
||||||
>>>>>>> Stashed changes
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 可视化的 mask-img.webp:让用户能看到“遮罩在放大”的过程 */
|
/* 可视化的 mask-img.webp:让用户能看到“遮罩在放大”的过程 */
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ if (!props.noAnimation) {
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.global-modal-content {
|
.global-modal-content {
|
||||||
z-index: 10;
|
/* z-index: 0; */
|
||||||
}
|
}
|
||||||
.transBottom-enter-active .global-modal-wrapper,
|
.transBottom-enter-active .global-modal-wrapper,
|
||||||
.transBottom-leave-active .global-modal-wrapper {
|
.transBottom-leave-active .global-modal-wrapper {
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ export const Request = async (url, data, type, noloading, noerror) => {
|
|||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
if (!noerror) {
|
if (!noerror) {
|
||||||
// weui.alert(message)
|
weui.alert(message)
|
||||||
}
|
}
|
||||||
return { res: response, json: result }
|
return { res: response, json: result }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user