diff --git a/woman/app.json b/woman/app.json index 1372504..995dbef 100644 --- a/woman/app.json +++ b/woman/app.json @@ -12,7 +12,9 @@ "pages/folicAcid/folicAcid", "pages/cancerCheck/cancerCheck", "pages/report_first/report_first", - "pages/premaritalCheckup/premaritalCheckup" + "pages/premaritalCheckup/premaritalCheckup", + "pages/premaritalReport/premaritalReport" + ], "window": { "backgroundTextStyle": "light", diff --git a/woman/app.wxss b/woman/app.wxss index 4e280fa..de0b651 100644 --- a/woman/app.wxss +++ b/woman/app.wxss @@ -351,6 +351,9 @@ padding: 0 100rpx; } +.padding-b60 { + padding-bottom: 60rpx; +} .font-black-28 { height: 28rpx; font-size: 28rpx; @@ -796,6 +799,13 @@ font-weight: 400; line-height: 20rpx; } +.font-4F4F4F-26 { + height: 26rpx; + font-size: 26rpx; + color: #4F4F4F; + font-weight: 400; + line-height: 26rpx; +} .font-4F4F4F-28 { height: 28rpx; font-size: 28rpx; @@ -921,16 +931,23 @@ height: 28rpx; font-size: 28rpx; font-weight: 400; - color: #686868; + color: #828282; line-height: 28rpx; } .font-828282-22 { height: 22rpx; font-size: 22rpx; font-weight: 400; - color: #686868; + color: #828282; line-height: 22rpx; } +.font-828282-26 { + height: 26rpx; + font-size: 26rpx; + font-weight: 400; + color: #828282; + line-height: 26rpx; +} .font-858585-24 { height: 24rpx; font-size: 24rpx; diff --git a/woman/pages/premaritalCheckup/premaritalCheckup.js b/woman/pages/premaritalCheckup/premaritalCheckup.js index cb2107a..80d0a12 100644 --- a/woman/pages/premaritalCheckup/premaritalCheckup.js +++ b/woman/pages/premaritalCheckup/premaritalCheckup.js @@ -1,66 +1,150 @@ -// pages/premaritalCheckup/premaritalCheckup.js +//articleLists.js 文章列表 +// 网络请求工具类 +var networkUtil = require('../../utils/network_util.js') +var api = require('../../utils/apiFile.js') +var hospital = '' + Page({ - /** - * 页面的初始数据 - */ data: { + baseCheck: [{ 'title': '首诊日期', 'word': 'checkTime', value: '' }, { 'title': '末次月经', 'word': 'lastMenses', value: '' }, { 'title': '预产期', 'word': 'dueDate', value: '' }, { 'title': '月经周期', 'word': 'mensDay', value: '' }], + bodyCheck: [{ title: '身高', word: 'height', value: '' }, { title: '体重', word: 'weight', value: '' }, { title: '心', word: 'heart', value: '' }, { title: '肺', word: 'lungs', value: '' }], - }, + womenCheck: [{ title: '外阴', word: 'vulva', value: '' }, { title: '阴道', word: 'vagina', value: 'vagina' }, { title: '宫颈', word: 'cervical', value: '' }, { title: '宫体', word: 'uterus', value: '' }, { title: '附件', word: 'fujian', value: '' }], + + obstetricsCheck: [{ title: '腹围', word: 'fuwei', value: '' }, { title: '宫高', word: 'gongGao', value: '' }, { title: '胎位', word: 'fetalPositionVal', value: '' }, { title: '胎心', word: 'heartRateVal', value: '' }, { title: '先露', word: 'fetalPresentationVal', value: '' }], - /** - * 生命周期函数--监听页面加载 - */ - onLoad(options) { + assistantCheck: [{ 'top_title': '血常规', content: [{ 'title': '血红蛋白', 'word': 'xhdb', value: '' }, { 'title': '血红蛋白券', 'word': '', value: '' }, { 'title': '白细胞计数', 'word': 'bxbjs', value: '' }, { 'title': '血小板计数', 'word': 'platelet', value: '' }, { 'title': '血常规其他', 'word': 'chgOther', value: '' }] }, - }, + { 'top_title': '乙肝五项', content: [{ 'title': '乙肝表面抗原', 'word': 'ygbmky', value: '' }, { 'title': '乙肝表面抗体', 'word': 'ygbmkt', value: '' }, { 'title': '乙肝e抗原', 'word': 'ygeky', value: '' }, { 'title': '乙肝e抗体', 'word': 'ygekt', value: '' }, { 'title': '乙肝核心抗体', 'word': 'yghxkt', value: '' }] }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { + { 'top_title': '肾功', content: [{ 'title': '血清肌酐', 'word': 'xqjq', value: '' }, { 'title': '血尿素氮', 'word': 'xnsd', value: '' }] }, - }, + { 'top_title': '血型', content: [{ 'title': '血型', 'word': 'abo', value: '' }, { 'title': 'RH血型', 'word': 'rh', value: '' }, { 'title': '血糖', 'word': 'bloodSugar', value: '' }] }, - /** - * 生命周期函数--监听页面显示 - */ - onShow() { + { 'top_title': '肝功能', content: [{ 'title': '血清谷丙转氨酶', 'word': 'xqgbzam', value: '' }, { 'title': '血清谷草转氨酶', 'word': 'xqgczam', value: '' }, { 'title': '白蛋白', 'word': 'albumin', value: '' }, { 'title': '总胆红素', 'word': 'totalBilirubin', value: '' }, { 'title': '结合胆红素', 'word': 'jhBilirubin', value: '' }, { 'title': '丙肝', 'word': 'bg', value: '' }] }, + { 'top_title': '尿常规', content: [{ 'title': '尿蛋白', 'word': 'ndb', value: '' }, { 'title': '尿糖', 'word': 'nt', value: '' }, { 'title': '尿酮体', 'word': 'urineKetone', value: '' }, { 'title': '尿潜血', 'word': 'bld', value: '' }, { 'title': '尿其他', 'word': 'ncgOther', value: '' }] },], + // 孕产史 + ycHistory:'' }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - + onLoad: function (options) { + //hospital = options.hospital + //this.requestData(options.id) }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - + /*---------自定义函数--------*/ + requestData(Id) { + var self = this + networkUtil.showLoading() + // 报告详情 + networkUtil._get(api.pregnancyReports + '/' + Id, {}, function (res) { + if (res.data.list.length == 0) { + return + } + var data = res.data.list[0].result2 + self.getBaseCheckWith(data) + self.getbodyCheck(data) + self.getwomenCheck(data) + self.getobstetricsCheck(data) + self.getassistantCheck(data) + var risk = '' + for (var key in res.data.list[0].result) { + if (res.data.list[0].result[key].k == '高危因素') { + risk = res.data.list[0].result[key].v + } + } + self.setData({ + checkData:data, + risk:risk + }) + }, function (res) { + + }) }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - + // 检查基础信息 + getBaseCheckWith(data){ + var baseCheck = this.data.baseCheck + for (var index in this.data.baseCheck) { + var item = this.data.baseCheck[index] + if (data[item.word]) { + item.value = data[item.word] + } + } + this.setData({ + baseCheck: baseCheck + }) }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - + // 检查基础信息 + getbodyCheck(data) { + var bodyCheck = this.data.bodyCheck + for (var index in bodyCheck) { + var item = bodyCheck[index] + if (data[item.word]) { + item.value = data[item.word] + } + } + this.setData({ + bodyCheck: bodyCheck + }) }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - - } -}) \ No newline at end of file + // 检查基础信息 + getwomenCheck(data) { + var womenCheck = this.data.womenCheck + for (var index in womenCheck) { + var item = womenCheck[index] + if (data[item.word]) { + item.value = data[item.word] + } + } + this.setData({ + womenCheck: womenCheck + }) + }, + // 检查基础信息 + getobstetricsCheck(data) { + var obstetricsCheck = this.data.obstetricsCheck + for (var index in obstetricsCheck) { + var item = obstetricsCheck[index] + if (data[item.word]) { + item.value = data[item.word] + } + } + this.setData({ + obstetricsCheck: obstetricsCheck + }) + }, + // 检查基础信息 + getassistantCheck(data) { + var assistantCheck = this.data.assistantCheck + for (var index in assistantCheck) { + var item = assistantCheck[index] + for (var newItem in item.content) { + if (data[item.content[newItem].word]) { + item.content[newItem].value = data[item.content[newItem].word] + } + } + } + this.setData({ + assistantCheck: assistantCheck + }) + }, + getycHistory(data){ + var str = '' + if(data.pregnacyTimes){ + str = '孕次:' + data.pregnacyTimes + '次' + } + if (data.prodTime) { + str = '产次:' + data.prodTime + '次' + } + if (data.pregnacyTimes) { + str = '孕次:' + data.pregnacyTimes + '次' + } + }, + goDetail(e) { + console.log("检测详情",e) + wx.navigateTo({ + url: '../premaritalReport/premaritalReport', + }) + }, + +}) diff --git a/woman/pages/premaritalCheckup/premaritalCheckup.wxml b/woman/pages/premaritalCheckup/premaritalCheckup.wxml index 45befa2..65e01c8 100644 --- a/woman/pages/premaritalCheckup/premaritalCheckup.wxml +++ b/woman/pages/premaritalCheckup/premaritalCheckup.wxml @@ -15,11 +15,11 @@ 检验报告查询 - - 血常规检查 + + {{item.top_title}} 未见异常 - + 详细报告 diff --git a/woman/pages/premaritalCheckup/premaritalCheckup.wxss b/woman/pages/premaritalCheckup/premaritalCheckup.wxss index 0bcfa86..e360376 100644 --- a/woman/pages/premaritalCheckup/premaritalCheckup.wxss +++ b/woman/pages/premaritalCheckup/premaritalCheckup.wxss @@ -2,7 +2,6 @@ /* pages/folicAcid/folicAcid.wxss */ .menuList_title { font-size: 34rpx; - font-family: PingFang SC-Medium, PingFang SC; font-weight: 600; line-height: 34rpx; background: linear-gradient(135deg, #FFB4B4 0%, #FF8EA9 100%); @@ -21,7 +20,6 @@ .menuList_text { font-size: 26rpx; - font-family: PingFang SC-Medium, PingFang SC; font-weight: 500; background: linear-gradient(135deg, #FFB4B4 0%, #FF8EA9 100%); -webkit-background-clip: text; @@ -31,7 +29,6 @@ .menuList_next{ width: 20rpx; height: 20rpx; - opacity: 1; border: 2rpx solid #FF8EA9; display: inline-block; diff --git a/woman/pages/premaritalReport/premaritalReport.js b/woman/pages/premaritalReport/premaritalReport.js new file mode 100644 index 0000000..2762af5 --- /dev/null +++ b/woman/pages/premaritalReport/premaritalReport.js @@ -0,0 +1,144 @@ +//articleLists.js 文章列表 +// 网络请求工具类 +var networkUtil = require('../../utils/network_util.js') +var api = require('../../utils/apiFile.js') +var hospital = '' + +Page({ + + data: { + baseCheck: [{ 'title': '首诊日期', 'word': 'checkTime', value: '' }, { 'title': '末次月经', 'word': 'lastMenses', value: '' }, { 'title': '预产期', 'word': 'dueDate', value: '' }, { 'title': '月经周期', 'word': 'mensDay', value: '' }], + bodyCheck: [{ title: '身高', word: 'height', value: '' }, { title: '体重', word: 'weight', value: '' }, { title: '心', word: 'heart', value: '' }, { title: '肺', word: 'lungs', value: '' }], + + womenCheck: [{ title: '外阴', word: 'vulva', value: '' }, { title: '阴道', word: 'vagina', value: 'vagina' }, { title: '宫颈', word: 'cervical', value: '' }, { title: '宫体', word: 'uterus', value: '' }, { title: '附件', word: 'fujian', value: '' }], + + obstetricsCheck: [{ title: '腹围', word: 'fuwei', value: '' }, { title: '宫高', word: 'gongGao', value: '' }, { title: '胎位', word: 'fetalPositionVal', value: '' }, { title: '胎心', word: 'heartRateVal', value: '' }, { title: '先露', word: 'fetalPresentationVal', value: '' }], + + assistantCheck: [{ 'top_title': '血常规', content: [{ 'title': '血红蛋白', 'word': 'xhdb', value: '' }, { 'title': '血红蛋白券', 'word': '', value: '' }, { 'title': '白细胞计数', 'word': 'bxbjs', value: '' }, { 'title': '血小板计数', 'word': 'platelet', value: '' }, { 'title': '血常规其他', 'word': 'chgOther', value: '' }] }, + + { 'top_title': '乙肝五项', content: [{ 'title': '乙肝表面抗原', 'word': 'ygbmky', value: '' }, { 'title': '乙肝表面抗体', 'word': 'ygbmkt', value: '' }, { 'title': '乙肝e抗原', 'word': 'ygeky', value: '' }, { 'title': '乙肝e抗体', 'word': 'ygekt', value: '' }, { 'title': '乙肝核心抗体', 'word': 'yghxkt', value: '' }] }, + + { 'top_title': '肾功', content: [{ 'title': '血清肌酐', 'word': 'xqjq', value: '' }, { 'title': '血尿素氮', 'word': 'xnsd', value: '' }] }, + + { 'top_title': '血型', content: [{ 'title': '血型', 'word': 'abo', value: '' }, { 'title': 'RH血型', 'word': 'rh', value: '' }, { 'title': '血糖', 'word': 'bloodSugar', value: '' }] }, + + { 'top_title': '肝功能', content: [{ 'title': '血清谷丙转氨酶', 'word': 'xqgbzam', value: '' }, { 'title': '血清谷草转氨酶', 'word': 'xqgczam', value: '' }, { 'title': '白蛋白', 'word': 'albumin', value: '' }, { 'title': '总胆红素', 'word': 'totalBilirubin', value: '' }, { 'title': '结合胆红素', 'word': 'jhBilirubin', value: '' }, { 'title': '丙肝', 'word': 'bg', value: '' }] }, + + { 'top_title': '尿常规', content: [{ 'title': '尿蛋白', 'word': 'ndb', value: '' }, { 'title': '尿糖', 'word': 'nt', value: '' }, { 'title': '尿酮体', 'word': 'urineKetone', value: '' }, { 'title': '尿潜血', 'word': 'bld', value: '' }, { 'title': '尿其他', 'word': 'ncgOther', value: '' }] },], + // 孕产史 + ycHistory:'' + }, + onLoad: function (options) { + //hospital = options.hospital + //this.requestData(options.id) + }, + /*---------自定义函数--------*/ + requestData(Id) { + var self = this + networkUtil.showLoading() + // 报告详情 + networkUtil._get(api.pregnancyReports + '/' + Id, {}, function (res) { + if (res.data.list.length == 0) { + return + } + var data = res.data.list[0].result2 + self.getBaseCheckWith(data) + self.getbodyCheck(data) + self.getwomenCheck(data) + self.getobstetricsCheck(data) + self.getassistantCheck(data) + var risk = '' + for (var key in res.data.list[0].result) { + if (res.data.list[0].result[key].k == '高危因素') { + risk = res.data.list[0].result[key].v + } + } + self.setData({ + checkData:data, + risk:risk + }) + }, function (res) { + + }) + }, + // 检查基础信息 + getBaseCheckWith(data){ + var baseCheck = this.data.baseCheck + for (var index in this.data.baseCheck) { + var item = this.data.baseCheck[index] + if (data[item.word]) { + item.value = data[item.word] + } + } + this.setData({ + baseCheck: baseCheck + }) + }, + // 检查基础信息 + getbodyCheck(data) { + var bodyCheck = this.data.bodyCheck + for (var index in bodyCheck) { + var item = bodyCheck[index] + if (data[item.word]) { + item.value = data[item.word] + } + } + this.setData({ + bodyCheck: bodyCheck + }) + }, + // 检查基础信息 + getwomenCheck(data) { + var womenCheck = this.data.womenCheck + for (var index in womenCheck) { + var item = womenCheck[index] + if (data[item.word]) { + item.value = data[item.word] + } + } + this.setData({ + womenCheck: womenCheck + }) + }, + // 检查基础信息 + getobstetricsCheck(data) { + var obstetricsCheck = this.data.obstetricsCheck + for (var index in obstetricsCheck) { + var item = obstetricsCheck[index] + if (data[item.word]) { + item.value = data[item.word] + } + } + this.setData({ + obstetricsCheck: obstetricsCheck + }) + }, + // 检查基础信息 + getassistantCheck(data) { + var assistantCheck = this.data.assistantCheck + for (var index in assistantCheck) { + var item = assistantCheck[index] + for (var newItem in item.content) { + if (data[item.content[newItem].word]) { + item.content[newItem].value = data[item.content[newItem].word] + } + } + } + this.setData({ + assistantCheck: assistantCheck + }) + }, + getycHistory(data){ + var str = '' + if(data.pregnacyTimes){ + str = '孕次:' + data.pregnacyTimes + '次' + } + if (data.prodTime) { + str = '产次:' + data.prodTime + '次' + } + if (data.pregnacyTimes) { + str = '孕次:' + data.pregnacyTimes + '次' + } + } + +}) diff --git a/woman/pages/premaritalReport/premaritalReport.json b/woman/pages/premaritalReport/premaritalReport.json new file mode 100644 index 0000000..4a7dd37 --- /dev/null +++ b/woman/pages/premaritalReport/premaritalReport.json @@ -0,0 +1,6 @@ +{ + "navigationBarBackgroundColor": "#ffffff", + "navigationBarTitleText": "婚前检测", + "navigationBarTextStyle": "black" + +} \ No newline at end of file diff --git a/woman/pages/premaritalReport/premaritalReport.wxml b/woman/pages/premaritalReport/premaritalReport.wxml new file mode 100644 index 0000000..f8a3564 --- /dev/null +++ b/woman/pages/premaritalReport/premaritalReport.wxml @@ -0,0 +1,12 @@ + + + + + 婚前医学检查证明 + + 参考数值 + 检测值 + + + + diff --git a/woman/pages/premaritalReport/premaritalReport.wxss b/woman/pages/premaritalReport/premaritalReport.wxss new file mode 100644 index 0000000..37e446c --- /dev/null +++ b/woman/pages/premaritalReport/premaritalReport.wxss @@ -0,0 +1,24 @@ +/* pages/cancerCheck/cancerCheck.wxss */ +/* pages/folicAcid/folicAcid.wxss */ +.itemList_title { + font-size: 30rpx; + font-weight: 600; + line-height: 30rpx; + background: linear-gradient(135deg, #FFB4B4 0%, #FF8EA9 100%); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; +} + +.itemList_bg{ + width: 670rpx; + height: 100rpx; + background: #FFFFFF; + border-radius: 20rpx 20rpx 20rpx 20rpx; + opacity: 1; + border: 4rpx solid transparent; + background-image: linear-gradient(#fff, #fff), + linear-gradient(to bottom left,#FFB4B4,#FF8EA9); + background-origin: border-box; + background-clip: content-box, border-box; +} + diff --git a/woman/pages/report_first/report_first.js b/woman/pages/report_first/report_first.js index bdcd945..f58460f 100644 --- a/woman/pages/report_first/report_first.js +++ b/woman/pages/report_first/report_first.js @@ -30,7 +30,7 @@ Page({ }, onLoad: function (options) { hospital = options.hospital - this.requestData(options.id) + this.requestData() }, /*---------自定义函数--------*/ requestData(Id) {