Compare commits

..
2 Commits
3 changed files with 34 additions and 35 deletions
@@ -56,7 +56,7 @@ class HomeController extends Controller
$contract = Contract::withoutGlobalScope('store')
->where('customer_id', $customer->id)
->latest()
->first(['id', 'contract_no', 'status', 'start_date', 'end_date', 'total_amount']);
->first(['id', 'contract_no', 'status', 'check_in_date', 'check_out_date', 'total_amount']);
// 月嫂信息(进行中派单)
$nannyOrder = NannyOrder::withoutGlobalScope('store')
+20 -22
View File
@@ -75,7 +75,7 @@ class DemoClientSeeder extends Seeder
[6, 36.8, '℃'],
[1, 36.4, '℃'],
[2, 57.9, 'kg'],
[3, '110/70', 'mmHg'],
[3, 110, 'mmHg'],
[5, 3.72, 'kg'],
];
foreach ($metricData as $i => [$type, $value, $unit]) {
@@ -84,7 +84,7 @@ class DemoClientSeeder extends Seeder
'metric_type' => $type,
'value' => $value,
'unit' => $unit,
'measured_at' => now()->subDays((int)($i / 2))->setHour(8 + $i % 3),
'recorded_at' => now()->subDays((int)($i / 2))->setHour(8 + $i % 3),
'created_at' => now()->subDays((int)($i / 2)),
]);
}
@@ -225,26 +225,24 @@ class DemoClientSeeder extends Seeder
// ── 9. 投诉反馈 ───────────────────────────────────────────────────────
DB::table('complaints')->insert([
[
'store_id' => $storeId,
'customer_id' => $customerId,
'type' => 1,
'content' => '昨晚空调温度偏低,宝宝有点凉,希望能保持在26度左右',
'status' => 2,
'handle_result' => '已通知客房调整空调,确保室温维持在25-26℃,感谢您的反馈!',
'handle_at' => now()->subDays(1),
'created_at' => now()->subDays(2),
'updated_at' => now()->subDays(1),
],
[
'store_id' => $storeId,
'customer_id' => $customerId,
'type' => 2,
'content' => '今日午餐的汤偏咸,建议减少盐量,产后饮食应清淡',
'status' => 1,
'created_at' => now()->subHours(5),
'updated_at' => now()->subHours(5),
],
'store_id' => $storeId,
'customer_id' => $customerId,
'type' => 1,
'content' => '昨晚空调温度偏低,宝宝有点凉,希望能保持在26度左右',
'status' => 2,
'handle_result' => '已通知客房调整空调,确保室温维持在25-26℃,感谢您的反馈!',
'handle_at' => now()->subDays(1),
'created_at' => now()->subDays(2),
'updated_at' => now()->subDays(1),
]);
DB::table('complaints')->insert([
'store_id' => $storeId,
'customer_id' => $customerId,
'type' => 2,
'content' => '今日午餐的汤偏咸,建议减少盐量,产后饮食应清淡',
'status' => 1,
'created_at' => now()->subHours(5),
'updated_at' => now()->subHours(5),
]);
$this->command->info("✅ Demo 客户创建成功!");
+13 -12
View File
@@ -34,10 +34,12 @@ const checkinDays = computed(() => {
})
const features = [
{ label: '月子餐', bg: '#fff0f4', color: '#f43f5e', icon: '🍱', path: '/meal' },
{ label: '服务包', bg: '#eff6ff', color: '#3b82f6', icon: '🛏', path: '/service/orders' },
{ label: '护理记录', bg: '#fffbeb', color: '#f59e0b', icon: '🩺', path: '/care/records' },
{ label: '我的月嫂', bg: '#f5f3ff', color: '#8b5cf6', icon: '👩', path: '/nanny' },
{ label: '月子餐', bg: '#fff0f4', color: '#f43f5e', icon: 'food-o', path: '/meal' },
{ label: '护理记录', bg: '#fffbeb', color: '#f59e0b', icon: 'notes-o', path: '/care/records' },
{ label: '健康档案', bg: '#f0fdf4', color: '#10b981', icon: 'records-o', path: '/grow' },
{ label: '服务包', bg: '#eff6ff', color: '#3b82f6', icon: 'gift-o', path: '/service/orders' },
{ label: '我的月嫂', bg: '#f5f3ff', color: '#8b5cf6', icon: 'manager-o', path: '/nanny' },
{ label: '账户余额', bg: '#fff7ed', color: '#f97316', icon: 'balance-o', path: '/account' },
]
const today = new Date().toLocaleDateString('zh-CN', { year: 'numeric', month: 'long', day: 'numeric' })
@@ -84,7 +86,7 @@ const today = new Date().toLocaleDateString('zh-CN', { year: 'numeric', month: '
</div>
</div>
<!-- 4 格功能入口圆形图标 -->
<!-- 6 格功能入口圆形图标 3×2 -->
<div class="features-row">
<div
v-for="f in features"
@@ -93,7 +95,7 @@ const today = new Date().toLocaleDateString('zh-CN', { year: 'numeric', month: '
@click="router.push(f.path)"
>
<div class="feat-circle" :style="{ background: f.bg }">
<span class="feat-emoji">{{ f.icon }}</span>
<van-icon :name="f.icon" :color="f.color" size="26" />
</div>
<span class="feat-label">{{ f.label }}</span>
</div>
@@ -239,24 +241,23 @@ const today = new Date().toLocaleDateString('zh-CN', { year: 'numeric', month: '
}
.cam-title { color: rgba(255,255,255,0.88); font-size: 14px; font-weight: 600; letter-spacing: 0.5px; }
/* ── Features (圆形) ── */
/* ── Features (圆形 3×2) ── */
.features-row {
display: grid; grid-template-columns: repeat(4, 1fr);
gap: 8px;
display: grid; grid-template-columns: repeat(3, 1fr);
gap: 12px 8px;
margin-bottom: 22px;
background: white;
border-radius: 22px;
padding: 18px 8px 14px;
padding: 18px 8px 16px;
box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.feat-item { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.feat-circle {
width: 58px; height: 58px;
width: 56px; height: 56px;
border-radius: 50%;
display: flex; align-items: center; justify-content: center;
box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}
.feat-emoji { font-size: 26px; line-height: 1; }
.feat-label { font-size: 12px; font-weight: 600; color: #374151; text-align: center; }
/* ── Schedule Card ── */