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
f9650118
Commit
f9650118
authored
Mar 17, 2019
by
张杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加课表和食谱
parent
a6ad07dc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
11 deletions
+48
-11
parrent.js
api/parrent.js
+2
-2
request.js
api/request.js
+4
-4
index.js
pages/home/parents/index.js
+38
-3
index.wxml
pages/home/parents/index.wxml
+4
-2
No files found.
api/parrent.js
View file @
f9650118
...
...
@@ -33,11 +33,11 @@ module.exports = {
getRecipe
()
{
return
request
.
get
(
"/wxsite/parents/getCurrentRecipe.do
"
)
return
request
.
get
(
"/wxsite/parents/getCurrentRecipe.do
?orgCode="
+
app
.
globalData
.
login
.
user
.
currentDepart
.
orgCode
)
},
getSchedule
(
classId
)
{
var
url
=
"/wxsite/parents/getCurrentSchedule.do?
classId="
+
classId
var
url
=
"/wxsite/parents/getCurrentSchedule.do?
orgCode="
+
app
.
globalData
.
login
.
user
.
currentDepart
.
orgCode
return
request
.
get
(
url
)
}
}
api/request.js
View file @
f9650118
...
...
@@ -11,14 +11,14 @@ const ERR_NOT_ACCESS_TOKEN = 21;
var
DEF_APP_CONFIG
=
{
appId
:
"wxe19b38d5dbc061c6"
,
// 勾芒小程序测试号
// 开发环境
domain
:
'https://dev.gomoretech.com/preschool'
,
baseUrl
:
"https://dev.gomoretech.com/preschool"
//
domain: 'https://dev.gomoretech.com/preschool',
//
baseUrl: "https://dev.gomoretech.com/preschool"
// 川哥本地环境
// domain: 'http://192.168.199.230:8080/preschool',
// baseUrl: "http://192.168.199.230:8080/preschool",
// 正式环境
//
domain: 'https://preschool.gomoretech.com/preschool',
//
baseUrl: "https://preschool.gomoretech.com/preschool"
domain
:
'https://preschool.gomoretech.com/preschool'
,
baseUrl
:
"https://preschool.gomoretech.com/preschool"
}
const
extConfig
=
wx
.
getExtConfigSync
?
wx
.
getExtConfigSync
()
:
DEF_APP_CONFIG
;
const
APP_ID
=
extConfig
.
appId
||
DEF_APP_CONFIG
.
appId
;
...
...
pages/home/parents/index.js
View file @
f9650118
...
...
@@ -51,6 +51,8 @@ Page({
this
.
data
.
page
=
0
this
.
httpRequest
()
this
.
getSchedule
()
this
.
getRecipe
()
},
...
...
@@ -110,9 +112,6 @@ Page({
musicUrl
:
res
.
musicUrl
})
var
url
=
utils
.
handleImgShow
(
res
.
attachment
)
console
.
log
(
url
)
...
...
@@ -151,6 +150,42 @@ Page({
},
tapPlayButton
:
function
()
{
this
.
data
.
isPlaying
=
!
this
.
data
.
isPlaying
let
btnImage
=
'/src/img/play.png'
if
(
this
.
data
.
isPlaying
)
{
this
.
data
.
innerAudioContext
.
play
()
btnImage
=
'/src/img/stop.png'
wx
.
showToast
({
title
:
'开始播放'
,
icon
:
'none'
})
}
else
{
this
.
data
.
innerAudioContext
.
pause
()
wx
.
showToast
({
title
:
'已暂停'
,
icon
:
'none'
})
}
this
.
setData
({
btnImage
:
btnImage
})
},
tapRecipe
:
function
(
e
)
{
wx
.
previewImage
({
urls
:
[
this
.
data
.
recipeImage
],
})
},
tapSchedule
:
function
(
e
)
{
wx
.
previewImage
({
urls
:
[
this
.
data
.
scheduleImage
],
})
},
tapUserInfoImg
:
function
(
e
)
{
var
that
=
this
;
// 选择图片
...
...
pages/home/parents/index.wxml
View file @
f9650118
...
...
@@ -88,16 +88,17 @@
<!-- 食谱 -->
<view hidden="{{selectedIndex != '1'}}">
<image
hidden="{{isRecipeNull == true}}" src='{{recipeImage}}
'></image>
<image
class='recipe-image' hidden="{{isRecipeNull == true}}" src='{{recipeImage}}' mode='widthFix' bindtap='tapRecipe
'></image>
<image hidden="{{isRecipeNull != true}}" src='/src/img/empty_data.png' class='empty-data'></image>
<view style='height:100rpx;width:auto;'></view>
</view>
<!-- 课表 -->
<view hidden="{{selectedIndex != '2'}}">
<image hidden='{{attachment == null}}' class='scheduleImage' src='{{scheduleImage}}' mode='widthFix'></image>
<image hidden='{{attachment == null}}' class='scheduleImage' src='{{scheduleImage}}' mode='widthFix'
bindtap='tapSchedule'
></image>
<view hidden='{{musicUrl == null}}' class='kg-home-header kg-flex-row music-board' style='width:100vw;height:120rpx;'>
<view class='kg-flex-row'>
<image src='{{btnImage}}' style='width:120rpx;height:120rpx;' bindtap='tapPlayButton'></image>
...
...
@@ -106,6 +107,7 @@
</view>
<image hidden="{{attachment != null && musicUrl != null}}" src='/src/img/empty_data.png' class='empty-data'></image>
<view style='height:100rpx;width:auto;'></view>
</view>
<view style='position:fixed;bottom: 0rpx;height:100rpx;background-color:white;width:100vw;'>
...
...
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