!1 20210315版本发布

Merge pull request !1 from Ezra/feature_20210224
This commit is contained in:
Ezra
2021-03-17 14:27:18 +08:00
committed by Gitee
15 changed files with 353 additions and 112 deletions

View File

@@ -22,7 +22,8 @@
"pages/sportsGroundList/index",
"pages/userInfo/index",
"pages/loginIndex/index",
"pages/withdrawal/index"
"pages/withdrawal/index",
"pages/healthDocs/index"
],
"window": {
"backgroundTextStyle": "dark",

BIN
images/jiankangbaogao.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -178,11 +178,6 @@ Page({
})
},
// 弹框背景禁止滑动
unMove() {
return;
},
// 关闭购买vip弹框
closeBuyVipPopup() {
this.setData({

View 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
View 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
})
}
},
})

View File

@@ -0,0 +1,6 @@
{
"enablePullDownRefresh": true,
"usingComponents": {
"header": "/component/header/header"
}
}

View 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>

View 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;
}

View File

@@ -147,21 +147,21 @@ Page({
this.setData({
state: state
})
if (state == 3) {
wx.showToast({
title: '暂未开放,敬请期待',
icon: 'none',
duration: 2000
})
let list = [{
longitude: this.data.longitude,
latitude: this.data.latitude
}];
this.setData({
includePoints: list
})
return;
}
// if (state == 3) {
// wx.showToast({
// title: '暂未开放,敬请期待',
// icon: 'none',
// duration: 2000
// })
// let list = [{
// longitude: this.data.longitude,
// latitude: this.data.latitude
// }];
// this.setData({
// includePoints: list
// })
// return;
// }
// this.getLngLat();
this.getLocation();
},
@@ -177,7 +177,7 @@ Page({
url: `/pages/basketballGym/index?id=${e.markerId}`,
})
}
if (this.data.state == 2) {
if (this.data.state == 2 || this.data.state == 3) {
wx.navigateTo({
url: `/pages/gymnasium/index?id=${e.markerId}`,
})
@@ -203,19 +203,6 @@ Page({
})
},
//扫描二维码
sacnQRCode() {
wx.scanCode({
success (res) {
wx.showToast({
title: res.result,
icon: 'none',
duration: 5000
})
}
})
},
// 跳转个人中心
pushMine() {
if (this.data.unClickBtn) {
@@ -271,6 +258,16 @@ Page({
})
},
// 跳转公告详情
pushHealthDocs(e) {
wx.navigateTo({
url: `/pages/healthDocs/index`,
success: function(res) {},
fail: function(res) {},
complete: function(res) {},
})
},
// 获取授权
setAuthSuccess(e) {
if (e.detail.authSetting['scope.userLocation']) {

View File

@@ -99,9 +99,9 @@
<button class='hide-btn'></button>
</cover-view>
<!-- 扫码进场 -->
<cover-view class='mine-box' style='bottom: 170rpx' bindtap='sacnQRCode'>
<cover-image class='img' src='../../images/ok.png'></cover-image>
<!-- 健康报告 -->
<cover-view class='mine-box' style='bottom: 170rpx' bindtap='pushHealthDocs'>
<cover-image class='img' src='../../images/jiankangbaogao.png'></cover-image>
<button class='hide-btn'></button>
</cover-view>

View File

@@ -114,6 +114,12 @@ Page({
url: '/pages/myBills/index',
})
},
// 跳转我的账单
pushMyHealth() {
wx.navigateTo({
url: '/pages/healthDocs/index',
})
},
// 跳转人脸采集
pushFacialCapturing() {
wx.navigateTo({

View File

@@ -36,6 +36,10 @@
<text>我的账单</text>
<image src='../../images/15@3x.png'></image>
</view>
<view class='cell' bindtap='pushMyHealth'>
<text>我的报告</text>
<image src='../../images/15@3x.png'></image>
</view>
<view class='cell' bindtap='pushFacialCapturing'>
<text>人脸采集</text>
<image src='../../images/15@3x.png'></image>

View File

@@ -99,7 +99,7 @@ Page({
url: `/pages/basketballGym/index?id=${id}`,
})
}
if (this.data.state == 2) {
if (this.data.state == 2 || this.data.state == 3) {
wx.navigateTo({
url: `/pages/gymnasium/index?id=${id}`,
})
@@ -131,12 +131,12 @@ Page({
venues: list,
isShowNewplot: true
})
if (this.data.state == 3) {
wx.showToast({
title: '暂未开放,敬请期待',
icon: 'none',
})
}
// if (this.data.state == 3) {
// wx.showToast({
// title: '暂未开放,敬请期待',
// icon: 'none',
// })
// }
wx.stopPullDownRefresh();
}, err => {
wx.stopPullDownRefresh();

View File

@@ -39,11 +39,9 @@
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"current": -1,
"list": []
},
"conversation": {
"current": -1,
"list": []
},
"game": {
@@ -51,7 +49,6 @@
"list": []
},
"miniprogram": {
"current": -1,
"list": []
}
}

View File

@@ -321,6 +321,12 @@ export default {
memberInformation(params) {
return fetchPost('/member/information', params, true);
},
// 健康报告
memberHealthDocs(params) {
return fetchPost('/member/health/docs', params, true);
},
// 修改个人信息
memberUpdateInformation(params) {
return fetchPost('/member/update/information', params, true);