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 @@
{{info.name}}
</view>
<view class="info-r-b">
怀孕{{info.week}}
怀孕{{info.gestationalWeeks}}
</view>
</view>
</view>
......@@ -24,23 +24,23 @@
11111
</view>
<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.num}}次产检
{{item.index}}次产检
</view>
<view class="">
产检时间:{{item.time}}
产检时间:{{item.checkupDate}}
</view>
</view>
<view class="item-line">
</view>
<view class="item-week">
孕期{{item.week}}
孕期{{item.pregnancyWeek}}
</view>
<view class="item-proect">
重点:{{getProject(item.project)}}
重点:{{getProject(item.examinationItems)}}
</view>
</view>
</view>
......@@ -60,106 +60,17 @@
onLoad
} from '@dcloudio/uni-app'
import {
throttleTap
throttleTap,
dateFormatter
} from '@/utils/index.js';
import {
getInfo
} from '../../api/obstetric.js';
// 获取当前时间
const time = ref(dateFormatter(new Date(), 'yyyy-MM-dd'));
// 用户信息
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 info = ref({})
// 返回
const backHandler = () => {
......@@ -173,8 +84,81 @@
}
// 拼接检查项目名称
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>
<style lang="less" scoped>
.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