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
67139e99
Commit
67139e99
authored
Jan 17, 2019
by
张杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix
parent
50defc57
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
91 additions
and
33 deletions
+91
-33
app.wxss
app.wxss
+6
-0
index.wxss
pages/add_record/index.wxss
+4
-4
index.js
pages/home/parents/index.js
+58
-7
index.wxml
pages/home/parents/index.wxml
+16
-16
index.wxss
pages/home/parents/index.wxss
+2
-1
index.wxss
pages/home/teacher/index.wxss
+2
-2
index.wxml
template/operate_btn/index.wxml
+3
-3
No files found.
app.wxss
View file @
67139e99
...
...
@@ -20,6 +20,12 @@
color: rgb(78, 78, 78);
}
.kg-text-light-gray {
font-weight:bold;
font-size: 26rpx;
color: #8a8b8c
}
.kg-text-normal-dark {
font-size: 32rpx;
color: black;
...
...
pages/add_record/index.wxss
View file @
67139e99
...
...
@@ -64,8 +64,8 @@
.add_picture_view {
position: relative;
width: calc(100vw /
4
+ 20rpx);
height: calc(100vw /
4
+ 20rpx);
width: calc(100vw /
2.5
+ 20rpx);
height: calc(100vw /
2.5
+ 20rpx);
margin-right: 30rpx;
}
...
...
@@ -74,8 +74,8 @@
position: absolute;
left: 0rpx;
bottom: 0rpx;
width: calc(100vw /
4
);
height: calc(100vw /
4
);
width: calc(100vw /
2.5
);
height: calc(100vw /
2.5
);
}
.delete {
...
...
pages/home/parents/index.js
View file @
67139e99
...
...
@@ -17,19 +17,70 @@ Page({
records
:
[],
recordTypes
:
app
.
globalData
.
recordTypes
,
eatStates
:
app
.
globalData
.
eatStates
,
rightIcon
:
'/src/img/xiugaimima.png'
rightIcon
:
'/src/img/xiugaimima.png'
,
pictureId
:
""
,
userIcon
:
""
,
selectPic
:[]
},
tapUserInfoImg
:
function
(
e
)
{
var
that
=
this
;
// 选择图片
wx
.
chooseImage
({
count
:
1
,
sizeType
:
[
'original'
,
'compressed'
],
// 可以指定是原图还是压缩图,默认二者都有
sourceType
:
[
'album'
,
'camera'
],
// 可以指定来源是相册还是相机,默认二者都有
success
:
function
(
res
)
{
//选中的图片路径
let
temPath
=
res
.
tempFilePaths
[
0
]
that
.
data
.
selectPic
.
push
(
temPath
)
that
.
setData
({
selectPic
:
that
.
data
.
selectPic
});
wx
.
uploadFile
({
url
:
utils
.
uploadPath
(),
filePath
:
temPath
,
name
:
'file'
,
header
:
{
'access-token'
:
utils
.
getAccessToken
()
},
success
(
res
)
{
const
resData
=
JSON
.
parse
(
res
.
data
)
// 获取服务端图片id
that
.
data
.
pictureId
=
resData
.
obj
that
.
data
.
userIcon
=
utils
.
handleImgShow
(
resData
.
obj
)
if
(
resData
.
obj
)
{
that
.
setData
({
pictureId
:
that
.
data
.
pictureId
,
userIcon
:
that
.
data
.
userIcon
})
}
else
{
throw
new
Error
({
msg
:
'图片上传失败'
})
}
},
fail
(
err
)
{
wx
.
showToast
({
title
:
err
.
msg
,
icon
:
'none'
})
}
})
}
})
},
changePwdTap
:
function
(
e
)
{
wx
.
navigateTo
({
url
:
'/pages/reset_psw/index'
,
})
},
previewPic
:
function
(
e
)
{
var
current
=
this
.
data
.
records
[
e
.
target
.
dataset
.
index
].
arrPic
[
e
.
target
.
dataset
.
pic
I
ndex
]
previewPic
:
function
(
e
)
{
var
current
=
this
.
data
.
records
[
e
.
target
.
dataset
.
index
].
arrPic
[
e
.
target
.
dataset
.
pic
i
ndex
]
wx
.
previewImage
({
current
:
current
,
urls
:
this
.
data
.
records
[
e
.
target
.
dataset
.
index
].
arrPic
...
...
@@ -54,7 +105,7 @@ Page({
let
student
=
app
.
globalData
.
login
.
students
[
0
]
var
studentId
=
student
.
id
this
.
setData
({
student
:
student
,
student
:
student
,
userIcon
:
app
.
globalData
.
login
.
wxaUser
.
avatarUrl
,
sex
:
student
.
sex
})
...
...
pages/home/parents/index.wxml
View file @
67139e99
...
...
@@ -5,10 +5,10 @@
<view class='kg-home-header kg-flex-row'>
<template is='userInfo' data="{{userImg:userIcon,title:student.name,subTitle:student.className,sex:sex}}"></template>
<view class='kg-flex-column' style='align-items:flex-end;'>
<image class='top_logo' src='/src/img/parent_logo.png'></image
>
<!-- <image class='top_logo' src='/src/img/parent_logo.png'></image> --
>
<view class='home-header-roll-call' bindtap='changePwdTap'>
<image class='roll-call-image' src='{{rightIcon}}'></image>
<view class='roll-call-title'
style='margin-top:20rpx;'
>修改密码</view>
<view class='roll-call-title'
r
>修改密码</view>
</view>
</view>
...
...
@@ -16,53 +16,53 @@
<view class='kg-separater'></view>
<scroll-view style='height:calc(100vh - 200rpx)' scroll-y='true'>
<view wx:for="{{records}}">
<view wx:for="{{records}}"
wx:key="item"
>
<view class='timeline-cell'>
<view class='timeline-line-container'>
<view class='timeline-line'></view>
<image class='timeline-cycle' src='/src/img/timeline-cycle.jpeg'></image>
</view>
<view class='kg-quantity-cell timeline-content'>
<view class='kg-flex-row'
style='margin-bottom:20rpx;'
>
<view class='kg-flex-row'>
<text class='kg-text-title'>{{item.recordDate}}</text>
<text class='kg-text-
normal
-gray'>{{item.teacher ? item.teacher.name : ""}}记录</text>
<text class='kg-text-
light
-gray'>{{item.teacher ? item.teacher.name : ""}}记录</text>
</view>
<!-- 饮食 -->
<view wx:for="{{item.dietRecord}}" wx:for-item="dietItem" wx:for-index="dietIndex">
<view wx:for="{{item.dietRecord}}" wx:for-item="dietItem" wx:for-index="dietIndex"
wx:key="dietItem.id"
>
<view wx:if="{{dietIndex == 0}}">
<template is='imgTextView' data="{{img:'eat',text:'饮食'}}"> </template>
</view>
<view class='kg-flex-row timeline-content-detail'>
<text class='kg-text-normal-gray'>{{dietItem.z_recordType}}</text>
<text class='kg-text-normal-gray'>{{dietItem.z_eatState}}</text>
<text class='kg-text-normal-gray'
style='width:130rpx;'
>{{dietItem.z_recordType}}</text>
<text class='kg-text-normal-gray'
style='width:130rpx;'
>{{dietItem.z_eatState}}</text>
</view>
</view>
<!-- 睡觉 -->
<view wx:for="{{item.sleepRecord}}" wx:for-item="sleepItem" wx:for-index="sleepIndex">
<view wx:for="{{item.sleepRecord}}" wx:for-item="sleepItem" wx:for-index="sleepIndex"
wx:key="sleepItem.id"
>
<view wx:if="{{sleepIndex == 0}}">
<view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>
<template is='imgTextView' data="{{img:'sleep',text:'睡觉'}}"> </template>
</view>
<view class='kg-flex-row timeline-content-detail'>
<text class='kg-text-normal-gray'>午睡</text>
<text class='kg-text-normal-gray'>{{sleepItem.value}}分钟</text>
<text class='kg-text-normal-gray'
style='width:130rpx;'
>午睡</text>
<text class='kg-text-normal-gray'
style='width:130rpx;'
>{{sleepItem.value}}分钟</text>
</view>
</view>
<!-- wc -->
<view wx:for="{{item.wcRecord}}" wx:for-item="wcItem" wx:for-index="wcIndex">
<view wx:for="{{item.wcRecord}}" wx:for-item="wcItem" wx:for-index="wcIndex"
wx:key="wcItem.id"
>
<view wx:if="{{wcIndex == 0}}">
<view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>
<template is='imgTextView' data="{{img:'wc',text:'WC'}}"> </template>
</view>
<view class='kg-flex-row timeline-content-detail'>
<text class='kg-text-normal-gray'>{{wcItem.z_recordType}}</text>
<text class='kg-text-normal-gray'>{{wcItem.value}}次</text>
<text class='kg-text-normal-gray'
style='width:130rpx;'
>{{wcItem.z_recordType}}</text>
<text class='kg-text-normal-gray'
style='width:130rpx;'
>{{wcItem.value}}次</text>
</view>
</view>
<text class='kg-text-normal-gray' style='margin-left:60rpx;'>{{item.remark ? item.remark : ''}}</text>
...
...
@@ -71,11 +71,11 @@
<!-- 今日照片 -->
<template is='imgTextView' data="{{img:'today',text:'今日照片'}}"> </template>
<view class='home-student-picture-item' style='margin-left:40rpx;'>
<view wx:for="{{item.arrPic}}" wx:for-item="picItem" wx:for-index="picIndex">
<view wx:for="{{item.arrPic}}" wx:for-item="picItem" wx:for-index="picIndex"
wx:key="picItem"
>
<image src='{{picItem}}' class='home-student-picture' catchtap='previewPic' data-index='{{index}}' data-picIndex='{{picIndex}}' mode='aspectFill'></image>
</view>
</view>
<text class='kg-text-normal-gray' style='margin-left:60rpx;'>
{{item.pictureRemark ? item.pictureRemark : ''}}
</text>
<text class='kg-text-normal-gray' style='margin-left:60rpx;'>
【禾其狗狗喝水器挂式水壶猫咪自动饮水杯用品狗笼喂水器宠物饮水器】https://m.tb.cn/h.3HA5uKq?sm=8a2196 点击链接,再选择浏览器咑閞;或復·制这段描述¥502VbroYaCP¥后到👉淘♂寳♀👈
</text>
</view>
</view>
...
...
pages/home/parents/index.wxss
View file @
67139e99
...
...
@@ -47,11 +47,12 @@
}
.timeline-content {
flex-grow: 1;
/* flex-grow: 1; */
margin-top: 10px;
margin-left: 4px;
margin-bottom: 10px;
margin-right: 10px;
width: 660rpx;
/* background-color: red; */
}
...
...
pages/home/teacher/index.wxss
View file @
67139e99
...
...
@@ -50,7 +50,7 @@
}
.home-student-picture {
width:calc(100vw /
4.5
);
height:calc(100vw /
4.5
);
width:calc(100vw /
3
);
height:calc(100vw /
3
);
margin-left:20rpx;
}
\ No newline at end of file
template/operate_btn/index.wxml
View file @
67139e99
...
...
@@ -60,7 +60,7 @@ subTitle:副标题
-->
<template name='userInfo'>
<view class='kg-flex-row'>
<image class='kg-user-icon' src='{{userImg}}'></image>
<image class='kg-user-icon' src='{{userImg}}'
bindtap='tapUserInfoImg'
></image>
<view class='kg-flex-column' style='margin-left: 16rpx;height: 120rpx;'>
<view class='kg-flex-row' style='justify-content:flex-start;'>
<view class='kg-text-title'>{{title}}</view>
...
...
@@ -88,8 +88,8 @@ sex:性别 f/m (女性/男性)
<!-- 图片+文字 -->
<template name='imgTextView'>
<view class='kg-flex-row' style='justify-content: flex-start;height:
6
0rpx;'>
<view class='kg-flex-row' style='justify-content: flex-start;height:
8
0rpx;'>
<image src='/src/img/{{img}}.png' style='width: 50rpx;height: 40rpx;'></image>
<text class='kg-text-normal-dark' style='margin-left:10rpx'>{{text != null ? text : ""}}</text>
<text class='kg-text-normal-dark' style='margin-left:10rpx
;font-weight:bold;
'>{{text != null ? text : ""}}</text>
</view>
</template>
\ No newline at end of file
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