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
826e817b
Commit
826e817b
authored
Dec 04, 2018
by
张杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
饮食分类部分页面
parent
aa2641a8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
912 additions
and
61 deletions
+912
-61
settings.json
.wing/settings.json
+3
-0
app.json
app.json
+1
-1
app.wxss
app.wxss
+11
-11
jsconfig.json
jsconfig.json
+7
-0
webApp.d.ts
libs/webApp.d.ts
+800
-0
index.js
pages/add_record/index.js
+9
-0
index.wxml
pages/add_record/index.wxml
+11
-8
index.wxss
pages/add_record/index.wxss
+29
-1
index.wxml
pages/home/teacher/index.wxml
+4
-7
index.wxss
pages/home/teacher/index.wxss
+31
-31
index.wxml
template/operate_btn/index.wxml
+6
-2
No files found.
.wing/settings.json
0 → 100644
View file @
826e817b
{
"editor.fontSize"
:
16
}
\ No newline at end of file
app.json
View file @
826e817b
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
"pages"
:[
"pages"
:[
"pages/add_record/index"
,
"pages/add_record/index"
,
"pages/home/teacher/index"
,
"pages/home/teacher/index"
,
"pages/home/reviewer/index"
,
"pages/home/reviewer/index"
,
"pages/home/parents/index"
"pages/home/parents/index"
],
],
"window"
:{
"window"
:{
"backgroundTextStyle"
:
"light"
,
"backgroundTextStyle"
:
"light"
,
...
...
app.wxss
View file @
826e817b
...
@@ -6,47 +6,47 @@
...
@@ -6,47 +6,47 @@
flex-direction: column;
flex-direction: column;
align-items: center;
align-items: center;
justify-content: space-between;
justify-content: space-between;
padding: 200rpx 0;
padding: 200r
r
px 0;
box-sizing: border-box;
box-sizing: border-box;
}
}
.kg-text-title {
.kg-text-title {
font-size:
17
px;
font-size:
32r
px;
font-weight: bold;
font-weight: bold;
}
}
.kg-text-normal-gray {
.kg-text-normal-gray {
font-size:
15
px;
font-size:
30r
px;
color: rgb(78, 78, 78);
color: rgb(78, 78, 78);
}
}
.kg-text-normal-dark {
.kg-text-normal-dark {
font-size:
16
px;
font-size:
32r
px;
color: black;
color: black;
}
}
.kg-separater {
.kg-separater {
background-color: #f2f6f9;
background-color: #f2f6f9;
height:
10
px;
height:
20r
px;
width: 100vw;
width: 100vw;
}
}
.kg-operate-btn-bg {
.kg-operate-btn-bg {
position: fixed;
position: fixed;
bottom: 0px;
bottom: 0
r
px;
/* background-color: red; */
/* background-color: red; */
height:
80
px;
height:
140r
px;
width: 100vh;
width: 100vh;
display: flex;
display: flex;
align-items: center;
align-items: center;
}
}
.kg-operate-btn {
.kg-operate-btn {
width: calc(100vw -
80
px);
width: calc(100vw -
160r
px);
margin-left:
40
px;
margin-left:
80r
px;
background-color: #f9aa76;
background-color: #f9aa76;
color: white;
color: white;
font-size:
18
px;
font-size:
36r
px;
}
}
.kg-btn-no-border::after {
.kg-btn-no-border::after {
...
@@ -56,6 +56,6 @@
...
@@ -56,6 +56,6 @@
.kg-section-header {
.kg-section-header {
display: flex;
display: flex;
flex-direction: row;
flex-direction: row;
height:
30
px;
height:
60r
px;
align-items: center;
align-items: center;
}
}
jsconfig.json
0 → 100644
View file @
826e817b
{
"compilerOptions"
:
{
},
"exclude"
:
[
]
}
\ No newline at end of file
libs/webApp.d.ts
0 → 100644
View file @
826e817b
This diff is collapsed.
Click to expand it.
pages/add_record/index.js
View file @
826e817b
...
@@ -13,9 +13,18 @@ Page({
...
@@ -13,9 +13,18 @@ Page({
],
],
clazz
:
[],
clazz
:
[],
controlIndex
:
0
,
controlIndex
:
0
,
categorys
:
[
'早餐'
,
'午餐'
,
'晚餐'
,
'上午加餐'
,
'下午加餐'
,
'喝水'
,
'牛奶'
],
selectIndex
:
0
,
},
},
tapCategory
:
function
(
e
)
{
this
.
setData
({
selectIndex
:
e
.
target
.
dataset
.
index
,
})
},
indexChanged
:
function
(
e
){
indexChanged
:
function
(
e
){
// 点中的是组中第个元素
// 点中的是组中第个元素
var
index
=
e
.
target
.
dataset
.
index
;
var
index
=
e
.
target
.
dataset
.
index
;
...
...
pages/add_record/index.wxml
View file @
826e817b
<!--pages/add_record/index.wxml-->
<!-- pages/add_record/index.wxml -->
<view class='kg-separater ' style='height:1px;'></view>
<import src='/template/operate_btn/index.wxml'></import>
<view class='kg-separater ' style='height:1rpx;'></view>
<view class="segmentedControl">
<view class="segmentedControl">
<!-- 循环遍历 -->
<!-- 循环遍历 -->
<block wx:for="{{radioValues}}">
<block wx:for="{{radioValues}}">
<text data-index="{{index}}" bindtap="indexChanged" class="{{clazz[index]}}">{{item.value}}</text>
<text data-index="{{index}}" bindtap="indexChanged" class="{{clazz[index]}}">{{item.value}}</text>
</block>
</block>
</view>
</view>
<view class='kg-separater
'></view>
<view class='kg-separater'></view>
<view hidden='{{controlIndex != 0}}'>
<view hidden='{{controlIndex != 0}}'>
<!-- 滑动区域 -->
<!-- 滑动区域 -->
<scroll-view style='height:calc(100vh - 100px - 80px)' scroll-y='true'>
<scroll-view style='height:calc(100vh - 100rpx - 80rpx)' scroll-y='true'>
<view class='kg-section-header'>
<template is="section_header" data="{{title:'分类'}}"></template>
<view style='width:4px; height:15px;background-color:#f9aa76; margin-left:10px'></view>
<view class="category">
<view class='kg-text-normal-gray' style='margin-left:8px'>分类</view>
<view wx:for="{{categorys}}">
<view class="eat_category_btn {{selectIndex == index ? 'selected' : ''}}" bindtap='tapCategory' data-index='{{index}}'>{{item}}</view>
</view>
</view>
</view>
<template is="section_header" data="{{title:'今日拍照'}}"></template>
</scroll-view>
</scroll-view>
</view>
</view>
<view hidden='{{controlIndex != 1}}'>睡觉</view>
<view hidden='{{controlIndex != 1}}'>睡觉</view>
<view hidden='{{controlIndex != 2}}'>WC</view>
<view hidden='{{controlIndex != 2}}'>WC</view>
\ No newline at end of file
pages/add_record/index.wxss
View file @
826e817b
...
@@ -47,3 +47,31 @@
...
@@ -47,3 +47,31 @@
/*高度也不必减少2px,就是控件高度的1/3*/
/*高度也不必减少2px,就是控件高度的1/3*/
width: calc((100vw - 20px) / 3);
width: calc((100vw - 20px) / 3);
}
}
.category {
display: flex;
flex-direction: row;
flex-wrap: wrap;
padding: 20rpx 20rpx 0rpx;
margin-right: -40rpx;
justify-content: flex-start;
}
.eat_category_btn {
display: flex;
align-items: center;
justify-content: center;
border: 2rpx solid rgb(190, 190, 190);
border-radius: 6rpx;
width: calc((100vw - 40rpx - 92rpx) / 3);
margin-right: 40rpx;
margin-bottom: 20rpx;
height: 70rpx;
line-height: 70rpx;
color: rgb(190, 190, 190);
}
.eat_category_btn.selected {
border-color: #f9aa76;
color: #f9aa76;
}
pages/home/teacher/index.wxml
View file @
826e817b
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<image class='home-header-user-icon' src='{{userIcon}}'></image>
<image class='home-header-user-icon' src='{{userIcon}}'></image>
<view class='home-header-user-info'>
<view class='home-header-user-info'>
<view class='kg-text-title'>向日葵小班-张老师</view>
<view class='kg-text-title'>向日葵小班-张老师</view>
<view class='kg-text-normal-gray
l
'>共19人</view>
<view class='kg-text-normal-gray'>共19人</view>
</view>
</view>
<view class='home-header-roll-call'>
<view class='home-header-roll-call'>
<image class='roll-call-image' src='{{signIcon}}'></image>
<image class='roll-call-image' src='{{signIcon}}'></image>
...
@@ -13,11 +13,8 @@
...
@@ -13,11 +13,8 @@
</view>
</view>
<view class='kg-separater'></view>
<view class='kg-separater'></view>
<!-- 滑动区域 -->
<!-- 滑动区域 -->
<scroll-view style='height:calc(100vh - 100px - 80px)' scroll-y='true'>
<scroll-view style='height:calc(100vh - 190rpx - 140rpx)' scroll-y='true'>
<view class='kg-section-header'>
<template is="section_header" data="{{title:'2018-09-12'}}"></template>
<view style='width:4px; height:15px;background-color:#f9aa76; margin-left:10px'></view>
<view class='kg-text-normal-gray' style='margin-left:8px'>2018-09-12</view>
</view>
<view wx:for="{{[1,2,3,4,5,6]}}">
<view wx:for="{{[1,2,3,4,5,6]}}">
<view class='home-student-info'>
<view class='home-student-info'>
<!-- 名字 -->
<!-- 名字 -->
...
@@ -32,7 +29,7 @@
...
@@ -32,7 +29,7 @@
<image src='/src/img/student_picture.png' class='home-student-picture' mode='aspectFill'></image>
<image src='/src/img/student_picture.png' class='home-student-picture' mode='aspectFill'></image>
</view>
</view>
<!-- 行为 -->
<!-- 行为 -->
<view class='home-student-name' style='justify-content: space-between;margin:0
px 10
px;'>
<view class='home-student-name' style='justify-content: space-between;margin:0
rpx 10r
px;'>
<view wx:for="{{[1,2,3]}}">
<view wx:for="{{[1,2,3]}}">
<view class='home-student-name'>
<view class='home-student-name'>
<image src='/src/img/eat.png' class='home-student-behavior' mode='aspectFit'></image>
<image src='/src/img/eat.png' class='home-student-behavior' mode='aspectFit'></image>
...
...
pages/home/teacher/index.wxss
View file @
826e817b
/* pages/home/teacher/index.wxss */
/* pages/home/teacher/index.wxss */
.home-header {
.home-header {
height:
90
px;
height:
180r
px;
/* background-color: rgb(182, 179, 179); */
/* background-color: rgb(182, 179, 179); */
display: flex;
display: flex;
flex-direction: row;
flex-direction: row;
align-items: center;
align-items: center;
margin-left:
16
px;
margin-left:
32r
px;
margin-right:
16
px;
margin-right:
32r
px;
justify-content: space-between;
justify-content: space-between;
}
}
.home-header-user-icon {
.home-header-user-icon {
height:
60
px;
height:
120r
px;
width:
60
px;
width:
120r
px;
border-radius:
30
px;
border-radius:
60r
px;
background-color: blueviolet;
background-color: blueviolet;
}
}
.home-header-user-info {
.home-header-user-info {
height:
60
px;
height:
120r
px;
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
justify-content: space-between;
justify-content: space-between;
/* background-color: burlywood; */
/* background-color: burlywood; */
flex-grow: 1;
flex-grow: 1;
margin-left:
8
px;
margin-left:
16r
px;
}
}
.home-header-roll-call {
.home-header-roll-call {
width:
60
px;
width:
120r
px;
height:
40
px;
height:
80r
px;
display: flex;
display: flex;
flex-direction: row;
flex-direction: row;
align-items: center;
align-items: center;
margin-left:
8
px;
margin-left:
16r
px;
}
}
.roll-call-image {
.roll-call-image {
height:
20
px;
height:
40r
px;
width:
20
px;
width:
40r
px;
}
}
.roll-call-title {
.roll-call-title {
font-size:
16
px;
font-size:
32r
px;
color: #f9aa76;
color: #f9aa76;
margin-left:
4
px;
margin-left:
8r
px;
}
}
.home-student-info {
.home-student-info {
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
margin-left:
10
px;
margin-left:
20r
px;
margin-right:
10
px;
margin-right:
20r
px;
margin-top:
10
px;
margin-top:
20r
px;
margin-bottom:
8
px;
margin-bottom:
16r
px;
border-radius:
3
px;
border-radius:
6r
px;
box-shadow: 0
px 0px 4px 4
px #f2f6f9;
box-shadow: 0
rpx 0rpx 8rpx 8r
px #f2f6f9;
padding:
6px 14
px;
padding:
12rpx 28r
px;
}
}
.home-student-name {
.home-student-name {
display: flex;
display: flex;
flex-direction: row;
flex-direction: row;
height:
40
px;
height:
80r
px;
align-items: center;
align-items: center;
}
}
.home-student-sex {
.home-student-sex {
height:
20
px;
height:
40r
px;
width:
15
px;
width:
30r
px;
margin-left:
4
px;
margin-left:
8r
px;
}
}
.home-student-behavior {
.home-student-behavior {
width:
30
px;
width:
60r
px;
height:
24
px;
height:
48r
px;
}
}
.home-student-picture-item {
.home-student-picture-item {
...
@@ -86,8 +86,8 @@
...
@@ -86,8 +86,8 @@
}
}
.home-student-picture {
.home-student-picture {
width:calc(100vw
/
4.5);
width:calc(100vw
/
4.5);
height:calc(100vw
/
4.5);
height:calc(100vw
/
4.5);
margin-left:
10
px
margin-left:
20r
px
}
}
\ No newline at end of file
template/operate_btn/index.wxml
View file @
826e817b
<!--template/operate_btn/index.wxml-->
<!--template/operate_btn/index.wxml-->
<template name="operate_btn">
<template name="operate_btn">
<view class='kg-separater ' style='height:
1
px;'></view>
<view class='kg-separater ' style='height:
4r
px;'></view>
<view class='kg-operate-btn-bg'>
<view class='kg-operate-btn-bg'>
<button class='kg-operate-btn kg-btn-no-border' bindtap='operateTap'>记录一笔</button>
<button class='kg-operate-btn kg-btn-no-border' bindtap='operateTap'>记录一笔</button>
</view>
</view>
</template>
</template>
<!--通用的分区标题-->
<template name='section_header'>
<template name='section_header'>
<view class='kg-section-header'>
<view style='width:10rpx; height:30rpx;background-color:#f9aa76; margin-left:20rpx'></view>
<view class='kg-text-normal-gray' style='margin-left:16rpx'>{{title}}</view>
</view>
</template>
</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