testSAS.js 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. // const db = wx.cloud.database()
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. menuList: [{
  8. icon: "/subpages/images/ic_test_a.png",
  9. title: "睡眠质量指数测评",
  10. desc: "依据匹兹堡睡眠质量指数表",
  11. bg: "linear-gradient(270deg, #DDE7FF 0%, #EEF6FF 100%)",
  12. titleBg: "#2F539E",
  13. descColor: "#4160AD",
  14. border: "1rpx solid #c8d7ff",
  15. btnBg: "linear-gradient(135deg, #2957CB 0%, #649DFA 100%)",
  16. // url: "/subpages/sleepQualityIndexAssessment/sleepQualityIndexAssessment",
  17. url: "/subpages/evaluationIntroduction/evaluationIntroduction?type=sleep"
  18. }, {
  19. icon: "/subpages/images/ic_test_b.png",
  20. title: "体质诊断检测",
  21. desc: "日本汉方医学专家铃木元设计",
  22. bg: "linear-gradient( 270deg, #FFE5E5 0%, #FFF2F4 100%)",
  23. titleBg: "#7E3934",
  24. descColor: "#4E1915",
  25. border: "1rpx solid #ffd3d3",
  26. btnBg: "linear-gradient(135deg, #F34556 0%, #FC8893 100%)",
  27. // url: "/subpages/constitutionDiagnosis/constitutionDiagnosis",
  28. url: "/subpages/evaluationIntroduction/evaluationIntroduction?type=physique"
  29. }]
  30. },
  31. toSleepEvaluation() {
  32. if (!wx.getStorageSync('hotelEmpower') && !wx.getStorageSync('roomEmpower')) {
  33. // 无权限
  34. wx.showModal({
  35. title: '提示',
  36. content: '您不是酒店住客,请联系前台',
  37. showCancel: false
  38. });
  39. return
  40. }
  41. wx.navigateTo({
  42. url: "/subpages/sleepEvaluation/sleepEvaluation"
  43. })
  44. },
  45. checkMenuTap(e) {
  46. console.log(e.currentTarget.dataset.url);
  47. wx.navigateTo({
  48. url: e.currentTarget.dataset.url
  49. })
  50. },
  51. /**
  52. * 生命周期函数--监听页面加载
  53. */
  54. onLoad: function (options) {
  55. },
  56. /**
  57. * 生命周期函数--监听页面初次渲染完成
  58. */
  59. onReady: function () {
  60. },
  61. /**
  62. * 生命周期函数--监听页面显示
  63. */
  64. onShow: function () {
  65. },
  66. /**
  67. * 生命周期函数--监听页面隐藏
  68. */
  69. onHide: function () {
  70. },
  71. /**
  72. * 生命周期函数--监听页面卸载
  73. */
  74. onUnload: function () {
  75. },
  76. /**
  77. * 页面相关事件处理函数--监听用户下拉动作
  78. */
  79. onPullDownRefresh: function () {
  80. },
  81. /**
  82. * 页面上拉触底事件的处理函数
  83. */
  84. onReachBottom: function () {
  85. },
  86. /**
  87. * 用户点击右上角分享
  88. */
  89. onShareAppMessage: function () {
  90. }
  91. })