first commit
This commit is contained in:
@@ -0,0 +1,455 @@
|
||||
<template>
|
||||
<view class="card-container">
|
||||
<!-- 顶部标题栏 -->
|
||||
|
||||
|
||||
<!-- 就诊卡列表 -->
|
||||
<view class="card-list">
|
||||
<view
|
||||
v-for="card in cardList"
|
||||
:key="card.id"
|
||||
class="card-item"
|
||||
@click="viewCardDetail(card)"
|
||||
>
|
||||
<!-- 卡片头部 -->
|
||||
<view class="card-header">
|
||||
<view class="card-id">
|
||||
<text class="label">诊单编号:</text>
|
||||
<text class="value">{{ card.id }}</text>
|
||||
</view>
|
||||
<view :class="['status-badge', getStatusClass(card.status)]">
|
||||
{{ card.status_desc || getStatusText(card.status) }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 患者信息 -->
|
||||
<view class="card-info">
|
||||
<view class="info-row">
|
||||
<text class="info-label">患者姓名:</text>
|
||||
<text class="info-value">{{ card.patient_name || '-' }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">性别年龄:</text>
|
||||
<text class="info-value">{{ card.gender_desc || '-' }} / {{ card.age }}岁</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">诊断类型:</text>
|
||||
<text class="info-value">{{ getDiagnosisTypeName(card.diagnosis_type) }}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">证型:</text>
|
||||
<text class="info-value">{{ getSyndromeTypeName(card.syndrome_type) }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 时间信息 -->
|
||||
<view class="card-footer">
|
||||
<view class="time-info">
|
||||
<text class="time-label">诊断日期:</text>
|
||||
<text class="time-value">{{ card.diagnosis_date_text || formatDate(card.diagnosis_date) }}</text>
|
||||
</view>
|
||||
<view class="time-info">
|
||||
<text class="time-label">创建时间:</text>
|
||||
<text class="time-value">{{ card.create_time || '-' }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 快捷入口 -->
|
||||
<view class="card-actions">
|
||||
<view class="card-action-btn primary" @click.stop="viewDailyRecord(card)">
|
||||
<text class="card-action-icon">📈</text>
|
||||
<text class="card-action-text">日常记录</text>
|
||||
</view>
|
||||
<view class="card-action-btn" @click.stop="viewCardDetail(card)">
|
||||
<text class="card-action-icon">📝</text>
|
||||
<text class="card-action-text">查看 / 编辑</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<view v-if="!loading && cardList.length === 0" class="empty-state">
|
||||
<uni-icons type="wallet" size="80" color="#1890ff"></uni-icons>
|
||||
<text class="empty-text">暂无就诊卡</text>
|
||||
<view class="add-card-btn" @click="createCard">新建就诊卡</view>
|
||||
</view>
|
||||
|
||||
<!-- 加载状态 -->
|
||||
<view v-if="loading" class="loading-state">
|
||||
<text class="loading-text">加载中...</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, getCurrentInstance } from 'vue'
|
||||
import { onLaunch, onShow, onHide, onError ,onShareAppMessage} from '@dcloudio/uni-app'
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
// 数据
|
||||
const cardList = ref([])
|
||||
const loading = ref(false)
|
||||
|
||||
// 页面加载时获取数据
|
||||
onMounted(() => {
|
||||
loadCardList()
|
||||
})
|
||||
onShow(() => {
|
||||
loadCardList()
|
||||
})
|
||||
// 加载就诊卡列表
|
||||
const loadCardList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
// 检查token是否存在
|
||||
const token = uni.getStorageSync('token')
|
||||
if (!token) {
|
||||
uni.showToast({ title: '请先登录', icon: 'none' })
|
||||
// setTimeout(() => {
|
||||
// uni.redirectTo({ url: '/pages/login/login' })
|
||||
// }, 1500)
|
||||
return
|
||||
}
|
||||
|
||||
// 获取当前用户的patient_id
|
||||
const userData = uni.getStorageSync('userData')
|
||||
const patientId = userData?.diagnosis?.patient_id
|
||||
|
||||
if (!patientId) {
|
||||
//uni.showToast({ title: '患者信息不存在', icon: 'none' })
|
||||
return
|
||||
}
|
||||
|
||||
// 调用后端接口获取就诊卡列表
|
||||
const res = await proxy.apiUrl({
|
||||
url: '/api/tcm/getCardList',
|
||||
method: 'GET',
|
||||
data: {
|
||||
patient_id: patientId
|
||||
}
|
||||
})
|
||||
|
||||
if (res.code === 1) {
|
||||
cardList.value = res.data || []
|
||||
} else {
|
||||
uni.showToast({ title: res.msg || '获取失败', icon: 'none' })
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('加载就诊卡列表失败:', err)
|
||||
//uni.showToast({ title: '加载失败', icon: 'none' })
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 查看卡片详情
|
||||
const viewCardDetail = (card) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/Card/edit_card?id=${card.id}`
|
||||
})
|
||||
}
|
||||
|
||||
// 查看日常记录(血糖血压 / 饮食 / 运动 / 跟踪备注 + 波浪图)
|
||||
const viewDailyRecord = (card) => {
|
||||
const url = `/tongji/pages/index?diagnosis_id=${card.id}` +
|
||||
`&patient_id=${card.patient_id || ''}` +
|
||||
`&patient_name=${encodeURIComponent(card.patient_name || '')}` +
|
||||
`&age=${card.age || ''}` +
|
||||
`&gender=${card.gender || ''}`
|
||||
uni.navigateTo({ url })
|
||||
}
|
||||
|
||||
// 新建就诊卡(patient_id 创建后自动生成,仅需登录)
|
||||
const createCard = () => {
|
||||
const token = uni.getStorageSync('token')
|
||||
if (!token) {
|
||||
uni.showToast({ title: '请先登录', icon: 'none' })
|
||||
return
|
||||
}
|
||||
uni.navigateTo({
|
||||
url: '/pages/Card/edit_card?add=1'
|
||||
})
|
||||
}
|
||||
|
||||
// 获取状态文本
|
||||
const getStatusText = (status) => {
|
||||
return status === 1 ? '启用' : '禁用'
|
||||
}
|
||||
|
||||
// 获取状态样式类
|
||||
const getStatusClass = (status) => {
|
||||
return status === 1 ? 'status-confirmed' : 'status-pending'
|
||||
}
|
||||
|
||||
// 诊断类型字典
|
||||
const diagnosisTypeMap = {
|
||||
'first_visit': '初诊',
|
||||
'follow_up': '复诊',
|
||||
'consultation': '会诊'
|
||||
}
|
||||
|
||||
// 证型字典
|
||||
const syndromeTypeMap = {
|
||||
'qi_deficiency': '气虚',
|
||||
'blood_deficiency': '血虚',
|
||||
'yin_deficiency': '阴虚',
|
||||
'yang_deficiency': '阳虚',
|
||||
'qi_stagnation': '气滞',
|
||||
'blood_stasis': '血瘀',
|
||||
'phlegm_dampness': '痰湿',
|
||||
'damp_heat': '湿热',
|
||||
'cold_dampness': '寒湿',
|
||||
'wind_cold': '风寒',
|
||||
'wind_heat': '风热'
|
||||
}
|
||||
|
||||
// 获取诊断类型名称
|
||||
const getDiagnosisTypeName = (type) => {
|
||||
return diagnosisTypeMap[type] || type || '-'
|
||||
}
|
||||
|
||||
// 获取证型名称
|
||||
const getSyndromeTypeName = (type) => {
|
||||
return syndromeTypeMap[type] || type || '-'
|
||||
}
|
||||
|
||||
// 格式化日期(时间戳转日期)
|
||||
const formatDate = (timestamp) => {
|
||||
if (!timestamp) return '-'
|
||||
const date = new Date(timestamp * 1000)
|
||||
const year = date.getFullYear()
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${year}-${month}-${day}`
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/* 适老化设计:50-80岁 - 大字号、高对比、大触控区 */
|
||||
.card-container {
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(180deg, #e8f0fa 0%, #ffffff 100%);
|
||||
padding-bottom: 56rpx;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: #ffffff;
|
||||
padding: 48rpx 40rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
|
||||
|
||||
.header-title {
|
||||
font-size: 48rpx;
|
||||
font-weight: bold;
|
||||
color: #1890ff;
|
||||
}
|
||||
}
|
||||
|
||||
.card-list {
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
.card-item {
|
||||
background: #ffffff;
|
||||
border-radius: 28rpx;
|
||||
padding: 44rpx;
|
||||
margin-bottom: 36rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.08);
|
||||
transition: all 0.3s;
|
||||
min-height: 200rpx;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.98);
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 32rpx;
|
||||
padding-bottom: 28rpx;
|
||||
border-bottom: 4rpx solid #e8eaed;
|
||||
}
|
||||
|
||||
.card-id {
|
||||
.label {
|
||||
font-size: 34rpx;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.value {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
}
|
||||
|
||||
.status-badge {
|
||||
padding: 12rpx 28rpx;
|
||||
border-radius: 28rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
|
||||
&.status-confirmed {
|
||||
background: #f6ffed;
|
||||
color: #204e2b;
|
||||
border: 4rpx solid #204e2b;
|
||||
}
|
||||
|
||||
&.status-pending {
|
||||
background: #fff7e6;
|
||||
color: #fa8c16;
|
||||
border: 4rpx solid #ffd591;
|
||||
}
|
||||
}
|
||||
|
||||
.card-info {
|
||||
margin-bottom: 28rpx;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 24rpx;
|
||||
|
||||
.info-label {
|
||||
font-size: 34rpx;
|
||||
color: #555;
|
||||
min-width: 200rpx;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 36rpx;
|
||||
color: #1a1a1a;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
padding-top: 28rpx;
|
||||
border-top: 4rpx solid #e8eaed;
|
||||
}
|
||||
|
||||
.card-actions {
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
margin-top: 28rpx;
|
||||
padding-top: 28rpx;
|
||||
border-top: 4rpx solid #e8eaed;
|
||||
}
|
||||
|
||||
.card-action-btn {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 12rpx;
|
||||
padding: 24rpx 12rpx;
|
||||
background: #f6faff;
|
||||
border-radius: 20rpx;
|
||||
border: 2rpx solid #d6e6fb;
|
||||
min-height: 80rpx;
|
||||
transition: all 0.2s;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.98);
|
||||
opacity: 0.85;
|
||||
}
|
||||
|
||||
&.primary {
|
||||
background: linear-gradient(135deg, #1890ff, #0ea5a4);
|
||||
border-color: transparent;
|
||||
|
||||
.card-action-icon,
|
||||
.card-action-text {
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.card-action-icon {
|
||||
font-size: 36rpx;
|
||||
color: #1890ff;
|
||||
}
|
||||
|
||||
.card-action-text {
|
||||
font-size: 30rpx;
|
||||
color: #1890ff;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.time-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.time-label {
|
||||
font-size: 30rpx;
|
||||
color: #555;
|
||||
min-width: 180rpx;
|
||||
}
|
||||
|
||||
.time-value {
|
||||
font-size: 32rpx;
|
||||
color: #555;
|
||||
}
|
||||
}
|
||||
|
||||
.view-count {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 12rpx;
|
||||
|
||||
.count-icon {
|
||||
font-size: 34rpx;
|
||||
margin-right: 12rpx;
|
||||
}
|
||||
|
||||
.count-text {
|
||||
font-size: 30rpx;
|
||||
color: #555;
|
||||
}
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 160rpx 0;
|
||||
|
||||
.empty-icon {
|
||||
font-size: 140rpx;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 40rpx;
|
||||
color: #555;
|
||||
margin-bottom: 56rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.add-card-btn {
|
||||
padding: 36rpx 88rpx;
|
||||
background: #1890ff;
|
||||
color: #ffffff;
|
||||
font-size: 40rpx;
|
||||
font-weight: 500;
|
||||
border-radius: 56rpx;
|
||||
min-height: 100rpx;
|
||||
}
|
||||
|
||||
.loading-state {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 120rpx 0;
|
||||
|
||||
.loading-text {
|
||||
font-size: 36rpx;
|
||||
color: #555;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,287 @@
|
||||
<template>
|
||||
<view class="card-container">
|
||||
<!-- 顶部标题栏 -->
|
||||
<view class="header">
|
||||
<text class="header-title">{{ data.title }}</text>
|
||||
</view>
|
||||
|
||||
<!-- 就诊卡列表 -->
|
||||
<view class="card-list" v-html="data.content">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, getCurrentInstance } from 'vue'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
// 数据
|
||||
const data = ref({})
|
||||
const loading = ref(false)
|
||||
const type=ref('')
|
||||
// 页面加载时获取数据
|
||||
onMounted(() => {
|
||||
loadCardList()
|
||||
})
|
||||
|
||||
// 加载就诊卡列表
|
||||
const loadCardList = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
// 检查token是否存在
|
||||
const pages = getCurrentPages()
|
||||
const currentPage = pages[pages.length - 1]
|
||||
type.value = currentPage.options.type
|
||||
|
||||
// 调用后端接口获取就诊卡列表
|
||||
const res = await proxy.apiUrl({
|
||||
url: '/api/index/policy',
|
||||
method: 'GET',
|
||||
data: {
|
||||
type: type.value
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
data.value = res.data
|
||||
uni.setNavigationBarTitle({
|
||||
title: res.data.title
|
||||
});
|
||||
|
||||
} catch (err) {
|
||||
console.error('加载就诊卡列表失败:', err)
|
||||
//uni.showToast({ title: '加载失败', icon: 'none' })
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 查看卡片详情
|
||||
const viewCardDetail = (card) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/Card/edit_card?id=${card.id}`
|
||||
})
|
||||
}
|
||||
|
||||
// 获取状态文本
|
||||
const getStatusText = (status) => {
|
||||
return status === 1 ? '启用' : '禁用'
|
||||
}
|
||||
|
||||
// 获取状态样式类
|
||||
const getStatusClass = (status) => {
|
||||
return status === 1 ? 'status-confirmed' : 'status-pending'
|
||||
}
|
||||
|
||||
// 诊断类型字典
|
||||
const diagnosisTypeMap = {
|
||||
'first_visit': '初诊',
|
||||
'follow_up': '复诊',
|
||||
'consultation': '会诊'
|
||||
}
|
||||
|
||||
// 证型字典
|
||||
const syndromeTypeMap = {
|
||||
'qi_deficiency': '气虚',
|
||||
'blood_deficiency': '血虚',
|
||||
'yin_deficiency': '阴虚',
|
||||
'yang_deficiency': '阳虚',
|
||||
'qi_stagnation': '气滞',
|
||||
'blood_stasis': '血瘀',
|
||||
'phlegm_dampness': '痰湿',
|
||||
'damp_heat': '湿热',
|
||||
'cold_dampness': '寒湿',
|
||||
'wind_cold': '风寒',
|
||||
'wind_heat': '风热'
|
||||
}
|
||||
|
||||
// 获取诊断类型名称
|
||||
const getDiagnosisTypeName = (type) => {
|
||||
return diagnosisTypeMap[type] || type || '-'
|
||||
}
|
||||
|
||||
// 获取证型名称
|
||||
const getSyndromeTypeName = (type) => {
|
||||
return syndromeTypeMap[type] || type || '-'
|
||||
}
|
||||
|
||||
// 格式化日期(时间戳转日期)
|
||||
const formatDate = (timestamp) => {
|
||||
if (!timestamp) return '-'
|
||||
const date = new Date(timestamp * 1000)
|
||||
const year = date.getFullYear()
|
||||
const month = String(date.getMonth() + 1).padStart(2, '0')
|
||||
const day = String(date.getDate()).padStart(2, '0')
|
||||
return `${year}-${month}-${day}`
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.card-container {
|
||||
min-height: 100vh;
|
||||
background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.header {
|
||||
background: #ffffff;
|
||||
padding: 40rpx 30rpx;
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
|
||||
|
||||
.header-title {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
color: #1890ff;
|
||||
}
|
||||
}
|
||||
|
||||
.card-list {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.card-item {
|
||||
background: #ffffff;
|
||||
border-radius: 20rpx;
|
||||
padding: 30rpx;
|
||||
margin-bottom: 24rpx;
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.08);
|
||||
transition: all 0.3s;
|
||||
|
||||
&:active {
|
||||
transform: scale(0.98);
|
||||
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 24rpx;
|
||||
padding-bottom: 20rpx;
|
||||
border-bottom: 2rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.card-id {
|
||||
.label {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.value {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.status-badge {
|
||||
padding: 8rpx 20rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 24rpx;
|
||||
font-weight: 500;
|
||||
|
||||
&.status-confirmed {
|
||||
background: #f6ffed;
|
||||
color: #52c41a;
|
||||
border: 2rpx solid #b7eb8f;
|
||||
}
|
||||
|
||||
&.status-pending {
|
||||
background: #fff7e6;
|
||||
color: #fa8c16;
|
||||
border: 2rpx solid #ffd591;
|
||||
}
|
||||
}
|
||||
|
||||
.card-info {
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 16rpx;
|
||||
|
||||
.info-label {
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
min-width: 160rpx;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
padding-top: 20rpx;
|
||||
border-top: 2rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.time-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 12rpx;
|
||||
|
||||
.time-label {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
min-width: 140rpx;
|
||||
}
|
||||
|
||||
.time-value {
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.view-count {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 8rpx;
|
||||
|
||||
.count-icon {
|
||||
font-size: 28rpx;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
|
||||
.count-text {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 120rpx 0;
|
||||
|
||||
.empty-icon {
|
||||
font-size: 120rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.empty-text {
|
||||
font-size: 32rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
.loading-state {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 80rpx 0;
|
||||
|
||||
.loading-text {
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,426 @@
|
||||
<template>
|
||||
<view class="mine-page">
|
||||
<!-- 顶部用户信息卡片 -->
|
||||
<div class="user-card" @click="navigateTo('/pages/user/userinfo')">
|
||||
<div class="user-header">
|
||||
<image class="avatar" :src="userInfo.avatar" mode="aspectFill" />
|
||||
<div class="user-info">
|
||||
<text class="nickname">{{ userInfo.nickname || '未登录' }}</text>
|
||||
<!-- <text class="vip-tag">VIP会员</text> -->
|
||||
</div>
|
||||
<!-- <div class="qr-code" @click.stop="showQRCode">
|
||||
<uni-icons type="scan" size="20" color="#333"></uni-icons>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="stat-row">
|
||||
<div class="stat-item">
|
||||
<text class="value">{{ userInfo.balance || 0 }}</text>
|
||||
<text class="label">钱包(元)</text>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<text class="value">{{ userInfo.points || 0 }}</text>
|
||||
<text class="label">积分</text>
|
||||
</div>
|
||||
<div class="stat-item">
|
||||
<text class="value">{{ userInfo.coupons || 0 }}</text>
|
||||
<text class="label">优惠券</text>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 订单卡片 -->
|
||||
<!-- <div class="order-card">
|
||||
<div class="card-header">
|
||||
<text class="title">我的订单</text>
|
||||
<div class="more" @click="navigateTo('/pages/order/list')">
|
||||
<text>查看全部</text>
|
||||
<uni-icons type="right" size="14" color="#999"></uni-icons>
|
||||
</div>
|
||||
</div>
|
||||
<div class="order-list">
|
||||
<div
|
||||
class="order-item"
|
||||
v-for="(item, index) in orderTypes"
|
||||
:key="index"
|
||||
@click="navigateTo(item.path)"
|
||||
>
|
||||
<div class="icon-wrapper">
|
||||
<image :src="item.image" mode="aspectFit" class="order-icon" />
|
||||
<text v-if="item.count" class="count-badge">{{ item.count }}</text>
|
||||
</div>
|
||||
<text class="order-name">{{ item.name }}</text>
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- 快捷功能区 -->
|
||||
<!-- <div class="quick-actions">
|
||||
<div
|
||||
class="action-item"
|
||||
v-for="(item, index) in allServices.slice(0, 4)"
|
||||
:key="index"
|
||||
@click="navigateTo(item.path)"
|
||||
>
|
||||
<div class="action-icon" :class="item.class">
|
||||
<uni-icons :type="item.icon" size="24" color="#fff"></uni-icons>
|
||||
</div>
|
||||
<text class="action-name">{{ item.name }}</text>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- 服务菜单列表(适老化:显示全部,大触控区) -->
|
||||
<div class="service-list">
|
||||
<div
|
||||
class="service-item"
|
||||
v-for="(item, index) in allServices"
|
||||
:key="index"
|
||||
@click="navigateTo(item.path)"
|
||||
>
|
||||
<div class="left">
|
||||
<div class="service-icon" :class="item.class">
|
||||
<uni-icons :type="item.icon" size="28" color="#fff"></uni-icons>
|
||||
</div>
|
||||
<text class="service-name">{{ item.name }}</text>
|
||||
</div>
|
||||
<div class="right">
|
||||
<text v-if="item.desc" class="desc">{{ item.desc }}</text>
|
||||
<uni-icons type="right" size="20" color="#666"></uni-icons>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- DEV 开发悬浮入口(生产环境自动隐藏) -->
|
||||
<dev-training-entry :bottom="360" />
|
||||
<TabBarDock :active="1" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { onShow, onShareAppMessage } from '@dcloudio/uni-app'
|
||||
import DevTrainingEntry from '@/components/dev-training-entry/index.vue'
|
||||
import TabBarDock from '@/components/app-tab-bar/tab-bar-dock.vue'
|
||||
export default {
|
||||
name: 'profileB',
|
||||
components: { DevTrainingEntry, TabBarDock },
|
||||
data() {
|
||||
return {
|
||||
userInfo: {
|
||||
avatar: '',
|
||||
nickname: '',
|
||||
userId: '',
|
||||
balance: '0',
|
||||
points: '0',
|
||||
coupons: '5'
|
||||
},
|
||||
orderTypes: [
|
||||
{
|
||||
name: '待付款',
|
||||
image: '/static/images/my/payment.png',
|
||||
path: '/pages/order/list?type=1',
|
||||
count: 2
|
||||
},
|
||||
{
|
||||
name: '待发货',
|
||||
image: '/static/images/my/delivery.png',
|
||||
path: '/pages/order/list?type=2',
|
||||
count: 1
|
||||
},
|
||||
{
|
||||
name: '待收货',
|
||||
image: '/static/images/my/shipping.png',
|
||||
path: '/pages/order/list?type=3',
|
||||
count: 0
|
||||
},
|
||||
{
|
||||
name: '待评价',
|
||||
image: '/static/images/my/review.png',
|
||||
path: '/pages/order/list?type=4',
|
||||
count: 3
|
||||
},
|
||||
{
|
||||
name: '退换/售后',
|
||||
image: '/static/images/my/after-sale.png',
|
||||
path: '/pages/order/list?type=5',
|
||||
count: 0
|
||||
}
|
||||
],
|
||||
allServices: [
|
||||
{ name: '就诊卡', icon: 'folder-add', path: '/pages/Card/Card', class: 'bg-cyan' },
|
||||
{ name: '设置', icon: 'gear', path: '/pages/user/userinfo', class: 'bg-gray' }// ,
|
||||
// { name: '客服中心', icon: 'headphones', path: '/pages/service/index', class: 'bg-orange', desc: '在线客服' }
|
||||
]
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
this.userInfo=uni.getStorageSync('userData')
|
||||
|
||||
},
|
||||
methods: {
|
||||
navigateTo(path) {
|
||||
uni.navigateTo({ url: path })
|
||||
},
|
||||
showQRCode() {
|
||||
// 显示二维码
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
/* 适老化设计:50-80岁老人 - 大字号、高对比、大触控区 */
|
||||
.mine-page {
|
||||
min-height: 100vh;
|
||||
background: #e8eaed;
|
||||
padding: 40rpx;
|
||||
padding-bottom: calc(40rpx + 200rpx + env(safe-area-inset-bottom));
|
||||
}
|
||||
|
||||
.user-card {
|
||||
background: #fff;
|
||||
border-radius: 28rpx;
|
||||
padding: 48rpx;
|
||||
margin-bottom: 40rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
|
||||
|
||||
.user-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 48rpx;
|
||||
|
||||
.avatar {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 80rpx;
|
||||
margin-right: 36rpx;
|
||||
border: 4rpx solid #e0e0e0;
|
||||
}
|
||||
|
||||
.user-info {
|
||||
flex: 1;
|
||||
|
||||
.nickname {
|
||||
font-size: 48rpx;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
margin-bottom: 16rpx;
|
||||
display: block;
|
||||
letter-spacing: 1rpx;
|
||||
}
|
||||
|
||||
.vip-tag {
|
||||
background: linear-gradient(90deg, #FFD700 0%, #FFA500 100%);
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
padding: 6rpx 20rpx;
|
||||
border-radius: 24rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.qr-code {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 44rpx;
|
||||
background: #f5f6fa;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.stat-row {
|
||||
display: flex;
|
||||
padding-top: 40rpx;
|
||||
border-top: 4rpx solid #e8eaed;
|
||||
|
||||
.stat-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
min-height: 120rpx;
|
||||
|
||||
.value {
|
||||
font-size: 52rpx;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
margin-bottom: 12rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.label {
|
||||
font-size: 32rpx;
|
||||
color: #555;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.order-card {
|
||||
background: #fff;
|
||||
border-radius: 24rpx;
|
||||
padding: 40rpx;
|
||||
margin-bottom: 30rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.04);
|
||||
|
||||
.card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.more {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
text {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
margin-right: 8rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.order-list {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
.order-item {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
|
||||
.icon-wrapper {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
margin: 0 auto 0;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.count-badge {
|
||||
position: absolute;
|
||||
top: -10rpx;
|
||||
right: -10rpx;
|
||||
background: #ff4d4f;
|
||||
color: #fff;
|
||||
font-size: 20rpx;
|
||||
min-width: 32rpx;
|
||||
height: 32rpx;
|
||||
line-height: 32rpx;
|
||||
text-align: center;
|
||||
border-radius: 16rpx;
|
||||
padding: 0 8rpx;
|
||||
}
|
||||
|
||||
.order-icon {
|
||||
width: 56rpx;
|
||||
height: 56rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.order-name {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.quick-actions {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.action-item {
|
||||
background: #fff;
|
||||
border-radius: 24rpx;
|
||||
padding: 30rpx 20rpx;
|
||||
text-align: center;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.04);
|
||||
|
||||
.action-icon {
|
||||
width: 80rpx;
|
||||
height: 80rpx;
|
||||
border-radius: 40rpx;
|
||||
margin: 0 auto 16rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.action-name {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.service-list {
|
||||
background: #fff;
|
||||
border-radius: 28rpx;
|
||||
padding: 20rpx 40rpx;
|
||||
box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.06);
|
||||
|
||||
.service-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 44rpx 0;
|
||||
border-bottom: 4rpx solid #e8eaed;
|
||||
min-height: 120rpx;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.service-icon {
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
border-radius: 44rpx;
|
||||
margin-right: 32rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.service-name {
|
||||
font-size: 38rpx;
|
||||
color: #1a1a1a;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.desc {
|
||||
font-size: 30rpx;
|
||||
color: #555;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 背景色
|
||||
.bg-red { background: #ff4d4f; }
|
||||
.bg-blue { background: #1890ff; }
|
||||
.bg-green { background: #52c41a; }
|
||||
.bg-purple { background: #722ed1; }
|
||||
.bg-orange { background: #fa8c16; }
|
||||
.bg-cyan { background: #13c2c2; }
|
||||
.bg-pink { background: #eb2f96; }
|
||||
.bg-gray { background: #666666; }
|
||||
</style>
|
||||
@@ -0,0 +1,495 @@
|
||||
<template>
|
||||
<view class="userinfo-container">
|
||||
<!-- 顶部标题栏 -->
|
||||
|
||||
|
||||
<!-- 加载状态 -->
|
||||
<view v-if="loading" class="loading-state">
|
||||
<text>加载中...</text>
|
||||
</view>
|
||||
|
||||
<!-- 编辑表单 -->
|
||||
<view v-else class="form-wrapper">
|
||||
<!-- 头像 -->
|
||||
<view class="form-section">
|
||||
<view class="form-group">
|
||||
<text class="form-label">头像</text>
|
||||
<view class="avatar-container">
|
||||
<image
|
||||
:src="formData.avatar"
|
||||
class="avatar-image"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
<view class="avatar-upload" @click="uploadAvatar">
|
||||
<uni-icons type="upload-filled" size="24" color="#FFA500" class="upload-icon"></uni-icons>
|
||||
<text class="upload-text">更换头像</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 基本信息 -->
|
||||
<view class="form-section">
|
||||
<text class="section-title">基本信息</text>
|
||||
|
||||
|
||||
<view class="form-group">
|
||||
<text class="form-label">昵称</text>
|
||||
<input
|
||||
v-model="formData.nickname"
|
||||
class="form-input"
|
||||
placeholder="请输入昵称"
|
||||
maxlength="50"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="form-group">
|
||||
<text class="form-label">性别</text>
|
||||
<view class="sex-group">
|
||||
<view
|
||||
class="sex-btn"
|
||||
:class="{ active: formData.sex === 1}"
|
||||
@click="formData.sex = 1"
|
||||
>
|
||||
男
|
||||
</view>
|
||||
<view
|
||||
class="sex-btn"
|
||||
:class="{ active: formData.sex === 2}"
|
||||
@click="formData.sex = 2"
|
||||
>
|
||||
女
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="form-group">
|
||||
<text class="form-label">年龄</text>
|
||||
<input
|
||||
v-model.number="formData.age"
|
||||
class="form-input"
|
||||
type="number"
|
||||
placeholder="请输入年龄"
|
||||
min="0"
|
||||
max="150"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 操作按钮 -->
|
||||
<view class="button-group">
|
||||
|
||||
<button class="btn btn-submit" @click="submitForm" :disabled="submitting">
|
||||
{{ submitting ? '保存中...' : '保存修改' }}
|
||||
</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted, getCurrentInstance } from 'vue'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const instance = getCurrentInstance();
|
||||
// 2. 从实例中获取全局 $url
|
||||
const $url = instance.appContext.config.globalProperties.$url;
|
||||
|
||||
// 数据
|
||||
const loading = ref(false)
|
||||
const submitting = ref(false)
|
||||
|
||||
// 表单数据
|
||||
const formData = ref({
|
||||
avatar: '',
|
||||
patient_name: '',
|
||||
phone: '',
|
||||
nickname: '',
|
||||
sex: 1,
|
||||
age: ''
|
||||
})
|
||||
|
||||
// 页面加载
|
||||
onMounted(() => {
|
||||
|
||||
loadUserInfo()
|
||||
})
|
||||
|
||||
// 加载用户信息
|
||||
const loadUserInfo = async () => {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await proxy.apiUrl({
|
||||
url: '/api/user/info',
|
||||
method: 'GET',
|
||||
data: {}
|
||||
})
|
||||
|
||||
if (res.code === 1) {
|
||||
const userInfo = res.data
|
||||
formData.value = {
|
||||
avatar: userInfo.avatar || '',
|
||||
patient_name: userInfo.patient_name || userInfo.nickname || '',
|
||||
phone: userInfo.phone || '',
|
||||
nickname: userInfo.nickname || '',
|
||||
sex: userInfo.sex =='男'?1:2,
|
||||
age: userInfo.age || ''
|
||||
}
|
||||
} else {
|
||||
uni.showToast({ title: res.msg || '加载失败', icon: 'none' })
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('加载用户信息失败:', err)
|
||||
uni.showToast({ title: '加载失败', icon: 'none' })
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 上传头像
|
||||
const uploadAvatar = () => {
|
||||
uni.chooseImage({
|
||||
count: 1,
|
||||
sizeType: ['compressed'],
|
||||
sourceType: ['album', 'camera'],
|
||||
success: async (res) => {
|
||||
const tempFilePath = res.tempFilePaths[0]
|
||||
|
||||
try {
|
||||
uni.showLoading({ title: '上传中...' })
|
||||
|
||||
// 获取token
|
||||
const token = uni.getStorageSync('token')
|
||||
|
||||
// 调用后端上传接口
|
||||
const uploadRes = await new Promise((resolve, reject) => {
|
||||
uni.uploadFile({
|
||||
url: $url+'/api/upload/image',
|
||||
filePath: tempFilePath,
|
||||
name: 'file',
|
||||
header: {
|
||||
token: token,
|
||||
'content-type': 'multipart/form-data'
|
||||
},
|
||||
success: (res) => {
|
||||
const data = JSON.parse(res.data)
|
||||
resolve(data)
|
||||
},
|
||||
fail: (err) => {
|
||||
reject(err)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
uni.hideLoading()
|
||||
|
||||
if (uploadRes.code === 1) {
|
||||
// 上传成功,更新头像
|
||||
formData.value.avatar = uploadRes.data.uri || uploadRes.data
|
||||
uni.showToast({ title: '头像上传成功', icon: 'success' })
|
||||
} else {
|
||||
uni.showToast({ title: uploadRes.msg || '上传失败', icon: 'none' })
|
||||
}
|
||||
} catch (err) {
|
||||
uni.hideLoading()
|
||||
console.error('上传头像失败:', err)
|
||||
uni.showToast({ title: '上传失败', icon: 'none' })
|
||||
}
|
||||
},
|
||||
fail: (err) => {
|
||||
console.error('选择图片失败:', err)
|
||||
uni.showToast({ title: '选择图片失败', icon: 'none' })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 验证手机号
|
||||
const validatePhone = (phone) => {
|
||||
if (!phone) return true // 可选字段
|
||||
return /^1[3-9]\d{9}$/.test(phone)
|
||||
}
|
||||
|
||||
// 提交表单
|
||||
const submitForm = async () => {
|
||||
// 验证必填字段
|
||||
if (!formData.value.patient_name) {
|
||||
uni.showToast({ title: '姓名不能为空', icon: 'none' })
|
||||
return
|
||||
}
|
||||
|
||||
// 验证手机号格式
|
||||
if (formData.value.phone && !validatePhone(formData.value.phone)) {
|
||||
uni.showToast({ title: '手机号格式不正确', icon: 'none' })
|
||||
return
|
||||
}
|
||||
|
||||
submitting.value = true
|
||||
try {
|
||||
// 调用后端API更新用户信息
|
||||
const res = await proxy.apiUrl({
|
||||
url: '/api/user/setInfo',
|
||||
method: 'POST',
|
||||
data: {
|
||||
avatar: formData.value.avatar,
|
||||
phone: formData.value.phone,
|
||||
nickname: formData.value.nickname,
|
||||
sex: formData.value.sex,
|
||||
age: formData.value.age,
|
||||
patient_name: formData.value.patient_name
|
||||
}
|
||||
})
|
||||
|
||||
if (res.code === 1) {
|
||||
// 更新本地存储
|
||||
const userData = uni.getStorageSync('userData')
|
||||
const updatedData = {
|
||||
...userData,
|
||||
avatar: formData.value.avatar,
|
||||
phone: formData.value.phone,
|
||||
nickname: formData.value.nickname,
|
||||
sex: formData.value.sex,
|
||||
age: formData.value.age,
|
||||
patient_name: formData.value.patient_name,
|
||||
diagnosis: {
|
||||
...userData.diagnosis,
|
||||
patient_name: formData.value.patient_name
|
||||
}
|
||||
}
|
||||
|
||||
uni.setStorageSync('userData', updatedData)
|
||||
|
||||
uni.showToast({ title: '保存成功', icon: 'success' })
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1500)
|
||||
} else {
|
||||
uni.showToast({ title: res.msg || '保存失败', icon: 'none' })
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('保存失败:', err)
|
||||
uni.showToast({ title: '保存失败', icon: 'none' })
|
||||
} finally {
|
||||
submitting.value = false
|
||||
}
|
||||
}
|
||||
|
||||
// 返回上一页
|
||||
const goBack = () => {
|
||||
uni.navigateBack()
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 适老化设计:50-80岁 - 大字号、高对比、大触控区 */
|
||||
.userinfo-container {
|
||||
min-height: 100vh;
|
||||
background: #e8eaed;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: #ffffff;
|
||||
padding: 24rpx 40rpx;
|
||||
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.header-back {
|
||||
font-size: 48rpx;
|
||||
color: #FFA500;
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.header-title {
|
||||
font-size: 44rpx;
|
||||
font-weight: bold;
|
||||
color: #1a1a1a;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.header-placeholder {
|
||||
width: 88rpx;
|
||||
}
|
||||
|
||||
.loading-state {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
font-size: 36rpx;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.form-wrapper {
|
||||
padding: 40rpx;
|
||||
}
|
||||
|
||||
.form-section {
|
||||
background: #ffffff;
|
||||
border-radius: 24rpx;
|
||||
padding: 40rpx;
|
||||
margin-bottom: 36rpx;
|
||||
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.06);
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
color: #FFA500;
|
||||
margin-bottom: 32rpx;
|
||||
display: block;
|
||||
padding-bottom: 24rpx;
|
||||
border-bottom: 4rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 36rpx;
|
||||
}
|
||||
|
||||
.form-group:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.form-label {
|
||||
display: block;
|
||||
font-size: 36rpx;
|
||||
color: #1a1a1a;
|
||||
font-weight: 500;
|
||||
margin-bottom: 20rpx;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.form-input {
|
||||
width: 100%;
|
||||
padding: 28rpx;
|
||||
border: 4rpx solid #e0e0e0;
|
||||
border-radius: 16rpx;
|
||||
font-size: 36rpx;
|
||||
line-height: 1.6;
|
||||
color: #1a1a1a;
|
||||
background: #ffffff;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
height: auto;
|
||||
min-height: 96rpx;
|
||||
}
|
||||
|
||||
.form-input::placeholder {
|
||||
color: #999;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 32rpx;
|
||||
}
|
||||
|
||||
.avatar-image {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 80rpx;
|
||||
background: #f0f0f0;
|
||||
border: 4rpx solid #e0e0e0;
|
||||
}
|
||||
|
||||
.avatar-upload {
|
||||
flex: 1;
|
||||
padding: 36rpx;
|
||||
border: 4rpx dashed #FFA500;
|
||||
border-radius: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 16rpx;
|
||||
min-height: 120rpx;
|
||||
}
|
||||
|
||||
.upload-icon {
|
||||
font-size: 56rpx;
|
||||
}
|
||||
|
||||
.upload-text {
|
||||
font-size: 34rpx;
|
||||
color: #FFA500;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.sex-group {
|
||||
display: flex;
|
||||
gap: 28rpx;
|
||||
}
|
||||
|
||||
.sex-btn {
|
||||
flex: 1;
|
||||
padding: 32rpx;
|
||||
border: 4rpx solid #e0e0e0;
|
||||
border-radius: 16rpx;
|
||||
text-align: center;
|
||||
font-size: 38rpx;
|
||||
line-height: 1.5;
|
||||
color: #555;
|
||||
background: #ffffff;
|
||||
transition: all 0.3s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 96rpx;
|
||||
}
|
||||
|
||||
.sex-btn.active {
|
||||
border-color: #FFA500;
|
||||
background: #fff7e6;
|
||||
color: #FFA500;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.button-group {
|
||||
display: flex;
|
||||
gap: 28rpx;
|
||||
margin-top: 56rpx;
|
||||
margin-bottom: 56rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
flex: 1;
|
||||
padding: 36rpx;
|
||||
border-radius: 20rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: bold;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
min-height: 100rpx;
|
||||
}
|
||||
|
||||
.btn:active {
|
||||
transform: scale(0.98);
|
||||
}
|
||||
|
||||
.btn:disabled {
|
||||
opacity: 0.6;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.btn-cancel {
|
||||
background: #f0f0f0;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.btn-submit {
|
||||
background: #FFA500;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-submit:active:not(:disabled) {
|
||||
background: #e69500;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user