细节完善

This commit is contained in:
kron
2025-07-15 14:02:09 +08:00
parent cf27f75f28
commit ece7e32393
7 changed files with 93 additions and 63 deletions

View File

@@ -112,6 +112,7 @@ onUnmounted(() => {
.score-item > text { .score-item > text {
position: relative; position: relative;
font-weight: bold; font-weight: bold;
margin-top: 2px;
} }
.complete-light { .complete-light {
position: absolute; position: absolute;

View File

@@ -16,7 +16,7 @@ const props = defineProps({
}, },
}); });
const nextLvlPoints = ref(""); const nextLvlPoints = ref("");
const containerWidth = computed(() => (props.showRank ? "72vw" : "100vw")); const containerWidth = computed(() => (props.showRank ? "72%" : "100%"));
const toUserPage = () => { const toUserPage = () => {
// 获取当前页面路径 // 获取当前页面路径
const pages = getCurrentPages(); const pages = getCurrentPages();

View File

@@ -5,6 +5,7 @@ import Avatar from "@/components/Avatar.vue";
import SButton from "@/components/SButton.vue"; import SButton from "@/components/SButton.vue";
import SModal from "@/components/SModal.vue"; import SModal from "@/components/SModal.vue";
import Signin from "@/components/Signin.vue"; import Signin from "@/components/Signin.vue";
import UserHeader from "@/components/UserHeader.vue";
import { createOrderAPI, getHomeData } from "@/apis"; import { createOrderAPI, getHomeData } from "@/apis";
import { formatTimestamp } from "@/util"; import { formatTimestamp } from "@/util";
import useStore from "@/store"; import useStore from "@/store";
@@ -49,11 +50,16 @@ const onPay = async () => {
} }
} }
}; };
const toOrderPage = () => {
uni.navigateTo({
url: "/pages/orders",
});
};
</script> </script>
<template> <template>
<Container title="会员说明"> <Container title="会员说明">
<view>
<view v-if="user.id" class="header"> <view v-if="user.id" class="header">
<view> <view>
<Avatar :src="user.avatar" :size="35" /> <Avatar :src="user.avatar" :size="35" />
@@ -63,8 +69,11 @@ const onPay = async () => {
>{{ formatTimestamp(user.expiredAt) }}到期</text >{{ formatTimestamp(user.expiredAt) }}到期</text
> >
</view> </view>
<view class="container"> <view
<view class="content"> class="container"
:style="{ height: !user.id ? '100%' : 'calc(100% - 62px)' }"
>
<view class="content vip-content">
<view class="title-bar"> <view class="title-bar">
<view /> <view />
<text>VIP 介绍</text> <text>VIP 介绍</text>
@@ -112,6 +121,11 @@ const onPay = async () => {
<SModal :show="showModal" :onClose="() => (showModal = false)"> <SModal :show="showModal" :onClose="() => (showModal = false)">
<Signin :onClose="() => (showModal = false)" /> <Signin :onClose="() => (showModal = false)" />
</SModal> </SModal>
<view class="my-orders" v-if="user.id">
<view @click="toOrderPage">
<text>我的订单</text>
<image src="../static/enter-arrow-blue.png" mode="widthFix" />
</view>
</view> </view>
</view> </view>
</Container> </Container>
@@ -142,7 +156,6 @@ const onPay = async () => {
} }
.container { .container {
width: 100%; width: 100%;
height: 100%;
background-color: #f5f5f5; background-color: #f5f5f5;
padding-top: 10px; padding-top: 10px;
} }
@@ -189,4 +202,24 @@ const onPay = async () => {
border-radius: 10px; border-radius: 10px;
text-align: center; text-align: center;
} }
.vip-content {
height: 62%;
}
.vip-content > view:nth-child(2) {
overflow: auto;
}
.my-orders {
display: flex;
justify-content: center;
color: #39a8ff;
margin-top: 10px;
font-size: 13px;
}
.my-orders > view {
display: flex;
align-items: center;
}
.my-orders > view > image {
width: 15px;
}
</style> </style>

View File

@@ -143,6 +143,7 @@ const onClose = () => {
) { ) {
setTimeout(() => { setTimeout(() => {
practiseResult.value = {}; practiseResult.value = {};
showGuide.value = false;
step.value = 5; step.value = 5;
}, 500); }, 500);
} else { } else {

View File

@@ -25,7 +25,6 @@ const start = ref(false);
const countDown = ref(90); const countDown = ref(90);
const battleId = ref(""); const battleId = ref("");
const currentRound = ref(1); const currentRound = ref(1);
const totalRounds = ref(0);
const power = ref(0); const power = ref(0);
const scores = ref([]); const scores = ref([]);
const tips = ref("即将开始..."); const tips = ref("即将开始...");

View File

@@ -56,7 +56,7 @@ const logout = () => {
<template> <template>
<Container title="用户信息"> <Container title="用户信息">
<view :style="{ width: '100%' }"> <view :style="{ width: '100%' }">
<UserHeader :user="user" /> <UserHeader />
<view class="container"> <view class="container">
<UserItem title="用户名">{{ user.nickName }}</UserItem> <UserItem title="用户名">{{ user.nickName }}</UserItem>
<UserItem title="头像"> <UserItem title="头像">

View File

@@ -15,10 +15,6 @@ export const checkConnection = () => {
fail: () => { fail: () => {
const token = uni.getStorageSync("token"); const token = uni.getStorageSync("token");
if (!token) return; if (!token) return;
uni.showToast({
title: "连接中...",
icon: "none",
});
// 如果发送失败,说明连接已断开,需要重新连接 // 如果发送失败,说明连接已断开,需要重新连接
websocket.createWebSocket(token, (content) => { websocket.createWebSocket(token, (content) => {
uni.$emit("socket-inbox", content); uni.$emit("socket-inbox", content);