From 3bc302535d4401cbc9d592a9b5aaed0937e2083f Mon Sep 17 00:00:00 2001
From: jie zhang <1074472615@qq.com>
Date: Tue, 26 Mar 2019 09:23:00 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96iPhoneX=E7=9A=84=E6=98=BE?=
 =?UTF-8?q?=E7=A4=BA=E6=95=88=E6=9E=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 app.js                          | 14 ++++++++++++++
 pages/add_record/index.js       |  4 ++--
 pages/add_record/index.wxml     |  5 ++++-
 pages/home/parents/index.js     |  3 ++-
 pages/home/parents/index.wxml   |  7 ++++++-
 pages/home/sign/index.js        |  5 +++--
 pages/home/sign/index.wxml      |  3 ++-
 pages/home/teacher/index.js     |  7 ++++---
 pages/home/teacher/index.wxml   |  3 ++-
 template/operate_btn/index.wxml |  3 ++-
 10 files changed, 41 insertions(+), 13 deletions(-)

diff --git a/app.js b/app.js
index 6a080e0..779a420 100644
--- a/app.js
+++ b/app.js
@@ -17,6 +17,7 @@ App({
     }
   },
   globalData: {
+    isIphoneX: false,
     innerAudioContext: null,
     isLogin: false,
     userInfo: null,
@@ -46,5 +47,18 @@ App({
       'nursery_afternoon': '下午托',
     }
 
+  },
+  onShow: function () {
+    let that = this;
+    wx.getSystemInfo({
+      success: res => {
+        console.log('手机信息res'+res.model)
+        let modelmes = res.model;
+        if (modelmes.search('iPhone X') != -1) {
+          that.globalData.isIphoneX = true
+        }
+      }
+    })
+
   }
 })
