Commit 3bc30253 authored by jie zhang's avatar jie zhang

优化iPhoneX的显示效果

parent 4d998d3c
...@@ -17,6 +17,7 @@ App({ ...@@ -17,6 +17,7 @@ App({
} }
}, },
globalData: { globalData: {
isIphoneX: false,
innerAudioContext: null, innerAudioContext: null,
isLogin: false, isLogin: false,
userInfo: null, userInfo: null,
...@@ -46,5 +47,18 @@ App({ ...@@ -46,5 +47,18 @@ App({
'nursery_afternoon': '下午托', '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
...@@ -58,7 +58,7 @@ Page({ ...@@ -58,7 +58,7 @@ Page({
//图片备注 //图片备注
picRemark: '', picRemark: '',
isHideBtn: false, isHideBtn: false,
isX: app.globalData.isIphoneX
}, },
...@@ -442,7 +442,7 @@ Page({ ...@@ -442,7 +442,7 @@ Page({
}, },
// 点击底部的保存按钮 // 点击底部的保存按钮
operateTap: function(event) { operateTap: function(event) {
console.log(event._relatedInfo.anchorTargetText)
var arrRecord = [] var arrRecord = []
let eatState = null let eatState = null
if (this.data.controlIndex == 0) { if (this.data.controlIndex == 0) {
......
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea> <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
</view> </view>
<view style='width:100vw;height:140rpx;'></view> <view style='width:100vw;height:140rpx;'></view>
<view wx:if="{{isX}}" style='height:70rpx;'></view>
</scroll-view> </scroll-view>
</view> </view>
...@@ -96,6 +97,7 @@ ...@@ -96,6 +97,7 @@
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea> <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
</view> </view>
<view style='width:100vw;height:140rpx;'></view> <view style='width:100vw;height:140rpx;'></view>
<view wx:if="{{isX}}" style='height:70rpx;'></view>
</scroll-view> </scroll-view>
</view> </view>
...@@ -156,8 +158,9 @@ ...@@ -156,8 +158,9 @@
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea> <textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
</view> </view>
<view style='width:100vw;height:140rpx;'></view> <view style='width:100vw;height:140rpx;'></view>
<view wx:if="{{isX}}" style='height:70rpx;'></view>
</scroll-view> </scroll-view>
</view> </view>
<template wx:if="{{isHideBtn == false}}" is="operate_btn" data="{{title:'保存'}}"></template> <template wx:if="{{isHideBtn == false}}" is="operate_btn" data="{{title:'保存', isX:isX}}"></template>
\ No newline at end of file \ No newline at end of file
...@@ -40,7 +40,8 @@ Page({ ...@@ -40,7 +40,8 @@ Page({
btnImage: '/src/img/play.png', btnImage: '/src/img/play.png',
isRecipeNull: false, isRecipeNull: false,
attachment: null, attachment: null,
musicUrl: null musicUrl: null,
isX: app.globalData.isIphoneX
}, },
scrollToUpper: function(e) { scrollToUpper: function(e) {
......
...@@ -79,11 +79,13 @@ ...@@ -79,11 +79,13 @@
<text class='kg-text-normal-gray'>{{wcItem.value ? wcItem.value : '0'}}次</text> <text class='kg-text-normal-gray'>{{wcItem.value ? wcItem.value : '0'}}次</text>
</view> </view>
</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> <text class='kg-text-light-gray' style='margin-left:60rpx;margin-right:35rpx;'>{{item.remark ? item.remark : ''}}</text>
</view> </view>
</view> </view>
</view> </view>
<image hidden="{{records.length != 0}}" src='/src/img/empty_data.png' class='empty-data'></image> <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> </scroll-view>
<!-- 食谱 --> <!-- 食谱 -->
...@@ -92,6 +94,7 @@ ...@@ -92,6 +94,7 @@
<image hidden="{{isRecipeNull != true}}" src='/src/img/empty_data.png' class='empty-data'></image> <image hidden="{{isRecipeNull != true}}" src='/src/img/empty_data.png' class='empty-data'></image>
<view style='height:100rpx;width:auto;'></view> <view style='height:100rpx;width:auto;'></view>
<view wx:if="{{isX}}" style='height:70rpx;'></view>
</view> </view>
...@@ -108,9 +111,10 @@ ...@@ -108,9 +111,10 @@
<image hidden="{{attachment != null && musicUrl != null}}" src='/src/img/empty_data.png' class='empty-data'></image> <image hidden="{{attachment != null && musicUrl != null}}" src='/src/img/empty_data.png' class='empty-data'></image>
<view style='height:100rpx;width:auto;'></view> <view style='height:100rpx;width:auto;'></view>
<view wx:if="{{isX}}" style='height:70rpx;'></view>
</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-separater' style='height:4rpx;'></view>
<view class='kg-flex-row tab-bg'> <view class='kg-flex-row tab-bg'>
<view class='kg-flex-column tab-item' bindtap='tapTabItem' data-index='0'> <view class='kg-flex-column tab-item' bindtap='tapTabItem' data-index='0'>
...@@ -126,4 +130,5 @@ ...@@ -126,4 +130,5 @@
<view style='text-align:center;font-size: 24rpx;'>课表</view> <view style='text-align:center;font-size: 24rpx;'>课表</view>
</view> </view>
</view> </view>
<view wx:if="{{isX}}" style='height:70rpx;'></view>
</view> </view>
\ No newline at end of file
...@@ -10,7 +10,8 @@ Page({ ...@@ -10,7 +10,8 @@ Page({
data: { data: {
selectTags: {}, selectTags: {},
classId: "", classId: "",
className: "" className: "",
isX: app.globalData.isIphoneX
}, },
/** /**
...@@ -57,7 +58,7 @@ Page({ ...@@ -57,7 +58,7 @@ Page({
}, },
operateTap: function(event) { operateTap: function(event) {
console.log(event._relatedInfo.anchorTargetText)
let records = this.data.records let records = this.data.records
let that = this let that = this
var studentIds = [] var studentIds = []
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
</view> </view>
</view> </view>
</view> </view>
<view wx:if="{{isX}}" style='height:70rpx;'></view>
</scroll-view> </scroll-view>
<template is="operate_btn" data="{{title:'确认'}}"></template> <template is="operate_btn" data="{{title:'确认', isX:isX}}"></template>
\ No newline at end of file \ No newline at end of file
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
const request = require('../../../api/teacher.js') const request = require('../../../api/teacher.js')
const utils = require('../../../utils/util.js') const utils = require('../../../utils/util.js')
const app = getApp() const app = getApp()
Page({ Page({
/** /**
...@@ -12,7 +13,8 @@ Page({ ...@@ -12,7 +13,8 @@ Page({
userIcon: "", userIcon: "",
records: [], records: [],
userName: '', userName: '',
subTitle: '共0人' subTitle: '共0人',
isX: app.globalData.isIphoneX
}, },
...@@ -26,7 +28,7 @@ Page({ ...@@ -26,7 +28,7 @@ Page({
}, },
tapCell: function(e) { tapCell: function(e) {
console.log(e)
let index = e.currentTarget.dataset.index let index = e.currentTarget.dataset.index
let student = this.data.records[index] let student = this.data.records[index]
wx.navigateTo({ wx.navigateTo({
...@@ -36,7 +38,6 @@ Page({ ...@@ -36,7 +38,6 @@ Page({
}, },
operateTap: function(event) { operateTap: function(event) {
console.log(event._relatedInfo.anchorTargetText)
var studentIds = [] var studentIds = []
for (var i = 0; i < this.data.records.length; i++) { for (var i = 0; i < this.data.records.length; i++) {
studentIds.push(this.data.records[i].id) studentIds.push(this.data.records[i].id)
......
...@@ -38,5 +38,6 @@ ...@@ -38,5 +38,6 @@
</view> </view>
</view> </view>
</view> </view>
<view wx:if="{{isX}}" style='height:70rpx;'></view>
</scroll-view> </scroll-view>
<template is="operate_btn" data="{{title:'记录一笔'}}"></template> <template is="operate_btn" data="{{title:'记录一笔', isX:isX}}"></template>
\ No newline at end of file \ No newline at end of file
<!--template/operate_btn/index.wxml--> <!--template/operate_btn/index.wxml-->
<!-- 通用的操作按钮 --> <!-- 通用的操作按钮 -->
<template name="operate_btn"> <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-separater' style='height:4rpx;'></cover-view>
<cover-view class='kg-operate-btn-bg'> <cover-view class='kg-operate-btn-bg'>
<button class='kg-operate-btn kg-btn-no-border' bindtap='operateTap'>{{title}}</button> <button class='kg-operate-btn kg-btn-no-border' bindtap='operateTap'>{{title}}</button>
</cover-view> </cover-view>
<cover-view wx:if="{{isX}}" style='height:70rpx;'></cover-view>
</cover-view> </cover-view>
</template> </template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment