diff --git a/app.json b/app.json index 7bed22d..5cb837b 100644 --- a/app.json +++ b/app.json @@ -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", @@ -38,4 +39,4 @@ "desc": "需要获取您的地理位置,请确认授权,否则地图功能将无法使用" } } -} \ No newline at end of file +} diff --git a/images/jiankangbaogao.png b/images/jiankangbaogao.png new file mode 100644 index 0000000..5247253 Binary files /dev/null and b/images/jiankangbaogao.png differ diff --git a/pages/basketballGym/index.js b/pages/basketballGym/index.js index 5adad51..8b0712e 100644 --- a/pages/basketballGym/index.js +++ b/pages/basketballGym/index.js @@ -31,7 +31,7 @@ Page({ if (options.scene) { id = options.scene; } - + wx.showLoading({ title: '加载中...', mask: true, @@ -178,11 +178,6 @@ Page({ }) }, - // 弹框背景禁止滑动 - unMove() { - return; - }, - // 关闭购买vip弹框 closeBuyVipPopup() { this.setData({ @@ -289,4 +284,4 @@ Page({ }) } -}) \ No newline at end of file +}) diff --git a/pages/healthDocs/filter.wxs b/pages/healthDocs/filter.wxs new file mode 100644 index 0000000..48285ef --- /dev/null +++ b/pages/healthDocs/filter.wxs @@ -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 +} diff --git a/pages/healthDocs/index.js b/pages/healthDocs/index.js new file mode 100644 index 0000000..e5c0dd6 --- /dev/null +++ b/pages/healthDocs/index.js @@ -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 + }) + } + }, +}) diff --git a/pages/healthDocs/index.json b/pages/healthDocs/index.json new file mode 100644 index 0000000..9d30e69 --- /dev/null +++ b/pages/healthDocs/index.json @@ -0,0 +1,6 @@ +{ + "enablePullDownRefresh": true, + "usingComponents": { + "header": "/component/header/header" + } +} \ No newline at end of file diff --git a/pages/healthDocs/index.wxml b/pages/healthDocs/index.wxml new file mode 100644 index 0000000..70302f2 --- /dev/null +++ b/pages/healthDocs/index.wxml @@ -0,0 +1,20 @@ + + +
+ + + + + 报告名称:{{item.docName}} + + 报告类型:{{item.docType == 0 ? "健康报告" : "未知类型"}} + 报告日期:{{filter.dateFormatStr(item.docDate)}} + + + + + + + + 暂无健康报告 ~ + diff --git a/pages/healthDocs/index.wxss b/pages/healthDocs/index.wxss new file mode 100644 index 0000000..68cdbe2 --- /dev/null +++ b/pages/healthDocs/index.wxss @@ -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; +} diff --git a/pages/home/index.js b/pages/home/index.js index c2600b9..46ae0e2 100644 --- a/pages/home/index.js +++ b/pages/home/index.js @@ -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']) { @@ -366,13 +363,13 @@ Page({ // 东 longitude: 121.7051696777, latitude: 31.2750297303 - }, + }, { // 南 longitude: 121.4167785645, latitude: 31.0317548780 }, - { + { // 西 longitude: 121.2135314941, latitude: 31.2433336586 @@ -512,4 +509,4 @@ function GetDistance(lat1, lng1, lat2, lng2) { s = Math.round(s * 1000) / 1; //单位修改为米,取整 //s=s.toFixed(4); return s; -} \ No newline at end of file +} diff --git a/pages/home/index.wxml b/pages/home/index.wxml index 04a1a70..53002e9 100644 --- a/pages/home/index.wxml +++ b/pages/home/index.wxml @@ -99,9 +99,9 @@ - - - + + + @@ -114,4 +114,4 @@ - \ No newline at end of file + diff --git a/pages/mine/index.js b/pages/mine/index.js index b71ba8d..5c8db5d 100644 --- a/pages/mine/index.js +++ b/pages/mine/index.js @@ -114,6 +114,12 @@ Page({ url: '/pages/myBills/index', }) }, + // 跳转我的账单 + pushMyHealth() { + wx.navigateTo({ + url: '/pages/healthDocs/index', + }) + }, // 跳转人脸采集 pushFacialCapturing() { wx.navigateTo({ @@ -159,4 +165,4 @@ Page({ showLogoutDialog: false }) } -}) \ No newline at end of file +}) diff --git a/pages/mine/index.wxml b/pages/mine/index.wxml index fd39341..10fbcf0 100644 --- a/pages/mine/index.wxml +++ b/pages/mine/index.wxml @@ -36,6 +36,10 @@ 我的账单 + + 我的报告 + + 人脸采集 @@ -54,4 +58,4 @@ - \ No newline at end of file + diff --git a/pages/sportsGroundList/index.js b/pages/sportsGroundList/index.js index 337eed1..f94a717 100644 --- a/pages/sportsGroundList/index.js +++ b/pages/sportsGroundList/index.js @@ -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(); diff --git a/project.config.json b/project.config.json index 9114597..8c33395 100644 --- a/project.config.json +++ b/project.config.json @@ -1,58 +1,55 @@ { - "description": "项目配置文件。", - "packOptions": { - "ignore": [] - }, - "setting": { - "urlCheck": false, - "es6": true, - "enhance": false, - "postcss": true, - "preloadBackgroundData": false, - "minified": true, - "newFeature": true, - "coverView": true, - "nodeModules": false, - "autoAudits": false, - "showShadowRootInWxmlPanel": true, - "scopeDataCheck": false, - "uglifyFileName": false, - "checkInvalidKey": true, - "checkSiteMap": true, - "uploadWithSourceMap": true, - "compileHotReLoad": false, - "babelSetting": { - "ignore": [], - "disablePlugins": [], - "outputPath": "" - }, - "useIsolateContext": true, - "useCompilerModule": true, - "userConfirmedUseCompilerModuleSwitch": false - }, - "compileType": "miniprogram", - "libVersion": "2.10.2", - "appid": "wx73eb8a9ed10a029d", - "projectname": "%E6%99%BA%E6%85%A7%E4%BA%91%E9%A6%86", - "isGameTourist": false, - "simulatorType": "wechat", - "simulatorPluginLibVersion": {}, - "condition": { - "search": { - "current": -1, - "list": [] - }, - "conversation": { - "current": -1, - "list": [] - }, - "game": { - "currentL": -1, - "list": [] - }, - "miniprogram": { - "current": -1, - "list": [] - } - } + "description": "项目配置文件。", + "packOptions": { + "ignore": [] + }, + "setting": { + "urlCheck": false, + "es6": true, + "enhance": false, + "postcss": true, + "preloadBackgroundData": false, + "minified": true, + "newFeature": true, + "coverView": true, + "nodeModules": false, + "autoAudits": false, + "showShadowRootInWxmlPanel": true, + "scopeDataCheck": false, + "uglifyFileName": false, + "checkInvalidKey": true, + "checkSiteMap": true, + "uploadWithSourceMap": true, + "compileHotReLoad": false, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "useIsolateContext": true, + "useCompilerModule": true, + "userConfirmedUseCompilerModuleSwitch": false + }, + "compileType": "miniprogram", + "libVersion": "2.10.2", + "appid": "wx73eb8a9ed10a029d", + "projectname": "%E6%99%BA%E6%85%A7%E4%BA%91%E9%A6%86", + "isGameTourist": false, + "simulatorType": "wechat", + "simulatorPluginLibVersion": {}, + "condition": { + "search": { + "list": [] + }, + "conversation": { + "list": [] + }, + "game": { + "currentL": -1, + "list": [] + }, + "miniprogram": { + "list": [] + } + } } \ No newline at end of file diff --git a/utils/api.js b/utils/api.js index fce4df9..7ccd1c7 100644 --- a/utils/api.js +++ b/utils/api.js @@ -277,7 +277,7 @@ export default { venueLessonDate(params) { return fetchPost('/venue/lesson/date', params, false); }, - // 课程详情 + // 课程详情 venueLessonDetail(params) { return fetchPost('/venue/lesson/detail', params, false); }, @@ -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); @@ -432,4 +438,4 @@ export default { memberLoginCheckWx(params) { return fetchPost('/member/login/checkWx', params, true); } -} \ No newline at end of file +}