\ No newline at end of file
diff --git a/pages/add_record/index.js b/pages/add_record/index.js
index d2a2c12..fd8ab8f 100644
--- a/pages/add_record/index.js
+++ b/pages/add_record/index.js
@@ -58,7 +58,7 @@ Page({
     //图片备注
     picRemark: '',
     isHideBtn: false,
-
+    isX: app.globalData.isIphoneX
 
   },
 
@@ -442,7 +442,7 @@ Page({
   },
   // 点击底部的保存按钮
   operateTap: function(event) {
-    console.log(event._relatedInfo.anchorTargetText)
+
     var arrRecord = []
     let eatState = null
     if (this.data.controlIndex == 0) {
diff --git a/pages/add_record/index.wxml b/pages/add_record/index.wxml
index b57e802..1acd6ca 100644
--- a/pages/add_record/index.wxml
+++ b/pages/add_record/index.wxml
@@ -57,6 +57,7 @@
       <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
     </view>
     <view style='width:100vw;height:140rpx;'></view>
+    <view wx:if="{{isX}}" style='height:70rpx;'></view>
   </scroll-view>
 </view>
 
@@ -96,6 +97,7 @@
       <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
     </view>
     <view style='width:100vw;height:140rpx;'></view>
+    <view wx:if="{{isX}}" style='height:70rpx;'></view>
   </scroll-view>
 </view>
 
@@ -156,8 +158,9 @@
       <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
     </view>
     <view style='width:100vw;height:140rpx;'></view>
+    <view wx:if="{{isX}}" style='height:70rpx;'></view>
   </scroll-view>
 </view>
 
 
-<template wx:if="{{isHideBtn == false}}" is="operate_btn" data="{{title:'保存'}}"></template>
\ No newline at end of file
+<template wx:if="{{isHideBtn == false}}" is="operate_btn" data="{{title:'保存', isX:isX}}"></template>
\ No newline at end of file
diff --git a/pages/home/parents/index.js b/pages/home/parents/index.js
index 645b5d7..a03c9d4 100644
--- a/pages/home/parents/index.js
+++ b/pages/home/parents/index.js
@@ -40,7 +40,8 @@ Page({
     btnImage: '/src/img/play.png',
     isRecipeNull: false,
     attachment: null,
-    musicUrl: null
+    musicUrl: null,
+    isX: app.globalData.isIphoneX
   },
 
   scrollToUpper: function(e) {
diff --git a/pages/home/parents/index.wxml b/pages/home/parents/index.wxml
index 680c3c2..b404662 100644
--- a/pages/home/parents/index.wxml
+++ b/pages/home/parents/index.wxml
@@ -79,11 +79,13 @@
             <text class='kg-text-normal-gray'>{{wcItem.value ? wcItem.value : '0'}}次</text>
           </view>
         </view>
+        <view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>
         <text class='kg-text-light-gray' style='margin-left:60rpx;margin-right:35rpx;'>{{item.remark ? item.remark : ''}}</text>
       </view>
     </view>
   </view>
   <image hidden="{{records.length != 0}}" src='/src/img/empty_data.png' class='empty-data'></image>
+  <view wx:if="{{isX}}" style='height:70rpx;'></view>
 </scroll-view>
 
 <!-- 食谱 -->
@@ -92,6 +94,7 @@
 
   <image hidden="{{isRecipeNull != true}}" src='/src/img/empty_data.png' class='empty-data'></image>
   <view style='height:100rpx;width:auto;'></view>
+  <view wx:if="{{isX}}" style='height:70rpx;'></view>
 </view>
 
 
@@ -108,9 +111,10 @@
 
   <image hidden="{{attachment != null && musicUrl != null}}" src='/src/img/empty_data.png' class='empty-data'></image>
   <view style='height:100rpx;width:auto;'></view>
+  <view wx:if="{{isX}}" style='height:70rpx;'></view>
 </view>
 
-<view style='position:fixed;bottom: 0rpx;height:100rpx;background-color:white;width:100vw;'>
+<view style='position:fixed;bottom: 0rpx;background-color:white;width:100vw;'>
   <view class='kg-separater' style='height:4rpx;'></view>
   <view class='kg-flex-row tab-bg'>
     <view class='kg-flex-column tab-item' bindtap='tapTabItem' data-index='0'>
@@ -126,4 +130,5 @@
       <view style='text-align:center;font-size: 24rpx;'>课表</view>
     </view>
   </view>
+  <view wx:if="{{isX}}" style='height:70rpx;'></view>
 </view>
\ No newline at end of file
diff --git a/pages/home/sign/index.js b/pages/home/sign/index.js
index 8052a71..401d3c0 100644
--- a/pages/home/sign/index.js
+++ b/pages/home/sign/index.js
@@ -10,7 +10,8 @@ Page({
   data: {
     selectTags: {},
     classId: "",
-    className: ""
+    className: "",
+    isX: app.globalData.isIphoneX
   },
 
   /**
@@ -57,7 +58,7 @@ Page({
 
   },
   operateTap: function(event) {
-    console.log(event._relatedInfo.anchorTargetText)
+
     let records = this.data.records
     let that = this
     var studentIds = []
diff --git a/pages/home/sign/index.wxml b/pages/home/sign/index.wxml
index 35b050b..7d66c20 100644
--- a/pages/home/sign/index.wxml
+++ b/pages/home/sign/index.wxml
@@ -12,6 +12,7 @@
       </view>
     </view>
   </view>
+  <view wx:if="{{isX}}" style='height:70rpx;'></view>
 </scroll-view>
 
-<template is="operate_btn" data="{{title:'确认'}}"></template>
\ No newline at end of file
+<template is="operate_btn" data="{{title:'确认', isX:isX}}"></template>
\ No newline at end of file
diff --git a/pages/home/teacher/index.js b/pages/home/teacher/index.js
index 43a7f57..8f0eeac 100644
--- a/pages/home/teacher/index.js
+++ b/pages/home/teacher/index.js
@@ -2,6 +2,7 @@
 const request = require('../../../api/teacher.js')
 const utils = require('../../../utils/util.js')
 const app = getApp()
+
 Page({
 
   /**
@@ -12,7 +13,8 @@ Page({
     userIcon: "",
     records: [],
     userName: '',
-    subTitle: '共0人'
+    subTitle: '共0人',
+    isX: app.globalData.isIphoneX
 
   },
 
@@ -26,7 +28,7 @@ Page({
   },
 
   tapCell: function(e) {
-    console.log(e)
+    
     let index = e.currentTarget.dataset.index
     let student = this.data.records[index]
     wx.navigateTo({
@@ -36,7 +38,6 @@ Page({
   },
 
   operateTap: function(event) {
-    console.log(event._relatedInfo.anchorTargetText)
     var studentIds = []
     for (var i = 0; i < this.data.records.length; i++) {
       studentIds.push(this.data.records[i].id)
diff --git a/pages/home/teacher/index.wxml b/pages/home/teacher/index.wxml
index 091dce0..41669db 100644
--- a/pages/home/teacher/index.wxml
+++ b/pages/home/teacher/index.wxml
@@ -38,5 +38,6 @@
       </view>
     </view>
   </view>
+  <view wx:if="{{isX}}" style='height:70rpx;'></view>
 </scroll-view>
-<template is="operate_btn" data="{{title:'记录一笔'}}"></template>
\ No newline at end of file
+<template is="operate_btn" data="{{title:'记录一笔', isX:isX}}"></template>
\ No newline at end of file
diff --git a/template/operate_btn/index.wxml b/template/operate_btn/index.wxml
index 3377d69..7d6e12a 100644
--- a/template/operate_btn/index.wxml
+++ b/template/operate_btn/index.wxml
@@ -1,11 +1,12 @@
 <!--template/operate_btn/index.wxml-->
 <!-- 通用的操作按钮 -->
 <template name="operate_btn">
-  <cover-view style='position:fixed;bottom: 0rpx;height:140rpx;background-color:white;z-index: 100;'>
+  <cover-view style='position:fixed;bottom: 0rpx;background-color:white;z-index: 100;'>
     <cover-view class='kg-separater' style='height:4rpx;'></cover-view>
     <cover-view class='kg-operate-btn-bg'>
       <button class='kg-operate-btn kg-btn-no-border' bindtap='operateTap'>{{title}}</button>
     </cover-view>
+    <cover-view wx:if="{{isX}}" style='height:70rpx;'></cover-view>
   </cover-view>
 </template>
 
-- 
2.18.1