柒零 1 жил өмнө
parent
commit
25da63906f

+ 2 - 1
app.json

@@ -18,7 +18,8 @@
         "warmReminder/warmReminder",
         "myMattress/myMattress",
         "addMattresses/addMattresses",
-        "constitutionDiagnosis/constitutionDiagnosis"
+        "constitutionDiagnosis/constitutionDiagnosis",
+        "detectionResult/detectionResult"
       ]
     }
   ],

+ 7 - 0
project.private.config.json

@@ -10,6 +10,13 @@
   "condition": {
     "miniprogram": {
       "list": [
+        {
+          "name": "subpages/detectionResult/detectionResult",
+          "pathName": "subpages/detectionResult/detectionResult",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
         {
           "name": "subpages/constitutionDiagnosis/constitutionDiagnosis",
           "pathName": "subpages/constitutionDiagnosis/constitutionDiagnosis",

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 33 - 0
subpages/bg/ic_detection_result_bg.svg


+ 7 - 5
subpages/constitutionDiagnosis/constitutionDiagnosis.js

@@ -532,11 +532,13 @@ Page({
 								title: '问卷提交成功',
 								icon: 'success',
 								duration: 2000,
-								// success() {
-								// 	setTimeout(() => {
-								// 		wx.navigateBack()
-								// 	}, 1500);
-								// }
+								success() {
+									setTimeout(() => {
+										wx.navigateTo({
+											url: `/subpages/detectionResult/detectionResult?comScoreIndex=${comScoreIndex}`,
+										})
+									}, 1000);
+								}
 							});
 				
 						}

+ 6 - 0
subpages/data/data.js

@@ -1856,6 +1856,12 @@ Page({
 		let rin_duration_efficiency_temp = ress.rtotal_duration ? (Math.ceil(((ress.rin_duration ? parseFloat(ress.rin_duration) : 0) / ress.rtotal_duration) * 100) + '%') : '%'
 		let rawake_duration_efficiency_temp = ress.rtotal_duration ? (Math.ceil(((ress.rawake_duration ? parseFloat(ress.rawake_duration) : 0) / ress.rtotal_duration) * 100) + '%') : '%'
 
+		// let rdeep_duration_efficiency_temp = ress.darktrate;
+		// let rlight_duration_efficiency_temp = ress.lightrate;
+		// let rin_duration_efficiency_temp = ress.midrate;
+		// let rawake_duration_efficiency_temp = ress.awakenrate;
+
+
 
 		let sleep_durationTemp = [];
 		let obj1 = {};

+ 108 - 0
subpages/detectionResult/detectionResult.js

@@ -0,0 +1,108 @@
+// subpages/detectionResult.js
+Page({
+
+  /**
+   * 页面的初始数据
+   */
+  data: {
+    comScoreIndex: [0],
+    ratingResultsList: [{
+      index: 0,
+      title: "气虚型",
+      tips:"(体力和气力都低下,需要规律性的生活方式)",
+      subTitle:"累啊』『真倒霉』成了口头语",
+      desc:"一般来说气虚型的人,就是被称作生命力的“气”整体不足。因为体力和气力的整体下降,无论做什么都会感到“真倒霉”“真麻烦”,饮食和运动也是马马虎虎地应付。结果,陷入生活越不规律,“气”就越衰弱的恶性循环。特点就是免疫力降低,易患感冒,而且很难一次性治愈。\n\n为了改善气虚,最重要的就是要有规律性的生活方式。晚上早睡,早上早起。日常食物也要以应季的食材为主,促进胃肠的蠕动,尽量多食用可以提升体温的豆类、薯类等食材。\n\n适度的运动是必要的,但因体力下降,所以万不可强求大的运动量,可以从散步呀、瑜伽呀等轻负荷的运动练起。\n\n特征:驼背。显老像;稍一运动就出汗;手脚发冷;易疲劳,总有困意与疲倦感;下半身易发胖。"
+    }, {
+      index: 1,
+      title: "气滞型",
+      tips: "(常常紧张、焦虑~要有意识地放松自己)",
+      subTitle: "感情起伏剧烈",
+      desc:"“气”本来是在体内正常循环的,但是因紧张和压力等使气滞留,就造成了气滞型。“气’一旦滞留,就表现为腹胀、肿胀、疼痛等症状。而且,感情起伏剧烈也是其特征。一旦情绪低落,很快就会焦虑起来,给人以“易发怒”歇斯底里”的感觉。更年期出现气滞的人也不在少数。\n\n养生法无疑是减轻压力的最好办法,但暴饮暴食则会适得其反。值得注意的是体重的增加会影响气的循环。香草和香味蔬菜有促进气循环和防止暴饮暴食的作用。除此之外,每天的日常安排中应留出自我放松的时间,也可以进行深呼吸,这些都有助于改善气滞。\n\n气滞型:入睡困难;眼睛充血;肚子容易生赘肉;焦虑,易怒,皮肤油腻,发红;易打嗝,矢气。"
+    }, {
+      index: 2,
+      title: "血虚型",
+      tips: "(饮食生活无规律~可能也有气虚或气滞的原因)",
+      subTitle: "头发散乱,皮肤无光泽",
+      desc:"你是否为了减肥极端地限制饮食,或者光在外边决餐?如果一直这样,就会使营养失去平衡,引起“血”的不足,陷入血虚状态。\n\n为此,日常饮食重要的是要注意营养的平衡,特别要多食用有造血作用的羊栖菜、动物肝脏、梅干等。“血”增加了,头发散乱、皮肤无光泽这些血虚型的症状自然就消失了。夜间是人体的造血时间,因此不要熬夜。还要控制电脑和手机的使用,也要控制看电视的时间。中医学以为用眼是消耗“血”的。\n\n特征:头发脆弱,脱发;常常眩晕,站起时头晕;脸色不好,皮肤干燥;指甲偏薄,易裂;耳鸣;冷静,认真型。"
+    }, {
+      index: 3,
+      title: "淤血型",
+      tips: "(血流不畅~更要注意减压,慎食生冷食品)",
+      subTitle: "常常感到肩凝、头痛",
+      desc: "血流不顺畅,易在体内形成血块(瘀血)。其原因有喜食生冷食品、压力大、过劳、睡眠不足等等。也有因气虚和血虚造成的瘀血。\n\n对这个型的人,首先是必须使其血行畅通,提高代谢。要多食用牛蒡、蒟蒻(魔芋)、黑醋等有化解瘀血作用的食品,也要多食用生姜和韭菜、葱等有香味的蔬菜。饮料也要尽量选择热你,偏冷会影响血循环。\n\n要养成运动的习惯。运动可以促进血行,缓解瘀血引起的肩凝和腰痛。当然,按摩下半身也可以有效地改善脸部的气色。\n\n特征:容易被晒伤;容易长色斑,雀斑;容易出现黑眼圈;常常为肩凝和腰痛烦恼;经血中有动物肝脏样血块;基本上自制力较强,但偶尔也会感情爆发。"
+    }, {
+      index: 4,
+      title: "水虚型",
+      tips: "(身体如同干枯一般~避免食用香辛食物和剧烈运动)",
+      subTitle: "常为头晕眼花、身体发热而烦恼",
+      desc: "体内水分不足称为水虚。皮肤、毛发、大便干燥的入水虚的可能性较大。而且,这类人因为给身体起到降温作用的水分不足,所以,常常感到头晕眼花或者身体发热。\n\n作为养生法,就是要通过食物的摄取,有效地补充水分。其中,苹果和香蕉、白菜可以有效地滋润身体,要有意识地多多食用。而且,因为睡眠中容易出汗,水分会在不知不觉中流失,因此,要在枕边预备下温开水,醒来后先饮水。\n\n另一方面,要尽量避免食用香辛食材。因为香辛料有温暖身体的作用,可能会加重头晕眼花和身体发热的症状。水虚的人还要避免剧烈的运动。因为他们的关节水分不足,剧烈运动会引发疼痛。\n\n特征:睡眠浅,盗汗;关节运动不灵活;不明原因的消沉,情绪低落;毛发和皮肤脆弱,口腔和咽喉干燥;便秘,尿量少。"
+    }, {
+      index: 5,
+      title: "痰湿型",
+      tips: "(体内多余的水分~常常引发各种“不调”,要慎食味重食品)",
+      subTitle: "体型胖墩墩的",
+      desc: "现代职场女性多为痰湿型。所谓痰湿就是生活不规律、压力大等原因造成身体内形成多余的水分块(痰湿)的状态。因为我们的身体70%是由水构成的,所以痰湿的影响不容忽视,会造成我们的身心状态出现各种各样的“不调”。\n\n首先,有氧运动能够增加肌肉的弹力,促进血行和代谢。肌肉弹力的提高、血行和代谢的改善,就可以通过汗和取把多余的水分排出体外。\n\n第二要注意减少冷饮和味重食品的摄入量,因为它们会造成水分的滞留。\n\n第三要多食用黄瓜和西瓜、梨等有较好利尿作用的食物。也要多食红豆、薏米。\n\n特征:整个身体容易浮肿;容易发胖;早晨起床后脸上有枕头的痕迹;皮肤发白。胖墩墩的;爱生湿乎乎的疙瘩;性格自我,爱慕虚荣。"
+    }]
+  },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
+  onLoad(options) {
+    if (options.comScoreIndex) {
+      this.setData({
+        comScoreIndex: options.comScoreIndex
+      })
+    }
+
+  },
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
+  }
+})

+ 6 - 0
subpages/detectionResult/detectionResult.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {},
+  "navigationBarBackgroundColor": "#ffffff",
+  "navigationBarTextStyle": "black",
+  "navigationBarTitleText": "检测结果"
+}

+ 23 - 0
subpages/detectionResult/detectionResult.wxml

@@ -0,0 +1,23 @@
+<!--subpages/detectionResult.wxml-->
+<view>
+    <wxs module="jstools" src="/subpages/wxs/includes.wxs"></wxs>
+    <swiper indicator-dots="{{false}}" autoplay="{{false}}" interval="{{2000}}" duration="{{500}}" class="swiper-page">
+        <block wx:for="{{ratingResultsList}}" wx:if="{{jstools.includes(comScoreIndex,index)}}" wx:key="*this">
+            <swiper-item>
+                <view class="swiper-item">
+                    <scroll-view scroll-y class="scroll-box">
+                        <view class="container-page">
+                            <image style="display: block;width: 100vw;position: absolute; z-index: -1;"
+                                src="/subpages/bg/ic_detection_result_bg.svg" mode="widthFix">
+                            </image>
+                            <text class="title">{{item.title}}</text>
+                            <text class="tips">{{item.tips}}</text>
+                            <text class="subTitle">{{item.subTitle}}</text>
+                            <text class="desc">{{item.desc}}</text>
+                        </view>
+                    </scroll-view>
+                </view>
+            </swiper-item>
+        </block>
+    </swiper>
+</view>

+ 62 - 0
subpages/detectionResult/detectionResult.wxss

@@ -0,0 +1,62 @@
+/* subpages/detectionResult.wxss */
+
+.swiper-page {
+    width: 100vw;
+    height: 100vh;
+}
+
+.swiper-item {
+    width: 100vw;
+    height: 100vh;
+}
+
+.scroll-box {
+    width: 100vw;
+    height: 100vh;
+    overflow-x: hidden;
+}
+
+.container-page {
+    width: 100vw;
+    display: flex;
+    flex-direction: column;
+    position: relative;
+}
+
+.title {
+    margin-top: 76rpx;
+    color: #FFFFFF;
+    font-weight: 600;
+    font-size: 40rpx;
+    margin-left: 40rpx;
+}
+
+.tips {
+    margin: 12rpx 40rpx 0 30rpx;
+    font-size: 24rpx;
+    color: #FFFFFF;
+}
+
+.subTitle {
+    width: fit-content;
+    font-size: 22rpx;
+    height: 32rpx;
+    line-height: 32rpx;
+    padding: 2rpx 10rpx;
+    color: #FFFFFF;
+    background: #00C1AF;
+    border-radius: 8rpx;
+    margin: 18rpx 40rpx 0 40rpx;
+}
+
+.desc {
+    margin: 40rpx auto 0;
+    font-size: 24rpx;
+    padding: 40rpx 30rpx;
+    width: 630rpx;
+    line-height: 40rpx;
+    color: #666666;
+    background: #FFFFFF;
+    box-shadow: 20rpx 8rpx 20rpx 0rpx rgba(219, 225, 231, 0.2);
+    border-radius: 28rpx;
+}

+ 3 - 3
subpages/icons/ic_no_mattress.svg

@@ -2,9 +2,9 @@
     height="108" viewBox="0 0 108 108">
     <defs>
         <mask id="master_svg0_1362_18086" style="mask-type:alpha" maskUnits="userSpaceOnUse">
-            <g>
-                <rect x="0" y="0" width="108" height="108" rx="0" fill="#FFFFFF" fill-opacity="1" />
-            </g>
+
+            <rect x="0" y="0" width="108" height="108" rx="0" fill="#FFFFFF" fill-opacity="1" />
+
         </mask>
         <filter id="master_svg1_1362_18083" filterUnits="objectBoundingBox" color-interpolation-filters="sRGB" x="0"
             y="0" width="85.39534759521484" height="47.72093200683594">

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно