健康报告生成
This commit is contained in:
5
app.json
5
app.json
@@ -22,7 +22,8 @@
|
|||||||
"pages/sportsGroundList/index",
|
"pages/sportsGroundList/index",
|
||||||
"pages/userInfo/index",
|
"pages/userInfo/index",
|
||||||
"pages/loginIndex/index",
|
"pages/loginIndex/index",
|
||||||
"pages/withdrawal/index"
|
"pages/withdrawal/index",
|
||||||
|
"pages/healthDocs/index"
|
||||||
],
|
],
|
||||||
"window": {
|
"window": {
|
||||||
"backgroundTextStyle": "dark",
|
"backgroundTextStyle": "dark",
|
||||||
@@ -38,4 +39,4 @@
|
|||||||
"desc": "需要获取您的地理位置,请确认授权,否则地图功能将无法使用"
|
"desc": "需要获取您的地理位置,请确认授权,否则地图功能将无法使用"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
images/jiankangbaogao.png
Normal file
BIN
images/jiankangbaogao.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
@@ -31,7 +31,7 @@ Page({
|
|||||||
if (options.scene) {
|
if (options.scene) {
|
||||||
id = options.scene;
|
id = options.scene;
|
||||||
}
|
}
|
||||||
|
|
||||||
wx.showLoading({
|
wx.showLoading({
|
||||||
title: '加载中...',
|
title: '加载中...',
|
||||||
mask: true,
|
mask: true,
|
||||||
@@ -178,11 +178,6 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 弹框背景禁止滑动
|
|
||||||
unMove() {
|
|
||||||
return;
|
|
||||||
},
|
|
||||||
|
|
||||||
// 关闭购买vip弹框
|
// 关闭购买vip弹框
|
||||||
closeBuyVipPopup() {
|
closeBuyVipPopup() {
|
||||||
this.setData({
|
this.setData({
|
||||||
@@ -289,4 +284,4 @@ Page({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
14
pages/healthDocs/filter.wxs
Normal file
14
pages/healthDocs/filter.wxs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
var dateFormatStr = function (dateStr) {
|
||||||
|
return dateStr.substring(0,10)
|
||||||
|
}
|
||||||
|
var moneyFormat = function (money) {
|
||||||
|
return money.toFixed(2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 导出
|
||||||
|
*/
|
||||||
|
module.exports = {
|
||||||
|
dateFormatStr: dateFormatStr,
|
||||||
|
moneyFormat: moneyFormat
|
||||||
|
}
|
||||||
133
pages/healthDocs/index.js
Normal file
133
pages/healthDocs/index.js
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
// pages/healthDocs/index.js
|
||||||
|
const app = getApp();
|
||||||
|
let page = 1;
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
docs: [],
|
||||||
|
isShowAuth: false,
|
||||||
|
isShowNewplot: false,
|
||||||
|
isGoHome: false,
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad: function(options) {
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady: function() {
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow: function() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload: function() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh: function() {
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom: function() {
|
||||||
|
this.getData(++page);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage: function() {
|
||||||
|
return {
|
||||||
|
title: '智慧云馆'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getData(e){
|
||||||
|
wx.showLoading({
|
||||||
|
title: '加载中...',
|
||||||
|
mask: true,
|
||||||
|
})
|
||||||
|
app.$api.memberHealthDocs({
|
||||||
|
page: e ? e : 1,
|
||||||
|
pageSize: 10
|
||||||
|
}).then(res => {
|
||||||
|
page = res.page.data.length > 0 ? res.page.page : page--;
|
||||||
|
let list = [];
|
||||||
|
if (e) {
|
||||||
|
list = this.data.docs
|
||||||
|
}
|
||||||
|
for (let i = 0; i < res.page.data.length; i++) {
|
||||||
|
list.push(res.page.data[i]);
|
||||||
|
}
|
||||||
|
this.setData({
|
||||||
|
docs: list,
|
||||||
|
isShowNewplot: true
|
||||||
|
})
|
||||||
|
wx.stopPullDownRefresh();
|
||||||
|
}, err => {
|
||||||
|
wx.stopPullDownRefresh();
|
||||||
|
this.setData({
|
||||||
|
isShowNewplot: true
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// 点击cell
|
||||||
|
clickCell(e) {
|
||||||
|
wx.showLoading({
|
||||||
|
title: '请稍候...',
|
||||||
|
mask: true,
|
||||||
|
})
|
||||||
|
wx.downloadFile({
|
||||||
|
// 示例 url,并非真实存在
|
||||||
|
url: e.currentTarget.dataset.id,
|
||||||
|
success: function (res) {
|
||||||
|
const filePath = res.tempFilePath
|
||||||
|
wx.openDocument({
|
||||||
|
filePath: filePath,
|
||||||
|
success: function (res) {
|
||||||
|
console.log('打开文档成功')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
// 获取授权
|
||||||
|
setAuthSuccess(e) {
|
||||||
|
if (e.detail.authSetting['scope.userLocation']) {
|
||||||
|
this.getLocation();
|
||||||
|
this.setData({
|
||||||
|
isShowAuth: false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
6
pages/healthDocs/index.json
Normal file
6
pages/healthDocs/index.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"enablePullDownRefresh": true,
|
||||||
|
"usingComponents": {
|
||||||
|
"header": "/component/header/header"
|
||||||
|
}
|
||||||
|
}
|
||||||
20
pages/healthDocs/index.wxml
Normal file
20
pages/healthDocs/index.wxml
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<!--pages/healthDocs/index.wxml-->
|
||||||
|
<wxs src="./filter.wxs" module="filter" />
|
||||||
|
<header isGoHome="{{isGoHome}}"></header>
|
||||||
|
<view class='container'>
|
||||||
|
<view class='list'>
|
||||||
|
<view class='cell-box' wx:for='{{docs}}' wx:key='{{index}}' bindtap='clickCell' data-id='{{item.docPath}}'>
|
||||||
|
<view class='cell'>
|
||||||
|
<view class='title'>报告名称:{{item.docName}}</view>
|
||||||
|
<view class='address'>
|
||||||
|
<text>报告类型:{{item.docType == 0 ? "健康报告" : "未知类型"}}</text>
|
||||||
|
<text>报告日期:{{filter.dateFormatStr(item.docDate)}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class='newplot' wx:if="{{isShowNewplot && docs.length == 0}}">
|
||||||
|
<image src='../../images/noContent.png'></image>
|
||||||
|
<text>暂无健康报告 ~</text>
|
||||||
|
</view>
|
||||||
62
pages/healthDocs/index.wxss
Normal file
62
pages/healthDocs/index.wxss
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
/* pages/healthDocs/index.wxss */
|
||||||
|
|
||||||
|
.container {
|
||||||
|
min-height: calc(100vh - 300rpx);
|
||||||
|
padding-top: 170rpx;
|
||||||
|
padding-bottom: 30rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list .cell-box {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
height: 140rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
padding: 0 26rpx 0 16rpx;
|
||||||
|
background: #1a191e;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list .cell-box>image {
|
||||||
|
width: 130rpx;
|
||||||
|
height: 110rpx;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list .cell-box .cell {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list .cell-box .cell .title {
|
||||||
|
color: #fff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
line-height: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list .cell-box .cell .address {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-top: 30rpx;
|
||||||
|
font-size: 24rpx;
|
||||||
|
line-height: 24rpx;
|
||||||
|
color: rgba(255, 255, 255, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.newplot {
|
||||||
|
position: fixed;
|
||||||
|
top: 260rpx;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: #FFF;
|
||||||
|
font-size: 28rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newplot>image {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
margin-top: -200rpx;
|
||||||
|
}
|
||||||
@@ -258,6 +258,16 @@ Page({
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 跳转公告详情
|
||||||
|
pushHealthDocs(e) {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: `/pages/healthDocs/index`,
|
||||||
|
success: function(res) {},
|
||||||
|
fail: function(res) {},
|
||||||
|
complete: function(res) {},
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
// 获取授权
|
// 获取授权
|
||||||
setAuthSuccess(e) {
|
setAuthSuccess(e) {
|
||||||
if (e.detail.authSetting['scope.userLocation']) {
|
if (e.detail.authSetting['scope.userLocation']) {
|
||||||
|
|||||||
@@ -99,9 +99,9 @@
|
|||||||
<button class='hide-btn'></button>
|
<button class='hide-btn'></button>
|
||||||
</cover-view>
|
</cover-view>
|
||||||
|
|
||||||
<!-- 扫码进场 -->
|
<!-- 健康报告 -->
|
||||||
<cover-view class='mine-box' style='bottom: 170rpx' bindtap='sacnQRCode'>
|
<cover-view class='mine-box' style='bottom: 170rpx' bindtap='pushHealthDocs'>
|
||||||
<cover-image class='img' src='../../images/ok.png'></cover-image>
|
<cover-image class='img' src='../../images/jiankangbaogao.png'></cover-image>
|
||||||
<button class='hide-btn'></button>
|
<button class='hide-btn'></button>
|
||||||
</cover-view>
|
</cover-view>
|
||||||
|
|
||||||
@@ -114,4 +114,4 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<confirm-dialog title="{{'提示'}}" message="{{'需要获取使用地理位置权限'}}" bindopensetting="setAuthSuccess" wx:if="{{isShowAuth}}" isAuth="{{true}}" show-cancel="{{false}}"></confirm-dialog>
|
<confirm-dialog title="{{'提示'}}" message="{{'需要获取使用地理位置权限'}}" bindopensetting="setAuthSuccess" wx:if="{{isShowAuth}}" isAuth="{{true}}" show-cancel="{{false}}"></confirm-dialog>
|
||||||
|
|||||||
@@ -114,6 +114,12 @@ Page({
|
|||||||
url: '/pages/myBills/index',
|
url: '/pages/myBills/index',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 跳转我的账单
|
||||||
|
pushMyHealth() {
|
||||||
|
wx.navigateTo({
|
||||||
|
url: '/pages/healthDocs/index',
|
||||||
|
})
|
||||||
|
},
|
||||||
// 跳转人脸采集
|
// 跳转人脸采集
|
||||||
pushFacialCapturing() {
|
pushFacialCapturing() {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
@@ -159,4 +165,4 @@ Page({
|
|||||||
showLogoutDialog: false
|
showLogoutDialog: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -36,6 +36,10 @@
|
|||||||
<text>我的账单</text>
|
<text>我的账单</text>
|
||||||
<image src='../../images/15@3x.png'></image>
|
<image src='../../images/15@3x.png'></image>
|
||||||
</view>
|
</view>
|
||||||
|
<view class='cell' bindtap='pushMyHealth'>
|
||||||
|
<text>我的报告</text>
|
||||||
|
<image src='../../images/15@3x.png'></image>
|
||||||
|
</view>
|
||||||
<view class='cell' bindtap='pushFacialCapturing'>
|
<view class='cell' bindtap='pushFacialCapturing'>
|
||||||
<text>人脸采集</text>
|
<text>人脸采集</text>
|
||||||
<image src='../../images/15@3x.png'></image>
|
<image src='../../images/15@3x.png'></image>
|
||||||
@@ -54,4 +58,4 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<confirm-dialog title="{{'提示'}}" message="{{'请确认退出登录'}}" bindcancelselect="cancelDeleteDialog" bindconfirmselect="confirmDeleteDialog" wx:if="{{showLogoutDialog}}"></confirm-dialog>
|
<confirm-dialog title="{{'提示'}}" message="{{'请确认退出登录'}}" bindcancelselect="cancelDeleteDialog" bindconfirmselect="confirmDeleteDialog" wx:if="{{showLogoutDialog}}"></confirm-dialog>
|
||||||
|
|||||||
10
utils/api.js
10
utils/api.js
@@ -277,7 +277,7 @@ export default {
|
|||||||
venueLessonDate(params) {
|
venueLessonDate(params) {
|
||||||
return fetchPost('/venue/lesson/date', params, false);
|
return fetchPost('/venue/lesson/date', params, false);
|
||||||
},
|
},
|
||||||
// 课程详情
|
// 课程详情
|
||||||
venueLessonDetail(params) {
|
venueLessonDetail(params) {
|
||||||
return fetchPost('/venue/lesson/detail', params, false);
|
return fetchPost('/venue/lesson/detail', params, false);
|
||||||
},
|
},
|
||||||
@@ -321,6 +321,12 @@ export default {
|
|||||||
memberInformation(params) {
|
memberInformation(params) {
|
||||||
return fetchPost('/member/information', params, true);
|
return fetchPost('/member/information', params, true);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 健康报告
|
||||||
|
memberHealthDocs(params) {
|
||||||
|
return fetchPost('/member/health/docs', params, true);
|
||||||
|
},
|
||||||
|
|
||||||
// 修改个人信息
|
// 修改个人信息
|
||||||
memberUpdateInformation(params) {
|
memberUpdateInformation(params) {
|
||||||
return fetchPost('/member/update/information', params, true);
|
return fetchPost('/member/update/information', params, true);
|
||||||
@@ -432,4 +438,4 @@ export default {
|
|||||||
memberLoginCheckWx(params) {
|
memberLoginCheckWx(params) {
|
||||||
return fetchPost('/member/login/checkWx', params, true);
|
return fetchPost('/member/login/checkWx', params, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user