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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -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,121 +60,105 @@ ...@@ -60,121 +60,105 @@
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', const backHandler = () => {
listData:[ uni.navigateBack()
{
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 onAdd = () => {
{ uni.navigateTo({
isAdd: 0, // 1 是 0 否 url: '/pages/addPostnatal/addPostnatal'
id: 2, })
time: '2025-05-11',
num: '二', // 产检次数
week: '5-6', // 周数
status: '2', //待产检、已过期、已产检,
// 产检项目
project: [{
name: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
name: '无创产前基因检测(NIPT)(非必查)',
id: 2
} }
] // 拼接检查项目名称
}, const getProject = (projects) => {
{ return projects.map(project => project.itemName).join('、');
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 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`
}, },
{ {
isAdd: 0, // 1 是 0 否 imageUrl: 'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl1.png',
id: 2, jumpUrl: `https://www.baidu.com`
time: '2025-05-11',
num: '二', // 产检次数
week: '5-6', // 周数
status: '2', //待产检、已过期、已产检,
// 产检项目
project: [{
name: '测量胎儿颈部透明层厚度(NT)',
id: 1
}, },
{ {
name: '无创产前基因检测(NIPT)(非必查)', imageUrl: 'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl2.png',
id: 2 jumpUrl: `https://www.baidu.com`
} }
] ],
}, // 产检记录
{ checkupList: [{
isAdd: 0, // 1 是 0 否 type: 0, // 1 是 0 否
id: 2, id: 1,
time: '2025-05-11', checkupDate: '2025-8-22',
num: '二', // 产检次数 index: '一', // 产检次数
week: '5-6', // 周数 pregnancyWeek: '5-6', // 周数
status: '2', //待产检、已过期、已产检, status: '待产检', //待产检、已过期、已产检,
// 产检项目 // 产检项目
project: [{ examinationItems: [{
name: '测量胎儿颈部透明层厚度(NT)', itemName: '测量胎儿颈部透明层厚度(NT)',
id: 1 id: 1
}, },
{ {
name: '无创产前基因检测(NIPT)(非必查)', itemName: '无创产前基因检测(NIPT)(非必查)',
id: 2 id: 2
} }
] ]
}]
} }
]
})
// 返回
const backHandler = () => {
uni.navigateBack()
} }
// 跳转新增产检页面 if (success) {
const onAdd = () => { info.value = data
uni.navigateTo({ } else{
url: '/pages/addPostnatal/addPostnatal' uni.showToast({
}) title: message,
icon: "none",
});
} }
// 拼接检查项目名称
const getProject = (projects) => {
return projects.map(project => project.name).join('、');
} }
onLoad(() => {
// 获取信息
getInfoFn(time.value)
})
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.production-calendar { .production-calendar {
......
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