Commit 06d9984f authored by weishengfei's avatar weishengfei

feat(obstetric): 自定义头部以及接口字段对接

parent 3f4b6508
...@@ -2,6 +2,13 @@ ...@@ -2,6 +2,13 @@
import requestModule from './request.js'; import requestModule from './request.js';
const { api } = requestModule; const { api } = requestModule;
/**
* 获取banner
* @returns
*/
export const postnatalJSON = () => api.get('/c/front/content',{type:'postnatal'});
/** /**
* 获取产检信息 * 获取产检信息
* @returns * @returns
......
<template>
<view class="customize">
<view class="navbar">
<view class="navbar-t" :style="{height:statusBarHeight+'px'}">
</view>
<view class="navbar-b" :style="{height:navBarHeight+'px',marginLeft:leftIconWidth+'px'}">
<slot name="navbar-content"></slot>
</view>
</view>
<view class="fill" :style="{height:fillHeight+'px'}">
</view>
</view>
</template>
<script setup>
import {
ref
} from 'vue'
// const props = defineProps({
// title: {
// type: String,
// default: '首页'
// }
// })
const leftIconWidth = ref(0)
const navBarHeight = ref(0)
// 获取系统信息
const {statusBarHeight} = uni.getSystemInfoSync()
// 获取胶囊按钮信息
// #ifndef MP-ALIPAY || H5
const {top, height} = uni.getMenuButtonBoundingClientRect()
// 计算导航栏高度
navBarHeight.value = (top - statusBarHeight) *2 + height
// #endif
// 计算填充高度
const fillHeight = statusBarHeight + navBarHeight.value
</script>
<style lang="scss" scoped>
.customize {
.navbar{
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 100;
.navbar-t{
}
.navbar-b{
display: flex;
align-items: center;
padding: 0 35rpx;
}
}
}
</style>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
<template> <template>
<view class="report-card" style="background-image: url( '//yun.duiba.com.cn/aurora/assets/c1e4ce971b7ffb55ed23ec8a9480b857a6328e98.png');"> <view class="report-card" style="background-image: url( '//yun.duiba.com.cn/aurora/assets/c1e4ce971b7ffb55ed23ec8a9480b857a6328e98.png');">
<view class="page-top"> <!-- <view class="page-top">
<image @tap="backHandler" class="btnback" src="/static/chanjianTool/back.png"></image> <image @tap="backHandler" class="btnback" src="/static/chanjianTool/back.png"></image>
<view class="page_title">我的报告单</view> <view class="page_title">我的报告单</view>
</view> </view> -->
<customize-navigation>
<template v-slot:navbar-content>
<view class="page-top">
<image @tap="backHandler" class="btnback" src="/static/chanjianTool/back.png"></image>
<view class="page_title">我的报告单</view>
</view>
</template>
</customize-navigation>
<view class="report-card-con"> <view class="report-card-con">
<view class="con-box"> <view class="con-box">
<view class="list-item" v-for="(item, index) in listData" :key="index"> <view class="list-item" v-for="(item, index) in listData" :key="index">
...@@ -319,29 +327,6 @@ ...@@ -319,29 +327,6 @@
} }
} }
} }
// 自定义头部
.page-top {
width: 100%;
}
.btnback {
width: 16rpx;
height: 29rpx;
margin-top: 110rpx;
margin-left: 35rpx;
}
.page_title {
width: 100%;
font-size: 34rpx;
font-weight: 500;
text-align: center;
color: #1d1e25;
margin-top: -46rpx;
margin-left: 0rpx;
}
.more-popup { .more-popup {
position: fixed; position: fixed;
left: 0; left: 0;
...@@ -416,5 +401,29 @@ ...@@ -416,5 +401,29 @@
height: 70rpx; height: 70rpx;
} }
} }
// 自定义头部
.page-top {
width: 100%;
display: flex;
align-items: center;
}
.btnback {
width: 16rpx;
height: 29rpx;
// margin-top: 110rpx;
// margin-left: 35rpx;
}
.page_title {
width: 100%;
font-size: 34rpx;
font-weight: 500;
text-align: center;
color: #1d1e25;
line-height: 36rpx;
// margin-top: -46rpx;
// margin-left: 0rpx;
}
} }
</style> </style>
\ No newline at end of file
<template> <template>
<view> <view>
<view class="postnatal"> <view class="postnatal">
<view class="page-top"> <!-- <view class="page-top">
<image @tap="backHandler" class="btnback" src="/static/chanjianTool/back.png"></image> <image @tap="backHandler" class="btnback" src="/static/chanjianTool/back.png"></image>
<view class="page_title">产检提醒</view> <view class="page_title">产检提醒</view>
</view> </view> -->
<!-- 自定义导航 -->
<customize-navigation>
<template v-slot:navbar-content>
<view class="page-top">
<image @tap="backHandler" class="btnback" src="/static/chanjianTool/back.png"></image>
<view class="page_title">产检提醒</view>
</view>
</template>
</customize-navigation>
<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 homeInfo.bannerList" :key="index"> <swiper-item v-for="(item, index) in bannerList" :key="index">
<image class="banner-img" :src="`${item.imageUrl}`" mode="aspectFill" <image class="banner-img" :src="`${item.img}`" mode="aspectFill"
@click="handleBannerClick(item, index)" /> @click="handleBannerClick(item, index)" />
</swiper-item> </swiper-item>
</swiper> </swiper>
...@@ -99,10 +107,12 @@ ...@@ -99,10 +107,12 @@
import md from '../../md'; import md from '../../md';
import { import {
getInfo, getInfo,
getUpdate getUpdate,
postnatalJSON
} from '../../api/obstetric.js'; } from '../../api/obstetric.js';
// 导入日期选择器组件 // 导入日期选择器组件
import DatePicker from '@/components/DatePicker.vue' import DatePicker from '@/components/DatePicker.vue'
import { type } from 'os';
const { const {
proxy proxy
} = getCurrentInstance(); } = getCurrentInstance();
...@@ -111,12 +121,16 @@ ...@@ -111,12 +121,16 @@
// 时间弹窗控制 // 时间弹窗控制
const visible = ref(false) const visible = ref(false)
// 时间 // 时间
const time = ref('') const time = ref('')
// 保存要修改的id // 保存要修改的id
const editId = ref(null) const editId = ref(null)
// 轮播图
const bannerList = ref([])
// 首页信息 // 首页信息
const homeInfo = ref({}) const homeInfo = ref({})
...@@ -169,8 +183,8 @@ ...@@ -169,8 +183,8 @@
console.log(item) console.log(item)
// 跳转 // 跳转
jump({ jump({
type: item.jumpType, type: item.type,
url: item.jumpUrl url: item.url
}) })
// let buttonName = ''; // let buttonName = '';
// switch(index){ // switch(index){
...@@ -269,20 +283,6 @@ ...@@ -269,20 +283,6 @@
data: { data: {
gestationalWeeks: '8', // 几周 gestationalWeeks: '8', // 几周
dueDate: '2025-10-20', // 预产期 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: [{ checkupList: [{
type: 0, // 1 是 0 否 type: 0, // 1 是 0 否
...@@ -495,7 +495,47 @@ ...@@ -495,7 +495,47 @@
}); });
} }
} }
// 获取banner图
const postnatalJSONFn = async ()=>{
// const { success, data, message } = await postnatalJSON()
const { success, data, message } = {
success: true,
message:'成功',
data: {
// 轮播数据
bannerList: [{
img: 'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl0.png',
url: `https://mp.weixin.qq.com/s/Xn5dh96OaQ9CcsVMZ5jnvg`,
type: 3
},
{
img: 'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl1.png',
url: `https://mp.weixin.qq.com/s/Xn5dh96OaQ9CcsVMZ5jnvg`,
type: 3
},
{
img: 'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl2.png',
url: `https://www.baidu.com`,
type: 3
}
]
}
}
if (success) {
bannerList.value = data.bannerList
} else{
uni.showToast({
title: message,
icon: "none",
});
}
}
onShow(() => { onShow(() => {
// 获取banner图
postnatalJSONFn()
// 获取信息 // 获取信息
getInfoFn() getInfoFn()
}) })
...@@ -678,13 +718,15 @@ ...@@ -678,13 +718,15 @@
.page-top { .page-top {
width: 100%; width: 100%;
display: flex;
align-items: center;
} }
.btnback { .btnback {
width: 16rpx; width: 16rpx;
height: 29rpx; height: 29rpx;
margin-top: 110rpx; // margin-top: 110rpx;
margin-left: 35rpx; // margin-left: 35rpx;
} }
.page_title { .page_title {
...@@ -693,7 +735,8 @@ ...@@ -693,7 +735,8 @@
font-weight: 500; font-weight: 500;
text-align: center; text-align: center;
color: #1d1e25; color: #1d1e25;
margin-top: -46rpx; line-height: 36rpx;
margin-left: 0rpx; // margin-top: -46rpx;
// margin-left: 0rpx;
} }
</style> </style>
\ No newline at end of file
<template> <template>
<view class="production-calendar"> <view class="production-calendar">
<view class="page-top"> <!-- <view class="page-top">
<view class="header-content"> <view class="header-content">
<image @tap="backHandler" class="btnback" src="/static/chanjianTool/back.png"></image> <image @tap="backHandler" class="btnback" src="/static/chanjianTool/back.png"></image>
<view class="page_title"> <view class="page_title">
...@@ -17,7 +17,27 @@ ...@@ -17,7 +17,27 @@
</view> </view>
</view> </view>
</view> </view>
</view> </view> -->
<customize-navigation>
<template v-slot:navbar-content>
<view class="page-top">
<image @tap="backHandler" class="btnback" src="/static/chanjianTool/back.png"></image>
<view class="page_title">
<view class="info-l">
<image :src="$baseUrl + 'common/default_avatar.png'"></image>
</view>
<view class="info-r">
<view class="info-r-t">
孕期
</view>
<view class="info-r-b">
怀孕{{ info.gestationalWeeks }}
</view>
</view>
</view>
</view>
</template>
</customize-navigation>
<!-- 显示区域 --> <!-- 显示区域 -->
<view class="production-calendar-con"> <view class="production-calendar-con">
<view class="calendar-box"> <view class="calendar-box">
...@@ -472,6 +492,96 @@ const getInfoFn = async () => { ...@@ -472,6 +492,96 @@ const getInfoFn = async () => {
} }
] ]
}, },
{
type: 0, // 1 是 0 否
id: 1,
checkupDate: '2025-07-23',
index: '一', // 产检次数
pregnancyWeek: '5-6', // 周数
status: '待产检', //待产检、已过期、已产检,
// 产检项目
examinationItems: [{
itemName: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
itemName: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
},
{
type: 0, // 1 是 0 否
id: 1,
checkupDate: '2025-07-23',
index: '一', // 产检次数
pregnancyWeek: '5-6', // 周数
status: '待产检', //待产检、已过期、已产检,
// 产检项目
examinationItems: [{
itemName: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
itemName: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
},
{
type: 0, // 1 是 0 否
id: 1,
checkupDate: '2025-07-23',
index: '一', // 产检次数
pregnancyWeek: '5-6', // 周数
status: '待产检', //待产检、已过期、已产检,
// 产检项目
examinationItems: [{
itemName: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
itemName: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
},
{
type: 0, // 1 是 0 否
id: 1,
checkupDate: '2025-07-23',
index: '一', // 产检次数
pregnancyWeek: '5-6', // 周数
status: '待产检', //待产检、已过期、已产检,
// 产检项目
examinationItems: [{
itemName: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
itemName: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
},
{
type: 0, // 1 是 0 否
id: 1,
checkupDate: '2025-07-23',
index: '一', // 产检次数
pregnancyWeek: '5-6', // 周数
status: '待产检', //待产检、已过期、已产检,
// 产检项目
examinationItems: [{
itemName: '测量胎儿颈部透明层厚度(NT)',
id: 1
},
{
itemName: '无创产前基因检测(NIPT)(非必查)',
id: 2
}
]
},
{ {
type: 0, // 1 是 0 否 type: 0, // 1 是 0 否
id: 1, id: 1,
...@@ -529,11 +639,10 @@ onShow(() => { ...@@ -529,11 +639,10 @@ onShow(() => {
.production-calendar { .production-calendar {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
background-size: 100% 100%; background-color: #fdf6eb;
// background-color: #fdf6eb;
&-con { &-con {
position: absolute; // position: absolute;
top: 176rpx; // top: 176rpx;
// left: 31rpx; // left: 31rpx;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
...@@ -549,14 +658,15 @@ onShow(() => { ...@@ -549,14 +658,15 @@ onShow(() => {
.con-list { .con-list {
position: absolute; position: absolute;
left: 0; left: 0;
top: 656rpx; top: 820rpx;
height: calc(100vh - 1021rpx); height: calc(100vh - 820rpx);
background: #fff; background: #fff;
border-radius: 24rpx; border-radius: 24rpx;
padding: 30rpx; padding: 30rpx;
overflow-y: auto; overflow-y: auto;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding-bottom: 100px;
.con-list-item { .con-list-item {
width: 689rpx; width: 689rpx;
// height: 221rpx; // height: 221rpx;
...@@ -603,8 +713,9 @@ onShow(() => { ...@@ -603,8 +713,9 @@ onShow(() => {
// 自定义头部 // 自定义头部
.page-top { .page-top {
width: 100%; width: 100%;
display: flex;
align-items: center;
background-color: #fdf6eb; background-color: #fdf6eb;
padding: 90rpx 0 0 10rpx;
} }
.header-content { .header-content {
...@@ -615,7 +726,6 @@ onShow(() => { ...@@ -615,7 +726,6 @@ onShow(() => {
.btnback { .btnback {
width: 16rpx; width: 16rpx;
height: 29rpx; height: 29rpx;
margin-left: 35rpx;
} }
.page_title { .page_title {
......
...@@ -395,12 +395,12 @@ const handleConfirm = () => { ...@@ -395,12 +395,12 @@ const handleConfirm = () => {
close(); close();
selectedValue.value = options[pickerValue.value[0]]; selectedValue.value = options[pickerValue.value[0]];
// 订阅提醒 // 订阅提醒
// uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
// tmplIds: [''], tmplIds: [infoData.wxTemplateId],
// success (res) { success (res) {
// console.log(res) console.log(res)
// } }
// }) })
} }
// 完成检查 // 完成检查
......
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