初始化上传医疗项目到 medical-mall

This commit is contained in:
2026-04-10 09:03:21 +08:00
parent ca8794ea3a
commit ce124e7119
421 changed files with 15139 additions and 2363 deletions

View File

@@ -9,21 +9,21 @@
</view>
<!-- #endif -->
<view class="tabs">
<view class="tab" :class="{ active: activeTab === 0 }" @click="activeTab = 0">等级设置</view>
<view class="tab" :class="{ active: activeTab === 1 }" @click="activeTab = 1">客户列表</view>
<view class="tab" :class="{ active: activeTab === 0 }" @click="activeTab = 0">关怀等级设置</view>
<view class="tab" :class="{ active: activeTab === 1 }" @click="activeTab = 1">服务对象列表</view>
</view>
<scroll-view scroll-y class="list-container" v-if="activeTab === 0">
<view class="section-card">
<view class="card-header">
<text class="card-title">等级配置</text>
<text class="card-title">关怀等级配置</text>
<text class="add-btn" @click="showAddLevel = true">+ 添加等级</text>
</view>
<view class="level-list">
<view v-for="level in levels" :key="level.id" class="level-item">
<view class="level-info">
<text class="level-name">{{ level.name }}</text>
<text class="level-rate">{{ (level.discount_rate * 10).toFixed(1) }}折</text>
<text class="level-rate">优惠比例: {{ (level.discount_rate * 10).toFixed(1) }}折</text>
</view>
<view class="level-actions">
<text class="action-edit" @click="editLevel(level)">编辑</text>
@@ -36,20 +36,20 @@
<scroll-view scroll-y class="list-container" v-if="activeTab === 1">
<view class="user-list">
<view v-if="users.length === 0" class="empty-tip">暂无注册客户</view>
<view v-if="users.length === 0" class="empty-tip">暂无服务对象记录</view>
<view v-for="user in users" :key="user.id" class="user-item">
<image :src="user.avatar_url || '/static/images/default-avatar.png'" class="user-avatar" />
<view class="user-info">
<view class="user-title-row">
<text class="user-name">{{ user.nickname || user.username || '未设置昵称' }}</text>
<text class="user-name">{{ user.nickname || user.username || '未设置姓名' }}</text>
<view class="user-tier-tag" v-if="user.tier_name">{{ user.tier_name }}</view>
</view>
<text class="user-email" v-if="user.email">{{ user.email }}</text>
<text class="user-phone">{{ user.phone || '未绑定手机' }}</text>
<text class="user-phone">{{ user.phone || '未绑定手机为服务对象' }}</text>
</view>
<view class="user-actions">
<text class="action-set" @click="showSetTier(user)">设置VIP</text>
<text class="action-set discount-btn" @click="goToExclusive(user)">专属折扣</text>
<view class="user-actions">
<text class="action-set" @click="showSetTier(user)">设置关怀等级</text>
<text class="action-set discount-btn" @click="goToExclusive(user)">专属补贴</text>
</view>
</view>
</view>
@@ -64,8 +64,8 @@
<input class="input" v-model="currentLevel.name" placeholder="请输入名称" />
</view>
<view class="form-item">
<text class="label">折扣率 (0-1)</text>
<input class="input" type="digit" v-model="currentLevel.discount_rate" placeholder="如0.85表示85折" />
<text class="label">优惠比例 (0-1)</text>
<input class="input" type="digit" v-model="currentLevel.discount_rate" placeholder="如0.85表示八五折专属优惠" />
</view>
<view class="modal-btns">
<text class="btn cancel" @click="showEditModal = false">取消</text>
@@ -77,7 +77,7 @@
<!-- 设置用户等级弹窗 -->
<view class="modal" v-if="showTierModal">
<view class="modal-content">
<view class="modal-title">设置会员等级</view>
<view class="modal-title">设置关怀等级</view>
<view class="tier-options">
<view v-for="level in levels" :key="level.id"
class="tier-option"
@@ -468,62 +468,65 @@
<style>
.members-page { background-color: #f8f9fa; min-height: 100vh; }
.tabs { display: flex; background: #fff; padding: 20rpx 0; border-bottom: 1rpx solid #eee; }
/* ===== tabs 横排 ===== */
.tabs { display: flex; flex-direction: row; background: #fff; padding: 20rpx 0; border-bottom: 1rpx solid #eee; }
.tab { flex: 1; text-align: center; font-size: 28rpx; color: #666; }
.tab.active { color: #007AFF; font-weight: bold; }
.tab.active { color: rgb(66, 121, 240); font-weight: bold; }
.list-container { padding: 20rpx; }
.section-card { background: #fff; border-radius: 16rpx; padding: 30rpx; }
.card-header { display: flex; justify-content: space-between; margin-bottom: 30rpx; align-items: center; }
/* ===== 卡片头部横排 ===== */
.card-header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; margin-bottom: 30rpx; }
.card-title { font-size: 32rpx; font-weight: bold; }
.add-btn { color: #007AFF; font-size: 26rpx; }
.level-item { display: flex; justify-content: space-between; border-bottom: 1rpx solid #f5f5f5; padding: 20rpx 0; }
.level-name { font-size: 30rpx; display: block; }
.level-rate { font-size: 24rpx; color: #FF9500; }
.level-actions .text { font-size: 24rpx; margin-left: 20rpx; }
.action-edit { color: #007AFF; margin-right: 20rpx; }
.action-del { color: #FF3B30; }
.add-btn { color: rgb(66, 121, 240); font-size: 26rpx; }
.search-bar { display: flex; padding: 20rpx; background: #fff; margin-bottom: 20rpx; border-radius: 12rpx; }
/* ===== 等级列表项横排(左名称+折扣 / 右操作)===== */
.level-item { display: flex; flex-direction: row; justify-content: space-between; align-items: center; border-bottom: 1rpx solid #f5f5f5; padding: 20rpx 0; }
.level-info { display: flex; flex-direction: column; flex: 1; }
.level-name { font-size: 30rpx; color: #333; margin-bottom: 4rpx; }
.level-rate { font-size: 24rpx; color: #FF9500; }
.level-actions { display: flex; flex-direction: row; align-items: center; }
.action-edit { color: rgb(66, 121, 240); font-size: 26rpx; margin-right: 24rpx; }
.action-del { color: #FF3B30; font-size: 26rpx; }
.search-bar { display: flex; flex-direction: row; align-items: center; padding: 20rpx; background: #fff; margin-bottom: 20rpx; border-radius: 12rpx; }
.search-input { flex: 1; height: 72rpx; background: #f5f5f5; border-radius: 36rpx; padding: 0 30rpx; font-size: 26rpx; }
.search-btn { margin-left: 20rpx; color: #007AFF; line-height: 72rpx; font-size: 28rpx; }
.user-item { display: flex; align-items: center; background: #fff; padding: 24rpx; border-radius: 16rpx; margin-bottom: 20rpx; }
.user-avatar { width: 90rpx; height: 90rpx; border-radius: 45rpx; background: #eee; }
.user-info { flex: 1; margin-left: 24rpx; }
.user-name { font-size: 30rpx; font-weight: bold; display: block; }
.search-btn { margin-left: 20rpx; color: rgb(66, 121, 240); line-height: 72rpx; font-size: 28rpx; }
/* ===== 用户列表项横排(左头像 / 中信息 / 右操作)===== */
.user-item { display: flex; flex-direction: row; align-items: center; background: #fff; padding: 24rpx; border-radius: 16rpx; margin-bottom: 20rpx; }
.user-avatar { width: 90rpx; height: 90rpx; border-radius: 45rpx; background: #eee; flex-shrink: 0; }
.user-info { flex: 1; margin-left: 24rpx; display: flex; flex-direction: column; }
/* 姓名行:昵称 + 等级标签横排 */
.user-title-row { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; margin-bottom: 4rpx; }
.user-name { font-size: 30rpx; font-weight: bold; color: #333; margin-right: 10rpx; }
.user-email { font-size: 22rpx; color: #999; margin-bottom: 4rpx; }
.user-phone { font-size: 24rpx; color: #999; }
.user-tier-tag { display: inline-block; background: #FF9500; color: #fff; font-size: 20rpx; padding: 2rpx 12rpx; border-radius: 4rpx; margin-top: 8rpx; }
.action-set {
font-size: 24rpx;
color: #2196F3;
padding: 10rpx 20rpx;
background-color: #E3F2FD;
border-radius: 8rpx;
}
.action-set.discount-btn {
color: #FF9800;
background-color: #FFF8E1;
margin-left: 16rpx;
}
.user-tier-tag { background: #FF9500; color: #fff; font-size: 20rpx; padding: 2rpx 12rpx; border-radius: 4rpx; }
/* ===== 操作按钮区横排 ===== */
.user-actions { display: flex; flex-direction: row; align-items: center; flex-shrink: 0; margin-left: 16rpx; }
.action-set { font-size: 24rpx; color: rgb(66, 121, 240); padding: 10rpx 16rpx; background-color: #e8f0fe; border-radius: 8rpx; }
.action-set.discount-btn { color: #FF9800; background-color: #FFF8E1; margin-left: 12rpx; }
/* 弹窗样式 */
.modal { 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: 999; }
.modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; flex-direction: row; align-items: center; justify-content: center; z-index: 999; }
.modal-content { background: #fff; width: 600rpx; border-radius: 24rpx; padding: 40rpx; }
.modal-title { text-align: center; font-size: 34rpx; font-weight: bold; margin-bottom: 30rpx; }
.form-item { margin-bottom: 30rpx; }
.label { font-size: 26rpx; color: #666; margin-bottom: 12rpx; display: block; }
.input { background: #f5f5f5; height: 80rpx; border-radius: 12rpx; padding: 0 20rpx; font-size: 28rpx; }
.modal-btns { display: flex; justify-content: flex-end; margin-top: 40rpx; }
/* ===== modal 按钮横排 ===== */
.modal-btns { display: flex; flex-direction: row; justify-content: flex-end; margin-top: 40rpx; }
.btn { padding: 16rpx 40rpx; border-radius: 12rpx; font-size: 28rpx; margin-left: 20rpx; }
.btn.cancel { background: #eee; color: #666; }
.btn.confirm { background: #007AFF; color: #fff; }
.tier-options { display: flex; flex-wrap: wrap; }
.btn.confirm { background: rgb(66, 121, 240); color: #fff; }
/* ===== 等级选择横向排列 ===== */
.tier-options { display: flex; flex-direction: row; flex-wrap: wrap; }
.tier-option { padding: 16rpx 30rpx; background: #f5f5f5; margin: 10rpx; border-radius: 36rpx; font-size: 26rpx; }
.tier-option.selected { background: #007AFF; color: #fff; }
.tier-option.selected { background: rgb(66, 121, 240); color: #fff; }
</style>