细节完善

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 {
position: relative;
font-weight: bold;
margin-top: 2px;
}
.complete-light {
position: absolute;

View File

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

View File

@@ -5,6 +5,7 @@ import Avatar from "@/components/Avatar.vue";
import SButton from "@/components/SButton.vue";
import SModal from "@/components/SModal.vue";
import Signin from "@/components/Signin.vue";
import UserHeader from "@/components/UserHeader.vue";
import { createOrderAPI, getHomeData } from "@/apis";
import { formatTimestamp } from "@/util";
import useStore from "@/store";
@@ -49,11 +50,16 @@ const onPay = async () => {
}
}
};
const toOrderPage = () => {
uni.navigateTo({
url: "/pages/orders",
});
};
</script>
<template>
<Container title="会员说明">
<view>
<view v-if="user.id" class="header">
<view>
<Avatar :src="user.avatar" :size="35" />
@@ -63,8 +69,11 @@ const onPay = async () => {
>{{ formatTimestamp(user.expiredAt) }}到期</text
>
</view>
<view class="container">
<view class="content">
<view
class="container"
:style="{ height: !user.id ? '100%' : 'calc(100% - 62px)' }"
>
<view class="content vip-content">
<view class="title-bar">
<view />
<text>VIP 介绍</text>
@@ -112,6 +121,11 @@ const onPay = async () => {
<SModal :show="showModal" :onClose="() => (showModal = false)">
<Signin :onClose="() => (showModal = false)" />
</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>
</Container>
@@ -142,7 +156,6 @@ const onPay = async () => {
}
.container {
width: 100%;
height: 100%;
background-color: #f5f5f5;
padding-top: 10px;
}
@@ -189,4 +202,24 @@ const onPay = async () => {
border-radius: 10px;
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>

View File

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

View File

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

View File

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

View File

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