修正多处问题,添加骨架屏
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view>
|
||||
<GlobalLoading />
|
||||
</view>
|
||||
@@ -82,4 +82,4 @@ onHide(() => {
|
||||
<style lang="scss">
|
||||
/* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
|
||||
@import "@/uni.scss";
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import request from "@/utils/request.js"
|
||||
import request from "@/utils/request.js"
|
||||
|
||||
export function getGroupCourseList(params = {}, options = {}) {
|
||||
return request.get('/groupCourse/list', params, options)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import request from "@/utils/request.js"
|
||||
import request from "@/utils/request.js"
|
||||
|
||||
/**
|
||||
* 微信小程序登录
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// common/constants/routes.js
|
||||
// common/constants/routes.js
|
||||
|
||||
/** 与 pages.json 保持一致 */
|
||||
export const PAGE = {
|
||||
@@ -189,4 +189,4 @@ export function backToMemberCenter() {
|
||||
*/
|
||||
export function backToTab(tabUrl) {
|
||||
goBackOrTab(tabUrl)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* 登录拦截Hook
|
||||
* 用于在需要登录的操作前检查用户登录状态,未登录则弹出登录框
|
||||
*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const COLORS = {
|
||||
const COLORS = {
|
||||
primary: '#0B2B4B',
|
||||
accent: '#FF6B35',
|
||||
accentLight: 'rgba(255, 107, 53, 0.25)',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
function formatRecordTime(date) {
|
||||
function formatRecordTime(date) {
|
||||
const y = date.getFullYear()
|
||||
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const d = String(date.getDate()).padStart(2, '0')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { courseCatalogMock } from './mockData.js'
|
||||
import { courseCatalogMock } from './mockData.js'
|
||||
|
||||
function clone(value) {
|
||||
return JSON.parse(JSON.stringify(value))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** 手机号展示脱敏(中间四位 ****) */
|
||||
/** 手机号展示脱敏(中间四位 ****) */
|
||||
|
||||
export function maskPhone(phone) {
|
||||
if (phone == null || phone === '') return ''
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export { statusBarTimeMixin, subPageMixin } from './mixins.js'
|
||||
export { statusBarTimeMixin, subPageMixin } from './mixins.js'
|
||||
export {
|
||||
loadMemberStore,
|
||||
saveMemberStore,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** 头像等媒体:真机选图后须 saveFile,/static/ 须 getImageInfo */
|
||||
/** 头像等媒体:真机选图后须 saveFile,/static/ 须 getImageInfo */
|
||||
|
||||
function buildStaticPathCandidates(url) {
|
||||
const list = [url]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { backToMemberCenter } from '../constants/routes.js'
|
||||
import { backToMemberCenter } from '../constants/routes.js'
|
||||
|
||||
/** 状态栏时间(Pixso 顶栏占位) */
|
||||
export const statusBarTimeMixin = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** 个人中心模块 mock 数据(后续可替换为 API) */
|
||||
/** 个人中心模块 mock 数据(后续可替换为 API) */
|
||||
|
||||
// Mock 数据开关 - 设为 false 可关闭所有 mock 数据
|
||||
export const MOCK_ENABLED = false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { moduleMock } from './mockData.js'
|
||||
import { moduleMock } from './mockData.js'
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {
|
||||
import {
|
||||
getDefaultBodyTestState,
|
||||
mergeBodyTestState,
|
||||
getLatestBodyTestRecord,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** 个人信息页前端校验(与后端手机号规则对齐:^1[3-9]\\d{9}$) */
|
||||
/** 个人信息页前端校验(与后端手机号规则对齐:^1[3-9]\\d{9}$) */
|
||||
|
||||
const PHONE_REG = /^1[3-9]\d{9}$/
|
||||
const MIN_NAME_LEN = 2
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/**
|
||||
/**
|
||||
* 路由权限拦截器
|
||||
* 自动拦截配置好的路径,未登录时自动弹出登录弹窗
|
||||
*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="qr-status">
|
||||
<!-- 加载中状态 -->
|
||||
<view v-if="status === 'loading'" class="status-loading">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<SkeletonBase>
|
||||
<view class="skeleton-banner"></view>
|
||||
|
||||
|
||||
@@ -0,0 +1,169 @@
|
||||
<!-- components/Skeleton/ListSkeleton.vue -->
|
||||
<template>
|
||||
<SkeletonBase>
|
||||
<!-- Tab区域 -->
|
||||
<view v-if="showTabs" class="skeleton-tabs">
|
||||
<view v-for="i in tabCount" :key="i" class="skeleton-tab skeleton-shimmer"></view>
|
||||
</view>
|
||||
<!-- 列表项 -->
|
||||
<view class="skeleton-list" :style="{ padding: listPadding }">
|
||||
<view v-for="i in count" :key="i" class="skeleton-item">
|
||||
<!-- 卡片式布局(默认) -->
|
||||
<template v-if="layout === 'card'">
|
||||
<view class="skeleton-card-item">
|
||||
<view class="skeleton-card-icon skeleton-shimmer"></view>
|
||||
<view class="skeleton-card-body">
|
||||
<view class="skeleton-card-title skeleton-shimmer"></view>
|
||||
<view class="skeleton-card-desc skeleton-shimmer"></view>
|
||||
<view class="skeleton-card-footer">
|
||||
<view class="skeleton-card-tag skeleton-shimmer"></view>
|
||||
<view class="skeleton-card-time skeleton-shimmer"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<!-- 简洁列表布局 -->
|
||||
<template v-else-if="layout === 'simple'">
|
||||
<view class="skeleton-simple-item">
|
||||
<view class="skeleton-simple-title skeleton-shimmer"></view>
|
||||
<view class="skeleton-simple-meta">
|
||||
<view class="skeleton-simple-line skeleton-shimmer"></view>
|
||||
<view class="skeleton-simple-line skeleton-shimmer short"></view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
</view>
|
||||
</view>
|
||||
</SkeletonBase>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import SkeletonBase from './SkeletonBase.vue'
|
||||
|
||||
defineProps({
|
||||
count: { type: Number, default: 6 },
|
||||
layout: { type: String, default: 'card' },
|
||||
showTabs: { type: Boolean, default: false },
|
||||
tabCount: { type: Number, default: 3 },
|
||||
listPadding: { type: String, default: '0 24rpx' }
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.skeleton-tabs {
|
||||
display: flex;
|
||||
gap: 16rpx;
|
||||
padding: 20rpx 24rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.skeleton-tab {
|
||||
height: 60rpx;
|
||||
width: 140rpx;
|
||||
border-radius: 12rpx;
|
||||
}
|
||||
|
||||
.skeleton-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16rpx;
|
||||
padding-top: 16rpx;
|
||||
}
|
||||
|
||||
/* 卡片式 */
|
||||
.skeleton-card-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 24rpx 20rpx;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.skeleton-card-icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 16rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.skeleton-card-body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12rpx;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.skeleton-card-title {
|
||||
height: 32rpx;
|
||||
width: 60%;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.skeleton-card-desc {
|
||||
height: 28rpx;
|
||||
width: 80%;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.skeleton-card-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 4rpx;
|
||||
}
|
||||
|
||||
.skeleton-card-tag {
|
||||
height: 24rpx;
|
||||
width: 80rpx;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
.skeleton-card-time {
|
||||
height: 24rpx;
|
||||
width: 120rpx;
|
||||
border-radius: 6rpx;
|
||||
}
|
||||
|
||||
/* 简洁式 */
|
||||
.skeleton-simple-item {
|
||||
padding: 28rpx 24rpx;
|
||||
background: #fff;
|
||||
border-radius: 16rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-simple-title {
|
||||
height: 34rpx;
|
||||
width: 55%;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.skeleton-simple-meta {
|
||||
display: flex;
|
||||
gap: 24rpx;
|
||||
}
|
||||
|
||||
.skeleton-simple-line {
|
||||
height: 26rpx;
|
||||
width: 180rpx;
|
||||
border-radius: 6rpx;
|
||||
|
||||
&.short {
|
||||
width: 100rpx;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.skeleton-shimmer) {
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: shimmer 1.5s infinite;
|
||||
}
|
||||
|
||||
@keyframes shimmer {
|
||||
0% { background-position: 200% 0; }
|
||||
100% { background-position: -200% 0; }
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,179 @@
|
||||
<!-- components/Skeleton/MemberCenterSkeleton.vue -->
|
||||
<template>
|
||||
<SkeletonBase>
|
||||
<!-- 头像和个人信息 -->
|
||||
<view class="skeleton-header">
|
||||
<view class="skeleton-avatar skeleton-shimmer"></view>
|
||||
<view class="skeleton-header-info">
|
||||
<view class="skeleton-name skeleton-shimmer"></view>
|
||||
<view class="skeleton-level skeleton-shimmer"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 统计数据 -->
|
||||
<view class="skeleton-stats">
|
||||
<view v-for="i in 3" :key="i" class="skeleton-stat-item">
|
||||
<view class="skeleton-stat-num skeleton-shimmer"></view>
|
||||
<view class="skeleton-stat-label skeleton-shimmer"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 会员卡 -->
|
||||
<view class="skeleton-card">
|
||||
<view class="skeleton-card-title skeleton-shimmer"></view>
|
||||
<view class="skeleton-card-body">
|
||||
<view class="skeleton-card-line skeleton-shimmer"></view>
|
||||
<view class="skeleton-card-line skeleton-shimmer short"></view>
|
||||
<view class="skeleton-card-btn skeleton-shimmer"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 快捷入口 -->
|
||||
<view class="skeleton-entry">
|
||||
<view v-for="i in 4" :key="i" class="skeleton-entry-item">
|
||||
<view class="skeleton-entry-icon skeleton-shimmer"></view>
|
||||
<view class="skeleton-entry-label skeleton-shimmer"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 底部占位 -->
|
||||
<view class="skeleton-spacer"></view>
|
||||
</SkeletonBase>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import SkeletonBase from './SkeletonBase.vue'
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.skeleton-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 40rpx 32rpx 24rpx;
|
||||
}
|
||||
|
||||
.skeleton-avatar {
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.skeleton-header-info {
|
||||
margin-left: 24rpx;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-name {
|
||||
height: 36rpx;
|
||||
width: 160rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.skeleton-level {
|
||||
height: 28rpx;
|
||||
width: 120rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.skeleton-stats {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 24rpx 32rpx;
|
||||
}
|
||||
|
||||
.skeleton-stat-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.skeleton-stat-num {
|
||||
height: 40rpx;
|
||||
width: 80rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.skeleton-stat-label {
|
||||
height: 24rpx;
|
||||
width: 60rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.skeleton-card {
|
||||
margin: 0 24rpx 24rpx;
|
||||
padding: 32rpx;
|
||||
background: #fff;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.skeleton-card-title {
|
||||
height: 32rpx;
|
||||
width: 140rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-bottom: 24rpx;
|
||||
}
|
||||
|
||||
.skeleton-card-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-card-line {
|
||||
height: 28rpx;
|
||||
width: 70%;
|
||||
border-radius: 8rpx;
|
||||
|
||||
&.short {
|
||||
width: 45%;
|
||||
}
|
||||
}
|
||||
|
||||
.skeleton-card-btn {
|
||||
height: 56rpx;
|
||||
width: 160rpx;
|
||||
border-radius: 12rpx;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
.skeleton-entry {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
padding: 24rpx 32rpx;
|
||||
}
|
||||
|
||||
.skeleton-entry-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.skeleton-entry-icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
|
||||
.skeleton-entry-label {
|
||||
height: 24rpx;
|
||||
width: 60rpx;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.skeleton-spacer {
|
||||
height: 200rpx;
|
||||
}
|
||||
|
||||
:deep(.skeleton-shimmer) {
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: shimmer 1.5s infinite;
|
||||
}
|
||||
|
||||
@keyframes shimmer {
|
||||
0% { background-position: 200% 0; }
|
||||
100% { background-position: -200% 0; }
|
||||
}
|
||||
</style>
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="message-skeleton">
|
||||
<view v-for="i in 6" :key="i" class="skeleton-item">
|
||||
<view class="skeleton-icon skeleton-shimmer"></view>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="skeleton" :style="{ padding: padding }">
|
||||
<slot />
|
||||
</view>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- components/TabBar.vue -->
|
||||
<!-- components/TabBar.vue -->
|
||||
<template>
|
||||
<view v-if="shouldShowTabBar" class="tab-bar-wrapper">
|
||||
<view class="tab-bar">
|
||||
@@ -290,4 +290,4 @@ function onTabTap(index) {
|
||||
color: rgba(130, 220, 130, 0.9);
|
||||
font-weight: 600;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- components/GlobalLoading.vue -->
|
||||
<!-- components/GlobalLoading.vue -->
|
||||
<template>
|
||||
<view v-if="visible" class="global-loading">
|
||||
<view class="loading-mask"></view>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<!-- 登录弹窗组件 -->
|
||||
<view class="login-modal-mask" v-if="visible" @tap="handleMaskTap">
|
||||
<view class="login-modal" :class="{ 'login-modal--center': modalStyle === 'center' }" @tap.stop>
|
||||
|
||||
@@ -0,0 +1,351 @@
|
||||
<template>
|
||||
<view class="ppm-overlay" v-if="visible" @tap="handleCancel">
|
||||
<view class="ppm-dialog" @tap.stop>
|
||||
<!-- 头部 -->
|
||||
<view class="ppm-header">
|
||||
<text class="ppm-header__icon">🔒</text>
|
||||
<text class="ppm-header__title">{{ title }}</text>
|
||||
<text v-if="subtitle" class="ppm-header__subtitle">{{ subtitle }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 金额展示 -->
|
||||
<view v-if="amount != null" class="ppm-amount">
|
||||
<text class="ppm-amount__label">{{ amountLabel }}</text>
|
||||
<text class="ppm-amount__value">¥{{ formatAmount(amount) }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 退款提示(免费次数) -->
|
||||
<view v-if="cancelNotice && cancelNotice.length" class="ppm-notice">
|
||||
<text>{{ cancelNotice }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 密码输入 -->
|
||||
<view class="ppm-input-wrap">
|
||||
<view class="ppm-code-box">
|
||||
<view
|
||||
v-for="i in 6"
|
||||
:key="i"
|
||||
class="ppm-code-item"
|
||||
:class="{
|
||||
'ppm-code-item--focus': focusIndex === i - 1 && password.length < 6,
|
||||
'ppm-code-item--filled': password.length >= i
|
||||
}"
|
||||
>
|
||||
<text v-if="password.length >= i" class="ppm-code-dot"></text>
|
||||
<view v-if="focusIndex === i - 1 && password.length === i - 1" class="ppm-code-cursor"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 隐藏输入框 -->
|
||||
<input
|
||||
class="ppm-hidden-input"
|
||||
type="number"
|
||||
:maxlength="6"
|
||||
:focus="inputFocus"
|
||||
:value="password"
|
||||
@input="onInput"
|
||||
@focus="onFocus"
|
||||
@blur="onBlur"
|
||||
/>
|
||||
|
||||
<!-- 提示 -->
|
||||
<view class="ppm-tips">
|
||||
<text>请输入6位支付密码</text>
|
||||
</view>
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<view class="ppm-buttons">
|
||||
<view class="ppm-btn ppm-btn--cancel" @tap="handleCancel">
|
||||
<text>取消</text>
|
||||
</view>
|
||||
<view
|
||||
class="ppm-btn ppm-btn--confirm"
|
||||
:class="{ 'ppm-btn--disabled': password.length < 6 || loading }"
|
||||
@tap="handleConfirm"
|
||||
>
|
||||
<text>{{ loading ? '验证中...' : '确认' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, nextTick } from 'vue'
|
||||
|
||||
const props = defineProps({
|
||||
visible: { type: Boolean, default: false },
|
||||
title: { type: String, default: '支付验证' },
|
||||
subtitle: { type: String, default: '' },
|
||||
amount: { type: [Number, String], default: null },
|
||||
amountLabel: { type: String, default: '支付金额' },
|
||||
cancelNotice: { type: String, default: '' },
|
||||
errorMsg: { type: String, default: '' },
|
||||
loading: { type: Boolean, default: false }
|
||||
})
|
||||
|
||||
const emit = defineEmits(['confirm', 'cancel'])
|
||||
|
||||
const password = ref('')
|
||||
const inputFocus = ref(false)
|
||||
const focusIndex = ref(0)
|
||||
|
||||
watch(() => props.visible, (val) => {
|
||||
if (val) {
|
||||
password.value = ''
|
||||
focusIndex.value = 0
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
inputFocus.value = true
|
||||
}, 300)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
function formatAmount(val) {
|
||||
return Number(val).toFixed(2)
|
||||
}
|
||||
|
||||
function onInput(e) {
|
||||
let val = String(e.detail.value || '').replace(/\D/g, '').slice(0, 6)
|
||||
password.value = val
|
||||
focusIndex.value = val.length
|
||||
}
|
||||
|
||||
function onFocus() {
|
||||
inputFocus.value = true
|
||||
focusIndex.value = password.value.length
|
||||
}
|
||||
|
||||
function onBlur() {
|
||||
// Keep focusIndex, just mark input as not focused
|
||||
}
|
||||
|
||||
function handleConfirm() {
|
||||
if (password.value.length < 6 || props.loading) return
|
||||
emit('confirm', password.value)
|
||||
}
|
||||
|
||||
function handleCancel() {
|
||||
emit('cancel')
|
||||
}
|
||||
|
||||
function clear() {
|
||||
password.value = ''
|
||||
focusIndex.value = 0
|
||||
}
|
||||
|
||||
defineExpose({ clear })
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.ppm-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 9999;
|
||||
animation: ppm-fade-in 0.25s ease;
|
||||
}
|
||||
|
||||
@keyframes ppm-fade-in {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
.ppm-dialog {
|
||||
width: 600rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 32rpx;
|
||||
padding: 48rpx 40rpx 36rpx;
|
||||
box-shadow: 0 16rpx 48rpx rgba(0, 0, 0, 0.15);
|
||||
animation: ppm-scale-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
@keyframes ppm-scale-in {
|
||||
from { opacity: 0; transform: scale(0.85); }
|
||||
to { opacity: 1; transform: scale(1); }
|
||||
}
|
||||
|
||||
.ppm-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
|
||||
.ppm-header__icon {
|
||||
font-size: 48rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.ppm-header__title {
|
||||
font-size: 34rpx;
|
||||
font-weight: 700;
|
||||
color: #1A202C;
|
||||
}
|
||||
|
||||
.ppm-header__subtitle {
|
||||
font-size: 24rpx;
|
||||
color: #8A99B4;
|
||||
margin-top: 6rpx;
|
||||
}
|
||||
|
||||
.ppm-amount {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 20rpx 40rpx;
|
||||
background: linear-gradient(135deg, #FFF5F0 0%, #FFF8F5 100%);
|
||||
border-radius: 16rpx;
|
||||
margin-bottom: 24rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.ppm-amount__label {
|
||||
font-size: 22rpx;
|
||||
color: #8A99B4;
|
||||
margin-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.ppm-amount__value {
|
||||
font-size: 48rpx;
|
||||
font-weight: 800;
|
||||
color: #FF6B35;
|
||||
font-family: 'DIN', 'Helvetica Neue', sans-serif;
|
||||
}
|
||||
|
||||
.ppm-notice {
|
||||
width: 100%;
|
||||
padding: 12rpx 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
background: #FFF7ED;
|
||||
border-radius: 12rpx;
|
||||
border: 1rpx solid #FFEDD5;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.ppm-notice text {
|
||||
font-size: 22rpx;
|
||||
color: #C2410C;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.ppm-input-wrap {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.ppm-code-box {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.ppm-code-item {
|
||||
width: 36px;
|
||||
height: 40px;
|
||||
background: #FFFFFF;
|
||||
border: 1px solid #E2E8F0;
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.ppm-code-item--focus {
|
||||
border-color: #FF6B35;
|
||||
}
|
||||
|
||||
.ppm-code-item--filled {
|
||||
border-color: #1A202C;
|
||||
}
|
||||
|
||||
.ppm-code-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: #1A202C;
|
||||
}
|
||||
|
||||
.ppm-code-cursor {
|
||||
width: 2px;
|
||||
height: 20px;
|
||||
background: #FF6B35;
|
||||
animation: ppm-blink 1s infinite;
|
||||
}
|
||||
|
||||
@keyframes ppm-blink {
|
||||
0%, 100% { opacity: 1; }
|
||||
50% { opacity: 0; }
|
||||
}
|
||||
|
||||
.ppm-hidden-input {
|
||||
position: fixed;
|
||||
left: -9999px;
|
||||
top: -9999px;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
opacity: 0;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.ppm-tips {
|
||||
margin-bottom: 32rpx;
|
||||
}
|
||||
|
||||
.ppm-tips text {
|
||||
font-size: 22rpx;
|
||||
color: #8A99B4;
|
||||
}
|
||||
|
||||
.ppm-buttons {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.ppm-btn {
|
||||
flex: 1;
|
||||
height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 28rpx;
|
||||
font-weight: 600;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.ppm-btn:active {
|
||||
transform: scale(0.96);
|
||||
}
|
||||
|
||||
.ppm-btn--cancel {
|
||||
background: #F3F4F6;
|
||||
color: #6B7280;
|
||||
}
|
||||
|
||||
.ppm-btn--confirm {
|
||||
background: linear-gradient(135deg, #FF6B35 0%, #FF8C5A 100%);
|
||||
color: #FFFFFF;
|
||||
box-shadow: 0 8rpx 20rpx rgba(255, 107, 53, 0.25);
|
||||
}
|
||||
|
||||
.ppm-btn--disabled {
|
||||
opacity: 0.5;
|
||||
}
|
||||
</style>
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view
|
||||
class="verify-code-input"
|
||||
@tap="focusInput"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<!-- 团课卡片容器 -->
|
||||
<view class="course-card" @click="goDetail">
|
||||
<!-- 卡片顶部图片区域 -->
|
||||
@@ -7,7 +7,7 @@
|
||||
<view v-if="!imageLoaded" class="skeleton skeleton-image"></view>
|
||||
<!-- 课程封面图片 -->
|
||||
<image
|
||||
:src="course.coverImage"
|
||||
:src="getCourseCoverUrl(course.coverImage)"
|
||||
mode="aspectFill"
|
||||
class="cover-image"
|
||||
:class="{ hidden: !imageLoaded }"
|
||||
@@ -111,6 +111,7 @@
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from 'vue'
|
||||
import { getCourseCoverUrl } from '@/utils/request.js'
|
||||
|
||||
// 图片加载状态
|
||||
const imageLoaded = ref(false)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="filter-section">
|
||||
<!-- 课程类型筛选 -->
|
||||
<picker
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="search-bar-wrapper">
|
||||
<!-- 搜索框 -->
|
||||
<view class="search-bar">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="time-period-selector">
|
||||
<view class="sort-header">
|
||||
<uni-icons type="calendar" size="16" color="#FF6B35" class="sort-icon" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view>
|
||||
<!-- 时间范围选择弹窗 -->
|
||||
<Transition name="modal">
|
||||
|
||||
@@ -134,7 +134,7 @@ const onImageLoad = (index) => {
|
||||
}
|
||||
|
||||
const onImageError = (index) => {
|
||||
console.error(`图片 ${index} 加载失败`)
|
||||
console.error(`图片 ${index} 加载失败, URL:`, banners.value[index]?.image?.substring(0, 120))
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<!-- 课程卡片 -->
|
||||
<view class="course-card" :style="cardStyle">
|
||||
<!-- 课程图片区域 -->
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<!-- 状态栏占位区(仅 App 端生效,H5/小程序无状态栏概念) -->
|
||||
<view class="tab-page__status-bar" :style="{ height: statusBarHeight + 'px' }"></view>
|
||||
<!-- 导航栏主体 -->
|
||||
|
||||
@@ -75,6 +75,8 @@ import { ref, onMounted } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { getActiveRecommendCourses } from '@/api/groupCourse.js'
|
||||
|
||||
import { getCourseCoverUrl } from '@/utils/request.js'
|
||||
|
||||
console.log('[RecommendCourses] 组件脚本已加载')
|
||||
|
||||
// 推荐课程数据列表
|
||||
@@ -99,12 +101,8 @@ const getCourseLevel = (course) => {
|
||||
return '初级'
|
||||
}
|
||||
|
||||
// 处理图片URL
|
||||
const getImageUrl = (coverImage) => {
|
||||
if (!coverImage) return 'https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=400&q=80'
|
||||
if (coverImage.startsWith('http')) return coverImage
|
||||
return `https://your-domain.com${coverImage}`
|
||||
}
|
||||
// 处理图片URL - 已由 getOssUrl 工具函数处理
|
||||
// 使用 @/utils/request.js 中的 getOssUrl 替代
|
||||
|
||||
// 获取推荐课程
|
||||
const fetchRecommendCourses = async () => {
|
||||
@@ -112,6 +110,10 @@ const fetchRecommendCourses = async () => {
|
||||
try {
|
||||
const res = await getActiveRecommendCourses()
|
||||
console.log('[RecommendCourses] API 返回:', JSON.stringify(res).substring(0, 200))
|
||||
if (res && Array.isArray(res) && res.length > 0) {
|
||||
console.log('[RecommendCourses] 第一项 groupCourse.coverImage:', JSON.stringify(res[0]?.groupCourse?.coverImage))
|
||||
console.log('[RecommendCourses] 第一项完整 groupCourse:', JSON.stringify(res[0]?.groupCourse))
|
||||
}
|
||||
if (res && Array.isArray(res)) {
|
||||
// 提取推荐中的 groupCourse,只排除已满员的课程(已结束的仍展示,点击时拦截)
|
||||
const filteredCourses = res.filter(recommend => {
|
||||
@@ -125,9 +127,17 @@ const fetchRecommendCourses = async () => {
|
||||
// 只取前3个符合条件的推荐课程
|
||||
courses.value = filteredCourses.slice(0, 3).map(recommend => {
|
||||
const course = recommend.groupCourse
|
||||
const rawCover = course.coverImage
|
||||
const finalImage = getCourseCoverUrl(rawCover) || 'https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=400&q=80'
|
||||
console.log('[RecommendCourses] 封面URL映射:', {
|
||||
'courseName': course.courseName,
|
||||
'原始coverImage': rawCover,
|
||||
'转换后URL': finalImage,
|
||||
'是否为完整URL': finalImage.startsWith('http')
|
||||
})
|
||||
return {
|
||||
id: course.id,
|
||||
image: getImageUrl(course.coverImage),
|
||||
image: finalImage,
|
||||
name: course.courseName || '未知课程',
|
||||
duration: calculateDuration(course.startTime, course.endTime),
|
||||
level: getCourseLevel(course),
|
||||
|
||||
@@ -48,6 +48,8 @@ import { ref, onMounted } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { getActiveRecommendCourses } from '@/api/groupCourse.js'
|
||||
|
||||
import { getCourseCoverUrl } from '@/utils/request.js'
|
||||
|
||||
console.log('[TodayRecommend] 组件脚本已加载')
|
||||
|
||||
// 今日推荐数据列表
|
||||
@@ -72,12 +74,7 @@ const getCourseLevel = (course) => {
|
||||
return '初级'
|
||||
}
|
||||
|
||||
// 处理图片URL
|
||||
const getImageUrl = (coverImage) => {
|
||||
if (!coverImage) return 'https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?w=300&q=80'
|
||||
if (coverImage.startsWith('http')) return coverImage
|
||||
return `https://your-domain.com${coverImage}`
|
||||
}
|
||||
// 处理图片URL - 已由 getOssUrl 工具函数处理
|
||||
|
||||
// 获取今日推荐
|
||||
const fetchTodayRecommend = async () => {
|
||||
@@ -85,6 +82,10 @@ const fetchTodayRecommend = async () => {
|
||||
try {
|
||||
const res = await getActiveRecommendCourses()
|
||||
console.log('[TodayRecommend] API 返回:', JSON.stringify(res).substring(0, 200))
|
||||
if (res && Array.isArray(res) && res.length > 0) {
|
||||
console.log('[TodayRecommend] 第一项 groupCourse.coverImage:', JSON.stringify(res[0]?.groupCourse?.coverImage))
|
||||
console.log('[TodayRecommend] 第一项完整 groupCourse:', JSON.stringify(res[0]?.groupCourse))
|
||||
}
|
||||
if (res && Array.isArray(res)) {
|
||||
// 提取推荐中的 groupCourse,只排除已满员的课程
|
||||
const filteredCourses = res.filter(recommend => {
|
||||
@@ -97,9 +98,17 @@ const fetchTodayRecommend = async () => {
|
||||
|
||||
recommends.value = filteredCourses.slice(0, 3).map(recommend => {
|
||||
const course = recommend.groupCourse
|
||||
const rawCover = course.coverImage
|
||||
const finalImage = getCourseCoverUrl(rawCover) || 'https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?w=300&q=80'
|
||||
console.log('[TodayRecommend] 封面URL映射:', {
|
||||
'courseName': course.courseName,
|
||||
'原始coverImage': rawCover,
|
||||
'转换后URL': finalImage,
|
||||
'是否为完整URL': finalImage.startsWith('http')
|
||||
})
|
||||
return {
|
||||
id: course.id,
|
||||
image: getImageUrl(course.coverImage),
|
||||
image: finalImage,
|
||||
title: course.courseName || '未知课程',
|
||||
tags: [calculateDuration(course.startTime, course.endTime), getCourseLevel(course)],
|
||||
desc: course.description || '精彩课程,不容错过',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="bt-radar">
|
||||
<canvas
|
||||
:id="canvasId"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="bt-trend">
|
||||
<canvas
|
||||
:id="canvasId"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="body-report-section">
|
||||
<view class="body-report-section__inner">
|
||||
<view class="body-report-section__header">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="booking-section">
|
||||
<view class="booking-section__inner">
|
||||
<view class="booking-section__header">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="checkin-section">
|
||||
<view class="checkin-section__inner">
|
||||
<view class="checkin-section__header">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="coupon-section">
|
||||
<view class="coupon-section__inner">
|
||||
<view class="coupon-section__header">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="profile-header">
|
||||
<!-- 登录状态 -->
|
||||
<view class="profile-card" v-if="isLogin" hover-class="mi-tap--hover" :hover-stay-time="150" @tap="handleUserTap">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="logout-section">
|
||||
<view
|
||||
class="logout-section__btn"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="member-card-section">
|
||||
<view class="member-card-section__inner">
|
||||
<!-- 标题栏 -->
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="quick-actions">
|
||||
<view class="quick-actions__inner">
|
||||
<view class="quick-actions__grid">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="referral-section">
|
||||
<view class="referral-section__inner">
|
||||
<view class="referral-section__header">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="settings-section">
|
||||
<view class="settings-section__inner">
|
||||
<text class="settings-section__title">设置与安全</text>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="status-bar">
|
||||
<view class="status-bar__inner">
|
||||
<text class="status-bar__time">{{ statusBarTime }}</text>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="sub-nav">
|
||||
<view class="sub-nav__toolbar" :style="toolbarStyle">
|
||||
<view class="sub-nav__nav">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="payment-panel">
|
||||
<!-- 支付方式 -->
|
||||
<view class="pp-section">
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue'
|
||||
import { getCourseCoverUrl } from '@/utils/request.js'
|
||||
|
||||
const props = defineProps({
|
||||
recommend: {
|
||||
@@ -91,9 +92,14 @@ const courseId = computed(() => props.recommend.groupCourse?.id)
|
||||
// 课程封面图片
|
||||
const courseImage = computed(() => {
|
||||
const coverImage = props.recommend.groupCourse?.coverImage
|
||||
if (!coverImage) return 'https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=400&q=80'
|
||||
if (coverImage.startsWith('http')) return coverImage
|
||||
return `https://your-domain.com${coverImage}`
|
||||
const url = getCourseCoverUrl(coverImage) || 'https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=400&q=80'
|
||||
console.log('[RecommendCourseCard] 封面URL:', {
|
||||
'courseName': props.recommend.groupCourse?.courseName,
|
||||
'原始coverImage': coverImage,
|
||||
'转换后URL': url,
|
||||
'是否完整URL': url && url.startsWith('http')
|
||||
})
|
||||
return url
|
||||
})
|
||||
|
||||
// 课程标签文本
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ref, computed, watch } from 'vue'
|
||||
import { ref, computed, watch } from 'vue'
|
||||
import { getGroupCoursePage, getTypeLabels, searchGroupCourse } from '@/api/groupCourse.js'
|
||||
|
||||
export function useGroupCourseList() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import App from './App'
|
||||
import App from './App'
|
||||
|
||||
// #ifndef VUE3
|
||||
import Vue from 'vue'
|
||||
@@ -30,4 +30,4 @@ export function createApp() {
|
||||
app
|
||||
}
|
||||
}
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
@@ -328,4 +328,4 @@
|
||||
{ "pagePath": "pages/memberInfo/memberInfo", "text": "我的" }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- components/LoadingOverlay.vue -->
|
||||
<!-- components/LoadingOverlay.vue -->
|
||||
<template>
|
||||
<view v-if="visible" class="loading-overlay">
|
||||
<view class="loading-content">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="checkin-page">
|
||||
<!-- 顶部导航栏(固定顶部) -->
|
||||
<view class="header">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- pages/course/index.vue -->
|
||||
<!-- pages/course/index.vue -->
|
||||
<template>
|
||||
<view class="scroll-container">
|
||||
<view class="tab-page">
|
||||
@@ -270,4 +270,4 @@ function goMyCourses() {
|
||||
z-index: 1000;
|
||||
background-color: transparent;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="course-detail-page">
|
||||
<!-- 页面头部 -->
|
||||
<PageHeader title="课程详情" subtitle="团课预约" :show-back="true" />
|
||||
@@ -64,7 +64,7 @@
|
||||
<view class="cover-image-wrapper">
|
||||
<image
|
||||
v-if="course.coverImage"
|
||||
:src="course.coverImage"
|
||||
:src="getCourseCoverUrl(course.coverImage)"
|
||||
mode="aspectFill"
|
||||
class="cover-image"
|
||||
/>
|
||||
@@ -245,6 +245,7 @@
|
||||
import { ref, computed } from 'vue'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { getGroupCourseDetail, bookGroupCourse } from '@/api/groupCourse.js'
|
||||
import { getCourseCoverUrl } from '@/utils/request.js'
|
||||
import { getPrimaryMemberCard } from '@/api/main.js'
|
||||
import { getMemberId } from '@/utils/request.js'
|
||||
import PageHeader from '@/components/index/PageHeader.vue'
|
||||
|
||||
@@ -46,8 +46,16 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view
|
||||
v-if="!pageReady"
|
||||
class="course-list-skel"
|
||||
>
|
||||
<ListSkeleton :count="4" layout="card" :show-tabs="false" />
|
||||
</scroll-view>
|
||||
|
||||
<!-- 团课列表 -->
|
||||
<scroll-view
|
||||
v-else
|
||||
scroll-y
|
||||
class="course-list"
|
||||
@scrolltolower="onScrollToLower"
|
||||
@@ -95,6 +103,7 @@ import FilterSection from '@/components/groupCourse/FilterSection.vue'
|
||||
import TimePeriodSelector from '@/components/groupCourse/TimePeriodSelector.vue'
|
||||
import TimeRangePicker from '@/components/groupCourse/TimeRangePicker.vue'
|
||||
import PageHeader from '@/components/index/PageHeader.vue'
|
||||
import ListSkeleton from '@/components/Skeleton/ListSkeleton.vue'
|
||||
import { useGroupCourseList } from '@/composables/useGroupCourseList.js'
|
||||
import { getTypeLabels, getGroupCourseTypes, getMemberBookings } from '@/api/groupCourse.js'
|
||||
import { getMemberId } from '@/utils/request.js'
|
||||
@@ -111,6 +120,9 @@ const courseTypeLabelsCache = ref({})
|
||||
// 已预约课程ID集合
|
||||
const bookedCourseIds = ref(new Set())
|
||||
|
||||
// 页面加载状态
|
||||
const pageReady = ref(false)
|
||||
|
||||
// 使用组合式函数
|
||||
const {
|
||||
// 状态
|
||||
@@ -162,6 +174,7 @@ onMounted(async () => {
|
||||
])
|
||||
// 获取所有团课的类型标签
|
||||
await fetchAllCourseTypeLabels()
|
||||
pageReady.value = true
|
||||
console.log('[list.vue] 可用的搜索参数获取方法:')
|
||||
console.log(' - searchBarRef.getSearchParams()')
|
||||
console.log(' - filterSectionRef.getFilterParams()')
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<!-- 页面头部 -->
|
||||
<PageHeader title="活氧舱" subtitle="科学训练 · 遇见更好的自己" />
|
||||
|
||||
@@ -100,4 +100,4 @@ onMounted(() => {
|
||||
.bottom-placeholder {
|
||||
height: 120rpx;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="历史对比" @back="onBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="连接设备" @back="onBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="体测报告" @back="onBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="体测" @back="goBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="测量中" @back="onCancel" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="体测报告" @back="onBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="体测设置" @back="onBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="趋势分析" @back="onBack" />
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
</view>
|
||||
|
||||
<view class="booking-page__body">
|
||||
<!-- 骨架屏 -->
|
||||
<ListSkeleton v-if="loading" :count="4" layout="card" />
|
||||
|
||||
<!-- 无数据 -->
|
||||
<view v-if="!displayedBookings.length && !loading" class="booking-page__empty">
|
||||
<text class="booking-page__empty-text">
|
||||
@@ -43,7 +46,7 @@
|
||||
>
|
||||
<image
|
||||
class="bk-card__banner"
|
||||
:src="item.coverImage || item.banner || 'https://gymfuture.oss-cn-chengdu.aliyuncs.com/static/images/default-course.png'"
|
||||
:src="item.banner"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="bk-card__content">
|
||||
@@ -114,7 +117,9 @@
|
||||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import PageHeader from '@/components/index/PageHeader.vue'
|
||||
import ListSkeleton from '@/components/Skeleton/ListSkeleton.vue'
|
||||
import { getMemberId } from '@/utils/request.js'
|
||||
import { getCourseCoverUrl } from '@/utils/request.js'
|
||||
import { getMemberBookings, signinGroupCourse, cancelBooking as cancelBookingApi } from '@/api/main.js'
|
||||
|
||||
const tabs = ref([
|
||||
@@ -175,7 +180,7 @@ function mapBooking(b) {
|
||||
status: status,
|
||||
statusLabel: getBookingStatusLabel(b),
|
||||
schedule: formatBookingTime(b.courseStartTime || b.startTime || b.bookingTime),
|
||||
banner: b.coverImage || '',
|
||||
banner: getCourseCoverUrl(b.coverImage) || 'https://gymfuture.oss-cn-chengdu.aliyuncs.com/static/images/default-course.png',
|
||||
coach: b.coachName || b.coach || '教练',
|
||||
footerText: status === 'ongoing' ? '请准时参加课程' : '',
|
||||
canSignin: status === 'ongoing',
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="card-detail-page">
|
||||
<view v-if="card" class="card-detail-page__body">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<PageHeader title="签到记录" subtitle="" :show-back="true" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="confirm-payment-page">
|
||||
<view class="cp-scroll-wrap">
|
||||
<scroll-view scroll-y class="cp-scroll">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="领券中心" @back="onBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page" v-if="coupon">
|
||||
<MemberInfoSubNav title="优惠券详情" @back="onBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="我的优惠券" @back="goBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page" v-if="course">
|
||||
<MemberInfoSubNav title="课程详情" @back="onBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="课程评价" @back="onBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page mi-course-list">
|
||||
<MemberInfoSubNav title="预约课程" @back="goBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="login-page">
|
||||
<!-- 自定义Toast弹窗 -->
|
||||
<view class="custom-toast" :class="{ show: toastShow }">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="member-card-page">
|
||||
<!-- 固定页面头部 -->
|
||||
<view class="member-card-page-header">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<scroll-view scroll-y class="scroll-container theme-light">
|
||||
<view class="member-page">
|
||||
<!-- Header: 用户信息区 -->
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
|
||||
<!-- 滚动内容区域 -->
|
||||
<view class="member-scroll-wrap">
|
||||
<scroll-view scroll-y class="member-scroll">
|
||||
<!-- 骨架屏 -->
|
||||
<MemberCenterSkeleton v-if="!pageReady" />
|
||||
|
||||
<scroll-view v-else scroll-y class="member-scroll">
|
||||
<view class="member-page">
|
||||
<MemberInfoHeader
|
||||
:user-info="userInfo"
|
||||
@@ -58,6 +61,7 @@ import { setToken, getToken, clearToken } from '@/utils/request.js'
|
||||
import MemberInfoHeader from '@/components/memberInfo/MemberInfoHeader.vue'
|
||||
import MemberInfoMemberCard from '@/components/memberInfo/MemberInfoMemberCard.vue'
|
||||
import MemberInfoLogout from '@/components/memberInfo/MemberInfoLogout.vue'
|
||||
import MemberCenterSkeleton from '@/components/Skeleton/MemberCenterSkeleton.vue'
|
||||
import TabBar from '@/components/TabBar.vue'
|
||||
import PageHeader from '@/components/index/PageHeader.vue'
|
||||
|
||||
@@ -65,6 +69,7 @@ const userInfo = ref({})
|
||||
const stats = ref({})
|
||||
const cardInfo = ref({})
|
||||
const loading = ref(false)
|
||||
const pageReady = ref(false)
|
||||
const hasActiveCard = ref(false)
|
||||
const isLogin = ref(false)
|
||||
|
||||
@@ -175,9 +180,11 @@ async function fetchMemberInfo() {
|
||||
|
||||
// 刷新store中的业务数据
|
||||
refreshFromStore()
|
||||
pageReady.value = true
|
||||
console.log('[memberInfo] fetchMemberInfo 执行完成')
|
||||
} catch (err) {
|
||||
console.error('[memberInfo] 获取会员信息失败:', err)
|
||||
pageReady.value = true
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
>已完成</text>
|
||||
</view>
|
||||
|
||||
<!-- 骨架屏 -->
|
||||
<ListSkeleton v-if="loading" :count="4" layout="card" />
|
||||
|
||||
<!-- 预约列表 -->
|
||||
<view
|
||||
v-for="item in displayedBookings"
|
||||
@@ -32,7 +35,7 @@
|
||||
>
|
||||
<image
|
||||
class="mi-mod-course-card__banner"
|
||||
:src="item.coverImage || 'https://gymfuture.oss-cn-chengdu.aliyuncs.com/static/images/default-course.png'"
|
||||
:src="item.coverImage"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="mi-mod-course-card__content">
|
||||
@@ -72,8 +75,10 @@
|
||||
<script setup>
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import PageHeader from '@/components/index/PageHeader.vue'
|
||||
import ListSkeleton from '@/components/Skeleton/ListSkeleton.vue'
|
||||
import PayPasswordModal from '@/components/global/PayPasswordModal.vue'
|
||||
import { getMemberId } from '@/utils/request.js'
|
||||
import { getCourseCoverUrl } from '@/utils/request.js'
|
||||
import { getMemberBookings, qrSignInGroupCourse } from '@/api/groupCourse.js'
|
||||
import { cancelBooking as cancelBookingApi } from '@/api/groupCourse.js'
|
||||
import { getConfigByKey } from '@/api/main.js'
|
||||
@@ -190,7 +195,7 @@ function mapBooking(b) {
|
||||
statusClass: statusClass,
|
||||
schedule: formatBookingTime(courseStartTime),
|
||||
location: b.location || '',
|
||||
coverImage: b.coverImage || ''
|
||||
coverImage: getCourseCoverUrl(b.coverImage) || 'https://gymfuture.oss-cn-chengdu.aliyuncs.com/static/images/default-course.png'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page" v-if="course">
|
||||
<MemberInfoSubNav title="线上课程" @back="onBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="我的积分" @back="goBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="积分明细" @back="onBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="积分商城" @back="onBack" />
|
||||
|
||||
@@ -11,8 +11,11 @@
|
||||
<text class="pc-intro__desc">购买后立即生效,享受专属会员权益</text>
|
||||
</view>
|
||||
|
||||
<!-- 骨架屏 -->
|
||||
<ListSkeleton v-if="loadingCards" :count="3" layout="simple" />
|
||||
|
||||
<!-- 卡列表 -->
|
||||
<view class="pc-list">
|
||||
<view v-else-if="cardTypes.length" class="pc-list">
|
||||
<view
|
||||
v-for="card in cardTypes"
|
||||
:key="card.id"
|
||||
@@ -268,6 +271,7 @@
|
||||
<script setup>
|
||||
import { ref, computed, onMounted, onUnmounted } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import ListSkeleton from '@/components/Skeleton/ListSkeleton.vue'
|
||||
import { purchaseMemberCard, createPayment, createQrCodePayment, getPaymentStatus, queryHuifuTradeByOrderId, getActiveMemberCards } from '@/api/main.js'
|
||||
import { getMemberId } from '@/utils/request.js'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="recharge-page">
|
||||
<MemberInfoSubNav title="储值卡充值" @back="goBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="邀请好友" @back="goBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="set-pay-password-page">
|
||||
<MemberInfoSubNav :title="isReset ? '修改支付密码' : '设置支付密码'" @back="goBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page">
|
||||
<MemberInfoSubNav title="训练报告" @back="goBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="bt-page" v-if="session">
|
||||
<MemberInfoSubNav title="训练详情" @back="onBack" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="scroll-container theme-light">
|
||||
<view class="Pixso-frame-2_791">
|
||||
<PageHeader title="个人信息" subtitle="" :show-back="true" />
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="message-detail-page">
|
||||
<!-- 顶部导航栏 -->
|
||||
<view class="nav-header" :style="navStyle">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<view class="message-page">
|
||||
<!-- 顶部导航栏 - 使用自定义导航栏适配胶囊 -->
|
||||
<view class="nav-header" :style="navStyle">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- pages/recommendCourses/index.vue -->
|
||||
<!-- pages/recommendCourses/index.vue -->
|
||||
<template>
|
||||
<!-- 页面容器 -->
|
||||
<view class="recommend-page">
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user