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
70bc625d
Commit
70bc625d
authored
Dec 04, 2018
by
张杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
826e817b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
85 additions
and
31 deletions
+85
-31
app.json
app.json
+2
-2
app.wxss
app.wxss
+42
-2
index.js
pages/add_record/index.js
+3
-0
index.wxml
pages/add_record/index.wxml
+15
-3
index.wxss
pages/add_record/index.wxss
+0
-17
index.wxml
pages/home/teacher/index.wxml
+2
-4
index.wxml
template/operate_btn/index.wxml
+21
-3
No files found.
app.json
View file @
70bc625d
{
"pages"
:[
"pages/add_record/index"
,
"pages/home/teacher/index"
,
"pages/home/teacher/index"
,
"pages/add_record/index"
,
"pages/home/reviewer/index"
,
"pages/home/parents/index"
...
...
app.wxss
View file @
70bc625d
...
...
@@ -32,10 +32,9 @@
}
.kg-operate-btn-bg {
position: fixed;
bottom: 0rpx;
/* background-color: red; */
height: 1
40
rpx;
height: 1
36
rpx;
width: 100vh;
display: flex;
align-items: center;
...
...
@@ -59,3 +58,44 @@
height: 60rpx;
align-items: center;
}
.kg-quantity-cell {
justify-content: space-between;
height: 120rpx;
width: auto;
border-radius: 6rpx;
box-shadow: 0rpx 0rpx 8rpx 8rpx #f2f6f9;
padding: 0rpx 20rpx;
margin-bottom: 20rpx;
}
.kg-flex-row {
display: flex;
flex-direction: row;
align-items: center;
}
.kg-border {
border: 2rpx solid rgb(190, 190, 190);
border-radius: 6rpx;
}
.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;
}
\ No newline at end of file
pages/add_record/index.js
View file @
70bc625d
...
...
@@ -15,6 +15,9 @@ Page({
controlIndex
:
0
,
categorys
:
[
'早餐'
,
'午餐'
,
'晚餐'
,
'上午加餐'
,
'下午加餐'
,
'喝水'
,
'牛奶'
],
selectIndex
:
0
,
inputModel
:
[
]
},
...
...
pages/add_record/index.wxml
View file @
70bc625d
<!-- pages/add_record/index.wxml -->
<import src='/template/operate_btn/index.wxml'></import>
<view class='kg-separater ' style='height:1rpx;'></view>
<view class='kg-separater ' style='height:2rpx;'></view>
<view class="segmentedControl">
<!-- 循环遍历 -->
<block wx:for="{{radioValues}}">
...
...
@@ -10,15 +12,25 @@
<view class='kg-separater'></view>
<view hidden='{{controlIndex != 0}}'>
<!-- 滑动区域 -->
<scroll-view style='height:calc(100vh -
100rpx - 8
0rpx)' scroll-y='true'>
<scroll-view style='height:calc(100vh -
50px - 2rpx - 20rpx - 14
0rpx)' scroll-y='true'>
<template is="section_header" data="{{title:'分类'}}"></template>
<!-- 分类选项 -->
<view class="category">
<view wx:for="{{categorys}}">
<view class="eat_category_btn {{selectIndex == index ? 'selected' : ''}}" bindtap='tapCategory' data-index='{{index}}'>{{item}}</view>
</view>
</view>
<view class='kg-separater'></view>
<!-- 数量 -->
<view style='margin:20rpx'>
<template is='quantity_cell' data="{{type:'input'}}"></template>
<template is='quantity_cell' data="{{type:'input'}}"></template>
<template is='quantity_cell' data="{{type:'select'}}"></template>
</view>
<view class='kg-separater'></view>
<template is="section_header" data="{{title:'今日拍照'}}"></template>
</scroll-view>
</view>
<view hidden='{{controlIndex != 1}}'>睡觉</view>
<view hidden='{{controlIndex != 2}}'>WC</view>
\ No newline at end of file
<view hidden='{{controlIndex != 2}}'>WC</view>
<template is="operate_btn" data="{{title:'保存'}}"></template>
\ No newline at end of file
pages/add_record/index.wxss
View file @
70bc625d
...
...
@@ -57,21 +57,4 @@
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 @
70bc625d
...
...
@@ -13,7 +13,7 @@
</view>
<view class='kg-separater'></view>
<!-- 滑动区域 -->
<scroll-view style='height:calc(100vh -
19
0rpx - 140rpx)' scroll-y='true'>
<scroll-view style='height:calc(100vh -
20
0rpx - 140rpx)' scroll-y='true'>
<template is="section_header" data="{{title:'2018-09-12'}}"></template>
<view wx:for="{{[1,2,3,4,5,6]}}">
<view class='home-student-info'>
...
...
@@ -37,9 +37,7 @@
</view>
</view>
</view>
</view>
</view>
</scroll-view>
<template is="operate_btn"></template>
\ No newline at end of file
<template is="operate_btn" data="{{title:'记录一笔'}}"></template>
\ No newline at end of file
template/operate_btn/index.wxml
View file @
70bc625d
<!--template/operate_btn/index.wxml-->
<template name="operate_btn">
<view class='kg-separater ' style='height:4rpx;'></view>
<view class='kg-operate-btn-bg'>
<button class='kg-operate-btn kg-btn-no-border' bindtap='operateTap'>记录一笔</button>
<view style='position:fixed;bottom: 0rpx;height:140rpx;'>
<view class='kg-separater' style='height:4rpx;'></view>
<view class='kg-operate-btn-bg'>
<button class='kg-operate-btn kg-btn-no-border' bindtap='operateTap'>{{title}}</button>
</view>
</view>
</template>
<!--通用的分区标题-->
...
...
@@ -13,4 +16,19 @@
<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 name='quantity_cell'>
<view class='kg-flex-row kg-quantity-cell'>
<view class='g-text-normal-dark'>张小华</view>
<view class='kg-flex-row' hidden="{{type != 'input'}}">
<input class='kg-border' style='width:140rpx;margin-right:10rpx;'></input>
<view class='kg-text-normal-gray'>毫升</view>
</view>
<view class='kg-flex-row' hidden="{{type != 'select'}}">
<view wx:for="{{['少','正常','多']}}">
<view class="eat_category_btn {{selectIndex == index ? 'selected' : ''}}" bindtap='tap' data-index='{{index}}' style='width: 100rpx;margin-right: 0rpx;margin-bottom: 0rpx;margin-left:20rpx;'>{{item}}</view>
</view>
</view>
</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