From bbfa35e871b8988e088f4bfeb263b2b413db10ce Mon Sep 17 00:00:00 2001
From: zhangyibo95 <690096405@qq.com>
Date: Fri, 28 Aug 2026 11:12:28 +0800
Subject: [PATCH] =?UTF-8?q?update=EF=BC=9A=E4=BC=98=E5=8C=96=E4=B8=AA?=
=?UTF-8?q?=E4=BA=BA=E8=AE=AD=E7=BB=83?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/my-growth.vue | 14 +-------------
src/pages/user.vue | 18 +++++++++++++++++-
2 files changed, 18 insertions(+), 14 deletions(-)
diff --git a/src/pages/my-growth.vue b/src/pages/my-growth.vue
index 7cd4b63..4353e28 100644
--- a/src/pages/my-growth.vue
+++ b/src/pages/my-growth.vue
@@ -15,18 +15,6 @@ const selectedIndex = ref(0);
const matchList = ref([]);
const battleList = ref([]);
const practiseList = ref([]);
-const trainingTypeNameMap = Object.freeze({
- base: "基础训练",
- endurance: "耐力训练",
- precision: "精准训练",
- rhythm: "节奏训练",
- stability: "稳定训练",
-});
-
-const getTrainingTypeName = (trainingType) => {
- const normalizedType = String(trainingType || "").trim().toLowerCase();
- return trainingTypeNameMap[normalizedType] || "自由训练";
-};
const formatPractiseTime = (value) => {
const normalizedTime = String(value || "").trim();
@@ -173,7 +161,7 @@ onLoad((options) => {
@click="() => getPractiseDetail(item.id)"
>
{{ getTrainingTypeName(item.trainingType) }}
+ >{{ item.trainingTypeText }}
{{ formatPractiseTime(item.createTime) }}
diff --git a/src/pages/user.vue b/src/pages/user.vue
index dd37b4c..1e7cdba 100644
--- a/src/pages/user.vue
+++ b/src/pages/user.vue
@@ -4,6 +4,7 @@ import Container from "@/components/Container.vue";
import UserHeader from "@/components/UserHeader.vue";
import UserItem from "@/components/UserItem.vue";
import Avatar from "@/components/Avatar.vue";
+import { getMyGoldAPI } from "@/apis";
import { canEenter } from "@/util";
import useStore from "@/store";
import { storeToRefs } from "pinia";
@@ -29,6 +30,16 @@ const toCoinPage = () => {
url: "/pages/coin/nearby-stores",
});
};
+const showCoinEntry = ref(false);
+const loadCoinEntryVisibility = async () => {
+ showCoinEntry.value = false;
+ try {
+ const result = await getMyGoldAPI();
+ showCoinEntry.value = result?.hasTempBind === true;
+ } catch (error) {
+ console.error("加载金币入口状态失败", error);
+ }
+};
const toBeVipPage = () => {
uni.navigateTo({
url: "/pages/member/be-vip",
@@ -74,6 +85,7 @@ const logout = () => {
updateUser();
};
onMounted(() => {
+ loadCoinEntryVisibility();
const accountInfo = uni.getAccountInfoSync();
const envVersion = accountInfo.miniProgram.envVersion;
if (envVersion !== "release") showLogout.value = true;
@@ -113,7 +125,11 @@ const buildVersion = typeof __BUILD_TIME__ !== 'undefined' ? __BUILD_TIME__ : ''
已完成
未完成
-
+