diff --git a/src/components/AppFooter.vue b/src/components/AppFooter.vue
index 4c7caf8..52285fc 100644
--- a/src/components/AppFooter.vue
+++ b/src/components/AppFooter.vue
@@ -13,7 +13,7 @@ const props = defineProps({
const tabs = [
{ image: "../static/tab-vip.png" },
- { image: "../static/tab-grow.png" },
+ { image: "../static/tab-point-book.png" },
{ image: "../static/tab-mall.png" },
];
@@ -26,7 +26,7 @@ function handleTabClick(index) {
}
if (index === 1) {
uni.navigateTo({
- url: "/pages/my-growth",
+ url: "/pages/point-book-create",
});
}
if (index === 2) {
@@ -45,14 +45,11 @@ function handleTabClick(index) {
:key="index"
class="tab-item"
@click="handleTabClick(index)"
+ :style="{
+ width: index === 1 ? '32%' : '10%',
+ }"
>
-
+
@@ -76,10 +73,16 @@ function handleTabClick(index) {
.tab-item {
z-index: 1;
}
+.tab-item > image {
+ width: 88%;
+}
.tab-item:nth-child(2) {
- transform: translateY(10px);
+ transform: translateY(20%) translateX(25%);
+}
+.tab-item:nth-child(3) {
+ transform: translateY(-10%) translateX(5%);
}
.tab-item:nth-child(4) {
- transform: translateY(10px) translateX(-10px);
+ transform: translateY(20%) translateX(-25%);
}
diff --git a/src/components/BowTargetEdit.vue b/src/components/BowTargetEdit.vue
new file mode 100644
index 0000000..d865c6d
--- /dev/null
+++ b/src/components/BowTargetEdit.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/EditOption.vue b/src/components/EditOption.vue
index 26deab4..6d7effe 100644
--- a/src/components/EditOption.vue
+++ b/src/components/EditOption.vue
@@ -1,5 +1,5 @@
@@ -112,21 +146,13 @@ const onMeterChange = (e) => {
}}
{{
- bowTypes[selectedIndex]
- ? bowTypes[selectedIndex].name
- : itemTexts[itemIndex]
+ value || itemTexts[itemIndex]
}}
{{
- distances[selectedIndex]
- ? distances[selectedIndex] + " 米"
- : selectedIndex === 9
- ? meter + " 米"
- : itemTexts[itemIndex]
+ value ? value + "米" : itemTexts[itemIndex]
}}
{{
- bowtargetTypes[selectedIndex]
- ? bowtargetTypes[selectedIndex]
- : itemTexts[itemIndex]
+ value || itemTexts[itemIndex]
}}
{{
selectedIndex !== -1 && secondSelectIndex !== -1
@@ -174,6 +200,7 @@ const onMeterChange = (e) => {
}"
>
(selectedIndex = 9)"
diff --git a/src/pages.json b/src/pages.json
index 7c440dc..c2ef301 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -1,13 +1,13 @@
{
"pages": [
{
- "path": "pages/point-book-create"
+ "path": "pages/index"
},
{
"path": "pages/point-book-edit"
},
{
- "path": "pages/index"
+ "path": "pages/point-book-create"
},
{
"path": "pages/point-book-list"
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 9134d64..6eea465 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -18,7 +18,8 @@ import { topThreeColors } from "@/constants";
import useStore from "@/store";
import { storeToRefs } from "pinia";
const store = useStore();
-const { updateConfig, updateUser, updateDevice, updateRank } = store;
+const { updateConfig, updateUser, updateDevice, updateRank, getLvlName } =
+ store;
// 使用storeToRefs,用于UI里显示,保持响应性
const { user, device, rankData } = storeToRefs(store);
const showModal = ref(false);
@@ -109,11 +110,10 @@ const comingSoon = () => {
toPage('/pages/my-device')"
/>
-
我的弓箭
请绑定设备
{
>{{ device.deviceName }}
toPage('/pages/first-try')"
/>
@@ -135,20 +135,17 @@ const comingSoon = () => {
快来报到吧~
-
- toPage('/pages/practise')">
-
-
-
- toPage('/pages/friend-battle')"
- >
-
+
+ toPage('/pages/practise')">
+
+
+ toPage('/pages/friend-battle')">
+
+
-
+
-
+
+ toPage('/pages/my-growth')">
+
+
+
+
+ 段位
+ {{ user.scores ? getLvlName(user.scores) : "-" }}
+
+
+ 赛季平均环数
+ {{ user.avg_ring ? user.avg_ring + "环" : "-" }}
+
+
+ 赛季胜率
+ {{
+ user.avg_win
+ ? Number((user.avg_win * 100).toFixed(2)) + "%"
+ : "-"
+ }}
+
+
+
+
@@ -254,17 +274,19 @@ const comingSoon = () => {
}
.feature-grid {
- display: grid;
- grid-template-columns: 1fr 1fr;
- grid-template-areas: "bow practice" "bow friend";
- row-gap: 5px;
- column-gap: 10px;
- margin-bottom: 10px;
+ width: 100%;
+ display: flex;
+ margin-bottom: 5px;
+}
+
+.feature-grid > view {
+ position: relative;
+ display: flex;
+ flex-direction: column;
}
.bow-card {
- grid-area: bow;
- position: relative;
+ width: 50%;
}
.feature-grid > view > image {
@@ -281,21 +303,16 @@ const comingSoon = () => {
color: #b3b3b3;
}
-.bow-card > image:first-child {
- transform: scaleY(1.08) translateY(9px);
-}
-
.bow-card > image:nth-child(3) {
transform: translateY(-1px);
}
-.practice-card {
- grid-area: practice;
- width: 100%;
+.play-card {
+ width: 48%;
+ margin-left: 2%;
}
-.friend-card {
- grid-area: friend;
+.play-card > view > image {
width: 100%;
}
@@ -382,7 +399,7 @@ const comingSoon = () => {
}
.more-players {
- background: rgba(255, 255, 255, 0.2);
+ background: #3C445A;
font-size: 9px;
line-height: 80rpx;
text-align: center;
@@ -447,4 +464,39 @@ const comingSoon = () => {
line-height: 20px;
margin-bottom: 5px;
}
+.my-data {
+ display: flex;
+ margin-top: 20px;
+ justify-content: space-between;
+}
+.my-data > view:first-child {
+ width: 28%;
+}
+.my-data > view:first-child > image {
+ width: 100%;
+ transform: translateX(-8px);
+}
+.my-data > view:nth-child(2) {
+ width: 68%;
+ font-size: 12px;
+ color: #fff6;
+ display: flex;
+ justify-content: space-between;
+}
+.my-data > view:nth-child(2) > view:nth-child(2) {
+ width: 38%;
+}
+.my-data > view:nth-child(2) > view {
+ width: 28%;
+ border-radius: 10px;
+ background: linear-gradient(180deg, #303b4c 30%, #2c384a 100%);
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+.my-data > view:nth-child(2) > view > text:last-child {
+ color: #fff;
+ line-height: 25px;
+}
diff --git a/src/pages/point-book-create.vue b/src/pages/point-book-create.vue
index 48b6a06..be42b77 100644
--- a/src/pages/point-book-create.vue
+++ b/src/pages/point-book-create.vue
@@ -24,6 +24,7 @@ const onSelect = (itemIndex, value) => {
else if (itemIndex === 1) distance.value = value;
else if (itemIndex === 2) bowtargetType.value = value;
else if (itemIndex === 3) amountGroup.value = value;
+ if (itemIndex < 3) expandIndex.value += 1;
if (
bowType.value &&
distance.value &&
@@ -44,6 +45,14 @@ const toEditPage = () => {
url: "/pages/point-book-edit",
});
};
+onMounted(() => {
+ const pointBook = uni.getStorageSync("point-book");
+ if (pointBook) {
+ bowType.value = pointBook.bowType;
+ distance.value = pointBook.distance;
+ bowtargetType.value = pointBook.bowtargetType;
+ }
+});
@@ -54,25 +63,31 @@ const toEditPage = () => {
title="计分本"
>
-
+
{
if (arrowGroups.value[currentGroup.value]) {
arrowGroups.value[currentGroup.value][currentArrow.value] = ring;
clickable.value = arrowGroups.value[currentGroup.value].every(
- (item) => item !== null
+ (item) => !!item
);
if (currentArrow.value < amount.value - 1) {
currentArrow.value++;
}
}
};
+const deleteArrow = () => {
+ arrowGroups.value[currentGroup.value][currentArrow.value] = "";
+};
onMounted(() => {
const pointBook = uni.getStorageSync("point-book");
@@ -53,7 +57,7 @@ onMounted(() => {
groups.value = Number(pointBook.amountGroup.split("/")[0]);
amount.value = Number(pointBook.amountGroup.split("/")[1]);
for (let i = 1; i <= groups.value; i++) {
- arrowGroups.value[i] = new Array(amount.value).fill(null);
+ arrowGroups.value[i] = new Array(amount.value).fill("");
}
}
});
@@ -67,12 +71,16 @@ onMounted(() => {
:onBack="() => (showTip = true)"
>
-
-
-
+
-
- 第 {{ currentGroup }} 组
+
+
+ 第 {{ currentGroup }} 组
+
+
+
+ 删除
+
{
borderColor: currentArrow === index ? '#FED847' : '#eeeeee',
borderWidth: currentArrow === index ? '2px' : '1px',
}"
- >{{ arrow === null ? "" : arrow + " 环" }}{{ isNaN(arrow) ? arrow : arrow ? arrow + " 环" : "" }}
输入分值的情况下,系统不提供落点稳定性分
- onClickRing(11)">X
+ onClickRing('X')">X
{
:style="{ backgroundColor: ringColors[i] || '#d8d8d8' }"
>{{ 11 - i }}
- onClickRing(0)">M
+ onClickRing('M')">M
@@ -194,27 +202,35 @@ onMounted(() => {
.tip-content > view > button:last-child {
background: #fed847;
}
-.bow-target {
- width: 90%;
- margin: 10px auto;
-}
-.bow-target > image {
- width: 100%;
-}
.title-bar {
- width: 100%;
+ width: calc(100% - 30px);
display: flex;
align-items: center;
+ justify-content: space-between;
font-size: 13px;
+ margin: 0 15px;
+}
+.title-bar > view:first-child {
+ display: flex;
+ align-items: center;
color: #333;
font-weight: 500;
}
-.title-bar > view:first-child {
+.title-bar > view:first-child > view:first-child {
width: 5px;
height: 15px;
border-radius: 10px;
background-color: #fed847;
margin-right: 7px;
- margin-left: 15px;
+}
+.title-bar > view:nth-child(2) {
+ color: #287fff;
+ display: flex;
+ align-items: center;
+}
+.title-bar > view:nth-child(2) image {
+ width: 14px;
+ height: 14px;
+ margin-right: 5px;
}
diff --git a/src/static/a2@2x(1).png b/src/static/a2@2x(1).png
deleted file mode 100644
index af32db3..0000000
Binary files a/src/static/a2@2x(1).png and /dev/null differ
diff --git a/src/static/a2@2x.png b/src/static/a2@2x.png
deleted file mode 100644
index 0a92375..0000000
Binary files a/src/static/a2@2x.png and /dev/null differ
diff --git a/src/static/a3@2x.png b/src/static/a3@2x.png
deleted file mode 100644
index a1b2a60..0000000
Binary files a/src/static/a3@2x.png and /dev/null differ
diff --git a/src/static/a4@2x.png b/src/static/a4@2x.png
deleted file mode 100644
index 4fd3518..0000000
Binary files a/src/static/a4@2x.png and /dev/null differ
diff --git a/src/static/bow-bg.png b/src/static/bow-bg.png
deleted file mode 100644
index 1da4506..0000000
Binary files a/src/static/bow-bg.png and /dev/null differ
diff --git a/src/static/bowtarget-example.png b/src/static/bowtarget-example.png
deleted file mode 100644
index ac38f12..0000000
Binary files a/src/static/bowtarget-example.png and /dev/null differ
diff --git a/src/static/delete.png b/src/static/delete.png
new file mode 100644
index 0000000..f0774cc
Binary files /dev/null and b/src/static/delete.png differ
diff --git a/src/static/first-try.png b/src/static/first-try.png
new file mode 100644
index 0000000..ba9456b
Binary files /dev/null and b/src/static/first-try.png differ
diff --git a/src/static/friend-battle.png b/src/static/friend-battle.png
new file mode 100644
index 0000000..3201fe1
Binary files /dev/null and b/src/static/friend-battle.png differ
diff --git a/src/static/my-bow.png b/src/static/my-bow.png
new file mode 100644
index 0000000..61cddec
Binary files /dev/null and b/src/static/my-bow.png differ
diff --git a/src/static/my-growth.png b/src/static/my-growth.png
new file mode 100644
index 0000000..1594922
Binary files /dev/null and b/src/static/my-growth.png differ
diff --git a/src/static/my-practise.png b/src/static/my-practise.png
new file mode 100644
index 0000000..f4e5540
Binary files /dev/null and b/src/static/my-practise.png differ
diff --git a/src/static/point-book-banner.png b/src/static/point-book-banner.png
deleted file mode 100644
index 58f73f1..0000000
Binary files a/src/static/point-book-banner.png and /dev/null differ
diff --git a/src/static/rank-bg.png b/src/static/rank-bg.png
new file mode 100644
index 0000000..f35e5f4
Binary files /dev/null and b/src/static/rank-bg.png differ
diff --git a/src/static/region-1.png b/src/static/region-1.png
deleted file mode 100644
index bceed48..0000000
Binary files a/src/static/region-1.png and /dev/null differ
diff --git a/src/static/region-2.png b/src/static/region-2.png
deleted file mode 100644
index 4f179f4..0000000
Binary files a/src/static/region-2.png and /dev/null differ
diff --git a/src/static/region-3.png b/src/static/region-3.png
deleted file mode 100644
index 5b62ba3..0000000
Binary files a/src/static/region-3.png and /dev/null differ
diff --git a/src/static/region-4.png b/src/static/region-4.png
deleted file mode 100644
index 4313ea0..0000000
Binary files a/src/static/region-4.png and /dev/null differ
diff --git a/src/static/region-5.png b/src/static/region-5.png
deleted file mode 100644
index 6a57973..0000000
Binary files a/src/static/region-5.png and /dev/null differ
diff --git a/src/static/region-bg.png b/src/static/region-bg.png
deleted file mode 100644
index 72a9af9..0000000
Binary files a/src/static/region-bg.png and /dev/null differ
diff --git a/src/static/region-more.png b/src/static/region-more.png
deleted file mode 100644
index 543f168..0000000
Binary files a/src/static/region-more.png and /dev/null differ
diff --git a/src/static/tab-bg.png b/src/static/tab-bg.png
index 55e6234..1392443 100644
Binary files a/src/static/tab-bg.png and b/src/static/tab-bg.png differ
diff --git a/src/static/tab-point-book.png b/src/static/tab-point-book.png
new file mode 100644
index 0000000..0736de7
Binary files /dev/null and b/src/static/tab-point-book.png differ