Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
Kindergarten
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
Kindergarten
Commits
3bc30253
Commit
3bc30253
authored
Mar 26, 2019
by
jie zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化iPhoneX的显示效果
parent
4d998d3c
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
41 additions
and
13 deletions
+41
-13
app.js
app.js
+14
-0
index.js
pages/add_record/index.js
+2
-2
index.wxml
pages/add_record/index.wxml
+4
-1
index.js
pages/home/parents/index.js
+2
-1
index.wxml
pages/home/parents/index.wxml
+6
-1
index.js
pages/home/sign/index.js
+3
-2
index.wxml
pages/home/sign/index.wxml
+2
-1
index.js
pages/home/teacher/index.js
+4
-3
index.wxml
pages/home/teacher/index.wxml
+2
-1
index.wxml
template/operate_btn/index.wxml
+2
-1
No files found.
app.js
View file @
3bc30253
...
...
@@ -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
pages/add_record/index.js
View file @
3bc30253
...
...
@@ -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
)
{
...
...
pages/add_record/index.wxml
View file @
3bc30253
...
...
@@ -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
pages/home/parents/index.js
View file @
3bc30253
...
...
@@ -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
)
{
...
...
pages/home/parents/index.wxml
View file @
3bc30253
...
...
@@ -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
pages/home/sign/index.js
View file @
3bc30253
...
...
@@ -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
=
[]
...
...
pages/home/sign/index.wxml
View file @
3bc30253
...
...
@@ -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
pages/home/teacher/index.js
View file @
3bc30253
...
...
@@ -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
)
...
...
pages/home/teacher/index.wxml
View file @
3bc30253
...
...
@@ -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
View file @
3bc30253
<!--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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment