完善弓箭调试和相关组件
This commit is contained in:
32
src/App.vue
32
src/App.vue
@@ -5,6 +5,12 @@ onLaunch(() => {});
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
page {
|
||||||
|
-webkit-touch-callout: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
button {
|
button {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -13,15 +19,37 @@ button {
|
|||||||
line-height: 1;
|
line-height: 1;
|
||||||
outline: none;
|
outline: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
-webkit-tap-highlight-color: transparent; /* 添加这行,去除点击高亮 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 去除按钮点击时的默认效果 */
|
|
||||||
button::after {
|
button::after {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 去除按钮的默认边框 */
|
/* 修改点击态样式 */
|
||||||
|
button:active {
|
||||||
|
border: none;
|
||||||
|
background: none !important; /* 添加 !important 确保覆盖默认样式 */
|
||||||
|
opacity: 1 !important; /* 防止透明度变化 */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 去除按钮的默认边框和点击效果 */
|
||||||
button[plain] {
|
button[plain] {
|
||||||
border: none;
|
border: none;
|
||||||
|
background: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 去除点击态的所有效果 */
|
||||||
|
button:hover,
|
||||||
|
button.hover {
|
||||||
|
background: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.guide-tips {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
.guide-tips > text:first-child {
|
||||||
|
color: #fed847;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
49
src/components/BowTarget.vue
Normal file
49
src/components/BowTarget.vue
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<script setup></script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<view class="header">
|
||||||
|
<image src="../static/avatar.png" mode="widthFix" />
|
||||||
|
<view>
|
||||||
|
<image src="../static/b-power.png" mode="widthFix" />
|
||||||
|
<view>电量50%</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<image src="../static/bow-target.png" mode="widthFix" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.container {
|
||||||
|
position: relative;
|
||||||
|
width: calc(100% - 30px);
|
||||||
|
padding: 50px 15px;
|
||||||
|
}
|
||||||
|
.container > image {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.header {
|
||||||
|
position: absolute;
|
||||||
|
top: 0px;
|
||||||
|
left: 0px;
|
||||||
|
width: calc(100% - 30px);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 20px 15px;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
.header > image {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
}
|
||||||
|
.header > view {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #b9b9b9;
|
||||||
|
}
|
||||||
|
.header > view > image {
|
||||||
|
width: 22px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
23
src/components/Button.vue
Normal file
23
src/components/Button.vue
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<script setup>
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<button><slot /></button>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.container {
|
||||||
|
width: 100vw;
|
||||||
|
}
|
||||||
|
.container > button {
|
||||||
|
margin: 0 auto;
|
||||||
|
height: 40px;
|
||||||
|
line-height: 40px;
|
||||||
|
font-weight: bold;
|
||||||
|
width: calc(100% - 20px);
|
||||||
|
background-color: #fed847;
|
||||||
|
font-size: 15px;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -12,7 +12,7 @@ defineProps({
|
|||||||
<image src="../static/shooter.png" mode="widthFix" />
|
<image src="../static/shooter.png" mode="widthFix" />
|
||||||
<view>
|
<view>
|
||||||
<image src="../static/long-bubble.png" mode="widthFix" />
|
<image src="../static/long-bubble.png" mode="widthFix" />
|
||||||
<text>{{ title }}</text>
|
<slot />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -22,21 +22,25 @@ defineProps({
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
|
width: 100vw;
|
||||||
}
|
}
|
||||||
.container > image {
|
.container > image {
|
||||||
width: 40vw;
|
width: 20%;
|
||||||
}
|
}
|
||||||
.container > view {
|
.container > view {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
width: 80%;
|
||||||
|
padding-right: 22px;
|
||||||
|
min-height: 55px;
|
||||||
}
|
}
|
||||||
.container > view > image {
|
.container > view > image {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -10%;
|
top: -14%;
|
||||||
left: -7%;
|
left: -7%;
|
||||||
width: 75vw;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.container > view > text {
|
.container > view {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 13px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ const toUserPage = () => {
|
|||||||
</view>
|
</view>
|
||||||
<view class="user-details">
|
<view class="user-details">
|
||||||
<view class="user-name">
|
<view class="user-name">
|
||||||
<text>{{ containerWidth }}</text>
|
<text>{{ userInfo.name }}</text>
|
||||||
<image src="../static/vip1.png" mode="widthFix" />
|
<image src="../static/vip1.png" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
<view class="user-stats">
|
<view class="user-stats">
|
||||||
@@ -101,7 +101,7 @@ const toUserPage = () => {
|
|||||||
|
|
||||||
.user-name > image {
|
.user-name > image {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
width: 24px;
|
width: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-stats {
|
.user-stats {
|
||||||
|
|||||||
@@ -24,6 +24,18 @@
|
|||||||
"navigationBarTitleText": "个人练习"
|
"navigationBarTitleText": "个人练习"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/practise-one",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "个人单组练习"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/practise-two",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "个人耐力挑战"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/friend-battle",
|
"path": "pages/friend-battle",
|
||||||
"style": {
|
"style": {
|
||||||
@@ -35,6 +47,12 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "排行榜"
|
"navigationBarTitleText": "排行榜"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/equipment-debug",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "弓箭调试"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
|
|||||||
45
src/pages/equipment-debug.vue
Normal file
45
src/pages/equipment-debug.vue
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<script setup>
|
||||||
|
import AppBackground from "@/components/AppBackground.vue";
|
||||||
|
import Header from "@/components/Header.vue";
|
||||||
|
import Guide from "@/components/Guide.vue";
|
||||||
|
import BowTarget from "@/components/BowTarget.vue";
|
||||||
|
import Button from "@/components/Button.vue";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view class="container">
|
||||||
|
<AppBackground />
|
||||||
|
<Header title="弓箭调试" />
|
||||||
|
<Guide>
|
||||||
|
<view class="guide-tips">
|
||||||
|
<text>请预先射几箭测试</text>
|
||||||
|
<text>确保射击距离有5米</text>
|
||||||
|
</view>
|
||||||
|
</Guide>
|
||||||
|
<BowTarget />
|
||||||
|
<view>
|
||||||
|
<text>本次射程5.2米,已达距离要求</text>
|
||||||
|
<Button>准备好了直接开始</Button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.container {
|
||||||
|
position: relative;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
.container > view:last-child {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
bottom: 40px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.container > view:last-child > text {
|
||||||
|
color: #fed847;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -2,17 +2,18 @@
|
|||||||
import AppBackground from "@/components/AppBackground.vue";
|
import AppBackground from "@/components/AppBackground.vue";
|
||||||
import Header from "@/components/Header.vue";
|
import Header from "@/components/Header.vue";
|
||||||
import Guide from "@/components/Guide.vue";
|
import Guide from "@/components/Guide.vue";
|
||||||
|
import Button from "@/components/Button.vue";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<AppBackground />
|
<AppBackground />
|
||||||
<Header title="新手试炼场" />
|
<Header title="新手试炼场" />
|
||||||
<Guide
|
<Guide>
|
||||||
title="hi,Rocker,这是新人必刷小任务,0基础小白也能快速掌握弓箭技巧和游戏规则哦~:)"
|
hi,Rocker,这是新人必刷小任务,0基础小白也能快速掌握弓箭技巧和游戏规则哦~:)</Guide
|
||||||
/>
|
>
|
||||||
<image src="../static/first-try-tip.png" class="try-tip" mode="widthFix" />
|
<image src="../static/first-try-tip.png" class="try-tip" mode="widthFix" />
|
||||||
<button class="start-btn">开始</button>
|
<Button>开始</Button>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -21,13 +22,4 @@ import Guide from "@/components/Guide.vue";
|
|||||||
width: calc(100% - 20px);
|
width: calc(100% - 20px);
|
||||||
margin: 10px 10px;
|
margin: 10px 10px;
|
||||||
}
|
}
|
||||||
.start-btn {
|
|
||||||
margin: 0 10px;
|
|
||||||
padding: 15px 0;
|
|
||||||
font-weight: bold;
|
|
||||||
width: calc(100% - 20px);
|
|
||||||
background-color: #fed847;
|
|
||||||
font-size: 15px;
|
|
||||||
border-radius: 10px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -8,9 +8,12 @@ import Guide from "@/components/Guide.vue";
|
|||||||
<view>
|
<view>
|
||||||
<AppBackground />
|
<AppBackground />
|
||||||
<Header title="好友约战" />
|
<Header title="好友约战" />
|
||||||
<Guide
|
<Guide>
|
||||||
title="约上朋友开几局,欢乐多,不寂寞,一起练升级更快,早日加入全国排位赛!"
|
<view class="guide-tips">
|
||||||
/>
|
<text>约上朋友开几局,欢乐多,不寂寞</text>
|
||||||
|
<text>一起练升级更快,早日加入全国排位赛!</text>
|
||||||
|
</view>
|
||||||
|
</Guide>
|
||||||
<view class="founded-room">
|
<view class="founded-room">
|
||||||
<image src="../static/founded-room.png" mode="widthFix" />
|
<image src="../static/founded-room.png" mode="widthFix" />
|
||||||
<view>
|
<view>
|
||||||
|
|||||||
@@ -32,6 +32,12 @@ const toPractisePage = () => {
|
|||||||
url: "/pages/practise",
|
url: "/pages/practise",
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const toQquipmentPage = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/equipment-debug",
|
||||||
|
});
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -40,11 +46,9 @@ const toPractisePage = () => {
|
|||||||
<UserHeader showRank />
|
<UserHeader showRank />
|
||||||
|
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<!-- 功能区域 -->
|
|
||||||
<view class="feature-grid">
|
<view class="feature-grid">
|
||||||
<!-- 我的弓箭区域 -->
|
|
||||||
<view class="bow-card">
|
<view class="bow-card">
|
||||||
<image src="../static/bow-bg.png" mode="widthFix" />
|
<image src="../static/bow-bg.png" mode="widthFix" @click="toQquipmentPage" />
|
||||||
<text>我的弓箭</text>
|
<text>我的弓箭</text>
|
||||||
<image
|
<image
|
||||||
src="../static/a2@2x.png"
|
src="../static/a2@2x.png"
|
||||||
@@ -53,18 +57,15 @@ const toPractisePage = () => {
|
|||||||
/>
|
/>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 个人练习区域 -->
|
|
||||||
<view class="practice-card" @click="toPractisePage">
|
<view class="practice-card" @click="toPractisePage">
|
||||||
<image src="../static/a2@2x(1).png" mode="widthFix" />
|
<image src="../static/a2@2x(1).png" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 好友约战区域 -->
|
|
||||||
<view class="friend-card" @click="toFriendBattlePage">
|
<view class="friend-card" @click="toFriendBattlePage">
|
||||||
<image src="../static/a3@2x.png" mode="widthFix" />
|
<image src="../static/a3@2x.png" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 排位赛区域 -->
|
|
||||||
<view class="ranking-section" @click="toRankingPage">
|
<view class="ranking-section" @click="toRankingPage">
|
||||||
<image src="../static/a4@2x.png" mode="widthFix" />
|
<image src="../static/a4@2x.png" mode="widthFix" />
|
||||||
<view class="ranking-players">
|
<view class="ranking-players">
|
||||||
@@ -144,14 +145,11 @@ const toPractisePage = () => {
|
|||||||
padding-top: 45px;
|
padding-top: 45px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 用户信息样式 */
|
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
height: calc(100vh - 220px);
|
height: calc(100vh - 220px);
|
||||||
padding: 20px 10px;
|
padding: 20px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 功能区网格样式 */
|
|
||||||
.feature-grid {
|
.feature-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
@@ -197,7 +195,6 @@ const toPractisePage = () => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 排位赛区域样式 */
|
|
||||||
.ranking-section {
|
.ranking-section {
|
||||||
border-radius: 15px;
|
border-radius: 15px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
|
|||||||
13
src/pages/practise-one.vue
Normal file
13
src/pages/practise-one.vue
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<script setup>
|
||||||
|
import AppBackground from "@/components/AppBackground.vue";
|
||||||
|
import Header from "@/components/Header.vue";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<AppBackground />
|
||||||
|
<Header title="个人单组练习" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
13
src/pages/practise-two.vue
Normal file
13
src/pages/practise-two.vue
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
<script setup>
|
||||||
|
import AppBackground from "@/components/AppBackground.vue";
|
||||||
|
import Header from "@/components/Header.vue";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<AppBackground />
|
||||||
|
<Header title="个人耐力挑战" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
@@ -2,19 +2,31 @@
|
|||||||
import AppBackground from "@/components/AppBackground.vue";
|
import AppBackground from "@/components/AppBackground.vue";
|
||||||
import Header from "@/components/Header.vue";
|
import Header from "@/components/Header.vue";
|
||||||
import Guide from "@/components/Guide.vue";
|
import Guide from "@/components/Guide.vue";
|
||||||
|
|
||||||
|
const toPractiseOne = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/practise-one",
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const toPractiseTwo = () => {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pages/practise-two",
|
||||||
|
});
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<AppBackground />
|
<AppBackground />
|
||||||
<Header title="个人练习" />
|
<Header title="个人练习" />
|
||||||
<Guide
|
<Guide>
|
||||||
title="师傅领进门,修行靠自身,赶紧练起来吧。坚持练习就能你快速升级,早日加入全国排位赛!"
|
师傅领进门,修行靠自身,赶紧练起来吧。坚持练习就能你快速升级,早日加入全国排位赛!</Guide
|
||||||
/>
|
>
|
||||||
<button class="practise1">
|
<button class="practise1" @click="toPractiseOne">
|
||||||
<image src="../static/practise1.png" class="practise1" mode="widthFix" />
|
<image src="../static/practise1.png" class="practise1" mode="widthFix" />
|
||||||
</button>
|
</button>
|
||||||
<button class="practise2">
|
<button class="practise2" @click="toPractiseTwo">
|
||||||
<image src="../static/practise2.png" class="practise2" mode="widthFix" />
|
<image src="../static/practise2.png" class="practise2" mode="widthFix" />
|
||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
BIN
src/static/b-power.png
Normal file
BIN
src/static/b-power.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
src/static/bow-target.png
Normal file
BIN
src/static/bow-target.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 95 KiB |
Reference in New Issue
Block a user