From 0390f382d0b89926f9ebdbfa62ae412a5cb81f08 Mon Sep 17 00:00:00 2001 From: Saturneric Date: Fri, 9 Apr 2021 23:51:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=83=A8=E5=88=86=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/step.js | 38 +++++++++++++ pages/my-children/my-children.js | 90 ++++++++++++++++++++++++++++++ pages/my-children/my-children.json | 3 + pages/my-children/my-children.wxml | 29 ++++++++++ pages/my-children/my-children.wxss | 1 + pages/robot/robot.js | 66 ++++++++++++++++++++++ pages/robot/robot.json | 3 + pages/robot/robot.wxml | 2 + pages/robot/robot.wxss | 1 + 9 files changed, 233 insertions(+) create mode 100644 api/step.js create mode 100644 pages/my-children/my-children.js create mode 100644 pages/my-children/my-children.json create mode 100644 pages/my-children/my-children.wxml create mode 100644 pages/my-children/my-children.wxss create mode 100644 pages/robot/robot.js create mode 100644 pages/robot/robot.json create mode 100644 pages/robot/robot.wxml create mode 100644 pages/robot/robot.wxss diff --git a/api/step.js b/api/step.js new file mode 100644 index 0000000..1fa22f3 --- /dev/null +++ b/api/step.js @@ -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: {} + }) +} \ No newline at end of file diff --git a/pages/my-children/my-children.js b/pages/my-children/my-children.js new file mode 100644 index 0000000..e05ec54 --- /dev/null +++ b/pages/my-children/my-children.js @@ -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 + }) + } +}) \ No newline at end of file diff --git a/pages/my-children/my-children.json b/pages/my-children/my-children.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/my-children/my-children.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/my-children/my-children.wxml b/pages/my-children/my-children.wxml new file mode 100644 index 0000000..1b0c331 --- /dev/null +++ b/pages/my-children/my-children.wxml @@ -0,0 +1,29 @@ + + + 我的孩子 + 我的孩子的一些信息 + + + 可查看的项目 + + + 孩子的健康 + + 详细信息 + + + + 孩子的荣誉 + + 详细信息 + + + + 孩子的成绩 + + 详细信息 + + + + + diff --git a/pages/my-children/my-children.wxss b/pages/my-children/my-children.wxss new file mode 100644 index 0000000..3e41771 --- /dev/null +++ b/pages/my-children/my-children.wxss @@ -0,0 +1 @@ +/* pages/my-children/my-children.wxss */ \ No newline at end of file diff --git a/pages/robot/robot.js b/pages/robot/robot.js new file mode 100644 index 0000000..0a24781 --- /dev/null +++ b/pages/robot/robot.js @@ -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 () { + + } +}) \ No newline at end of file diff --git a/pages/robot/robot.json b/pages/robot/robot.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/robot/robot.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/robot/robot.wxml b/pages/robot/robot.wxml new file mode 100644 index 0000000..124c331 --- /dev/null +++ b/pages/robot/robot.wxml @@ -0,0 +1,2 @@ + +pages/robot/robot.wxml diff --git a/pages/robot/robot.wxss b/pages/robot/robot.wxss new file mode 100644 index 0000000..52c201e --- /dev/null +++ b/pages/robot/robot.wxss @@ -0,0 +1 @@ +/* pages/robot/robot.wxss */ \ No newline at end of file