diff --git a/src/App.vue b/src/App.vue
index b5db4a8..29f8829 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -114,4 +114,27 @@ button::after {
animation: scaleOut 0.3s ease-out forwards;
transform-origin: center center;
}
+
+@keyframes rotate {
+ from {
+ transform: rotate(0deg);
+ }
+ to {
+ transform: rotate(360deg);
+ }
+}
+
+@keyframes pumpIn {
+ from {
+ transform: scale(2);
+ }
+ to {
+ transform: scale(1);
+ }
+}
+
+.pump-in {
+ animation: pumpIn 0.3s ease-out forwards;
+ transform-origin: center center;
+}
diff --git a/src/components/AppFooter.vue b/src/components/AppFooter.vue
index 120d0f5..458df70 100644
--- a/src/components/AppFooter.vue
+++ b/src/components/AppFooter.vue
@@ -19,6 +19,11 @@ const tabs = [
function handleTabClick(index) {
if (!user.value.id) return props.signin();
+ if (index === 0) {
+ uni.navigateTo({
+ url: "/pages/be-vip",
+ });
+ }
if (index === 1) {
uni.navigateTo({
url: "/pages/my-growth",
diff --git a/src/components/BowData.vue b/src/components/BowData.vue
index 92d6793..1b25aff 100644
--- a/src/components/BowData.vue
+++ b/src/components/BowData.vue
@@ -53,7 +53,6 @@ const props = defineProps({
:total="arrows.length"
:scores="arrows.map((a) => a.ring)"
/>
- 长按保存本次靶纸
@@ -70,11 +69,6 @@ const props = defineProps({
align-items: center;
z-index: 10;
}
-.container > text:last-child {
- font-size: 14px;
- color: #fff9;
- margin-top: 20px;
-}
.header {
display: flex;
justify-content: space-between;
diff --git a/src/components/BowTarget.vue b/src/components/BowTarget.vue
index ad96e48..11dd2e9 100644
--- a/src/components/BowTarget.vue
+++ b/src/components/BowTarget.vue
@@ -173,18 +173,6 @@ function calcRealY(num) {
.target > image:last-child {
width: 100%;
}
-@keyframes pumpIn {
- from {
- transform: scale(2);
- }
- to {
- transform: scale(1);
- }
-}
-.pump-in {
- animation: pumpIn 0.3s ease-out forwards;
- transform-origin: center center;
-}
.hit {
position: absolute;
width: 20px;
diff --git a/src/components/SButton.vue b/src/components/SButton.vue
index 12b5b18..9389502 100644
--- a/src/components/SButton.vue
+++ b/src/components/SButton.vue
@@ -1,4 +1,5 @@
@@ -38,13 +50,14 @@ const props = defineProps({
color,
}"
open-type="getUserInfo"
- @click="
- () => {
- if (!disabled) onClick();
- }
- "
+ @click="onBtnClick"
>
-
+
+
+
+
+
+
@@ -55,9 +68,15 @@ const props = defineProps({
line-height: 44px;
font-weight: bold;
font-size: 15px;
- text-align: center;
display: flex;
+ text-align: center;
justify-content: center;
align-items: center;
}
+.loading {
+ width: 25px;
+ height: 25px;
+ background-blend-mode: darken;
+ animation: rotate 1s linear infinite;
+}
diff --git a/src/components/ScoreResult.vue b/src/components/ScoreResult.vue
index ec81685..25a7a53 100644
--- a/src/components/ScoreResult.vue
+++ b/src/components/ScoreResult.vue
@@ -131,7 +131,7 @@ setTimeout(() => {
.container-header > text:last-child {
color: #fff;
text-align: center;
- margin-top: -100px;
+ margin-top: -85px;
}
.container-content {
width: calc(100vw - 20px);
diff --git a/src/components/ShootProgress.vue b/src/components/ShootProgress.vue
index 9a4f52e..7615b9a 100644
--- a/src/components/ShootProgress.vue
+++ b/src/components/ShootProgress.vue
@@ -1,5 +1,5 @@
@@ -74,7 +89,7 @@ watch(
view:last-child > view {
@@ -124,7 +138,7 @@ watch(
height: 20px;
border-radius: 20px;
z-index: -1;
- transition: all 0.3s linear;
+ transition: all 1s linear;
}
.container > view:last-child > text {
z-index: 1;
diff --git a/src/components/StartCountdown.vue b/src/components/StartCountdown.vue
new file mode 100644
index 0000000..82eabcb
--- /dev/null
+++ b/src/components/StartCountdown.vue
@@ -0,0 +1,59 @@
+
+
+
+
+ 3
+ 2
+ 1
+
+
+
+
diff --git a/src/pages/be-vip.vue b/src/pages/be-vip.vue
index beb9d79..289fb6f 100644
--- a/src/pages/be-vip.vue
+++ b/src/pages/be-vip.vue
@@ -15,11 +15,20 @@ const vips = [1, 3, 6, 12];
const chooseVip = (index) => {
vipChoosen.value = index;
};
+
+const onPay = () => {
+ if (!user.value.id) {
+ return uni.showToast({
+ title: "请先登录",
+ icon: "none",
+ });
+ }
+};
-
- 支付
+ 支付
diff --git a/src/pages/first-try.vue b/src/pages/first-try.vue
index 068885e..abe4c55 100644
--- a/src/pages/first-try.vue
+++ b/src/pages/first-try.vue
@@ -10,6 +10,7 @@ import ScorePanel from "@/components/ScorePanel.vue";
import Container from "@/components/Container.vue";
import Avatar from "@/components/Avatar.vue";
import BowPower from "@/components/BowPower.vue";
+import StartCountdown from "@/components/StartCountdown.vue";
import { createPractiseAPI, getHomeData } from "@/apis";
import { MESSAGETYPES } from "@/constants";
import useStore from "@/store";
@@ -30,6 +31,7 @@ const stepButtonTexts = [
"退出新手试炼",
];
const title = ref("新手试炼场");
+const startCount = ref(false);
const start = ref(false);
const practiseResult = ref({});
const power = ref(0);
@@ -39,6 +41,11 @@ const createPractise = async (arrows) => {
const result = await createPractiseAPI(arrows);
};
+const onStart = () => {
+ start.value = true;
+ scores.value = [];
+};
+
async function onReceiveMessage(content) {
const messages = JSON.parse(content).data.updates || [];
messages.forEach((msg) => {
@@ -54,6 +61,7 @@ async function onReceiveMessage(content) {
}
}
if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) {
+ start.value = false;
practiseResult.value = {
...msg.practice,
arrows: JSON.parse(msg.practice.arrows),
@@ -86,9 +94,7 @@ const nextStep = async () => {
scores.value = [];
await createPractise(total);
step.value = 4;
- setTimeout(() => {
- start.value = true;
- }, 500);
+ startCount.value = true;
} else if (step.value === 5) {
const result = await getHomeData();
if (result.user) updateUser(result.user);
@@ -216,6 +222,7 @@ const onClose = () => {
:onClose="onClose"
:result="practiseResult"
/>
+
{{
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 169182f..6457717 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -106,8 +106,13 @@ onMounted(async () => {
- toPage('/pages/ranking')">
+
+
@@ -252,6 +257,14 @@ onMounted(async () => {
z-index: -1;
}
+.into-btn {
+ position: absolute;
+ top: 40px;
+ left: calc(50% - 100px);
+ width: 200px;
+ height: 100px;
+}
+
.ranking-players {
display: flex;
align-items: center;
diff --git a/src/pages/my-device.vue b/src/pages/my-device.vue
index f3fc95f..062af35 100644
--- a/src/pages/my-device.vue
+++ b/src/pages/my-device.vue
@@ -87,9 +87,9 @@ const backToHome = () => {
扫码绑定弓箭
- (showTip = true)">
- 找不到我的弓箭?
- 我还没有弓箭
+
+ (showTip = true)">找不到我的弓箭?
+ 我还没有弓箭
{
await createPractiseAPI(total);
- start.value = true;
currentRound.value = 0;
scores.value = [];
+ startCount.value = true;
+};
+
+const onStart = () => {
+ start.value = true;
+ scores.value = [];
+ currentRound.value = 0;
};
async function onReceiveMessage(content) {
@@ -45,6 +53,7 @@ async function onReceiveMessage(content) {
}
}
if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) {
+ start.value = false;
practiseResult.value = {
...msg.practice,
arrows: JSON.parse(msg.practice.arrows),
@@ -104,9 +113,12 @@ onUnmounted(() => {
:onClose="onComplete"
:result="practiseResult"
/>
+
- 准备好了,直接开始
+
+ 准备好了,直接开始
+
diff --git a/src/pages/practise-two.vue b/src/pages/practise-two.vue
index e50db10..d5fd44d 100644
--- a/src/pages/practise-two.vue
+++ b/src/pages/practise-two.vue
@@ -8,6 +8,7 @@ import ScoreResult from "@/components/ScoreResult.vue";
import SButton from "@/components/SButton.vue";
import Avatar from "@/components/Avatar.vue";
import BowPower from "@/components/BowPower.vue";
+import StartCountdown from "@/components/StartCountdown.vue";
import { createPractiseAPI, getHomeData } from "@/apis";
import { MESSAGETYPES } from "@/constants";
import useStore from "@/store";
@@ -15,6 +16,7 @@ import { storeToRefs } from "pinia";
const store = useStore();
const { user } = storeToRefs(store);
const { updateUser } = store;
+const startCount = ref(false);
const start = ref(false);
const showScore = ref(false);
const scores = ref([]);
@@ -25,9 +27,15 @@ const power = ref(0);
const onReady = async () => {
await createPractiseAPI(total);
- start.value = true;
currentRound.value = 0;
scores.value = [];
+ startCount.value = true;
+};
+
+const onStart = () => {
+ start.value = true;
+ scores.value = [];
+ currentRound.value = 0;
};
async function onReceiveMessage(content) {
@@ -42,6 +50,7 @@ async function onReceiveMessage(content) {
}
}
if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) {
+ start.value = false;
practiseResult.value = {
...msg.practice,
arrows: JSON.parse(msg.practice.arrows),
@@ -104,9 +113,12 @@ onUnmounted(() => {
:onClose="onComplete"
:result="practiseResult"
/>
+
- 准备好了,直接开始
+ 准备好了,直接开始
diff --git a/src/static/btn-loading.png b/src/static/btn-loading.png
new file mode 100644
index 0000000..fab9a4d
Binary files /dev/null and b/src/static/btn-loading.png differ
diff --git a/src/store.js b/src/store.js
index bbdc8fc..07c89e3 100644
--- a/src/store.js
+++ b/src/store.js
@@ -43,8 +43,8 @@ export default defineStore("store", {
}
return false;
});
+ this.user.lvlName = lvlName;
}
- this.user.lvlName = lvlName;
},
updateDevice(deviceId, deviceName) {
this.device.deviceId = deviceId;
@@ -65,8 +65,8 @@ export default defineStore("store", {
}
return false;
});
+ this.user.lvlName = lvlName;
}
- this.user.lvlName = lvlName;
},
},