From 927ad523f2944af2096c51a35794b3a497862ab4 Mon Sep 17 00:00:00 2001 From: kron Date: Sat, 12 Jul 2025 16:01:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B0=94=E6=B3=A1=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E4=BA=A4=E4=BA=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 1 + src/components/BubbleTip.vue | 43 +++++++++++++++++++++++++ src/components/SButton.vue | 1 + src/pages/first-try.vue | 59 +++++++++++++++++++++++------------ src/pages/index.vue | 19 +++++++++-- src/pages/practise-one.vue | 17 +++++++++- src/pages/practise-two.vue | 15 +++++++++ src/static/bubble-tip.png | Bin 0 -> 1162 bytes src/static/bubble-tip2.png | Bin 0 -> 1122 bytes 9 files changed, 132 insertions(+), 23 deletions(-) create mode 100644 src/components/BubbleTip.vue create mode 100644 src/static/bubble-tip.png create mode 100644 src/static/bubble-tip2.png diff --git a/src/App.vue b/src/App.vue index 32a20f9..670e42c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -192,5 +192,6 @@ button::after { justify-content: space-between; padding: 0 15px; padding-top: 20px; + position: relative; } diff --git a/src/components/BubbleTip.vue b/src/components/BubbleTip.vue new file mode 100644 index 0000000..a48c795 --- /dev/null +++ b/src/components/BubbleTip.vue @@ -0,0 +1,43 @@ + + + + + diff --git a/src/components/SButton.vue b/src/components/SButton.vue index b36eb85..3a55872 100644 --- a/src/components/SButton.vue +++ b/src/components/SButton.vue @@ -81,6 +81,7 @@ const onBtnClick = debounce(async () => { text-align: center; justify-content: center; align-items: center; + overflow: initial; } .loading { width: 25px; diff --git a/src/pages/first-try.vue b/src/pages/first-try.vue index 77ab83b..7f5fcf7 100644 --- a/src/pages/first-try.vue +++ b/src/pages/first-try.vue @@ -11,6 +11,7 @@ import Container from "@/components/Container.vue"; import Avatar from "@/components/Avatar.vue"; import BowPower from "@/components/BowPower.vue"; import TestDistance from "@/components/TestDistance.vue"; +import BubbleTip from "@/components/BubbleTip.vue"; import { createPractiseAPI } from "@/apis"; import { generateCanvasImage } from "@/util"; import { MESSAGETYPES } from "@/constants"; @@ -34,8 +35,26 @@ const title = ref("新手试炼场"); const start = ref(false); const practiseResult = ref({}); const power = ref(0); -// const btnDisabled = ref(false); +const btnDisabled = ref(false); const practiseId = ref(""); +const showGuide = ref(false); + +const guideImages = [ + "https://api.shelingxingqiu.com/attachment/2025-07-09/db77x68bs7z5elwvw7.png", + "https://api.shelingxingqiu.com/attachment/2025-07-09/db77x68qmi7grgreen.png", + "https://api.shelingxingqiu.com/attachment/2025-07-09/db77x68hgrw1ip4wae.png", + "https://api.shelingxingqiu.com/attachment/2025-07-09/db77x684x8zmfrmbla.png", + "https://api.shelingxingqiu.com/attachment/2025-07-09/db77x67sding7fodnk.png", + "https://api.shelingxingqiu.com/attachment/2025-07-09/db77x68mpug7cac4yt.png", + "https://api.shelingxingqiu.com/attachment/2025-07-09/db77x68my783mlmgxv.png", + "https://api.shelingxingqiu.com/attachment/2025-07-09/db77x68p48ylzirtb0.png", +]; + +const onSwiperIndexChange = (index) => { + if (index + 1 === guideImages.length) { + showGuide.value = true; + } +}; const createPractise = async (arrows) => { const result = await createPractiseAPI(arrows); @@ -49,9 +68,9 @@ async function onReceiveMessage(messages = []) { scores.value.push(msg.target); } power.value = msg.target.battery; - // if (step.value === 2 && msg.target.dst / 100 > 5) { - // if (step.value === 2 && msg.target.dst > 5) { - // btnDisabled.value = false; + // if (step.value === 2 && msg.target.dst / 100 >= 5) { + btnDisabled.value = false; + showGuide.value = true; // } } if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) { @@ -87,10 +106,12 @@ const nextStep = async () => { step.value = 1; title.value = "-凹造型"; } else if (step.value === 1) { - // btnDisabled.value = true; + showGuide.value = false; + btnDisabled.value = true; step.value = 2; title.value = "-感知距离"; } else if (step.value === 2) { + showGuide.value = false; step.value = 3; title.value = "-小试牛刀"; } else if (step.value === 3) { @@ -189,18 +210,7 @@ const onClose = () => { v-if="step === 5" /> - + { - {{ - stepButtonTexts[step] - }} + + + {{ + step === 1 ? "学会了,我摆得比教练还帅" : "我找到合适的点位了" + }} + + {{ stepButtonTexts[step] }} + diff --git a/src/pages/index.vue b/src/pages/index.vue index 7daa31d..d8e09d1 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -6,6 +6,7 @@ import AppBackground from "@/components/AppBackground.vue"; import UserHeader from "@/components/UserHeader.vue"; import SModal from "@/components/SModal.vue"; import Signin from "@/components/Signin.vue"; +import BubbleTip from "@/components/BubbleTip.vue"; import { getAppConfig, getHomeData, @@ -21,6 +22,7 @@ const { updateConfig, updateUser, updateDevice, updateRank } = store; const { user, device, rankData } = storeToRefs(store); const showModal = ref(false); const isIos = ref(true); +const showGuide = ref(false); const toPage = (path) => { if (!user.value.id) { @@ -67,6 +69,12 @@ onMounted(async () => { console.log("首页数据:", result); if (result.user) { updateUser(result.user); + if (result.user.trio <= 0) { + showGuide.value = true; + setTimeout(() => { + showGuide.value = false; + }, 3000); + } const devices = await getMyDevicesAPI(); if (devices.bindings && devices.bindings.length) { updateDevice( @@ -114,6 +122,13 @@ const comingSoon = () => { mode="widthFix" @click="() => toPage('/pages/first-try')" /> + + 新人必刷! + 快来报到吧~ + @@ -263,8 +278,8 @@ const comingSoon = () => { transform: scaleY(1.08) translateY(9px); } -.bow-card > image:last-child { - transform: translateY(12px); +.bow-card > image:nth-child(3) { + transform: translateY(11px); } .practice-card { diff --git a/src/pages/practise-one.vue b/src/pages/practise-one.vue index 2294b95..aa9da93 100644 --- a/src/pages/practise-one.vue +++ b/src/pages/practise-one.vue @@ -9,6 +9,7 @@ import SButton from "@/components/SButton.vue"; import Avatar from "@/components/Avatar.vue"; import BowPower from "@/components/BowPower.vue"; import TestDistance from "@/components/TestDistance.vue"; +import BubbleTip from "@/components/BubbleTip.vue"; import { createPractiseAPI, getHomeData } from "@/apis"; import { generateCanvasImage } from "@/util"; import { MESSAGETYPES, roundsName } from "@/constants"; @@ -17,13 +18,14 @@ import { storeToRefs } from "pinia"; const store = useStore(); const { user } = storeToRefs(store); const { updateUser } = store; -const start = ref(false); +const start = ref(true); const scores = ref([]); const total = 12; const currentRound = ref(0); const practiseResult = ref({}); const power = ref(0); const practiseId = ref(""); +const showGuide = ref(false); const onReady = async () => { const result = await createPractiseAPI(total); @@ -42,6 +44,12 @@ async function onReceiveMessage(messages = []) { if (currentRound.value === 4) { currentRound.value = 1; } + if (scores.value.length === total / 2) { + showGuide.value = true; + setTimeout(() => { + showGuide.value = false; + }, 3000); + } } power.value = msg.target.battery; } @@ -100,6 +108,13 @@ onUnmounted(() => { + + 还有两场,坚持 + 就是胜利!💪 + { const result = await createPractiseAPI(total); @@ -36,6 +38,12 @@ async function onReceiveMessage(messages = []) { if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID) { if (scores.value.length < total) { scores.value.push(msg.target); + if (scores.value.length === total / 2) { + showGuide.value = true; + setTimeout(() => { + showGuide.value = false; + }, 3000); + } } power.value = msg.target.battery; } @@ -94,6 +102,13 @@ onUnmounted(() => { + + 完成过半,胜利 + 在望!💪 + Px(L`g(JRCr$PoXw9@RT##f=N4jIxO9gz3tbrFg1^9p3s&mV04`lj!dJjJbjAu? zU@o1H&IiLsG7A$of-r8>1%Uu2s0-slji_S)KR^=`ganAwnGU^=-djsMo!<8Lw!Jf@ z=j_^^=RN2A&U@dy_uliCsL^!%crPq#Gk}*tz5w8908iA?RQ*jVeN8qj$J*8}g1ima z{Sm-rxbBDCvE%okMOIzCW@dWey2FrO2asr-P**GR|2gMbSk?gh`fgT|SOHuoPHX`= z1L>)*#@6iO$p?`7xPANSa#PEI>*UF|AY}lQzF*sybA2qUJAZ+Eo7=Wc6es!!tnb;< z2g_jBUykWfpMc=HZ*bQx-_w2Inwsjtx^-7g7^zP$QV%b@Jbd^fckjMg06sl^3cwcM zSa}vvc{vt8S7sVPm#xv4XJ@CmbLUq2sh@NMlF3FQxo>Du9+veiH9eh#G#pxHIz}fz z4p2vro`CrR+@(*fiY5`K?x9d%h-h~FpMQU=g z>_JBtLWp_E)Wn1V9wT&WeB1yxz+)s3^H5YKV>~=Y=+xMl0d9cDNFe5+sL@g5;W0ul z0WZJ3ZDaz)M*&73iW)UCVmv$)s@8O(hKCLC*02m^g-WLl@KC5))5!pD4ad+{s3S*= zhlj@1d`HT0sss13kEof4H!q{F$}bpr^P6cbR3ShO4VjPrxN%mdEIeH$4xKNW4Vb{?>oQ zRKB6wx35s+!zf2++v6G?ZuK5q_cc1smEt;9Rl zW-{s3{CJ1-tJi6U2^Ymtsy*U;ob|wUSk@Tk=HBD%Y`${WYL*52DWkL*WT6sSidKo- ztgoz|ei6W30QUjR16YK#1hO1t4!~`YKS25nj`NlGCLu5jUcI$MA6co?JCK~{7AlnF zUy!~A`5i3ldn_&80Qno!={qeO<9|aD3g25jg~sh^VBk4e*0q|-;I~y?vFc9%J_qmx zEbB`S4gK2qETSno6ZqiZ^8h?(VVZY&{|w-g|K|g_+!cip|ahzIX2^$bNsp#f*o%2jF8!A0d~!$jQlU6d>)^bR2Nm zwuOa-Um*1Y@Su8-&mfyU$79F5tYS^K&I8`x{|d-KknaOH%aIY!vpc4B9`HSTo?NTp cBFwJ;3qddiD^{iv%K!iX07*qoM6N<$f+id)%>V!Z literal 0 HcmV?d00001 diff --git a/src/static/bubble-tip2.png b/src/static/bubble-tip2.png new file mode 100644 index 0000000000000000000000000000000000000000..d9f2ce31519f6ae3d431beabf93029b1f5af22e2 GIT binary patch literal 1122 zcmV-o1fBbdP)Px(97#k$RCr$PoWW}pR~*N`-yscpDE)JNyOyjJ^%*+>;<_S(%S&M4JITY#kp#H-|XLHegVkmkp2R2 z7r=G&^xP&HDJVv%NfQ&@0CJGtZ>%<}VFVH;Kt2L+f`<>^to2+aSY5pM7M7OAL4KBS z7tEazXr6#{8J(R+c<9h_*?3K`t74r3u)lfFW?=+UBQTB5&QHpstq68(>=FQrtf_G~ z$1M=J%--J5oqb8L8XN0|bfX1_W@-e|B|sivZ|_Z(vH|DM=hqfkZpB_M>sS8kSMuxY zloY>iL1*^HFCG0n!m(o?P-o9}0r+u^a=jE&S&VT)F2(FRDK4`QF&n?iOI@p%`YFzj zs556KK=wpN)p|j`Hp)i5Rc0Sg!1zV8sh`iEq((<)0DPG41jM`>fkX)W;spB-q+N-) zGbctMT>|q|F6WZ69qG1X-i<&41jvFDtVP%aSelD1AuvykjLbl?Iqa73wnkbcFhdOw zS7!-Y^l0WrAVmTb)alb*kSclD6k9XbMxZ4EQdjt;Yj`*hz_t>$MAM8@CXh!avnSk3 zkj-`@2*SMtaS83(-ozz%&3<#w&G$Y#cxM*1PYK@faO z-!D`Nwlp(nVXr_I?y ztkIidzfXk#c@Mxz`u@)wW=e4l%1sx1e;YxmQgq7LhX_rp`wm3!g+@Lo6tEnipaN&mw0 zW>==8_Ynl&a%kvb+}|Dmk#a-Q)`upESN5|t=>VhPA-XDo&vVgmGsQ*4-yz+G^b?ks?{IYV*=7v4Qymj*8=s~!nU5iT7keho%`v50 zAioDW&208b8@u~jG;M-y<6}^Ne-30{O&8`tPJz6J#l>4Zcg`(}tgI3+!L~^X@_i34 zU;YW;9Y`e2s;LX