Commit 15385b49 authored by weishengfei's avatar weishengfei

接口字段对接

parent 84c72061
// 产检提醒模块相关接口
import requestModule from './request.js';
const { api } = requestModule;
/**
* 获取产检信息
* @returns
*/
export const getInfo = (data) => api.get('/maternity_checkup/home',data);
/**
* 产看产检详情
* @returns
*/
export const getDetail = (data) => api.get('/maternityCheckup/detail',data);
/**
* 删除报告单
* @returns
*/
export const getDelete = (data) => api.get('/maternityCheckup/delete',data);
/**
* 产检项目列表
* @returns
*/
export const getExaminationItems = (data) => api.get('/maternityCheckup/examinationItems',data);
/**
* 修改产检记录
* @returns
*/
export const getUpdate = (data) => api.post('/maternityCheckup/update',data);
/**
*
* /**
* 新增产检记录
* @returns
*/
export const getAdd = (data) => api.post('/maternityCheckup/add',data);
/**
* 我的报告单列表
* @returns
*/
export const getReportList = () => api.get('/maternityCheckup/reportList');
\ No newline at end of file
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
<!-- 添加的产品项目 --> <!-- 添加的产品项目 -->
<view class="project-list" v-if="listData.length > 0"> <view class="project-list" v-if="listData.length > 0">
<view class="list-item" v-for="({name, id}, index) in listData" :key="index"> <view class="list-item" v-for="({itemName, id}, index) in listData" :key="index">
<view class="item-name"> <view class="item-name">
{{name}} {{itemName}}
</view> </view>
<image @click="onDetele(id)" class="item-img" src="/static/chanjianTool/delete.png"></image> <image @click="onDetele(id)" class="item-img" src="/static/chanjianTool/delete.png"></image>
</view> </view>
...@@ -51,12 +51,12 @@ ...@@ -51,12 +51,12 @@
<view class="upload-image" @click="onUpload"> <view class="upload-image" @click="onUpload">
<image src="/static/chanjianTool/icon11.png"></image> <image src="/static/chanjianTool/icon11.png"></image>
</view> </view>
<view class="img-list-item" v-for="( {url, id}, index) in bgdImgList" :key="index"> <view class="img-list-item" v-for="( item, index) in bgdImgList" :key="index">
<view class="item-image"> <view class="item-image">
<image class="img1" :src="url" mode="widthFix"></image> <image class="img1" :src="item" mode="widthFix"></image>
</view> </view>
<image @click="onImageDel(id)" class="img" src="/static/chanjianTool/icon14.png"></image> <image @click="onImageDel(item)" class="img" src="/static/chanjianTool/icon14.png"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -81,16 +81,16 @@ ...@@ -81,16 +81,16 @@
<!-- 项目列表 --> <!-- 项目列表 -->
<scroll-view scroll-y @touchmove.stop.prevent="" <scroll-view scroll-y @touchmove.stop.prevent=""
class="airport-list"> class="airport-list">
<view v-for="group in list" :key="group.letter" class="letter-group"> <view v-for="group in examinationList" :key="group.groupName" class="letter-group">
<view class="letter-title">{{ group.letter }}</view> <view class="letter-title">{{ group.groupName }}</view>
<view class="box"> <view class="box">
<view v-for="item in group.data" :key="item.id" class="airport-item"> <view v-for="item in group.list" :key="item.id" class="airport-item">
<view class="airport-item-radio" @click="toggleSelect(item)"> <view class="airport-item-radio" @click="toggleSelect(item)">
<image class="image-1" v-if="isSelected(item.id)" src="/static/chanjianTool/icon17.png" mode=""></image> <image class="image-1" v-if="isSelected(item.id)" src="/static/chanjianTool/icon17.png" mode=""></image>
<image class="image-2" v-else src="/static/chanjianTool/icon18.png"></image> <image class="image-2" v-else src="/static/chanjianTool/icon18.png"></image>
{{ item.name }} {{ item.itemName }}
</view> </view>
<view class="airport-item-image" @click="onView(item)"> <view class="airport-item-image" @click.stop="onView(item)">
<image src="/static/chanjianTool/icon16.png"></image> <image src="/static/chanjianTool/icon16.png"></image>
</view> </view>
...@@ -105,16 +105,16 @@ ...@@ -105,16 +105,16 @@
</view> </view>
</uni-popup> </uni-popup>
<!-- 项目介绍 --> <!-- 项目介绍 -->
<uni-popup ref="popupText" type="bottom" :mask-click="false" background-color="#FFFFFF" border-radius="32rpx 32rpx 0 0"> <uni-popup ref="popupText" type="bottom" :mask-click="true" background-color="#FFFFFF" border-radius="32rpx 32rpx 0 0">
<view class="container2"> <view class="container2">
<view class="text-t"> <view class="text-t">
<view class="t-1"> <view class="t-1">
{{popupTextObj.name}} {{popupTextObj.itemName}}
</view> </view>
<image @click="onPopupClose2" src="/static/chanjianTool/icon15.png" mode=""></image> <image @click="onPopupClose2" src="/static/chanjianTool/icon15.png" mode=""></image>
</view> </view>
<view class="text-c"> <view class="text-c">
{{popupTextObj.text}} {{popupTextObj.introduction}}
</view> </view>
</view> </view>
</uni-popup> </uni-popup>
...@@ -135,6 +135,10 @@ ...@@ -135,6 +135,10 @@
import { import {
uploadImage uploadImage
} from "../../api/common.js"; } from "../../api/common.js";
import {
getAdd,
getExaminationItems
} from '../../api/obstetric.js';
// 导入日期选择器组件 // 导入日期选择器组件
import DatePicker from '@/components/DatePicker.vue' import DatePicker from '@/components/DatePicker.vue'
...@@ -156,34 +160,10 @@ ...@@ -156,34 +160,10 @@
// 存储查看项目介绍内容 // 存储查看项目介绍内容
const popupTextObj = ref({}) const popupTextObj = ref({})
// 模拟项目列表 // 模拟项目列表
const list = ref([{ const examinationList = ref([])
"letter": "A",
"data": [{
id: 'A001',
name: "阿克苏机场",
text:'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
},
{
id: 'A002',
name: "阿拉山口机场",
text:'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
}
]
}, {
"letter": "B",
"data": [{
id: 'B001',
name: "保山机场",
text:'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
},
{
id: 'B002',
name: "包头机场",
text:'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
}
]
}]);
// 已选项目(存储ID和name) // 已选项目(存储ID和name)
const selectedAirports = ref([]); const selectedAirports = ref([]);
...@@ -191,27 +171,8 @@ ...@@ -191,27 +171,8 @@
const listData = ref([]); const listData = ref([]);
// 报告单图片 // 报告单图片
const bgdImgList = ref([{ const bgdImgList = ref([])
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
}
])
// 查看项目介绍 // 查看项目介绍
const onView = (item) =>{ const onView = (item) =>{
console.log(item) console.log(item)
...@@ -267,7 +228,7 @@ ...@@ -267,7 +228,7 @@
if (index === -1) { if (index === -1) {
selectedAirports.value.push({ selectedAirports.value.push({
id: airport.id, id: airport.id,
name: airport.name itemName: airport.itemName
}); });
} else { } else {
selectedAirports.value.splice(index, 1); selectedAirports.value.splice(index, 1);
...@@ -300,9 +261,9 @@ ...@@ -300,9 +261,9 @@
}) })
} }
// 删除上传图片 // 删除上传图片
const onImageDel = (id) => { const onImageDel = (e) => {
bgdImgList.value.filter((item, index) => { bgdImgList.value.filter((item, index) => {
if (item.id === id) { if (item === e) {
bgdImgList.value.splice(index, 1) bgdImgList.value.splice(index, 1)
} }
}) })
...@@ -328,10 +289,7 @@ ...@@ -328,10 +289,7 @@
hideLoading(); hideLoading();
if (uploadRes.success) { if (uploadRes.success) {
console.log(uploadRes) console.log(uploadRes)
bgdImgList.value.push({ bgdImgList.value.push(uploadRes.data.url)
url: uploadRes.data.url,
id: Date.now() + Math.floor(Math.random() * 1000)
})
} else { } else {
uni.showToast({ uni.showToast({
title: uploadRes.message, title: uploadRes.message,
...@@ -351,14 +309,15 @@ ...@@ -351,14 +309,15 @@
}) })
return return
} }
const ids = listData.value.map(item => item.id).join(',');
const param = { const param = {
time: time.value, checkupDate: time.value,
list: listData.value, checkupItems: ids,
bgdImgList: bgdImgList.value reportImages: bgdImgList.value
} }
console.log(param, '参数') console.log(param, '参数')
showLoading(); showLoading();
// const {success, data} = await updateBabyInfo(data); // const {success, data} = await getAdd(data);
const { success, data, message } = { const { success, data, message } = {
success: true, success: true,
message: '', message: '',
...@@ -387,6 +346,48 @@ ...@@ -387,6 +346,48 @@
}) })
} }
// 获取产检项目列表
const getList = async () =>{
// const {success, data, message} = await getExaminationItems()
const {success, message, data} = {
success: true,
message: '',
data: {
items:[
{
"groupName": "A",
"list": [{
id: 'A001',
itemName: "阿克苏机场",
introduction:'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
},
{
id: 'A002',
itemName: "阿拉山口机场阿拉山口机场阿拉山口机场",
introduction:'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
}
]
}, {
"groupName": "B",
"list": [{
id: 'B001',
itemName: "保山机场",
introduction:'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
},
{
id: 'B002',
itemName: "包头机场",
introduction:'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
}
]
}
]
}
}
if(success){
examinationList.value = data.items
}
}
onLoad((options) => { onLoad((options) => {
console.log(options) console.log(options)
if(Object.keys(options ?? {}).length){ if(Object.keys(options ?? {}).length){
...@@ -400,6 +401,7 @@ ...@@ -400,6 +401,7 @@
title: '新增产检' title: '新增产检'
}); });
} }
getList()
}) })
</script> </script>
...@@ -628,7 +630,7 @@ ...@@ -628,7 +630,7 @@
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
border-radius: 16rpx; border-radius: 16rpx;
padding: 0 36rpx; padding: 0 0 0 36rpx;
box-sizing: border-box; box-sizing: border-box;
background: #fff; background: #fff;
} }
...@@ -647,6 +649,10 @@ ...@@ -647,6 +649,10 @@
border:none; border:none;
} }
.airport-item-image{ .airport-item-image{
width: 72rpx;
text-align: center;
height: 115rpx;
line-height: 115rpx;
image{ image{
width: 11rpx; width: 11rpx;
height: 21rpx; height: 21rpx;
...@@ -654,8 +660,13 @@ ...@@ -654,8 +660,13 @@
} }
} }
.airport-item-radio{ .airport-item-radio{
flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
image{ image{
margin-right: 8rpx; margin-right: 8rpx;
margin-top: 5rpx; margin-top: 5rpx;
...@@ -734,15 +745,16 @@ ...@@ -734,15 +745,16 @@
flex-direction: column; flex-direction: column;
.text-t{ .text-t{
flex-shrink: 0; flex-shrink: 0;
display: flex; position: relative;
align-items: center;
justify-content: space-between;
.t-1{ .t-1{
flex: 1; flex: 1;
font-size: 34rpx; font-size: 34rpx;
font-weight: 700; font-weight: 700;
} }
image{ image{
position: absolute;
top: 10.5rpx;
right: 0rpx;
width: 28rpx; width: 28rpx;
height: 29rpx; height: 29rpx;
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<view class="item-time"> <view class="item-time">
<view class="item-time-l"> <view class="item-time-l">
<image src="/static/chanjianTool/icon19.png"></image> <image src="/static/chanjianTool/icon19.png"></image>
{{item.time}} {{item.checkupDate}}
</view> </view>
<view class="item-time-r" @click="onDelete(item.id)"> <view class="item-time-r" @click="onDelete(item.id)">
...@@ -22,17 +22,18 @@ ...@@ -22,17 +22,18 @@
</view> </view>
<view class="item-content"> <view class="item-content">
<view class="content-1"> <view class="content-1">
{{item.num}}次产检:孕{{item.week}} {{item.checkupTimes}}次产检:孕{{item.pregnancyCycle}}
</view> </view>
<view class="content-2"> <view class="content-2">
重点: {{getProject(item.project)}} 重点: {{getProject(item.items)}}
</view> </view>
<view class="content-3"> <view class="content-3">
<template v-for="(items, i) in item.imageList.slice(0, 3)" :key="index"> <template v-for="(e, i) in item.reportImages.slice(0, 3)" :key="i">
<view class="content-3-v" :class="{ 'has-more': i === 2 && item.imageList.length > 3 }"> <view class="content-3-v" :class="{ 'has-more': i === 2 && item.reportImages.length > 3 }">
<image @click="onPreviewImage(items.url)" :src="items.url" mode="widthFix"></image> <image @click="onPreviewImage(e)" :src="e" mode="widthFix"></image>
<view @click="onMoreImage(item.imageList)" class="more-count" v-if="i === 2 && item.imageList.length > 3"> <view @click="onMoreImage(item.reportImages)" class="more-count"
+{{ item.imageList.length - 3 }} v-if="i === 2 && item.reportImages.length > 3">
+{{ item.reportImages.length - 3 }}
</view> </view>
</view> </view>
</template> </template>
...@@ -41,19 +42,20 @@ ...@@ -41,19 +42,20 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 查看更多图片 --> <!-- 查看更多图片 -->
<view class="more-popup" v-if="showMore"> <view class="more-popup" v-if="showMore">
<view class="more-popup-list"> <view class="more-popup-list">
<view class="title"> <view class="title">
我的报告单 我的报告单
</view> </view>
<view class="more-image"> <view class="more-image">
<view v-for="(item, index) in imageListData" :key="index" class="more-image-1" @click="onPreviewImage(item.url)"> <view v-for="(item, index) in imageListData" :key="index" class="more-image-1"
<image :src="item.url"></image> @click="onPreviewImage(item)">
</view> <image :src="item"></image>
</view>
</view> </view>
</view> </view>
<view class="close-btn-bottom" @tap="closeVideo"> <view class="close-btn-bottom" @tap="onClose">
<image src="/static/chanjianTool/icon21.png"></image> <image src="/static/chanjianTool/icon21.png"></image>
</view> </view>
</view> </view>
...@@ -71,188 +73,29 @@ ...@@ -71,188 +73,29 @@
import { import {
throttleTap throttleTap
} from '@/utils/index.js'; } from '@/utils/index.js';
import {
getReportList,
getDelete
} from '../../api/obstetric.js';
import md from '../../md'; import md from '../../md';
// 控制查看更多图片 // 控制查看更多图片
const showMore = ref(false) const showMore = ref(false)
// 存储查看的图片数组 // 存储查看的图片数组
const imageListData = ref([]) const imageListData = ref([])
// 报告单数据 // 报告单数据
const listData = ref([{ const listData = ref([])
isAdd: 0, // 1 是 0 否
id: 1,
time: '2025-07-09',
num: '一', // 产检次数
week: '5-6', // 周数
status: '1', //待产检、已过期、已产检,
// 产检项目
project: [{
name: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
name: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
],
imageList: [{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
}
]
},
{
isAdd: 0, // 1 是 0 否
id: 1,
time: '2025-07-09',
num: '一', // 产检次数
week: '5-6', // 周数
status: '1', //待产检、已过期、已产检,
// 产检项目
project: [{
name: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
name: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
],
imageList: [{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
}
]
},
{
isAdd: 0, // 1 是 0 否
id: 1,
time: '2025-07-09',
num: '一', // 产检次数
week: '5-6', // 周数
status: '1', //待产检、已过期、已产检,
// 产检项目
project: [{
name: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
name: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
],
imageList: [{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
}
]
},
{
isAdd: 0, // 1 是 0 否
id: 1,
time: '2025-07-09',
num: '一', // 产检次数
week: '5-6', // 周数
status: '1', //待产检、已过期、已产检,
// 产检项目
project: [{
name: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
name: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
],
imageList: [{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
}
]
}
])
// 查看更多图片 // 查看更多图片
const onMoreImage = (item) => { const onMoreImage = (item) => {
console.log(item) console.log(item)
showMore.value = true showMore.value = true
imageListData.value = item imageListData.value = item
} }
const closeVideo=()=> { // 关闭
const onClose = () => {
showMore.value = false; showMore.value = false;
} }
// 图片预览 // 图片预览
...@@ -265,16 +108,101 @@ ...@@ -265,16 +108,101 @@
} }
// 拼接检查项目名称 // 拼接检查项目名称
const getProject = (projects) => { const getProject = (projects) => {
return projects.map(project => project.name).join('、'); return projects.map(project => project.itemName).join('、');
} }
// 删除事件 // 删除事件
const onDelete = throttleTap((id) => { const onDelete = throttleTap((id) => {
console.log(id) console.log(id)
uni.showModal({
// title: '提示',
content: '确认删除吗?',
success: function (res) {
if (res.confirm) {
getDeleteFn(id)
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
// getDeleteFn(id)
}) })
// 返回上一页面 // 返回上一页面
const backHandler = () => { const backHandler = () => {
uni.navigateBack(); uni.navigateBack();
} }
// 删除报告单
const getDeleteFn = async (id) => {
// const { code, message, data, success } = await getDelete({id})
const { code, message, data, success } = {
code: 200,
message: '成功',
success: true,
data: {}
}
if (success) {
uni.showToast({
title: '删除成功',
icon: 'none'
})
// 我的报告单
getReportListFn()
} else {
uni.showToast({
title: message,
icon: 'none'
})
}
}
// 获取报告单
const getReportListFn = async () => {
// const { code, message, data, success } = await getReportList()
const {
code,
message,
data,
success
} = {
code: 200,
message: '成功',
success: true,
data: [{
id: 1,
checkupDate: '2025-07-09',
checkupTimes: '一', // 产检次数
pregnancyCycle: '5-6', // 周数
// 产检项目
items: [{
itemName: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
itemName: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
],
reportImages: [
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
]
}
]
}
if (success) {
listData.value = data
} else {
uni.showToast({
title: message,
icon: 'none'
})
}
}
onLoad(() => {
// 我的报告单
getReportListFn()
})
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
...@@ -289,18 +217,21 @@ ...@@ -289,18 +217,21 @@
// width: 750rpx; // width: 750rpx;
top: 190rpx; top: 190rpx;
left: 31rpx; left: 31rpx;
.con-box{
.con-box {
width: 682rpx; width: 682rpx;
height: calc(100vh - 220rpx); height: calc(100vh - 220rpx);
overflow-y: auto; overflow-y: auto;
} }
.list-item { .list-item {
width: 682rpx; width: 682rpx;
border-radius: 24rpx; border-radius: 24rpx;
background: #ffffff; background: #ffffff;
padding: 35rpx 34rpx 45rpx 34rpx; padding: 35rpx 34rpx 45rpx 34rpx;
box-sizing: border-box; box-sizing: border-box;
margin-bottom: 30rpx; margin-bottom: 30rpx;
.item-time { .item-time {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
...@@ -409,6 +340,7 @@ ...@@ -409,6 +340,7 @@
margin-top: -46rpx; margin-top: -46rpx;
margin-left: 0rpx; margin-left: 0rpx;
} }
.more-popup { .more-popup {
position: fixed; position: fixed;
left: 0; left: 0;
...@@ -421,49 +353,53 @@ ...@@ -421,49 +353,53 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
z-index: 9999; z-index: 9999;
.more-popup-list{
.more-popup-list {
width: 661rpx; width: 661rpx;
height: 881rpx; height: 881rpx;
background: #ffffff; background: #ffffff;
border-radius: 52rpx; border-radius: 52rpx;
padding: 50rpx 58rpx; padding: 50rpx 58rpx;
box-sizing: border-box; box-sizing: border-box;
.title{ .title {
text-align: center; text-align: center;
font-size: 36rpx; font-size: 36rpx;
color: #b27c1e; color: #b27c1e;
margin-bottom: 45rpx; margin-bottom: 45rpx;
} }
.more-image{
.more-image {
width: 100%; width: 100%;
height: 695rpx; height: 695rpx;
overflow: auto; overflow: auto;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-content: flex-start; align-content: flex-start;
} }
.more-image-1 { .more-image-1 {
width: 169rpx; width: 169rpx;
height: 169rpx; height: 169rpx;
border-radius: 10rpx; border-radius: 10rpx;
overflow: hidden; overflow: hidden;
margin-right: 12rpx; margin-right: 12rpx;
margin-bottom: 30rpx; margin-bottom: 30rpx;
flex-shrink: 0; flex-shrink: 0;
image {
width: 100%; image {
height: 100%; width: 100%;
/* 新增:确保图片填充模式与父容器一致 */ height: 100%;
object-fit: cover; /* 新增:确保图片填充模式与父容器一致 */
/* 可选:加载时避免闪烁 */ object-fit: cover;
display: block; /* 可选:加载时避免闪烁 */
} display: block;
}
} }
} }
} }
.close-btn-bottom { .close-btn-bottom {
margin: 40rpx auto 0 auto; margin: 40rpx auto 0 auto;
width: 70rpx; width: 70rpx;
...@@ -473,7 +409,8 @@ ...@@ -473,7 +409,8 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
image{
image {
width: 70rpx; width: 70rpx;
height: 70rpx; height: 70rpx;
} }
......
...@@ -9,20 +9,21 @@ ...@@ -9,20 +9,21 @@
<view class="postnatal-con"> <view class="postnatal-con">
<!-- 轮播图 --> <!-- 轮播图 -->
<swiper class="banner-swiper" :autoplay="true" :circular="true"> <swiper class="banner-swiper" :autoplay="true" :circular="true">
<swiper-item v-for="(item, index) in bannerList" :key="index"> <swiper-item v-for="(item, index) in homeInfo.bannerList" :key="index">
<image class="banner-img" :src="`${item.img}`" mode="aspectFill" @click="handleBannerClick(item, index)" /> <image class="banner-img" :src="`${item.imageUrl}`" mode="aspectFill"
@click="handleBannerClick(item, index)" />
</swiper-item> </swiper-item>
</swiper> </swiper>
<!-- 孕期信息 --> <!-- 孕期信息 -->
<view class="postnatal-con-info"> <view class="postnatal-con-info">
<view class="info-l"> <view class="info-l">
{{homeInfo.gestationalWeeks}}
</view> </view>
<view class="info-c"> <view class="info-c">
<image class="info-img" src="/static/chanjianTool/line.png"></image> <image class="info-img" src="/static/chanjianTool/line.png"></image>
</view> </view>
<view class="info-r"> <view class="info-r">
预产期:2025-10-01 预产期:{{homeInfo.dueDate}}
</view> </view>
</view> </view>
<!-- 按钮 --> <!-- 按钮 -->
...@@ -37,21 +38,20 @@ ...@@ -37,21 +38,20 @@
</view> </view>
<!-- 产检记录 --> <!-- 产检记录 -->
<view class="postnatal-con-record"> <view class="postnatal-con-record">
<view class="record-item" <view class="record-item"
v-for="({id, time, num, week, status, project, isAdd}, index) in recordList" v-for="({id, checkupDate, index, pregnancyWeek, status, examinationItems, type}, i) in homeInfo.checkupList"
@click="onDetails(id)" @click="onDetails(id)" :key="i">
:key="index" <image class="add-image" v-if="type === 1 " src="/static/chanjianTool/bs.png"></image>
>
<image class="add-image" v-if="isAdd ===1 " src="/static/chanjianTool/bs.png"></image>
<view class="item-t"> <view class="item-t">
<view class="item-t-l"> <view class="item-t-l">
{{num}}次产检 {{index}}次产检
</view> </view>
<view class="item-t-r"> <view class="item-t-r">
<view class=""> <view class="">
产检时间:{{ time ? time : '---'}} 产检时间:{{ checkupDate ? checkupDate : '---'}}
</view> </view>
<image @click="onEdit(id, time)" class="edit-img" src="/static/chanjianTool/edit.png"></image> <image @click.stop="onEdit(id, checkupDate)" class="edit-img" src="/static/chanjianTool/edit.png">
</image>
</view> </view>
</view> </view>
<view class="item-line"> <view class="item-line">
...@@ -59,14 +59,14 @@ ...@@ -59,14 +59,14 @@
</view> </view>
<view class="item-c"> <view class="item-c">
<view class="item-c-l"> <view class="item-c-l">
孕期{{week}} 孕期{{pregnancyWeek}}
</view> </view>
<view class=""> <view class="">
<image class="record-img" :src="getSrcUrl(status)"></image> <image class="record-img" :src="getSrcUrl(status)"></image>
</view> </view>
</view> </view>
<view class="item-b"> <view class="item-b">
重点:{{getProject(project)}} 重点:{{getProject(examinationItems)}}
</view> </view>
</view> </view>
</view> </view>
...@@ -75,79 +75,9 @@ ...@@ -75,79 +75,9 @@
<view class="postnatal-add" @click="onAdd"> <view class="postnatal-add" @click="onAdd">
<image src="/static/chanjianTool/add.png"></image> <image src="/static/chanjianTool/add.png"></image>
</view> </view>
<!-- 选择提醒弹窗 --> <!-- 使用封装后的日期选择器组件 -->
<view> <DatePicker v-model:visible="visible" :default-date="time" @confirm="handleDateConfirm" />
<!-- 底部弹窗遮罩层 -->
<view v-if="showPicker" class="picker-layer-mask" @click="close"></view>
<!-- 弹窗内容区 -->
<view v-if="showPicker" class="picker-layer-popup">
<view class="picker-layer-panel">
<!-- 可自定义头部 -->
<view class="picker-layer-header">
<text class="picker-layer-cancel" @click="close">取消</text>
<text class="picker-layer-confirm" @click="handleConfirm">确定</text>
</view>
<view class="picker-layer-view-mask-top"></view>
<view class="picker-layer-view-mask-bottom"></view>
<!-- picker-view 选择器核心 -->
<picker-view
class="picker-layer-view"
mask-style="background: rgb(246, 248, 250); z-index: 0;"
indicator-style="border-radius: 10px; height: 50px; background:#ffffff; z-index:0"
:value="pickerValue"
@change="handleChange"
:immediate-change="true"
>
<picker-view-column>
<view class="picker-layer-item" v-for="(item, index) in options" :key="index">{{item}}</view>
</picker-view-column>
</picker-view>
</view>
</view>
</view>
<!-- 修改时间 -->
<view >
<!-- 底部弹窗遮罩层 -->
<view v-if="visible" class="picker-layer-mask" @click="close1"></view>
<!-- 弹窗内容区 -->
<view v-if="visible" class="picker-layer-popup">
<view class="picker-layer-panel">
<!-- 可自定义头部 -->
<view class="picker-layer-header">
<text class="picker-layer-cancel" @click="close1">取消</text>
<text class="picker-layer-confirm" @click="handleConfirm1">确定</text>
</view>
<view class="picker-layer-view-mask-top"></view>
<view class="picker-layer-view-mask-bottom"></view>
<!-- picker-view 选择器核心 -->
<picker-view
class="picker-layer-view"
mask-style="background: rgb(246, 248, 250); z-index: 0;"
indicator-style="border-radius: 10px; height: 50px; background:#ffffff; z-index:0"
:value="timeValue"
:immediate-change="true"
@change="bindChange"
>
<picker-view-column>
<view class="picker-layer-item" v-for="(item,index) in years" :key="index">{{item}}</view>
</picker-view-column>
<picker-view-column>
<view class="picker-layer-item" v-for="(item,index) in months" :key="index">{{item}}</view>
</picker-view-column>
<picker-view-column>
<view class="picker-layer-item" v-for="(item,index) in days" :key="index">{{item}}</view>
</picker-view-column>
</picker-view>
</view>
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
...@@ -167,181 +97,58 @@ ...@@ -167,181 +97,58 @@
throttleTap throttleTap
} from '@/utils/index.js'; } from '@/utils/index.js';
import md from '../../md'; import md from '../../md';
import {
getInfo,
getUpdate
} from '../../api/obstetric.js';
// 导入日期选择器组件
import DatePicker from '@/components/DatePicker.vue'
const { const {
proxy proxy
} = getCurrentInstance(); } = getCurrentInstance();
const $baseUrl = proxy.$baseUrl; const $baseUrl = proxy.$baseUrl;
const back_btn = ref('') const back_btn = ref('')
// 提醒选择器相关状态 // 时间弹窗控制
const showPicker = ref(false) const visible = ref(false)
const options = ['当天', '前一天', '前三天'] // 提醒时间选项 // 时间
const pickerValue = ref([0]) // 当前选中的索引 const time = ref('')
const selectedValue = ref('') // 选中的值
// 保存要修改的id // 保存要修改的id
const editId = ref(null) const editId = ref(null)
// 日期选择器相关状态 // 首页信息
const visible = ref(false) // 是否显示日期选择器 const homeInfo = ref({})
const date = new Date()
const timeValue = ref([]) // 日期选择器当前值
// 年份数据 (2010-当前年份+2)
const years = ref([])
const currentYear = date.getFullYear()
for (let i = 2010; i <= currentYear + 2; i++) {
years.value.push(i)
}
// 月份数据
const months = ref([])
for (let i = 1; i <= 12; i++) {
months.value.push(i)
}
// 日期数据 (动态生成)
const days = ref([])
// 当前选中的年月日
const selectedYear = ref(currentYear)
const selectedMonth = ref(date.getMonth() + 1)
const selectedDay = ref(date.getDate())
// 获取某年某月的天数
function getDaysInMonth(year, month) {
return new Date(year, month, 0).getDate()
}
// 更新日期数据
const updateDays = () => {
const daysInMonth = getDaysInMonth(selectedYear.value, selectedMonth.value)
days.value = []
for (let i = 1; i <= daysInMonth; i++) {
days.value.push(i)
}
// 确保选中的日期不超过当月最大天数
if (selectedDay.value > days.value.length) {
selectedDay.value = days.value.length
}
// 更新选择器的索引值
updateValueIndices()
}
// 更新选择器的索引值
const updateValueIndices = () => {
const yearIndex = years.value.indexOf(selectedYear.value)
const monthIndex = months.value.indexOf(selectedMonth.value)
const dayIndex = days.value.indexOf(selectedDay.value)
if (yearIndex !== -1 && monthIndex !== -1 && dayIndex !== -1) {
timeValue.value = [yearIndex, monthIndex, dayIndex]
}
}
// 初始化日期数据
updateDays()
// 按钮列表 // 按钮列表
const btnList = ref([{ const btnList = ref([{
name: '提醒',
imageSrc: '/static/chanjianTool/icon1.png',
type: 1
},
{
name: '报告单', name: '报告单',
imageSrc: '/static/chanjianTool/icon2.png', imageSrc: '/static/chanjianTool/icon2.png',
type: 2 type: 1
}, },
{ {
name: '日历', name: '日历',
imageSrc: '/static/chanjianTool/icon3.png', imageSrc: '/static/chanjianTool/icon3.png',
type: 3 type: 2
}
])
// 轮播数据
const bannerList = ref([{
img: 'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl0.png',
url: `https://www.baidu.com`
},
{
img: 'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl1.png',
url: `https://www.baidu.com`
},
{
img: 'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl2.png',
url: `https://www.baidu.com`
},
]);
// 产检记录
const recordList = ref([{
isAdd: 0, // 1 是 0 否
id: 1,
time: '',
num: '一', // 产检次数
week: '5-6', // 周数
status: '1', //待产检、已过期、已产检,
// 产检项目
project: [{
name: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
name: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
},
{
isAdd: 0, // 1 是 0 否
id: 2,
time: '2025-05-11',
num: '二', // 产检次数
week: '5-6', // 周数
status: '2', //待产检、已过期、已产检,
// 产检项目
project: [{
name: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
name: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
},
{
isAdd: 1, // 1 是 0 否
id: 3,
time: '2025-05-11',
num: '三', // 产检次数
week: '5-6', // 周数
status: '3', //待产检、已过期、已产检,
// 产检项目
project: [{
name: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
name: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
} }
]) ])
// 跳转产检详情页面 // 跳转产检详情页面
const onDetails =(id) =>{ const onDetails = (id) => {
uni.navigateTo({ uni.navigateTo({
url:`/pages/productionDetails/productionDetails?id=${id}` url: `/pages/productionDetails/productionDetails?id=${id}`
}) })
} }
// 拼接检查项目名称 // 拼接检查项目名称
const getProject = (projects) => { const getProject = (projects) => {
return projects.map(project => project.name).join('、'); return projects.map(project => project.itemName).join('、');
} }
// 根据状态返回图片 // 根据状态返回图片
const getSrcUrl = (status) => { const getSrcUrl = (status) => {
const imageMap = { const imageMap = {
'1': '/static/chanjianTool/icon4.png', 'pending': '/static/chanjianTool/icon4.png',
'2': '/static/chanjianTool/icon5.png', 'expired': '/static/chanjianTool/icon5.png',
'3': '/static/chanjianTool/icon6.png', 'completed': '/static/chanjianTool/icon6.png',
}; };
return imageMap[status]; return imageMap[status];
...@@ -360,6 +167,11 @@ ...@@ -360,6 +167,11 @@
// 点击轮播图事件 // 点击轮播图事件
const handleBannerClick = (item, index) => { const handleBannerClick = (item, index) => {
console.log(item) console.log(item)
// 跳转
jump({
type: item.jumpType,
url: item.jumpUrl
})
// let buttonName = ''; // let buttonName = '';
// switch(index){ // switch(index){
// case 0: // case 0:
...@@ -372,13 +184,6 @@ ...@@ -372,13 +184,6 @@
// buttonName = '第三张焦点图'; // buttonName = '第三张焦点图';
// break; // break;
// } // }
// 跳转
jump({
type: JumpType.H5,
url: item.url
})
// md.sensorLogTake({ // md.sensorLogTake({
// xcxClick: "产品提醒页-首屏页面点击", // xcxClick: "产品提醒页-首屏页面点击",
// pageName: "产品提醒页-首屏", // pageName: "产品提醒页-首屏",
...@@ -386,138 +191,136 @@ ...@@ -386,138 +191,136 @@
// }); // });
} }
// 新增体检 // 新增体检
const onAdd = ()=>{ const onAdd = () => {
uni.navigateTo({ uni.navigateTo({
url:'/pages/addPostnatal/addPostnatal' url: '/pages/addPostnatal/addPostnatal'
}) })
} }
// 按钮点击 // 按钮点击
const onBtn = (type) => { const onBtn = (type) => {
console.log(type) // type 1 报告单 2 日历
// type 1 提醒 2 报告单 3 日历
showPicker.value
switch (type) { switch (type) {
case 1: case 1:
showPicker.value = true uni.navigateTo({
url: '/pages/myReportCard/myReportCard'
})
break; break;
case 2: case 2:
uni.navigateTo({
url:'/pages/myReportCard/myReportCard'
})
break;
case 3:
uni.navigateTo({ uni.navigateTo({
url:'/pages/productionCalendar/productionCalendar' url: '/pages/productionCalendar/productionCalendar'
}) })
break; break;
default: default:
break; break;
} }
} }
// 提醒关闭
const close = () => {
showPicker.value = false;
}
// 选择器变化事件
const handleChange = (e) => {
pickerValue.value = e.detail.value;
}
// 确认选择
const handleConfirm = () => {
close();
selectedValue.value = options[pickerValue.value[0]];
// 订阅提醒
// uni.requestSubscribeMessage({
// tmplIds: [''],
// success (res) {
// console.log(res)
// }
// })
}
// 编辑时间 // 编辑时间
const onEdit = (id, time)=>{ const onEdit = (id, newTime) => {
console.log(id, time) console.log(id, newTime)
editId.value = id time.value = newTime
visible.value = true visible.value = true
// 如果有时间,解析时间并设置选中值 editId.value = id
if (time) {
const dateParts = time.split('-')
const year = parseInt(dateParts[0])
const month = parseInt(dateParts[1])
const day = parseInt(dateParts[2])
// 更新选中值
selectedYear.value = year
selectedMonth.value = month
selectedDay.value = day
// 更新 timeValue 的索引
const yearIndex = years.value.indexOf(year)
const monthIndex = months.value.indexOf(month)
const dayIndex = days.value.indexOf(day)
// 这里直接修改 timeValue.value 会触发 watch
timeValue.value = [yearIndex, monthIndex, dayIndex]
} else {
// 如果没有时间,设置为当前日期
const today = new Date()
const yearIndex = years.value.indexOf(today.getFullYear())
const monthIndex = months.value.indexOf(today.getMonth() + 1)
const dayIndex = days.value.indexOf(today.getDate())
timeValue.value = [yearIndex, monthIndex, dayIndex]
}
}
const setDate = (indices) => {
if (!indices || indices.length !== 3) return
const year = years.value[indices[0]]
const month = months.value[indices[1]]
const day = days.value[indices[2]]
selectedYear.value = year
selectedMonth.value = month
selectedDay.value = day
}
// 时间选择变化时间
const bindChange = (e) => {
console.log(e)
const values = e.detail.value
timeValue.value = values
selectedYear.value = years.value[values[0]]
selectedMonth.value = months.value[values[1]]
selectedDay.value = days.value[values[2]]
} }
// 时间提醒关闭 // 选择日期回调确认
const close1 = () => { const handleDateConfirm = (date) => {
visible.value = false; console.log('选择的日期是:', date);
time.value = date;
console.log(editId.value, time.value)
onEditTime()
}
// 修改产检时间
const onEditTime = async () => {
// const { code, success, message } = await getUpdate({id: editId.value,checkupDate: time.value})
const { code, success, message } = {
code: 200,
success: true,
message: '成功',
}
if (success) {
uni.showToast({
title: '修改成功',
icon: 'none'
})
// 重新获取信息
getInfoFn()
} else {
uni.showToast({
title: message,
icon: 'none'
})
}
} }
// 获取信息接口
// 时间确认选择 const getInfoFn = async () => {
const handleConfirm1 = () => { console.log('获取信息')
close1(); // 获取信息
const formattedDate = `${selectedYear.value}-${String(selectedMonth.value).padStart(2, '0')}-${String(selectedDay.value).padStart(2, '0')}`; // const {code,success, message, data } = await getInfo()
const recordToUpdate = recordList.value.find(item => item.id === editId.value); const {
recordToUpdate.time = formattedDate; code,
recordList.value = [...recordList.value]; success,
message,
data
} = {
code: 200,
success: true,
message: '成功',
data: {
gestationalWeeks: '8', // 几周
dueDate: '2025-10-20', // 预产期
// 轮播数据
bannerList: [{
imageUrl: 'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl0.png',
jumpUrl: `https://www.baidu.com`
},
{
imageUrl: 'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl1.png',
jumpUrl: `https://www.baidu.com`
},
{
imageUrl: 'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl2.png',
jumpUrl: `https://www.baidu.com`
}
],
// 产检记录
checkupList: [{
type: 0, // 1 是 0 否
id: 1,
checkupDate: '2025-8-22',
index: '一', // 产检次数
pregnancyWeek: '5-6', // 周数
status: 'pending', //待产检、已过期、已产检,
// 产检项目
examinationItems: [{
itemName: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
itemName: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
}]
}
}
if (success) {
homeInfo.value = data
} else{
uni.showToast({
title: message,
icon: "none",
});
}
} }
// 监听年份和月份变化,更新日期数据 onLoad(() => {
watch([selectedYear, selectedMonth], () => { // 获取信息
updateDays() getInfoFn()
}) })
// 监听选择器值变化,更新选中日期
watch(() => timeValue.value, (newVal) => {
setDate(newVal)
})
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@import "@/common.less"; @import "@/common.less";
.postnatal { .postnatal {
// position: absolute; // position: absolute;
width: 100%; width: 100%;
...@@ -552,34 +355,35 @@ ...@@ -552,34 +355,35 @@
} }
&-btn { &-btn {
margin-top: 30rpx; margin-top: 55rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-bottom: 10rpx; margin-bottom: 30rpx;
.btn-item { .btn-item {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; // justify-content: center;
width: 212rpx; width: 334rpx;
height: 85rpx; height: 115rpx;
background: #ffffff; background: #ffffff;
border-radius: 16rpx; border-radius: 16rpx;
font-size: 28rpx; font-size: 34rpx;
.image1 { .image1 {
width: 44rpx; width: 58rpx;
height: 44rpx; height: 58rpx;
margin-left: 80rpx;
} }
.btn-item-text { .btn-item-text {
margin-left: 6rpx; margin-left: 12rpx;
margin-right: 34rpx; margin-right: 52rpx;
} }
.image2 { .image2 {
width: 9rpx; width: 12rpx;
height: 17rpx; height: 23rpx;
} }
} }
} }
...@@ -591,18 +395,20 @@ ...@@ -591,18 +395,20 @@
.record-item { .record-item {
width: 687rpx; width: 687rpx;
background-color: #fff; background-color: #fff;
margin-top: 30rpx; margin-bottom: 30rpx;
border-radius: 24rpx; border-radius: 24rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 40rpx 32rpx; padding: 40rpx 32rpx;
position: relative; position: relative;
.add-image{
.add-image {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
width: 111rpx; width: 111rpx;
height: 30rpx; height: 30rpx;
} }
.item-t, .item-t,
.item-c { .item-c {
display: flex; display: flex;
...@@ -709,131 +515,4 @@ ...@@ -709,131 +515,4 @@
margin-top: -46rpx; margin-top: -46rpx;
margin-left: 0rpx; margin-left: 0rpx;
} }
.picker-layer-mask {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 3999;
}
/* 遮罩层样式 */
.picker-layer-popup {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 4000;
display: flex;
flex-direction: column;
align-items: center;
animation: picker-layer-up 0.3s;
}
@keyframes picker-layer-up {
from {
transform: translateY(100%);
}
to {
transform: translateY(0);
}
}
/* 弹窗容器样式 */
.picker-layer-panel {
width: 100vw;
height: 50vh;
background: #f6f8fa;
border-top-left-radius: 24rpx;
border-top-right-radius: 24rpx;
overflow: hidden;
display: flex;
flex-direction: column;
position: relative;
}
.picker-layer-header {
display: flex;
justify-content: space-between;
align-items: center;
height: 140rpx;
box-sizing: border-box;
background: #f6f8fa;
padding: 0 32rpx;
.picker-layer-cancel {
color: #6f6d67;
font-size: 28rpx;
width: 136rpx;
height: 74rpx;
border-radius: 20rpx;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
}
.picker-layer-confirm {
color: #ffffff;
font-size: 28rpx;
width: 136rpx;
height: 74rpx;
border-radius: 20rpx;
background: #d3a358;
display: flex;
align-items: center;
justify-content: center;
}
.picker-layer-title {
color: #222;
font-size: 32rpx;
font-weight: bold;
}
}
.picker-layer-view {
flex: 1;
width: 100%;
height: 100%;
}
.picker-layer-item {
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size: 32rpx;
color: #1d1e25;
}
.picker-layer-view-mask-top {
position: absolute;
top: 140rpx;
left: 0;
width: 100%;
height: calc(50% - 100rpx);
z-index: 1;
background: linear-gradient(to bottom,
rgb(246, 248, 250) 0%,
rgba(255, 255, 255, 0.5) 100%);
pointer-events: none;
}
.picker-layer-view-mask-bottom {
position: absolute;
bottom: 0rpx;
left: 0;
width: 100%;
height: calc(50% - 100rpx);
z-index: 1;
background: linear-gradient(to top,
rgb(246, 248, 250) 0%,
rgba(255, 255, 255, 0.5) 100%);
pointer-events: none;
}
</style> </style>
\ No newline at end of file
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
{{info.name}} {{info.name}}
</view> </view>
<view class="info-r-b"> <view class="info-r-b">
怀孕{{info.week}} 怀孕{{info.gestationalWeeks}}
</view> </view>
</view> </view>
</view> </view>
...@@ -24,23 +24,23 @@ ...@@ -24,23 +24,23 @@
11111 11111
</view> </view>
<view class="con-list"> <view class="con-list">
<view class="con-list-item" v-for="(item, index) in info.listData "> <view class="con-list-item" v-for="(item, index) in info.checkupList" :key="index" @click="onDetails(item.id)">
<view class="item-time"> <view class="item-time">
<view class=""> <view class="">
{{item.num}}次产检 {{item.index}}次产检
</view> </view>
<view class=""> <view class="">
产检时间:{{item.time}} 产检时间:{{item.checkupDate}}
</view> </view>
</view> </view>
<view class="item-line"> <view class="item-line">
</view> </view>
<view class="item-week"> <view class="item-week">
孕期{{item.week}} 孕期{{item.pregnancyWeek}}
</view> </view>
<view class="item-proect"> <view class="item-proect">
重点:{{getProject(item.project)}} 重点:{{getProject(item.examinationItems)}}
</view> </view>
</view> </view>
</view> </view>
...@@ -60,106 +60,17 @@ ...@@ -60,106 +60,17 @@
onLoad onLoad
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
import { import {
throttleTap throttleTap,
dateFormatter
} from '@/utils/index.js'; } from '@/utils/index.js';
import {
getInfo
} from '../../api/obstetric.js';
// 获取当前时间
const time = ref(dateFormatter(new Date(), 'yyyy-MM-dd'));
// 用户信息 // 用户信息
const info = ref({ const info = ref({})
name: '好宝宝的妈妈',
head: 'https://course.feihe.com/momclub-picture/homepage/children/children_1.png',
week: '8',
listData:[
{
isAdd: 0, // 1 是 0 否
id: 2,
time: '2025-05-11',
num: '二', // 产检次数
week: '5-6', // 周数
status: '2', //待产检、已过期、已产检,
// 产检项目
project: [{
name: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
name: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
},
{
isAdd: 0, // 1 是 0 否
id: 2,
time: '2025-05-11',
num: '二', // 产检次数
week: '5-6', // 周数
status: '2', //待产检、已过期、已产检,
// 产检项目
project: [{
name: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
name: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
},
{
isAdd: 0, // 1 是 0 否
id: 2,
time: '2025-05-11',
num: '二', // 产检次数
week: '5-6', // 周数
status: '2', //待产检、已过期、已产检,
// 产检项目
project: [{
name: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
name: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
},
{
isAdd: 0, // 1 是 0 否
id: 2,
time: '2025-05-11',
num: '二', // 产检次数
week: '5-6', // 周数
status: '2', //待产检、已过期、已产检,
// 产检项目
project: [{
name: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
name: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
},
{
isAdd: 0, // 1 是 0 否
id: 2,
time: '2025-05-11',
num: '二', // 产检次数
week: '5-6', // 周数
status: '2', //待产检、已过期、已产检,
// 产检项目
project: [{
name: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
name: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
}
]
})
// 返回 // 返回
const backHandler = () => { const backHandler = () => {
...@@ -173,8 +84,81 @@ ...@@ -173,8 +84,81 @@
} }
// 拼接检查项目名称 // 拼接检查项目名称
const getProject = (projects) => { const getProject = (projects) => {
return projects.map(project => project.name).join('、'); return projects.map(project => project.itemName).join('、');
} }
// 跳转产检详情页面
const onDetails = (id) => {
uni.navigateTo({
url: `/pages/productionDetails/productionDetails?id=${id}`
})
}
// 获取信息接口
const getInfoFn = async (date) => {
console.log('获取信息', date)
// 获取信息
// const {code,success, message, data } = await getInfo({queryDate:date})
const {
code,
success,
message,
data
} = {
code: 200,
success: true,
message: '成功',
data: {
gestationalWeeks: '8', // 几周
dueDate: '2025-10-20', // 预产期
// 轮播数据
bannerList: [{
imageUrl: 'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl0.png',
jumpUrl: `https://www.baidu.com`
},
{
imageUrl: 'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl1.png',
jumpUrl: `https://www.baidu.com`
},
{
imageUrl: 'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl2.png',
jumpUrl: `https://www.baidu.com`
}
],
// 产检记录
checkupList: [{
type: 0, // 1 是 0 否
id: 1,
checkupDate: '2025-8-22',
index: '一', // 产检次数
pregnancyWeek: '5-6', // 周数
status: '待产检', //待产检、已过期、已产检,
// 产检项目
examinationItems: [{
itemName: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
itemName: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
}]
}
}
if (success) {
info.value = data
} else{
uni.showToast({
title: message,
icon: "none",
});
}
}
onLoad(() => {
// 获取信息
getInfoFn(time.value)
})
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.production-calendar { .production-calendar {
......
...@@ -14,17 +14,23 @@ ...@@ -14,17 +14,23 @@
<scroll-view class="content-scroll" scroll-y :scroll-top="scrollTop" @scroll="handleScroll" scroll-with-animation> <scroll-view class="content-scroll" scroll-y :scroll-top="scrollTop" @scroll="handleScroll" scroll-with-animation>
<view class="production-details-container"> <view class="production-details-container">
<view class="container-1 pad"> <view class="container-1 pad">
次检查 {{infoData.index}}次检查
</view> </view>
<view class="container-2 pad"> <view class="container-2 pad">
<view class="container-2-l"> <view class="container-2-l">
孕期5-6 孕期{{infoData.pregnancyWeek}}
</view> </view>
<view class="container-2-r" @click="onComplete"> <view class="container-2-r" >
<image v-if="!isCompleted" src="/static/chanjianTool/icon24.png"></image> <view class="r-complete" @click="onComplete">
<image v-else src="/static/chanjianTool/icon25.png"></image> <image v-if="!isCompleted" src="/static/chanjianTool/icon24.png"></image>
完成检查 <image v-else src="/static/chanjianTool/icon25.png"></image>
完成检查
</view>
<view class="r-remind" @click="onRemind">
<image src="/static/chanjianTool/icon26.png"></image>
</view>
</view> </view>
</view> </view>
<view class="container-line pad"> <view class="container-line pad">
</view> </view>
...@@ -33,12 +39,12 @@ ...@@ -33,12 +39,12 @@
产检时间 产检时间
</view> </view>
<view class="container-3-r" @click="onChangeTime"> <view class="container-3-r" @click="onChangeTime">
{{time ? time : '选择时间'}} {{infoData.checkupDate ? infoData.checkupDate : '选择时间'}}
<image src="/static/chanjianTool/edit.png"></image> <image src="/static/chanjianTool/edit.png"></image>
</view> </view>
</view> </view>
<view class="container-4 pad"> <view class="container-4 pad">
建议时间:2025-07-05至2025-08-15 建议时间:{{infoData.suggestionCheckupDate}}
</view> </view>
<!-- 产检须知 --> <!-- 产检须知 -->
<view class="project-box" id="section-0"> <view class="project-box" id="section-0">
...@@ -125,15 +131,48 @@ ...@@ -125,15 +131,48 @@
<view class="upload-image" @click="onUpload"> <view class="upload-image" @click="onUpload">
<image src="/static/chanjianTool/icon11.png"></image> <image src="/static/chanjianTool/icon11.png"></image>
</view> </view>
<view class="img-list-item" v-for="( {url, id}, index) in bgdImgList" :key="index"> <view class="img-list-item" v-for="( item, index) in bgdImgList" :key="index">
<view class="item-image"> <view class="item-image">
<image class="img1" :src="url" mode="widthFix"></image> <image class="img1" :src="item" mode="widthFix"></image>
</view> </view>
<image @click="onImageDel(id)" class="img" src="/static/chanjianTool/icon14.png"></image> <image @click="onImageDel(item)" class="img" src="/static/chanjianTool/icon14.png"></image>
</view> </view>
</view> </view>
</view> </view>
<!-- 选择提醒弹窗 -->
<view>
<!-- 底部弹窗遮罩层 -->
<view v-if="showPicker" class="picker-layer-mask" @click="close"></view>
<!-- 弹窗内容区 -->
<view v-if="showPicker" class="picker-layer-popup">
<view class="picker-layer-panel">
<!-- 可自定义头部 -->
<view class="picker-layer-header">
<text class="picker-layer-cancel" @click="close">取消</text>
<text class="picker-layer-confirm" @click="handleConfirm">确定</text>
</view>
<view class="picker-layer-view-mask-top"></view>
<view class="picker-layer-view-mask-bottom"></view>
<!-- picker-view 选择器核心 -->
<picker-view
class="picker-layer-view"
mask-style="background: rgb(246, 248, 250); z-index: 0;"
indicator-style="border-radius: 10px; height: 50px; background:#ffffff; z-index:0"
:value="pickerValue"
@change="handleChange"
:immediate-change="true"
>
<picker-view-column>
<view class="picker-layer-item" v-for="(item, index) in options" :key="index">{{item}}</view>
</picker-view-column>
</picker-view>
</view>
</view>
</view>
</view> </view>
</scroll-view> </scroll-view>
<!-- 产检选择时间 --> <!-- 产检选择时间 -->
...@@ -153,7 +192,21 @@ ...@@ -153,7 +192,21 @@
import { import {
throttleTap throttleTap
} from '@/utils/index.js'; } from '@/utils/index.js';
// 时间组件
import DatePicker from '@/components/DatePicker.vue' import DatePicker from '@/components/DatePicker.vue'
import {
getDetail,
getUpdate
} from '../../api/obstetric.js';
// 提醒选择器相关状态
const showPicker = ref(false)
const options = ['当天', '前一天', '前三天'] // 提醒时间选项
const pickerValue = ref([0]) // 当前选中的索引
const selectedValue = ref('') // 选中的值
const tabInfo = [{ const tabInfo = [{
"line1": "产检须知", "line1": "产检须知",
}, },
...@@ -164,28 +217,16 @@ ...@@ -164,28 +217,16 @@
"line1": "本次报告单", "line1": "本次报告单",
} }
] ]
// 本次报告单
const bgdImgList = ref([{ // 存储id
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg', const editId=ref('')
id: Date.now() + Math.floor(Math.random() * 1000)
}, // 详情
{ const infoData = ref({})
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000) // 临时储存报告单
}, const bgdImgList = ref([])
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
},
{
url: 'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
id: Date.now() + Math.floor(Math.random() * 1000)
}
])
const time = ref('2025-07-21') const time = ref('2025-07-21')
const onModify = () =>{ const onModify = () =>{
...@@ -200,23 +241,7 @@ ...@@ -200,23 +241,7 @@
// 日期选择器 // 日期选择器
const visible = ref(false) const visible = ref(false)
// 修改时间
const onChangeTime = throttleTap(() => {
visible.value = true
})
// 选择时间
const handleDateConfirm = (date) => {
visible.value = false
time.value = date
}
// 完成检查
const onComplete = () => {
// 切换状态
isCompleted.value = !isCompleted.value
console.log(isCompleted.value)
}
// 滚动相关状态 // 滚动相关状态
const scrollTop = ref(0) const scrollTop = ref(0)
const isFixedTabs = ref(false) const isFixedTabs = ref(false)
...@@ -302,7 +327,7 @@ const scrollToSection = (index) => { ...@@ -302,7 +327,7 @@ const scrollToSection = (index) => {
// 删除上传图片 // 删除上传图片
const onImageDel = (id) => { const onImageDel = (id) => {
bgdImgList.value.filter((item, index) => { bgdImgList.value.filter((item, index) => {
if (item.id === id) { if (item === id) {
bgdImgList.value.splice(index, 1) bgdImgList.value.splice(index, 1)
} }
}) })
...@@ -341,15 +366,146 @@ const scrollToSection = (index) => { ...@@ -341,15 +366,146 @@ const scrollToSection = (index) => {
}, },
}); });
}) })
// 查看更多 // 查看更多
const onSeeBtn = () => { const onSeeBtn = () => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/myReportCard/myReportCard' url: '/pages/myReportCard/myReportCard'
}) })
} }
// 打开提醒弹窗
const onRemind = () => {
showPicker.value = true;
}
// 提醒关闭
const close = () => {
showPicker.value = false;
}
// 选择提醒事件
const handleChange = (e) => {
pickerValue.value = e.detail.value;
}
// 确认选择
const handleConfirm = () => {
close();
selectedValue.value = options[pickerValue.value[0]];
// 订阅提醒
// uni.requestSubscribeMessage({
// tmplIds: [''],
// success (res) {
// console.log(res)
// }
// })
}
// 完成检查
const onComplete = () => {
// 切换状态
isCompleted.value = !isCompleted.value
console.log(isCompleted.value)
}
// 修改时间
const onChangeTime = throttleTap(() => {
visible.value = true
})
// 选择时间
const handleDateConfirm = (date) => {
visible.value = false
time.value = date
onEditTime()
}
// 修改产检时间
const onEditTime = async () => {
// const { code, success, message } = await getUpdate({id: editId.value,checkupDate: time.value})
const { code, success, message } = {
code: 200,
success: true,
message: '成功',
}
if (success) {
uni.showToast({
title: '修改成功',
icon: 'none'
})
// 重新获取信息
getDetailFn(editId.value)
} else {
uni.showToast({
title: message,
icon: 'none'
})
}
}
// 获取详情接口
const getDetailFn = async (id) => {
console.log('获取信息',id)
// 获取信息
// const {code,success, message, data } = await getDetail({id})
const {
code,
success,
message,
data
} = {
code: 200,
success: true,
message: '成功',
data: {
// 产检记录
checkupList: {
type: 0, // 1 是 0 否
id: 1,
checkupDate: '2025-8-22',
index: '一', // 产检次数
pregnancyWeek: '5-6', // 周数,
content:'', // 产检须知
suggestionCheckupDate:'2025-08-09至2025-09-16', // 建议时间
wxTemplateId:'', // 订阅模版id
status: 'pending', // 待产检 - pending,已过期 - expired, 已产检 - completed
// 产检项目
examinationItems: [{
itemName: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
itemName: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
],
// 报告单
reportImages:[
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg',
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
]
}
}
}
if (success) {
const {
checkupList
} = data
infoData.value = checkupList
bgdImgList.value = checkupList.reportImages
} else{
uni.showToast({
title: message,
icon: "none",
});
}
}
// 获取传过来的参数 // 获取传过来的参数
onLoad((options) => { onLoad((options) => {
console.log(options) console.log(options)
editId.value = options.id
getDetailFn(options.id)
}) })
</script> </script>
...@@ -458,13 +614,26 @@ const scrollToSection = (index) => { ...@@ -458,13 +614,26 @@ const scrollToSection = (index) => {
color: #a68dbb; color: #a68dbb;
display: flex; display: flex;
align-items: center; align-items: center;
.r-complete{
image { display: flex;
width: 21rpx; align-items: center;
height: 22rpx; image {
margin-right: 7rpx; width: 21rpx;
height: 22rpx;
margin-right: 7rpx;
}
}
.r-remind{
width: 121rpx;
height: 35rpx;
margin-left: 22rpx;
image{
width: 100%;
height: 100%;
}
} }
} }
} }
.container-line { .container-line {
...@@ -488,11 +657,13 @@ const scrollToSection = (index) => { ...@@ -488,11 +657,13 @@ const scrollToSection = (index) => {
.container-3-r { .container-3-r {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 28rpx;
line-height: 26rpx;
image { image {
width: 21rpx; width: 21rpx;
height: 21rpx; height: 21rpx;
margin-left: 15rpx; margin-left: 15rpx;
margin-top: 1rpx;
} }
} }
} }
...@@ -610,5 +781,133 @@ const scrollToSection = (index) => { ...@@ -610,5 +781,133 @@ const scrollToSection = (index) => {
} }
} }
} }
/* 遮罩层样式 */
.picker-layer-mask {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 3999;
}
.picker-layer-popup {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 4000;
display: flex;
flex-direction: column;
align-items: center;
animation: picker-layer-up 0.3s;
}
@keyframes picker-layer-up {
from {
transform: translateY(100%);
}
to {
transform: translateY(0);
}
}
/* 弹窗容器样式 */
.picker-layer-panel {
width: 100vw;
height: 50vh;
background: #f6f8fa;
border-top-left-radius: 24rpx;
border-top-right-radius: 24rpx;
overflow: hidden;
display: flex;
flex-direction: column;
position: relative;
}
.picker-layer-header {
display: flex;
justify-content: space-between;
align-items: center;
height: 140rpx;
box-sizing: border-box;
background: #f6f8fa;
padding: 0 32rpx;
.picker-layer-cancel {
color: #6f6d67;
font-size: 28rpx;
width: 136rpx;
height: 74rpx;
border-radius: 20rpx;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
}
.picker-layer-confirm {
color: #ffffff;
font-size: 28rpx;
width: 136rpx;
height: 74rpx;
border-radius: 20rpx;
background: #d3a358;
display: flex;
align-items: center;
justify-content: center;
}
.picker-layer-title {
color: #222;
font-size: 32rpx;
font-weight: bold;
}
}
.picker-layer-view {
flex: 1;
width: 100%;
height: 100%;
}
.picker-layer-item {
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size: 32rpx;
color: #1d1e25;
}
.picker-layer-view-mask-top {
position: absolute;
top: 140rpx;
left: 0;
width: 100%;
height: calc(50% - 100rpx);
z-index: 1;
background: linear-gradient(to bottom,
rgb(246, 248, 250) 0%,
rgba(255, 255, 255, 0.5) 100%);
pointer-events: none;
}
.picker-layer-view-mask-bottom {
position: absolute;
bottom: 0rpx;
left: 0;
width: 100%;
height: calc(50% - 100rpx);
z-index: 1;
background: linear-gradient(to top,
rgb(246, 248, 250) 0%,
rgba(255, 255, 255, 0.5) 100%);
pointer-events: none;
}
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment