hookehuyr

feat(plan): 重疾产品缴费年期新增"直至65岁"选项

为三款重疾保险产品添加"直至65岁"缴费年期选项:
- MPC 守护无间重疾
- MBC PRO 活跃人生重疾保 PRO
- MBC2 活跃人生重疾保 2

同时添加首页产品列表 Mock 数据支持,便于前端开发测试。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 /* 1 /*
2 * @Date: 2026-02-13 01:05:52 2 * @Date: 2026-02-13 01:05:52
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2026-02-15 14:59:27 4 + * @LastEditTime: 2026-02-25 17:18:05
5 * @FilePath: /manulife-weapp/src/config/app.js 5 * @FilePath: /manulife-weapp/src/config/app.js
6 * @Description: 应用配置 6 * @Description: 应用配置
7 */ 7 */
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
29 * // 关闭 Mock 数据(生产环境) 29 * // 关闭 Mock 数据(生产环境)
30 * USE_MOCK_DATA = false 30 * USE_MOCK_DATA = false
31 */ 31 */
32 -export const USE_MOCK_DATA = false 32 +export const USE_MOCK_DATA = true
33 33
34 /** 34 /**
35 * 根据 NODE_ENV 自动判断是否使用 Mock 35 * 根据 NODE_ENV 自动判断是否使用 Mock
......
...@@ -152,7 +152,8 @@ export const PLAN_TEMPLATES = { ...@@ -152,7 +152,8 @@ export const PLAN_TEMPLATES = {
152 payment_periods: [ 152 payment_periods: [
153 '10 年(15 日 - 65 岁)', 153 '10 年(15 日 - 65 岁)',
154 '20 年(15 日 - 65 岁)', 154 '20 年(15 日 - 65 岁)',
155 - '25 年(15 日 - 60 岁)' 155 + '25 年(15 日 - 60 岁)',
156 + '直至65岁'
156 ], 157 ],
157 age_range: { min: 0, max: 65 }, 158 age_range: { min: 0, max: 65 },
158 insurance_period: '终身', 159 insurance_period: '终身',
...@@ -170,7 +171,8 @@ export const PLAN_TEMPLATES = { ...@@ -170,7 +171,8 @@ export const PLAN_TEMPLATES = {
170 payment_periods: [ 171 payment_periods: [
171 '10 年(15 日 - 65 岁)', 172 '10 年(15 日 - 65 岁)',
172 '20 年(15 日 - 65 岁)', 173 '20 年(15 日 - 65 岁)',
173 - '25 年(15 日 - 60 岁)' 174 + '25 年(15 日 - 60 岁)',
175 + '直至65岁'
174 ], 176 ],
175 age_range: { min: 0, max: 65 }, 177 age_range: { min: 0, max: 65 },
176 insurance_period: '终身', 178 insurance_period: '终身',
...@@ -188,7 +190,8 @@ export const PLAN_TEMPLATES = { ...@@ -188,7 +190,8 @@ export const PLAN_TEMPLATES = {
188 payment_periods: [ 190 payment_periods: [
189 '10 年(15 日 - 65 岁)', 191 '10 年(15 日 - 65 岁)',
190 '20 年(15 日 - 65 岁)', 192 '20 年(15 日 - 65 岁)',
191 - '25 年(15 日 - 60 岁)' 193 + '25 年(15 日 - 60 岁)',
194 + '直至65岁'
192 ], 195 ],
193 age_range: { min: 0, max: 65 }, 196 age_range: { min: 0, max: 65 },
194 insurance_period: '终身', 197 insurance_period: '终身',
......
...@@ -177,6 +177,8 @@ import { weekHotAPI } from '@/api/file'; ...@@ -177,6 +177,8 @@ import { weekHotAPI } from '@/api/file';
177 import { homeIconAPI } from '@/api/home'; 177 import { homeIconAPI } from '@/api/home';
178 import { usePlanSubmit } from '@/composables/usePlanSubmit'; 178 import { usePlanSubmit } from '@/composables/usePlanSubmit';
179 import { usePermission } from '@/composables/usePermission'; 179 import { usePermission } from '@/composables/usePermission';
180 +import { USE_MOCK_DATA } from '@/config/app';
181 +import { getHotProductsMock } from '@/api/mock/mock/hotProducts';
180 182
181 // 初始化权限检查 183 // 初始化权限检查
182 const { requireLogin } = usePermission() 184 const { requireLogin } = usePermission()
...@@ -307,16 +309,17 @@ const hotProducts = ref([]); ...@@ -307,16 +309,17 @@ const hotProducts = ref([]);
307 /** 309 /**
308 * 获取热卖产品列表 310 * 获取热卖产品列表
309 * 311 *
310 - * @description 调用 listAPI 获取真实的热卖产品数据 312 + * @description 根据 USE_MOCK_DATA 开关选择使用 Mock 数据或真实 API
311 */ 313 */
312 const fetchHotProducts = async () => { 314 const fetchHotProducts = async () => {
313 try { 315 try {
314 console.log('[Index] 获取热卖产品'); 316 console.log('[Index] 获取热卖产品');
317 + console.log('[Index] 使用 Mock 数据:', USE_MOCK_DATA);
315 318
316 - // 调用真实 API 319 + // 根据 Mock 数据开关选择数据源
317 - const res = await listAPI({ 320 + const res = USE_MOCK_DATA
318 - recommend: 'hot' 321 + ? getHotProductsMock()
319 - }); 322 + : await listAPI({ recommend: 'hot' });
320 323
321 if (res.code === 1 && res.data && res.data.list) { 324 if (res.code === 1 && res.data && res.data.list) {
322 hotProducts.value = res.data.list; 325 hotProducts.value = res.data.list;
......