diff --git a/.env.prd b/.env.prd index b112485..9b7d66e 100644 --- a/.env.prd +++ b/.env.prd @@ -1,5 +1,6 @@ VITE_MODE = prd -VITE_HOST = https://hd.xglpa.com +VITE_HOST = https://wmm.pingan.com.cn VITE_CDN = https://cdn.xglpa.com VITE_FOLDER = /vite-4 -VITE_API = /vite-api \ No newline at end of file +VITE_API = /intfgw/data/mmoactivity +VITE_URL = https://w.pingan.com.cn/lckj/pawm-mmo-activity-xgl-frontend/index.html \ No newline at end of file diff --git a/src/components/Draw.vue b/src/components/Draw.vue index 338accc..3531811 100644 --- a/src/components/Draw.vue +++ b/src/components/Draw.vue @@ -14,13 +14,14 @@ const money = ref("8.88"); const code = ref("sss"); const showResult = ref(false); -const hasPrize = ref(true); +const hasPrize = ref(false); const drawFn = (event) => { let e = event.target.parentElement; debounceTap(e, async () => { console.log("抽奖"); - Toast.loading({ + if(userStore.hasDraw){ + Toast.loading({ message: "抽奖中", forbidClick: true, duration: 0, @@ -31,12 +32,12 @@ const drawFn = (event) => { { rotation: "+30", repeat: -1, yoyo: true, ease: "none", duration: 0.3 } ); - try { - const res = await drawApi( - { subAnswerKey: userStore.drawKey }, - userStore.token - ); + drawApi( + { subAnswerKey: userStore.drawKey }, + userStore.token + ).then(res => { if (res.code == 0) { + console.log('正常抽奖'); // isDrawn后端判断有没有中奖 hasPrize.value = res.data.isDrawn == 1 ? true : false; // true 中奖 || false 未中奖 userStore.updateDraw(); // 更新抽奖机会 @@ -48,23 +49,33 @@ const drawFn = (event) => { userStore.updatePrize(res.data); } } else { - hasPrize.value = false; // true 中奖 || false 未中奖 + console.log('抽奖异常'); + if (res.code == 6003) { + console.log('6003', res); + Toast(res.msg) + userStore.updateDraw(); + + } else { + console.log('eroor', res); + hasPrize.value = false; // true 中奖 || false 未中奖 + userStore.updateDraw(); + setTimeout(() => { + Toast.clear(); + showResult.value = true; + gsap.from(".result-container", { + duration: 0.5, + scale: 0.7, + autoAlpha: 0, + }); + gsap.killTweensOf(".draw-light,.draw"); + }, 1000); + } } - } catch (e) { - hasPrize.value = false; + }) + }else{ + Toast('今日抽奖次数已用完!') } - userStore.updateDraw(); - setTimeout(() => { - Toast.clear(); - showResult.value = true; - gsap.from(".result-container", { - duration: 0.5, - scale: 0.7, - autoAlpha: 0, - }); - gsap.killTweensOf(".draw-light,.draw"); - }, 1000); }); }; @@ -115,6 +126,8 @@ onMounted(() => {
+ +
@@ -132,6 +145,7 @@ onMounted(() => {
+ @@ -146,6 +160,12 @@ onMounted(() => { @include box(685px, 694px); position: relative; + + .draw-cls-btn{ + @include pos(82px, 82px,300.5px,670px); + @include bg_pos("prize/cls-btn.png"); + } + .draw-light { pointer-events: none; @include pos(685px, 694px, 0px, 0px); @@ -231,5 +251,6 @@ onMounted(() => { margin-top: 40px; } } + } \ No newline at end of file diff --git a/src/components/Question.vue b/src/components/Question.vue index a1a35b9..ecee368 100644 --- a/src/components/Question.vue +++ b/src/components/Question.vue @@ -36,10 +36,13 @@ const answerFn = (item, event) => { qid: cid, answer: item.secore, text: item.text, + aid: item.aid }); } else { answerList.value[has].answer = item.secore; answerList.value[has].text = item.text; + answerList.value[has].aid = item.aid; + } // 更新下一题信息 @@ -63,10 +66,12 @@ const answerFn = (item, event) => { qid: cid, answer: item.secore, text: item.text, + aid: item.aid }); } else { answerList.value[has].answer = item.secore; answerList.value[has].text = item.text; + answerList.value[has].aid = item.aid; } resultBtnAni.play(); } @@ -139,6 +144,10 @@ const prevePage = (event) => { } activeId.value = ""; currentId.value--; + + // 查询上一题做的选择 + console.log('当前题库:',answerList.value[currentId.value]); + activeId.value = answerList.value[currentId.value].aid }); }; diff --git a/src/components/Rule.vue b/src/components/Rule.vue index 6a6ea7c..dcaca87 100644 --- a/src/components/Rule.vue +++ b/src/components/Rule.vue @@ -36,9 +36,7 @@ onMounted(() => {
【领奖说明】:
- 1、中奖后在中奖页面复制兑换码,前往[平安理财服务号] - 消息框发送兑换码即可领取奖品。如关闭了中奖界面,可在首页-[我的奖品] - 内查看兑换码; + 1、中奖后在中奖页面复制兑换码,前往[平安理财服务号] 消息框输入“2024财运滚滚”获取兑换链接,进入链接输入兑换码兑换奖品。如关闭了中奖界面,可在首页-[我的奖品] 内查看兑换码。
2、成功领奖后,奖品将会在24小时内自动到账,请耐心等候;
3、中奖人请在活动结束前进行兑换,逾期视为弃权。
diff --git a/src/page/Home/App.vue b/src/page/Home/App.vue index 1b5c9d3..80b07ac 100644 --- a/src/page/Home/App.vue +++ b/src/page/Home/App.vue @@ -1,5 +1,5 @@