Kaynağa Gözat

判断导航栏

yuanyiming 1 yıl önce
ebeveyn
işleme
d8dce2ea65
2 değiştirilmiş dosya ile 63 ekleme ve 30 silme
  1. 16 2
      src/views/eva/studentDetail.vue
  2. 47 28
      src/views/eva/studentEvaluate.vue

+ 16 - 2
src/views/eva/studentDetail.vue

@@ -1,8 +1,8 @@
 <template>
   <!-- 学生详情 -->
   <div class="studentDetail" ref="tabs">
-    <bar :tit="'学生记录'" :backPage="1"></bar>
-    <div style="height: 50px;"></div>
+    <bar :tit="'学生记录'" :backPage="1" v-if="!isBarShow"></bar>
+    <div style="height: 50px;" v-if="!isBarShow"></div>
     <!-- 顶部学生信息开始 -->
 
     <div class="top">
@@ -178,6 +178,8 @@ export default {
 
       // 切换学生list
       cutListShow: false,
+      // 是微信浏览器环境为1,不是微信浏览器环境为0
+      isBarShow: 0,
 
       // 这个是本学期总条数,单独写一个是因为他不因为观察记录的选择而改变
       conList: [],
@@ -560,11 +562,23 @@ export default {
     recordContinue(e) {
       // this.$router.push(`/studentEvaluate?shareShow=${1}&rid=${e}&cid=${this.$route.query.cid}`)
       this.$router.push(`/studentEvaluate?shareShow=${1}&rid=${e}`)
+    },
+    isWei() {
+      if (/(MicroMessenger)/i.test(navigator.userAgent)) {
+        this.isBarShow = 1
+        if (/(Android)/i.test(navigator.userAgent)) {
+          this.isBarShow = 0
+        }
+      } else {
+        this.isBarShow = 0
+      }
     }
   },
 
   mounted() {},
   created() {
+    this.isWei()
+
     this.stuId = localStorage.getItem('userId')
     this.classId = localStorage.getItem('classId')
     // console.log(this.classId)

+ 47 - 28
src/views/eva/studentEvaluate.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 学生评价 -->
   <div class="studentEvaluate">
-    <bar :tit="'学生评价'" :num="1">
+    <bar :tit="'学生评价'" :num="1" v-if="!isBarShow">
       <template v-slot:back>
         <van-icon @click="SaveBack" name="arrow-left" />
       </template>
@@ -11,7 +11,7 @@
       </template>
     </bar>
 
-    <div style="height: 50px;z-index: 30;display: block;"></div>
+    <div style="height: 50px;z-index: 30;display: block;" v-if="!isBarShow"></div>
 
     <!-- <div class="bigBlock"> -->
     <div class="bigBlock" style="">
@@ -162,7 +162,12 @@
         观察记录
       </div>
       <div class="EvaluateTxt">
-        <textarea name="" id="" style="width: 100%;height: 100%;border: none;" v-model="recordCon"></textarea>
+        <textarea
+          name=""
+          id=""
+          style="width: 100%;height: 100%;border: none;resize:none;"
+          v-model="recordCon"
+        ></textarea>
       </div>
 
       <!-- 上传图片开始 -->
@@ -287,6 +292,9 @@ export default {
       classEspNum: false,
       repShowMask: false,
       popCssNum: 0,
+
+      // 是微信浏览器环境为1,不是微信浏览器环境为0
+      isBarShow: 0,
       // 判断多选框展示(不关闭哪个)
       tyNum: 0,
       // // 重复添加弹出框判断
@@ -347,7 +355,31 @@ export default {
       term: false
     }
   },
-
+  watch: {
+    selectWData(val) {
+      // console.log('val', val)
+      if (val.length === 0) {
+        this.wei = true
+      } else {
+        this.wei = false
+      }
+    },
+    termData(val) {
+      if (val === '') {
+        this.term = true
+      } else {
+        this.term = false
+      }
+    }
+    // visitTime(val) {
+    //   // console.log('val', val)
+    //   if (val === '') {
+    //     this.tim = true
+    //   } else {
+    //     this.tim = false
+    //   }
+    // }
+  },
   methods: {
     selBtn(e, i) {
       this.tyNum = e
@@ -1000,35 +1032,20 @@ export default {
       this.minDate = new Date(2020, 0, 1)
       // 日期选择的最大日期
       this.maxDate = new Date(2099, 11, 1)
-    }
-  },
-  watch: {
-    selectWData(val) {
-      // console.log('val', val)
-      if (val.length === 0) {
-        this.wei = true
-      } else {
-        this.wei = false
-      }
     },
-    termData(val) {
-      if (val === '') {
-        this.term = true
+    isWei() {
+      if (/(MicroMessenger)/i.test(navigator.userAgent)) {
+        this.isBarShow = 1
+        if (/(Android)/i.test(navigator.userAgent)) {
+          this.isBarShow = 0
+        }
       } else {
-        this.term = false
+        this.isBarShow = 0
       }
     }
-    // visitTime(val) {
-    //   // console.log('val', val)
-    //   if (val === '') {
-    //     this.tim = true
-    //   } else {
-    //     this.tim = false
-    //   }
-    // }
   },
-
   created() {
+    this.isWei()
     this.getRecordPlace()
     this.getPresentDate()
     // 是否显示分享和继续记录按钮。添加按钮进来不显示
@@ -1053,6 +1070,8 @@ export default {
   // position: relative;
   padding-bottom: 80px;
   min-height: 120vh;
+  box-sizing: border-box;
+  padding-top: 10px;
   background-image: linear-gradient(to bottom, #005ccd 1%, #005ccd 12%, #f6f5f8 35%, #f6f5f8 100%);
   .popCSS {
     position: absolute;
@@ -1077,7 +1096,7 @@ export default {
     position: relative;
     width: 90%;
     margin: 0 auto;
-    margin-top: 10px;
+    // margin-top: 10px;
     // margin-bottom: 80px;
     background-color: #fff;
     border-radius: 15px;