添加部分文件

This commit is contained in:
Saturneric 2021-04-09 23:51:59 +08:00
parent 63e1cb524a
commit 0390f382d0
9 changed files with 233 additions and 0 deletions

38
api/step.js Normal file
View File

@ -0,0 +1,38 @@
import request from '../utils/request.js'
export const saveSteps = (encryptData, iv) => {
return request({
url: "/step",
method: "post",
data: {
encryptData,
iv
}
})
}
export const getStepsForParent = (openid) => {
return request({
url: "/step/parent",
method: "get",
data: {
openid
}
})
}
export const getStepsMonth = () => {
return request({
url: "/step/month",
method: "get",
data: {}
})
}
export const getStepsToday = () => {
return request({
url: "/step/today",
method: "get",
data: {}
})
}

View File

@ -0,0 +1,90 @@
// pages/my-children/my-children.js
Page({
/**
* 页面的初始数据
*/
data: {
childrenOpenid: ''
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
console.log(options)
this.setData({
childrenOpenid: options.openid
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
bindHonorsInfo() {
// 跳转
wx.navigateTo({
url: '/pages/my-honors/my-honors?isParent=true&openid=' + this.data.childrenOpenid
})
},
bindCoursesInfo() {
// 跳转
wx.navigateTo({
url: '/pages/my-grade/my-grade?isParent=true&openid=' + this.data.childrenOpenid
})
},
bindHealthInfo() {
// 跳转
wx.navigateTo({
url: '/pages/my-health/my-health?isParent=true&openid=' + this.data.childrenOpenid
})
}
})

View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

View File

@ -0,0 +1,29 @@
<view class="page" data-weui-theme="{{theme}}">
<view class="page__hd" wx:if="{{!showMessage}}">
<view class="page__title">我的孩子</view>
<view class="page__desc">我的孩子的一些信息</view>
</view>
<view class="page__bd">
<view class="weui-cells__title">可查看的项目</view>
<view class="weui-cells">
<view class="weui-cell weui-cell_active weui-cell_access" bindtap="bindHealthInfo">
<view class="weui-cell__bd">孩子的健康</view>
<view class="weui-cell__ft" style="font-size: 0;">
<text class="demo_badge_tips">详细信息</text>
</view>
</view>
<view class="weui-cell weui-cell_active weui-cell_access" bindtap="bindHonorsInfo">
<view class="weui-cell__bd">孩子的荣誉</view>
<view class="weui-cell__ft" style="font-size: 0;">
<text class="demo_badge_tips">详细信息</text>
</view>
</view>
<view class="weui-cell weui-cell_active weui-cell_access" bindtap="bindCoursesInfo">
<view class="weui-cell__bd">孩子的成绩</view>
<view class="weui-cell__ft" style="font-size: 0;">
<text class="demo_badge_tips">详细信息</text>
</view>
</view>
</view>
</view>
</view>

View File

@ -0,0 +1 @@
/* pages/my-children/my-children.wxss */

66
pages/robot/robot.js Normal file
View File

@ -0,0 +1,66 @@
// pages/robot/robot.js
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})

3
pages/robot/robot.json Normal file
View File

@ -0,0 +1,3 @@
{
"usingComponents": {}
}

2
pages/robot/robot.wxml Normal file
View File

@ -0,0 +1,2 @@
<!--pages/robot/robot.wxml-->
<text>pages/robot/robot.wxml</text>

1
pages/robot/robot.wxss Normal file
View File

@ -0,0 +1 @@
/* pages/robot/robot.wxss */