柒零 před 1 rokem
rodič
revize
12cca95acf

+ 2 - 2
pages/index/index.js

@@ -100,7 +100,7 @@ function setOption(chart) {
 			},
 			splitLine: {
 				distance: -10,
-				length: 10,
+				length: 6,
 				lineStyle: {
 					width: 1.5,
 					color: '#9499C3'
@@ -134,7 +134,7 @@ function setOption(chart) {
 				valueAnimation: true,
 				width: '60%',
 				offsetCenter: [0, '20%'],
-				fontSize: 32,
+				fontSize: 28,
 				fontWeight: 'bolder',
 				formatter: function (value) {
 					return value.toFixed(0) + '{units|%}'

+ 75 - 2
subpages/sleepEvaluation/sleepEvaluation.js

@@ -99,7 +99,7 @@ Page({
 		productComfort: '',
 		improvementAreas: [], // 使用数组来存储多选答案  
 		ImprovementSleep: [],//哪些方式来帮助改善睡眠
-		improvementSleep:[],
+		improvementSleep: [],
 		satisfied: [],// 哪些方面让您比较满意
 		suggestion: '', // 文本输入的建议
 		thirdPlatformsInput: '',//填写第三方平台
@@ -117,6 +117,7 @@ Page({
 		channel: '',//您是通过什么渠道预定到的本酒店睡眠房?
 		hotel: '',//酒店
 		room: '',//房间
+		mInputId:''//自动滚动用的
 	},
 
 	// 处理性别选择  
@@ -297,6 +298,76 @@ Page({
 			channel: this.data.channel,
 		};
 
+		let checkList = {
+			age: this.data.age,
+			career: this.data.career,
+			gender: this.data.gender,
+			channel: this.data.channel,
+			stayExper: this.data.stayExper,
+			satisfied: this.data.satisfied,
+			noSatisfied: this.data.noSatisfied,
+			improvementSleep: this.data.improvementSleep,
+			wayImprovementSleep: this.data.wayImprovementSleep,
+			getSleepHealth: this.data.getSleepHealth,
+			influenceSleep: this.data.influenceSleep,
+			improvSleepMethods: this.data.improvSleepMethods,
+			suggestion: this.data.suggestion,
+
+			// sleepEnvironmentComfort: this.data.sleepEnvironmentComfort,
+			// productComfort: this.data.productComfort,
+			// improvementAreas: this.data.improvementAreas,
+			// thirdPlatformsInput: this.data.thirdPlatformsInput,
+
+
+		}
+
+		var isFinish = true;
+		var emptyKey = "";
+
+		const that = this;
+
+		for (const key in checkList) {
+			if (checkList.hasOwnProperty(key)) {
+				const element = checkList[key];
+				if (!element || (Array.isArray(element) && element.length <= 0)) { // 检查属性值是否为空  
+					// 这里可以添加更复杂的判断,比如仅针对字符串检查是否为空字符串  
+					// if (typeof obj[key] === 'string' && obj[key].trim() === '') {  
+					isFinish = false;
+					emptyKey = key;
+					wx.showModal({
+						title: '无法提交',
+						content: '您还有部分题目未完成,请检查后重新提交',
+						showCancel: false,
+						confirmColor: '#0BC3AA',
+						confirmText: "好的",
+						success(res) {
+							console.log(emptyKey.toString());
+							that.setData({
+								mInputId: emptyKey.toString()
+							}) 
+
+						}
+					})
+					return; // 停止循环  
+				}
+			}
+		}
+
+		if (!isFinish) {
+			wx.showModal({
+				title: '无法提交',
+				content: '您还有部分题目未完成,请检查后重新提交',
+				showCancel: false,
+				confirmColor: '#0BC3AA',
+				confirmText: "好的",
+				success(res) {
+					console.log(emptyKey.toString());
+					
+				}
+			})
+			return;
+		}
+
 		// 将surveyData发送到服务器  
 		console.log('提交的问卷数据:', surveyData);
 
@@ -332,7 +403,9 @@ Page({
 			icon: 'success',
 			duration: 2000,
 			success() {
-				wx.navigateBack()
+				setTimeout(() => {
+					wx.navigateBack()
+				}, 1500);
 			}
 		});
 

+ 255 - 247
subpages/sleepEvaluation/sleepEvaluation.wxml

@@ -1,249 +1,257 @@
-<view class="container">
-  <image src="/subpages/images/testb_banner.png" style="display: block;width: 100vw;" mode="widthFix"></image>
-  <wxs module="jstools" src="/subpages/wxs/includes.wxs"></wxs>
-  <!-- 基本信息 -->
-  <view class="section-top">
-    <image src="/subpages/images/testb_bg.png" style="display: block;width: 100%;" mode="widthFix"></image>
-    <text
-      class="tips">您好!非常感谢您在百忙之中填写这份问卷。为了更好地了解您的入住体验,并根据您的建议进行持续完善。我们特此开展此次调查。请您根据自己的实际情况如实回答,所有数据将严格保密,仅用于研究分析。本问卷大约需要5-10分钟时间,请您耐心完成。您的意见对于我们而言至关重要。</text>
-  </view>
-  <view class='title_1'>一、基本信息</view>
-  <view class="section">
-    <text>1.您的年龄:</text>
-    <van-radio-group value="{{ age }}" bind:change="bindAgeChange">
-      <van-radio wx:for="{{ageOptions}}" wx:key="index" name="{{item.value}}" checked-color="#0ABCA4"
-        custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon" src="{{ age === item.value ? activeIcon : normalIcon }}" />
-          <text class="radio-title" style="{{ age === item.value ? activeColor : normalColor }}">{{item.label}}</text>
-        </view>
-
-      </van-radio>
-    </van-radio-group>
-
-
-
-  </view>
-  <view class="section">
-    <text>2.您的职业:</text>
-    <van-radio-group value="{{ career }}" bind:change="bindCareerChange">
-      <van-radio wx:for="{{careerOptions}}" wx:key="index" name="{{item.value}}" checked-color="#0ABCA4"
-        custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon" src="{{ career === item.value ? activeIcon : normalIcon }}" />
-          <text class="radio-title"
-            style="{{ career === item.value ? activeColor : normalColor }}">{{item.label}}</text>
-        </view>
-      </van-radio>
-    </van-radio-group>
-
-    <input type="text" placeholder="请填写您的职业" bindinput="bindCareerInputInput" />
-  </view>
-  <view class="section">
-    <text>3.您的性别:</text>
-
-    <van-radio-group value="{{ gender }}" bind:change="bindGenderChange">
-      <van-radio name='0' checked-color="#0ABCA4" custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon" src="{{ gender === '0' ? activeIcon : normalIcon }}" />
-          <text class="radio-title" style="{{ gender === '0' ? activeColor : normalColor }}">男</text>
-        </view>
-      </van-radio>
-      <van-radio name='1' checked-color="#0ABCA4" custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon" src="{{ gender === '1' ? activeIcon : normalIcon }}" />
-          <text class="radio-title" style="{{ gender === '1' ? activeColor : normalColor }}">女</text>
-        </view>
-      </van-radio>
-      <van-radio name='2' checked-color="#0ABCA4" custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon" src="{{ gender === '2' ? activeIcon : normalIcon }}" />
-          <text class="radio-title" style="{{ gender === '2' ? activeColor : normalColor }}">不愿透露</text>
-        </view>
-      </van-radio>
-    </van-radio-group>
-  </view>
-
-  <view class="section">
-    <text>4、您是通过什么渠道预定到的本酒店睡眠房?</text>
-
-
-    <van-radio-group value="{{ channel }}" bind:change="bindChannelChange">
-
-      <van-radio name='0' checked-color="#0ABCA4" custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon" src="{{ channel === '0' ? activeIcon : normalIcon }}" />
-          <text class="radio-title" style="{{ channel === '0' ? activeColor : normalColor }}">酒店散客</text>
-        </view>
-      </van-radio>
-      <van-radio name='1' checked-color="#0ABCA4" custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon" src="{{ channel === '1' ? activeIcon : normalIcon }}" />
-          <text class="radio-title" style="{{ channel === '1' ? activeColor : normalColor }}">朋友推荐</text>
-        </view>
-      </van-radio>
-      <van-radio name='2' checked-color="#0ABCA4" custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon" src="{{ channel === '2' ? activeIcon : normalIcon }}" />
-          <text class="radio-title"
-            style="{{ channel === '2' ? activeColor : normalColor }}">第三方平台(如携程、去哪儿网、飞猪、同程等)</text>
-        </view>
-      </van-radio>
-    </van-radio-group>
-    <input type="text" placeholder="请填写第三方平台" bindinput="bindThirdPlatformsInputInput" />
-  </view>
-  <view class='title_1'>二、用户体验</view>
-  <!-- 睡眠环境评价 -->
-  <view class="section">
-    <text>5、睡眠房的入住体验怎么样?</text>
-
-    <van-radio-group value="{{ stayExper }}" bind:change="bindStayExperOptions">
-      <van-radio wx:for="{{stayExperOptions}}" wx:key="index" name="{{item.value}}" checked-color="#0ABCA4"
-        custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon" src="{{ stayExper === item.value ? activeIcon : normalIcon }}" />
-          <text class="radio-title"
-            style="{{ stayExper === item.value ? activeColor : normalColor }}">{{item.label}}</text>
-        </view>
-      </van-radio>
-    </van-radio-group>
-  </view>
-
-  <view class="section">
-    <text>6、入住之后,您觉得哪些方面让您比较满意?(多选)</text>
-    <van-checkbox-group value="{{ satisfied }}" bind:change="bindSatisfied">
-      <van-checkbox wx:for="{{satisfiedOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
-        name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon"
-            src="{{ jstools.includes(satisfied,item.value) ? activeIcon : normalIcon }}" />
-          <text class="radio-title"
-            style="{{  jstools.includes(satisfied,item.value) ? activeColor : normalColor }}">{{item.label}}</text>
-        </view>
-      </van-checkbox>
-    </van-checkbox-group>
-
-  </view>
-
-  <view class="section">
-    <text>7、让您对本次睡眠房入住体验不满意的原因是?</text>
-
-
-    <van-radio-group value="{{ noSatisfied }}" bind:change="bindNoSatisfiedChange">
-      <van-radio wx:for="{{noSatisfiedOptions}}" wx:key="index" name="{{item.value}}" checked-color="#0ABCA4"
-        custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon" src="{{ noSatisfied === item.value ? activeIcon : normalIcon }}" />
-          <text class="radio-title"
-            style="{{ noSatisfied === item.value ? activeColor : normalColor }}">{{item.label}}</text>
-        </view>
-      </van-radio>
-    </van-radio-group>
-
-    <input type="text" placeholder="请填写体验不满意的原因" bindinput="bindNoSatisfiedInput" />
-  </view>
-
-  <view class="section">
-    <text>8、您通常采取什么措施来改善睡眠?(多选)</text>
-
-    <van-checkbox-group value="{{ improvementSleep }}" bind:change="bindImprovementSleep">
-      <van-checkbox wx:for="{{improvementSleepOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
-        name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon"
-            src="{{ jstools.includes(improvementSleep,item.value) ? activeIcon : normalIcon }}" />
-          <text class="radio-title"
-            style="{{  jstools.includes(improvementSleep,item.value) ? activeColor : normalColor }}">{{item.label}}</text>
-        </view>
-      </van-checkbox>
-    </van-checkbox-group>
-  </view>
-
-  <view class="section">
-    <text>9、您倾向于下面哪些方式来帮助改善睡眠?</text>
-
-
-    <van-checkbox-group value="{{ wayImprovementSleep }}" bind:change="bindWayImprovementSleep">
-      <van-checkbox wx:for="{{wayImprovementSleepOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
-        name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon"
-            src="{{ jstools.includes(wayImprovementSleep,item.value) ? activeIcon : normalIcon }}" />
-          <text class="radio-title"
-            style="{{  jstools.includes(wayImprovementSleep,item.value) ? activeColor : normalColor }}">{{item.label}}</text>
-        </view>
-      </van-checkbox>
-    </van-checkbox-group>
-    <input type="text" placeholder="请填写帮助改善睡眠方式" bindinput="bindWayImprovementSleepInput" />
-  </view>
-
-
-  <view class="section">
-    <text>10、您通常从哪里获取关于睡眠健康的信息?(多选)</text>
-    <van-checkbox-group value="{{ getSleepHealth }}" bind:change="bindGetSleepHealth">
-      <van-checkbox wx:for="{{getSleepHealthOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
-        name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon"
-            src="{{ jstools.includes(getSleepHealth,item.value) ? activeIcon : normalIcon }}" />
-          <text class="radio-title"
-            style="{{  jstools.includes(getSleepHealth,item.value) ? activeColor : normalColor }}">{{item.label}}</text>
-        </view>
-      </van-checkbox>
-    </van-checkbox-group>
-    <input type="text" placeholder="请填写从哪里获取关于睡眠健康的信息" bindinput="bindGetSleepHealthInput" />
-
-  </view>
-  <view class='title_1'>三、影响睡眠的因素</view>
-  <view class="section">
-    <text>11、您认为以下哪些因素会影响您的睡眠?(多选)</text>
-
-
-    <van-checkbox-group value="{{ influenceSleep }}" bind:change="bindInfluenceSleep">
-      <van-checkbox wx:for="{{influenceSleepOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
-        name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon"
-            src="{{ jstools.includes(influenceSleep,item.value) ? activeIcon : normalIcon }}" />
-          <text class="radio-title"
-            style="{{  jstools.includes(influenceSleep,item.value) ? activeColor : normalColor }}">{{item.label}}</text>
-        </view>
-      </van-checkbox>
-    </van-checkbox-group>
-
-    <input type="text" placeholder="请填写影响您的睡眠因素" bindinput="bindInfluenceSleepInput" />
-  </view>
-
-  <view class="section">
-    <text>12、您通常使用什么方法来改善睡眠质量?(多选)</text>
-    <van-checkbox-group value="{{ improvSleepMethods }}" bind:change="bindImprovSleepMethods">
-      <van-checkbox wx:for="{{improvSleepMethodsOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
-        name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
-        <view class="radio-view">
-          <image class="radio-icon" slot="icon"
-            src="{{ jstools.includes(improvSleepMethods,item.value) ? activeIcon : normalIcon }}" />
-          <text class="radio-title"
-            style="{{  jstools.includes(improvSleepMethods,item.value) ? activeColor : normalColor }}">{{item.label}}</text>
-        </view>
-      </van-checkbox>
-    </van-checkbox-group>
-
-    <input type="text" placeholder="请填写改善睡眠质量方法" bindinput="bindImprovSleepMethodsInput" />
-
-  </view>
-  <view class='title_1'>四、其他意见和建议</view>
-  <!-- 文本输入问题示例 -->
-  <view class="section">
-    <text>13. 关于本次睡眠房的入住体验,您最希望哪些方面可以进行改善优化</text>
-    <textarea class="full-width-textarea" type="text" placeholder="请填写您的建议" bindinput="bindSuggestionInput" />
-  </view>
-
-  <!-- 提交按钮 -->
-  <text class="commit-btn" bindtap="submitSurvey">提交问卷</text>
-  <!-- <view class="bottom-view">
-    <text style="font-weight:600">感谢您的参与和支持!</text>
-    <text
-      style="font-size: 28rpx;margin-top: 30rpx;color: #666666;">通过这份问卷,我们可以更好地了解受访者的睡眠状况及其影响因素,从而为他们提供更有效的改善建议。希望您能如实填写,以便我们为您提供更好的服务。</text>
-  </view> -->
+<view style="width: 100vw;height: 100vh; background: #CCEDF5;">
+  <scroll-view scroll-y="true" style="height: 100vh;background: #CCEDF5;" scroll-into-view="{{mInputId}}">
+
+    <view class="container">
+      <image src="/subpages/images/testb_banner.png" style="display: block;width: 100vw;" mode="widthFix"></image>
+      <wxs module="jstools" src="/subpages/wxs/includes.wxs"></wxs>
+      <!-- 基本信息 -->
+      <view class="section-top">
+        <image src="/subpages/images/testb_bg.png" style="display: block;width: 100%;" mode="widthFix"></image>
+        <text
+          class="tips">您好!非常感谢您在百忙之中填写这份问卷。为了更好地了解您的入住体验,并根据您的建议进行持续完善。我们特此开展此次调查。请您根据自己的实际情况如实回答,所有数据将严格保密,仅用于研究分析。本问卷大约需要5-10分钟时间,请您耐心完成。您的意见对于我们而言至关重要。</text>
+      </view>
+      <view class='title_1'>一、基本信息</view>
+      <view class="section" id="age">
+        <text>1.您的年龄:</text>
+        <van-radio-group value="{{ age }}" bind:change="bindAgeChange">
+          <van-radio wx:for="{{ageOptions}}" wx:key="index" name="{{item.value}}" checked-color="#0ABCA4"
+            custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon" src="{{ age === item.value ? activeIcon : normalIcon }}" />
+              <text class="radio-title"
+                style="{{ age === item.value ? activeColor : normalColor }}">{{item.label}}</text>
+            </view>
+
+          </van-radio>
+        </van-radio-group>
+
+
+
+      </view>
+      <view class="section" id="career">
+        <text>2.您的职业:</text>
+        <van-radio-group value="{{ career }}" bind:change="bindCareerChange">
+          <van-radio wx:for="{{careerOptions}}" wx:key="index" name="{{item.value}}" checked-color="#0ABCA4"
+            custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon" src="{{ career === item.value ? activeIcon : normalIcon }}" />
+              <text class="radio-title"
+                style="{{ career === item.value ? activeColor : normalColor }}">{{item.label}}</text>
+            </view>
+          </van-radio>
+        </van-radio-group>
+
+        <input type="text" placeholder="请填写您的职业" bindinput="bindCareerInputInput" />
+      </view>
+      <view class="section" id="gender">
+        <text>3.您的性别:</text>
+
+        <van-radio-group value="{{ gender }}" bind:change="bindGenderChange">
+          <van-radio name='0' checked-color="#0ABCA4" custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon" src="{{ gender === '0' ? activeIcon : normalIcon }}" />
+              <text class="radio-title" style="{{ gender === '0' ? activeColor : normalColor }}">男</text>
+            </view>
+          </van-radio>
+          <van-radio name='1' checked-color="#0ABCA4" custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon" src="{{ gender === '1' ? activeIcon : normalIcon }}" />
+              <text class="radio-title" style="{{ gender === '1' ? activeColor : normalColor }}">女</text>
+            </view>
+          </van-radio>
+          <van-radio name='2' checked-color="#0ABCA4" custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon" src="{{ gender === '2' ? activeIcon : normalIcon }}" />
+              <text class="radio-title" style="{{ gender === '2' ? activeColor : normalColor }}">不愿透露</text>
+            </view>
+          </van-radio>
+        </van-radio-group>
+      </view>
+
+      <view class="section" id="channel">
+        <text>4、您是通过什么渠道预定到的本酒店睡眠房?</text>
+
+
+        <van-radio-group value="{{ channel }}" bind:change="bindChannelChange">
+
+          <van-radio name='0' checked-color="#0ABCA4" custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon" src="{{ channel === '0' ? activeIcon : normalIcon }}" />
+              <text class="radio-title" style="{{ channel === '0' ? activeColor : normalColor }}">酒店散客</text>
+            </view>
+          </van-radio>
+          <van-radio name='1' checked-color="#0ABCA4" custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon" src="{{ channel === '1' ? activeIcon : normalIcon }}" />
+              <text class="radio-title" style="{{ channel === '1' ? activeColor : normalColor }}">朋友推荐</text>
+            </view>
+          </van-radio>
+          <van-radio name='2' checked-color="#0ABCA4" custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon" src="{{ channel === '2' ? activeIcon : normalIcon }}" />
+              <text class="radio-title"
+                style="{{ channel === '2' ? activeColor : normalColor }}">第三方平台(如携程、去哪儿网、飞猪、同程等)</text>
+            </view>
+          </van-radio>
+        </van-radio-group>
+        <input type="text" placeholder="请填写第三方平台" bindinput="bindThirdPlatformsInputInput" />
+      </view>
+      <view class='title_1'>二、用户体验</view>
+      <!-- 睡眠环境评价 -->
+      <view class="section" id="stayExper">
+        <text>5、睡眠房的入住体验怎么样?</text>
+
+        <van-radio-group value="{{ stayExper }}" bind:change="bindStayExperOptions">
+          <van-radio wx:for="{{stayExperOptions}}" wx:key="index" name="{{item.value}}" checked-color="#0ABCA4"
+            custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon" src="{{ stayExper === item.value ? activeIcon : normalIcon }}" />
+              <text class="radio-title"
+                style="{{ stayExper === item.value ? activeColor : normalColor }}">{{item.label}}</text>
+            </view>
+          </van-radio>
+        </van-radio-group>
+      </view>
+
+      <view class="section" id="satisfied">
+        <text>6、入住之后,您觉得哪些方面让您比较满意?(多选)</text>
+        <van-checkbox-group value="{{ satisfied }}" bind:change="bindSatisfied">
+          <van-checkbox wx:for="{{satisfiedOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
+            name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon"
+                src="{{ jstools.includes(satisfied,item.value) ? activeIcon : normalIcon }}" />
+              <text class="radio-title"
+                style="{{  jstools.includes(satisfied,item.value) ? activeColor : normalColor }}">{{item.label}}</text>
+            </view>
+          </van-checkbox>
+        </van-checkbox-group>
+
+      </view>
+
+      <view class="section" id="noSatisfied">
+        <text>7、让您对本次睡眠房入住体验不满意的原因是?</text>
+
+
+        <van-radio-group value="{{ noSatisfied }}" bind:change="bindNoSatisfiedChange">
+          <van-radio wx:for="{{noSatisfiedOptions}}" wx:key="index" name="{{item.value}}" checked-color="#0ABCA4"
+            custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon" src="{{ noSatisfied === item.value ? activeIcon : normalIcon }}" />
+              <text class="radio-title"
+                style="{{ noSatisfied === item.value ? activeColor : normalColor }}">{{item.label}}</text>
+            </view>
+          </van-radio>
+        </van-radio-group>
+
+        <input type="text" placeholder="请填写体验不满意的原因" bindinput="bindNoSatisfiedInput" />
+      </view>
+
+      <view class="section" id="improvementSleep">
+        <text>8、您通常采取什么措施来改善睡眠?(多选)</text>
+
+        <van-checkbox-group value="{{ improvementSleep }}" bind:change="bindImprovementSleep">
+          <van-checkbox wx:for="{{improvementSleepOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
+            name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon"
+                src="{{ jstools.includes(improvementSleep,item.value) ? activeIcon : normalIcon }}" />
+              <text class="radio-title"
+                style="{{  jstools.includes(improvementSleep,item.value) ? activeColor : normalColor }}">{{item.label}}</text>
+            </view>
+          </van-checkbox>
+        </van-checkbox-group>
+      </view>
+
+      <view class="section" id="wayImprovementSleep">
+        <text>9、您倾向于下面哪些方式来帮助改善睡眠?</text>
+
+
+        <van-checkbox-group value="{{ wayImprovementSleep }}" bind:change="bindWayImprovementSleep">
+          <van-checkbox wx:for="{{wayImprovementSleepOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
+            name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon"
+                src="{{ jstools.includes(wayImprovementSleep,item.value) ? activeIcon : normalIcon }}" />
+              <text class="radio-title"
+                style="{{  jstools.includes(wayImprovementSleep,item.value) ? activeColor : normalColor }}">{{item.label}}</text>
+            </view>
+          </van-checkbox>
+        </van-checkbox-group>
+        <input type="text" placeholder="请填写帮助改善睡眠方式" bindinput="bindWayImprovementSleepInput" />
+      </view>
+
+
+      <view class="section" id="getSleepHealth">
+        <text>10、您通常从哪里获取关于睡眠健康的信息?(多选)</text>
+        <van-checkbox-group value="{{ getSleepHealth }}" bind:change="bindGetSleepHealth">
+          <van-checkbox wx:for="{{getSleepHealthOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
+            name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon"
+                src="{{ jstools.includes(getSleepHealth,item.value) ? activeIcon : normalIcon }}" />
+              <text class="radio-title"
+                style="{{  jstools.includes(getSleepHealth,item.value) ? activeColor : normalColor }}">{{item.label}}</text>
+            </view>
+          </van-checkbox>
+        </van-checkbox-group>
+        <input type="text" placeholder="请填写从哪里获取关于睡眠健康的信息" bindinput="bindGetSleepHealthInput" />
+
+      </view>
+      <view class='title_1'>三、影响睡眠的因素</view>
+      <view class="section" id="influenceSleep">
+        <text>11、您认为以下哪些因素会影响您的睡眠?(多选)</text>
+
+
+        <van-checkbox-group value="{{ influenceSleep }}" bind:change="bindInfluenceSleep">
+          <van-checkbox wx:for="{{influenceSleepOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
+            name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon"
+                src="{{ jstools.includes(influenceSleep,item.value) ? activeIcon : normalIcon }}" />
+              <text class="radio-title"
+                style="{{  jstools.includes(influenceSleep,item.value) ? activeColor : normalColor }}">{{item.label}}</text>
+            </view>
+          </van-checkbox>
+        </van-checkbox-group>
+
+        <input type="text" placeholder="请填写影响您的睡眠因素" bindinput="bindInfluenceSleepInput" />
+      </view>
+
+      <view class="section" id="improvSleepMethods">
+        <text>12、您通常使用什么方法来改善睡眠质量?(多选)</text>
+        <van-checkbox-group value="{{ improvSleepMethods }}" bind:change="bindImprovSleepMethods">
+          <van-checkbox wx:for="{{improvSleepMethodsOptions}}" wx:key="index" shape="square" checked-color="#0ABCA4"
+            name="{{item.value}}" custom-class="custom-radio-class" use-icon-slot>
+            <view class="radio-view">
+              <image class="radio-icon" slot="icon"
+                src="{{ jstools.includes(improvSleepMethods,item.value) ? activeIcon : normalIcon }}" />
+              <text class="radio-title"
+                style="{{  jstools.includes(improvSleepMethods,item.value) ? activeColor : normalColor }}">{{item.label}}</text>
+            </view>
+          </van-checkbox>
+        </van-checkbox-group>
+
+        <input type="text" placeholder="请填写改善睡眠质量方法" bindinput="bindImprovSleepMethodsInput" />
+
+      </view>
+      <view class='title_1'>四、其他意见和建议</view>
+      <!-- 文本输入问题示例 -->
+      <view class="section" id="suggestion">
+        <text>13. 关于本次睡眠房的入住体验,您最希望哪些方面可以进行改善优化</text>
+        <textarea class="full-width-textarea" type="text" placeholder="请填写您的建议" bindinput="bindSuggestionInput" />
+      </view>
+
+      <!-- 提交按钮 -->
+      <text class="commit-btn" bindtap="submitSurvey">提交问卷</text>
+      <view style="height: 80rpx;"></view>
+      <!-- <view class="bottom-view">
+      <text style="font-weight:600">感谢您的参与和支持!</text>
+      <text
+        style="font-size: 28rpx;margin-top: 30rpx;color: #666666;">通过这份问卷,我们可以更好地了解受访者的睡眠状况及其影响因素,从而为他们提供更有效的改善建议。希望您能如实填写,以便我们为您提供更好的服务。</text>
+    </view> -->
+
+    </view>
+  </scroll-view>
 
 </view>

+ 4 - 2
subpages/sleepEvaluation/sleepEvaluation.wxss

@@ -3,8 +3,8 @@
 /* 通用样式 */
 .container {
   width: 100%;
+  display: block;
   background: #CCEDF5;
-  text-align: left;
 }
 
 .section {
@@ -18,6 +18,7 @@
 }
 
 .section-top {
+  margin: 0 auto;
   width: 672rpx;
   position: relative;
 }
@@ -191,7 +192,8 @@ input {
   line-height: 90rpx;
   border-radius: 45rpx;
   text-align: center;
-  width: calc(100% - 120rpx);
+  width: calc(100vw - 120rpx);
+  display: block;
   color: #FFFFFF;
   font-size: 32rpx;
   margin: 80rpx auto 80rpx auto;

+ 24 - 5
subpages/sleepQualityIndexAssessment/sleepQualityIndexAssessment.js

@@ -15,7 +15,8 @@ Page({
 		currentDateItem: null,
 		answerJson: [],
 		columns: [[], []],
-		BMI: null,
+		BMI: null, 
+		mInputId:"",
 		weight: 0,
 		height: 0,
 		promptTextMessageFlag: false,//结果弹窗
@@ -205,18 +206,33 @@ Page({
 		var finish = true;
 		var _this = this;
 		let oldJsonList = _this.data.qnaire;
-		oldJsonList.forEach(element => {
-			// value 是 radio + date
-			//questionValue 是最后一项 radio&input 的值
+		var mInputId = "";
+		for (let i = 0; i < oldJsonList.length; i++) {
+			const element = oldJsonList[i];
 			if (!element.value) {
 				finish = false;
 				console.log("未完成的:", element.num);
+				mInputId = "item" + element.num;
+				wx.showModal({
+					title: '无法提交',
+					content: '您还有部分题目未完成,请检查后重新提交',
+					showCancel: false,
+					confirmColor: '#0BC3AA',
+					confirmText: "好的",
+					success(res) {
+						_this.setData({
+							mInputId: mInputId
+						})
+					}
+				})
+				return;
 			} else {
 				// if (element.type == "radio&input" && !element.questionValue) {
 				// 	finish = false;
 				// }
 			}
-		});
+			
+		}
 		if (finish == false) {
 			wx.showModal({
 				title: '无法提交',
@@ -225,6 +241,9 @@ Page({
 				confirmColor: '#0BC3AA',
 				confirmText: "好的",
 				success(res) {
+					_this.setData({
+						mInputId: mInputId
+					})
 				}
 			})
 		} else {

+ 132 - 121
subpages/sleepQualityIndexAssessment/sleepQualityIndexAssessment.wxml

@@ -1,136 +1,147 @@
 <!--miniprogram/pages/testSAS/testSAS.wxml-->
-<view class='container'>
-	<image src="/subpages/images/test_banner.png" style="display: block;width: 100vw;" mode="widthFix"></image>
-	<text class="tips">本测评系统依据匹兹堡睡眠质量指数量表(PSQI)开发。PSQI由匹茨堡大学医学中心精神科睡眠和生物节律研究中心睡眠专家Buysse
-		Dj等人编制,专门用于评定被试者近一个月的主观睡眠质量。PSQI作为一种科学、系统的睡眠质量评估工具,为了解个体睡眠状况、诊断睡眠障碍以及制定相应的干预措施提供了重要的工具和平台。
-	</text>
-	<view class="item" wx:for="{{qnaire}}" wx:for-index="index" wx:for-item="item" wx:key="{{index}}">
-		<text class="item-problem">{{item.question}}</text>
-		<text wx:if="{{item.question_1 && item.type == 'radio'}}" class="item-problem-sub">{{item.question_1}}</text>
-		<view class="item-problem-input-view" wx:if="{{item.question_1 && item.type == 'radio&input'}}">
-			<text class="item-problem-input-title">{{item.question_1}}</text>
-			<view class="item-problem-input-line"></view>
-			<van-field class="item-problem-input" value="{{ item.questionValue }}" placeholder="" border="{{ false }}"
-				data-item="{{item}}" bind:change="onChangeInput" />
-		</view>
-		<view wx:if="{{item.question_1}}" class="item-border"></view>
-		<view class="date-show-view" wx:if="{{item.question_1 && item.type == 'date'}}" data-item="{{item}}"
-			bindtap="onOpenDateDialog">
-			<text class="show-date-title">{{item.question_1}}</text>
-			<text>{{item.value}}</text>
-			<van-icon name="arrow" color="#999999" />
-		</view>
 
-		<van-radio-group class="radio-list" value="{{ item.value }}"
-			wx:if="{{item.type == 'radio' || item.type == 'radio&input'}}" data-item="{{item}}"
-			bind:change="onChangeRadio">
-			<van-radio wx:for="{{item.options}}" wx:for-index="subIndex" wx:for-item="subItem" wx:key="{{subIndex}}"
-				use-icon-slot value="{{ subItem.key }}" name="{{ subItem.key }}">
-				<view class="radio-view">
-					<image class="radio-icon" slot="icon"
-						src="{{ item.value === subItem.key ? activeIcon : normalIcon }}" />
-					<text class="radio-title"
-						style="{{ item.value === subItem.key ? activeColor : normalColor }}">{{subItem.value}}</text>
+<view style="width: 100vw;height: 100vh; background: #ECFAF7;">
+	<scroll-view scroll-y="true" style="height: 100vh;background: #ECFAF7;" scroll-into-view="{{mInputId}}">
+		<view class='container'>
+			<image src="/subpages/images/test_banner.png" style="display: block;width: 100vw;" mode="widthFix"></image>
+			<view class="tips">
+				<text>本测评系统依据匹兹堡睡眠质量指数量表(PSQI)开发。PSQI由匹茨堡大学医学中心精神科睡眠和生物节律研究中心睡眠专家BuysseDj等人编制,专门用于评定被试者近一个月的主观睡眠质量。PSQI作为一种科学、系统的睡眠质量评估工具,为了解个体睡眠状况、诊断睡眠障碍以及制定相应的干预措施提供了重要的工具和平台。
+				</text>
+			</view>
+			<view class="item" wx:for="{{qnaire}}" wx:for-index="index" wx:for-item="item" wx:key="{{index}}"
+				id="item{{item.num}}">
+				<text class="item-problem">{{item.question}}</text>
+				<text wx:if="{{item.question_1 && item.type == 'radio'}}"
+					class="item-problem-sub">{{item.question_1}}</text>
+				<view class="item-problem-input-view" wx:if="{{item.question_1 && item.type == 'radio&input'}}">
+					<text class="item-problem-input-title">{{item.question_1}}</text>
+					<view class="item-problem-input-line"></view>
+					<van-field class="item-problem-input" value="{{ item.questionValue }}" placeholder=""
+						border="{{ false }}" data-item="{{item}}" bind:change="onChangeInput" />
 				</view>
-			</van-radio>
-		</van-radio-group>
-	</view>
-	<view class="bottom-view">
-		<view class="bottom-view-privacy">
-			<van-checkbox use-icon-slot value="{{ checkedPrivacy }}" bind:change="onChangePrivacy">
-				<view class="privacy-checkbox">
-					<image class="privacy-checkbox-icon" slot="icon"
-						src="{{ checkedPrivacy ? activeIcon : normalIcon }}" />
-					<text class="privacy-detail-btn">我已阅读并同意</text>
+				<view wx:if="{{item.question_1}}" class="item-border"></view>
+				<view class="date-show-view" wx:if="{{item.question_1 && item.type == 'date'}}" data-item="{{item}}"
+					bindtap="onOpenDateDialog">
+					<text class="show-date-title">{{item.question_1}}</text>
+					<text>{{item.value}}</text>
+					<van-icon name="arrow" color="#999999" />
 				</view>
-			</van-checkbox>
-			<text class="privacy-detail-btn_tk" bindtap="showPrivacyDetail">《舒眠调查问卷隐私条款》</text>
-		</view>
-		<text class="commit-btn" bindtap="formSubmit">提交</text>
-	</view>
-	<van-popup show="{{ privacyDetailShow }}" closeable close-on-click-overlay z-index="10086" overlay position="bottom"
-		bind:close="hidePrivacyPolicy" bind:click-overlay="hidePrivacyPolicy">
-		<scroll-view class="modal-content" scroll-y="true">
-			<!-- 这里是800字的内容,为了示例只显示部分内容 -->
-			<view><text style="font-size:50rpx;font-weight:700rpx;">微信小程序调查问卷隐私条款</text></view>
-			<view><text style="font-weight:400rpx;">一、前言</text></view>
-			<view><text
-					style="font-weight:400rpx;">我们非常重视用户的隐私和个人信息保护。为了保障用户在使用本微信小程序(以下简称“小程序”)进行调查问卷时的权益,我们制定了本隐私条款。本隐私条款详细说明了我们在收集、使用、存储和保护用户信息时的原则、范围、方式和目的。请用户在使用本小程序前,仔细阅读并理解本隐私条款。</text>
-			</view>
-			<view><text style="font-weight:400rpx;">二、信息收集</text></view>
-			<view><text
-					style="font-weight:400rpx;">在用户参与调查问卷时,我们可能会收集用户的一些基本信息,如姓名、联系方式、电子邮箱等。这些信息将仅用于统计分析、改进服务质量和联系用户。</text>
-			</view>
-			<view><text
-					style="font-weight:400rpx;">我们可能会收集用户在使用小程序过程中产生的日志信息,包括但不限于设备型号、操作系统版本、IP地址、访问时间等。这些信息将用于优化小程序的性能和功能。</text>
-			</view>
-			<view><text style="font-weight:400rpx;">三、信息使用</text></view>
-			<view><text style="font-weight:400rpx;">我们将按照本隐私条款的规定,合法、正当地使用用户信息,不会将其用于与调查问卷无关的目的。</text></view>
-			<view><text style="font-weight:400rpx;">我们可能会将用户信息用于以下用途:统计分析调查问卷结果,为改进服务质量和制定政策提供参考;</text></view>
-			<view><text style="font-weight:400rpx;">在用户同意的前提下,向用户推荐相关的服务或产品。</text></view>
-			<view><text style="font-weight:400rpx;">我们不会将用户信息泄露给任何第三方,除非得到用户的明确同意或法律法规另有规定。</text></view>
-			<view><text style="font-weight:400rpx;">四、信息安全</text></view>
-			<view><text style="font-weight:400rpx;">我们将采取合理的技术和管理措施,保障用户信息的安全,防止信息泄露、丢失、被篡改或非法获取。</text></view>
-			<view><text style="font-weight:400rpx;">我们将定期对用户信息进行备份,以防止数据丢失。</text></view>
-			<view><text style="font-weight:400rpx;">五、用户权利</text></view>
-			<view><text style="font-weight:400rpx;">用户有权了解我们收集、使用其信息的情况,并可以要求我们提供相关的解释和说明。</text></view>
-			<view><text style="font-weight:400rpx;">用户有权要求我们更正、删除其提供的不准确或不完整的个人信息。</text></view>
-			<view><text style="font-weight:400rpx;">用户有权拒绝我们收集、使用其个人信息,但可能会影响其使用小程序的部分功能。</text></view>
-			<view><text style="font-weight:400rpx;">六、隐私条款的修改</text></view>
-			<view><text
-					style="font-weight:400rpx;">我们可能会根据法律法规的变化、技术的进步或业务发展的需要,对本隐私条款进行修改。修改后的隐私条款将通过小程序内公告或其他适当的方式通知用户。请用户定期查看并了解最新的隐私条款内容。</text>
-			</view>
-			<view><text style="font-weight:400rpx;">七、联系方式</text></view>
-			<view><text style="font-weight:400rpx;">如果您对本隐私条款有任何疑问或建议,请通过以下方式与我们联系:[您的联系方式]。我们将尽快回复您并为您解答问题。</text>
+
+				<van-radio-group class="radio-list" value="{{ item.value }}"
+					wx:if="{{item.type == 'radio' || item.type == 'radio&input'}}" data-item="{{item}}"
+					bind:change="onChangeRadio">
+					<van-radio wx:for="{{item.options}}" wx:for-index="subIndex" wx:for-item="subItem"
+						wx:key="{{subIndex}}" use-icon-slot value="{{ subItem.key }}" name="{{ subItem.key }}">
+						<view class="radio-view">
+							<image class="radio-icon" slot="icon"
+								src="{{ item.value === subItem.key ? activeIcon : normalIcon }}" />
+							<text class="radio-title"
+								style="{{ item.value === subItem.key ? activeColor : normalColor }}">{{subItem.value}}</text>
+						</view>
+					</van-radio>
+				</van-radio-group>
 			</view>
-			<view><text style="font-weight:400rpx;">八、法律适用和争议解决</text></view>
-			<view><text
-					style="font-weight:400rpx;">本隐私条款的解释、适用和争议解决均适用中华人民共和国法律。如双方因本隐私条款产生争议,应首先通过友好协商解决;协商不成的,任何一方均有权向有管辖权的人民法院提起诉讼。</text>
+			<view class="bottom-view">
+				<view class="bottom-view-privacy">
+					<van-checkbox use-icon-slot value="{{ checkedPrivacy }}" bind:change="onChangePrivacy">
+						<view class="privacy-checkbox">
+							<image class="privacy-checkbox-icon" slot="icon"
+								src="{{ checkedPrivacy ? activeIcon : normalIcon }}" />
+							<text class="privacy-detail-btn">我已阅读并同意</text>
+						</view>
+					</van-checkbox>
+					<text class="privacy-detail-btn_tk" bindtap="showPrivacyDetail">《舒眠调查问卷隐私条款》</text>
+				</view>
+				<text class="commit-btn" bindtap="formSubmit">提交</text>
+				<view style="height: 80rpx;"></view>
 			</view>
-			<button class="close-modal-btn" bindtap="hideModal">关闭</button>
-		</scroll-view>
-	</van-popup>
-	<van-popup wx:if="{{currentDateItem}}" show="{{ showDateDialog }}" close-on-click-overlay z-index="10086" overlay
-		position="bottom" bind:close="onCloseDateDialog" custom-class="custom-date-class"
-		bind:click-overlay="onCloseDateDialog">
-		<van-datetime-picker type="time" formatter="{{ formatter }}" title="{{currentDateItem.question_1}}"
-			value="{{ currentDate }}" min-hour="0" max-hour="23" bind:confirm="onDateInput"
-			bind:cancel="onCloseDateDialog" toolbar-class="toolbar-class" />
-	</van-popup>
+			<van-popup show="{{ privacyDetailShow }}" closeable close-on-click-overlay z-index="10086" overlay
+				position="bottom" bind:close="hidePrivacyPolicy" bind:click-overlay="hidePrivacyPolicy">
+				<scroll-view class="modal-content" scroll-y="true">
+					<!-- 这里是800字的内容,为了示例只显示部分内容 -->
+					<view><text style="font-size:50rpx;font-weight:700rpx;">微信小程序调查问卷隐私条款</text></view>
+					<view><text style="font-weight:400rpx;">一、前言</text></view>
+					<view><text
+							style="font-weight:400rpx;">我们非常重视用户的隐私和个人信息保护。为了保障用户在使用本微信小程序(以下简称“小程序”)进行调查问卷时的权益,我们制定了本隐私条款。本隐私条款详细说明了我们在收集、使用、存储和保护用户信息时的原则、范围、方式和目的。请用户在使用本小程序前,仔细阅读并理解本隐私条款。</text>
+					</view>
+					<view><text style="font-weight:400rpx;">二、信息收集</text></view>
+					<view><text
+							style="font-weight:400rpx;">在用户参与调查问卷时,我们可能会收集用户的一些基本信息,如姓名、联系方式、电子邮箱等。这些信息将仅用于统计分析、改进服务质量和联系用户。</text>
+					</view>
+					<view><text
+							style="font-weight:400rpx;">我们可能会收集用户在使用小程序过程中产生的日志信息,包括但不限于设备型号、操作系统版本、IP地址、访问时间等。这些信息将用于优化小程序的性能和功能。</text>
+					</view>
+					<view><text style="font-weight:400rpx;">三、信息使用</text></view>
+					<view><text style="font-weight:400rpx;">我们将按照本隐私条款的规定,合法、正当地使用用户信息,不会将其用于与调查问卷无关的目的。</text></view>
+					<view><text style="font-weight:400rpx;">我们可能会将用户信息用于以下用途:统计分析调查问卷结果,为改进服务质量和制定政策提供参考;</text></view>
+					<view><text style="font-weight:400rpx;">在用户同意的前提下,向用户推荐相关的服务或产品。</text></view>
+					<view><text style="font-weight:400rpx;">我们不会将用户信息泄露给任何第三方,除非得到用户的明确同意或法律法规另有规定。</text></view>
+					<view><text style="font-weight:400rpx;">四、信息安全</text></view>
+					<view><text style="font-weight:400rpx;">我们将采取合理的技术和管理措施,保障用户信息的安全,防止信息泄露、丢失、被篡改或非法获取。</text></view>
+					<view><text style="font-weight:400rpx;">我们将定期对用户信息进行备份,以防止数据丢失。</text></view>
+					<view><text style="font-weight:400rpx;">五、用户权利</text></view>
+					<view><text style="font-weight:400rpx;">用户有权了解我们收集、使用其信息的情况,并可以要求我们提供相关的解释和说明。</text></view>
+					<view><text style="font-weight:400rpx;">用户有权要求我们更正、删除其提供的不准确或不完整的个人信息。</text></view>
+					<view><text style="font-weight:400rpx;">用户有权拒绝我们收集、使用其个人信息,但可能会影响其使用小程序的部分功能。</text></view>
+					<view><text style="font-weight:400rpx;">六、隐私条款的修改</text></view>
+					<view><text
+							style="font-weight:400rpx;">我们可能会根据法律法规的变化、技术的进步或业务发展的需要,对本隐私条款进行修改。修改后的隐私条款将通过小程序内公告或其他适当的方式通知用户。请用户定期查看并了解最新的隐私条款内容。</text>
+					</view>
+					<view><text style="font-weight:400rpx;">七、联系方式</text></view>
+					<view><text
+							style="font-weight:400rpx;">如果您对本隐私条款有任何疑问或建议,请通过以下方式与我们联系:[您的联系方式]。我们将尽快回复您并为您解答问题。</text>
+					</view>
+					<view><text style="font-weight:400rpx;">八、法律适用和争议解决</text></view>
+					<view><text
+							style="font-weight:400rpx;">本隐私条款的解释、适用和争议解决均适用中华人民共和国法律。如双方因本隐私条款产生争议,应首先通过友好协商解决;协商不成的,任何一方均有权向有管辖权的人民法院提起诉讼。</text>
+					</view>
+					<button class="close-modal-btn" bindtap="hideModal">关闭</button>
+				</scroll-view>
+			</van-popup>
+			<van-popup wx:if="{{currentDateItem}}" show="{{ showDateDialog }}" close-on-click-overlay z-index="10086"
+				overlay position="bottom" bind:close="onCloseDateDialog" custom-class="custom-date-class"
+				bind:click-overlay="onCloseDateDialog">
+				<van-datetime-picker type="time" formatter="{{ formatter }}" title="{{currentDateItem.question_1}}"
+					value="{{ currentDate }}" min-hour="0" max-hour="23" bind:confirm="onDateInput"
+					bind:cancel="onCloseDateDialog" toolbar-class="toolbar-class" />
+			</van-popup>
 
-	<van-popup show="{{ promptTextMessageFlag }}" close-on-click-overlay="{{false}}" z-index="10086" overlay
-		bind:close="onCloseResultsDialog" custom-style="background-color: transparent;">
-		<view class="resultsAreShown-view">
+			<van-popup show="{{ promptTextMessageFlag }}" close-on-click-overlay="{{false}}" z-index="10086" overlay
+				bind:close="onCloseResultsDialog" custom-style="background-color: transparent;">
+				<view class="resultsAreShown-view">
 
-			<view class="resultsAreShown-content">
-				<View class="resultsAreShown-content-top">
-					<image class="resultsAreShown-content-bg" src="/subpages/bg/ic_test_results_bg.png"></image>
-					<text class="resultsAreShown-content-title">睡眠情况统计</text>
-				</View>
-				<view class="resultsAreShown-content-h">
-					<text class="resultsAreShown-content-desc">睡眠得分:</text>
-					<text class="resultsAreShown-content-score">{{comScore}}</text>
-					<text class="resultsAreShown-content-units">分</text>
-				</view>
-				<text class="resultsAreShown-content-desc">睡眠质量:</text>
+					<view class="resultsAreShown-content">
+						<View class="resultsAreShown-content-top">
+							<image class="resultsAreShown-content-bg" src="/subpages/bg/ic_test_results_bg.png"></image>
+							<text class="resultsAreShown-content-title">睡眠情况统计</text>
+						</View>
+						<view class="resultsAreShown-content-h">
+							<text class="resultsAreShown-content-desc">睡眠得分:</text>
+							<text class="resultsAreShown-content-score">{{comScore}}</text>
+							<text class="resultsAreShown-content-units">分</text>
+						</view>
+						<text class="resultsAreShown-content-desc">睡眠质量:</text>
 
-				<view class="resultsAreShown-content-score-view">
-					<view wx:for="{{ratingResultsList}}" wx:for-item="item" wx:for-index="index" wx:key="{{index}}"
-						class="resultsAreShown-content-score-item">
-						<image class="resultsAreShown-content-score-icon" src="{{item.icon}}"
-							style="{{'opacity: '+(comScoreIndex == index ? '1' : '0')}}">
-						</image>
-						<view class="resultsAreShown-content-score-line" style="{{'background-color:'+item.color}}">
+						<view class="resultsAreShown-content-score-view">
+							<view wx:for="{{ratingResultsList}}" wx:for-item="item" wx:for-index="index"
+								wx:key="{{index}}" class="resultsAreShown-content-score-item">
+								<image class="resultsAreShown-content-score-icon" src="{{item.icon}}"
+									style="{{'opacity: '+(comScoreIndex == index ? '1' : '0')}}">
+								</image>
+								<view class="resultsAreShown-content-score-line"
+									style="{{'background-color:'+item.color}}">
+								</view>
+								<text
+									class=" {{comScoreIndex == index ? 'resultsAreShown-content-score-desc.active' : 'resultsAreShown-content-score-desc'}}">{{item.title}}</text>
+							</view>
 						</view>
-						<text
-							class=" {{comScoreIndex == index ? 'resultsAreShown-content-score-desc.active' : 'resultsAreShown-content-score-desc'}}">{{item.title}}</text>
+
 					</view>
-				</view>
 
-			</view>
+					<van-icon name="close" size="56rpx" color="#FFFFFF" bindtap="onCloseResultsDialog" />
+				</view>
 
-			<van-icon name="close" size="56rpx" color="#FFFFFF" bindtap="onCloseResultsDialog" />
+			</van-popup>
 		</view>
-
-	</van-popup>
+	</scroll-view>
 </view>

+ 6 - 1
subpages/sleepQualityIndexAssessment/sleepQualityIndexAssessment.wxss

@@ -3,7 +3,12 @@ page {
   display: flex;
   flex-direction: column;
   background: #ECFAF7;
-  padding-bottom: 120px;
+}
+
+.container {
+  width: 100%;
+  display: block;
+  background: #ECFAF7;
 }
 
 .item {