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

优化iPhoneX的显示效果

parent 4d998d3c
......@@ -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
......@@ -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) {
......
......@@ -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
......@@ -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) {
......
......@@ -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
......@@ -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 = []
......
......@@ -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
......@@ -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)
......
......@@ -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
<!--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>
......
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