parent
fa481b2f20
commit
6015f30e13
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"permissions": {
|
||||||
|
"openapi": [
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
const saveProfile = require('./saveProfile/index')
|
||||||
|
|
||||||
|
// 云函数入口函数
|
||||||
|
exports.main = async (event, context) => {
|
||||||
|
switch (event.type) {
|
||||||
|
case 'saveProfile':
|
||||||
|
return await saveProfile.main(event, context);
|
||||||
|
}
|
||||||
|
};
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"name": "db",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"author": "",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"wx-server-sdk": "latest"
|
||||||
|
}
|
||||||
|
}
|
@ -1,66 +0,0 @@
|
|||||||
// pages/Message/Message.js
|
|
||||||
Page({
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面的初始数据
|
|
||||||
*/
|
|
||||||
data: {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面加载
|
|
||||||
*/
|
|
||||||
onLoad(options) {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
|
||||||
*/
|
|
||||||
onReady() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面显示
|
|
||||||
*/
|
|
||||||
onShow() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面隐藏
|
|
||||||
*/
|
|
||||||
onHide() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面卸载
|
|
||||||
*/
|
|
||||||
onUnload() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面相关事件处理函数--监听用户下拉动作
|
|
||||||
*/
|
|
||||||
onPullDownRefresh() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面上拉触底事件的处理函数
|
|
||||||
*/
|
|
||||||
onReachBottom() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户点击右上角分享
|
|
||||||
*/
|
|
||||||
onShareAppMessage() {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
<!--pages/Message/Message.wxml-->
|
|
||||||
<text>pages/Message/Message.wxml</text>
|
|
@ -1 +0,0 @@
|
|||||||
/* pages/Message/Message.wxss */
|
|
@ -1,30 +1,39 @@
|
|||||||
<!--pages/Tprofile/Tprofile.wxml-->
|
<!--pages/Tprofile/Tprofile.wxml-->
|
||||||
<!--pages/Comments/Comments.wxml-->
|
<!--pages/Comments/Comments.wxml-->
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="form-group">
|
<form bindsubmit="submit">
|
||||||
<text>姓名:</text>
|
<!-- todo: 修改数据,绑定输入 -->
|
||||||
<input type="text" placeholder="请输入您的姓名" />
|
<view class="form-group">
|
||||||
</view>
|
<text>姓名:</text>
|
||||||
<view class="form-group">
|
<input type="text" placeholder="请输入您的姓名" />
|
||||||
<text>手机号码:</text>
|
</view>
|
||||||
<input type="tel" placeholder="请输入您的手机号码" />
|
|
||||||
</view>
|
|
||||||
<view class="form-group">
|
|
||||||
<text>电子邮箱:</text>
|
|
||||||
<input type="email" placeholder="请输入您的电子邮箱" />
|
|
||||||
</view>
|
|
||||||
<view class="form-group">
|
|
||||||
<text>教师证号:</text>
|
|
||||||
<input type="text" placeholder="请输入您的教师证号" />
|
|
||||||
</view>
|
|
||||||
<view class="form-group">
|
|
||||||
<text>密码:</text>
|
|
||||||
<input type="password" placeholder="请输入您的密码" />
|
|
||||||
</view>
|
|
||||||
<view class="form-group">
|
|
||||||
<text>确认密码:</text>
|
|
||||||
<input type="password" placeholder="请再次输入您的密码" />
|
|
||||||
</view>
|
|
||||||
<button class="btn-submit">提交</button>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
|
<view class="form-group">
|
||||||
|
<text>手机号码:</text>
|
||||||
|
<input type="tel" placeholder="请输入您的手机号码" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="form-group">
|
||||||
|
<text>电子邮箱:</text>
|
||||||
|
<input type="email" placeholder="请输入您的电子邮箱" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="form-group">
|
||||||
|
<text>教师证号:</text>
|
||||||
|
<input type="text" placeholder="请输入您的教师证号" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="form-group">
|
||||||
|
<text>密码:</text>
|
||||||
|
<input type="password" placeholder="请输入您的密码" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="form-group">
|
||||||
|
<text>确认密码:</text>
|
||||||
|
<input type="password" placeholder="请再次输入您的密码" />
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<button class="btn-submit">提交</button>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</view>
|
@ -1,66 +0,0 @@
|
|||||||
// pages/profile/profile_teacher.js
|
|
||||||
Page({
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面的初始数据
|
|
||||||
*/
|
|
||||||
data: {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面加载
|
|
||||||
*/
|
|
||||||
onLoad(options) {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
|
||||||
*/
|
|
||||||
onReady() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面显示
|
|
||||||
*/
|
|
||||||
onShow() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面隐藏
|
|
||||||
*/
|
|
||||||
onHide() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面卸载
|
|
||||||
*/
|
|
||||||
onUnload() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面相关事件处理函数--监听用户下拉动作
|
|
||||||
*/
|
|
||||||
onPullDownRefresh() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面上拉触底事件的处理函数
|
|
||||||
*/
|
|
||||||
onReachBottom() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户点击右上角分享
|
|
||||||
*/
|
|
||||||
onShareAppMessage() {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"usingComponents": {}
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
<!--pages/profile/profile_teacher.wxml-->
|
|
||||||
<text>pages/profile/profile_teacher.wxml</text>
|
|
@ -1 +0,0 @@
|
|||||||
/* pages/profile/profile_teacher.wxss */
|
|
@ -1,26 +1,47 @@
|
|||||||
|
const db = wx.cloud.database().collection("user_Data");
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
|
//页面数据
|
||||||
data:{
|
data:{
|
||||||
date:"",
|
birthday: "",
|
||||||
region:"",
|
region:"",
|
||||||
},
|
},
|
||||||
submit:function(e){
|
|
||||||
console.log(e);
|
//表单提交方法
|
||||||
|
submit: function(e){
|
||||||
|
console.log(e.detail.value);
|
||||||
|
//todo: 添加输入检测
|
||||||
|
|
||||||
|
//往数据库里插入的方法
|
||||||
|
db.add({
|
||||||
|
//传入数据
|
||||||
|
data: e.detail.value,
|
||||||
|
//成功后执行的方法
|
||||||
|
success:(res) => {
|
||||||
|
console.log(res)
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
goToPageTpro: function() {
|
|
||||||
|
//跳转至教师信息页面
|
||||||
|
navigateToPageTpro: function() {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/Tprofile/Tprofile',
|
url: '/pages/Tprofile/Tprofile',
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
dateChange:function(e){
|
|
||||||
|
//更新页面的生日信息
|
||||||
|
dateChange: function(e){
|
||||||
this.setData({
|
this.setData({
|
||||||
date:e.detail.value,
|
birthday: e.detail.value,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
regionChange:function(e){
|
|
||||||
|
//更新页面的地区信息
|
||||||
|
regionChange: function(e){
|
||||||
this.setData({
|
this.setData({
|
||||||
region:e.detail.value,
|
region: e.detail.value,
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
Loading…
Reference in new issue