UI调整
This commit is contained in:
@@ -189,7 +189,7 @@ button::after {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
padding-top: 20px;
|
padding-top: 10px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.half-time-tip {
|
.half-time-tip {
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ const props = defineProps({
|
|||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
|
background-color: #050b19;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bg-image {
|
.bg-image {
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ const simulShoot2 = async () => {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.container {
|
.container {
|
||||||
width: calc(100% - 30px);
|
width: calc(100% - 30px);
|
||||||
padding: 15px;
|
padding: 5px 15px;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.target {
|
.target {
|
||||||
@@ -260,7 +260,7 @@ const simulShoot2 = async () => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
margin-bottom: -10px;
|
margin-bottom: -40px;
|
||||||
}
|
}
|
||||||
.header > image:first-child {
|
.header > image:first-child {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
|
|||||||
@@ -223,13 +223,13 @@ onUnmounted(() => {
|
|||||||
transform: translateX(-10px);
|
transform: translateX(-10px);
|
||||||
}
|
}
|
||||||
.container > view:first-child > image:first-child {
|
.container > view:first-child > image:first-child {
|
||||||
width: 80px;
|
width: 22vw;
|
||||||
transform: translateX(10px);
|
transform: translateX(10px);
|
||||||
}
|
}
|
||||||
.container > view:first-child > text {
|
.container > view:first-child > text {
|
||||||
color: #fed847;
|
color: #fed847;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
transform: translateY(-10px);
|
transform: translateY(-10px) translateX(-10px);
|
||||||
}
|
}
|
||||||
.container > view:first-child > button:last-child {
|
.container > view:first-child > button:last-child {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
@@ -239,27 +239,32 @@ onUnmounted(() => {
|
|||||||
transform: translateX(10px) translateY(-10px);
|
transform: translateX(10px) translateY(-10px);
|
||||||
}
|
}
|
||||||
.container > view:last-child {
|
.container > view:last-child {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
width: clac(100% - 30px);
|
width: clac(100% - 30px);
|
||||||
margin: 0 15px;
|
margin: 0 15px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: #ffffff80;
|
background-color: #ffffff80;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
margin-top: -20px;
|
margin-top: -16px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
height: 20px;
|
height: 15px;
|
||||||
line-height: 20px;
|
line-height: 15px;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.container > view:last-child > view {
|
.container > view:last-child > view {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 20px;
|
height: 15px;
|
||||||
border-radius: 20px;
|
border-radius: 15px;
|
||||||
z-index: -1;
|
z-index: -1;
|
||||||
transition: all 1s linear;
|
transition: all 1s linear;
|
||||||
}
|
}
|
||||||
.container > view:last-child > text {
|
.container > view:last-child > text {
|
||||||
|
font-size: 10px;
|
||||||
|
line-height: 15px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -462,7 +462,7 @@ async function onReceiveMessage(messages = []) {
|
|||||||
}
|
}
|
||||||
if (msg.constructor === MESSAGETYPES.MatchOver) {
|
if (msg.constructor === MESSAGETYPES.MatchOver) {
|
||||||
uni.setStorageSync("last-battle", msg.endStatus);
|
uni.setStorageSync("last-battle", msg.endStatus);
|
||||||
if (msg.endStatus.nosaved) {
|
if (msg.endStatus.noSaved) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "游戏结束",
|
title: "游戏结束",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ function recoverData(battleInfo) {
|
|||||||
start.value = true;
|
start.value = true;
|
||||||
}
|
}
|
||||||
if (battleInfo.status === 2) {
|
if (battleInfo.status === 2) {
|
||||||
|
const elapsedTime = (Date.now() - Date.parse(battleInfo.createdAt)) / 1000;
|
||||||
|
console.log("elapsedTime:", elapsedTime);
|
||||||
startCount.value = true;
|
startCount.value = true;
|
||||||
// 这里的开始时间不是游戏开始时间,而是上半场或者下半场或者中场的开始时间,还要根据状态来判断
|
// 这里的开始时间不是游戏开始时间,而是上半场或者下半场或者中场的开始时间,还要根据状态来判断
|
||||||
tips.value = battleInfo.halfGame
|
tips.value = battleInfo.halfGame
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 111 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.0 KiB After Width: | Height: | Size: 6.8 KiB |
Reference in New Issue
Block a user