yuliang 5 年之前
父节点
当前提交
e0704c28e8
共有 1 个文件被更改,包括 6 次插入5 次删除
  1. 6 5
      whepi-ui/templates/home/ribao.js

+ 6 - 5
whepi-ui/templates/home/ribao.js

@@ -387,19 +387,20 @@ function ribaoCommit() {
     alert("请填写年龄");
     return;
   }
-  if (age.length > 3) {
-    alert("请填写正确的年龄");
-    return;
-  }
   if (grender == 0) {
     alert("请填写性别");
     return;
   }
+  if (age > 150 || age < 0) {
+    alert("请填写正确的年龄");
+    return;
+  }
+
   if (temperature <= 0) {
     alert("请填写体温");
     return;
   }
-  if (temperature.length > 4) {
+  if (temperature > 50 || temperature < 30) {
     alert("请填写正确的体温");
     return;
   }