123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- // pages/report/report.js
- import { myReportList, getReport } from '../../api/my'
- const app = getApp()
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- reportList: [],
- showPage: true
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
- app.globalData.selectedInex = 1
- this.getMyReportList()
- },
- // 我的报告
- getMyReportList () {
- var that = this
- wx.showLoading({
- title: '加载中...',
- mask: true
- })
- myReportList({}).then(res => {
- wx.hideLoading()
- var response = res.data || []
- that.setData({
- reportList: response
- })
- }).catch(e => {
- wx.hideLoading()
- wx.showModal({
- content: e,
- confirmColor: '#333',
- showCancel: false
- })
- })
- },
- /**
- * 立即预约
- */
- handleAppoint() {
- wx.navigateTo({
- url: '/pages/appointment/appointment',
- })
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
- },
- /**
- * 点击报告进入详情
- */
- handleDetail(e) {
- var reportId = e.currentTarget.dataset.reportid
- wx.navigateTo({
- url: '/pages/reportDetail/reportDetail?reportid=' + reportId
- })
- }
- })
|