miniprogram

kongweiyu_branch
温雍敬 2 years ago
parent ed5644edcf
commit 55820b258f

@ -1,4 +1,83 @@
const db = wx.cloud.database().collection("teacher_Data")
// pages/Tprofile/Tprofile.js
Page({
<<<<<<< HEAD
=======
/**
* 页面的初始数据
*/
data: {
},
submit: (e)=> {
console.log(e.detail.value)
db.add({
data: e.detail.value,
success: (res) => {
console.log(res)
}
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
>>>>>>> 6015f30e13144ccd1fb5bbdf8627e332769439a1
})

@ -1,5 +1,6 @@
<!--pages/Tprofile/Tprofile.wxml-->
<view class="container">
<<<<<<< HEAD
<view class="input-group">
<text>姓名:</text>
<input type="text" placeholder="请输入您的姓名" class="input" />
@ -141,3 +142,41 @@
<!-- 添加提交按钮 -->
<button bindtap="submitForm" class="submit-btn">提交</button>
</view>
=======
<form bindsubmit="submit">
<!-- todo: 修改数据,绑定输入 -->
<view class="form-group">
<text>姓名:</text>
<input type="text" placeholder="请输入您的姓名" />
</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>
>>>>>>> 6015f30e13144ccd1fb5bbdf8627e332769439a1

@ -20,46 +20,11 @@
<input class="search-input" type="text" placeholder="请输入搜索内容"></input>
<button class="search-button">搜索</button>
</view>
</view>
<view class="show_information">
<!-- //当每通过一个教员上传的简历信息则创建一个 -->
<view class="content-container">
<image class="image" src="图片地址"></image>
<view class="text-container">
<text class="title">标题</text>
<view>
<text class="description">描述信息</text>
</view>
</view>
</view>
<view class="button-container">
<button class="button">按钮一</button>
<button class="button">按钮二</button>
</view>
</view>
<view class="show_information">
<!-- //当每通过一个教员上传的简历信息则创建一个 -->
<view class="content-container">
<image class="image" src="图片地址"></image>
<view class="text-container">
<text class="title">标题</text>
<view>
<text class="description">描述信息</text>
</view>
</view>
</view>
<view class="button-container">
<button class="button">按钮一</button>
<button class="button">按钮二</button>
</view>
</view>
<view class="show_information">
<view class="show_information" wx:for="{{[1,2,3,4,5]}}">
<!-- //当每通过一个教员上传的简历信息则创建一个 -->
<view class="content-container">
<image class="image" src="图片地址"></image>
@ -70,29 +35,12 @@
</view>
</view>
</view>
<view class="button-container">
<button class="button">按钮一</button>
<button class="button">按钮二</button>
</view>
</view>
<view class="show_information">
<!-- //当每通过一个教员上传的简历信息则创建一个 -->
<view class="content-container">
<image class="image" src="图片地址"></image>
<view class="text-container">
<text class="title">标题</text>
<view>
<text class="description">描述信息</text>
</view>
</view>
</view>
<view class="button-container">
<button class="button">按钮一</button>
<button class="button">按钮二</button>
</view>
</view>
<view class="title" bind:tap="change">{{hello}}</view>
<view class="desc">这里是家教帮平台,再也不用担心孩子的学习了</view>

@ -1,26 +1,47 @@
const db = wx.cloud.database().collection("user_Data");
Page({
//页面数据
data:{
date:"",
birthday: "",
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({
url: '/pages/Tprofile/Tprofile',
})
},
dateChange:function(e){
//更新页面的生日信息
dateChange: function(e){
this.setData({
date:e.detail.value,
birthday: e.detail.value,
});
},
regionChange:function(e){
//更新页面的地区信息
regionChange: function(e){
this.setData({
region:e.detail.value,
region: e.detail.value,
});
},
}
});

@ -1,23 +1,23 @@
<view class="body">
<form bindsubmit="submit">
<view class="button-container" >
<button bindtap="goToPageTpro">Be a teacher</button>
<button bindtap="navigateToPageTpro">Be a teacher</button>
</view>
<view class="section">
<view class="title">昵称:</view>
<input type="nickname" class="input"name="nickname"placeholder="昵称" />
<input type="nickname" class="input" name="nickname" placeholder="昵称" />
</view>
<view class="section">
<view class="title">性别:</view>
<radio-group class="mg" name="gender">
<label >
<radio value="nan" />
<radio value="man" />
</label>
<label >
<radio value="nv" />
<radio value="woman" />
</label>
</radio-group>
@ -25,32 +25,32 @@
<view class="section">
<view class="title">年龄:</view>
<picker bindchange="dateChange" fields="year" value="{{date}}"mode="date"class="input"name="date">
<view class="picker">出生年:{{date}}</view>
<picker bindchange="dateChange" fields="year" value="{{birthday}}" mode="date" class="input" name="birthday">
<view class="picker">出生年:{{birthday}}</view>
</picker>
</view>
<view class="section">
<view class="title">地区:</view>
<picker bindchange="regionChange" value="{{region}}" value="{{region}}"mode="region"class="input"name="region">
<picker bindchange="regionChange" value="{{region}}" value="{{region}}"mode="region" class="input" name="region">
<view class="picker">当前选择:{{region}}</view>
</picker>
</view>
<view class="section">
<view class="title">可以添加到你的联系方式:</view>
<input type="input" class="input"name="code"placeholder="昵称" />
<input type="input" class="input" name="contact" placeholder="请输入" />
</view>
<view class="section">
<view class="title">你的基本情况:</view>
<input type="input" class="input"name="code"placeholder="昵称" />
<input type="input" class="input" name="information" placeholder="请输入" />
</view>
<view class="area">
<button style="margin:30rpx 0"type="primary"
<button style="margin:30rpx 0" type="primary"
form-type="submit">提交</button>
<button style="margin:30rpx 0"type="reset"
<button style="margin:30rpx 0" type="reset"
form-type="submit">重置</button>
</view>
</form>

@ -56,5 +56,5 @@
}
},
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "miniProgram2"
"projectname": "miniprogram"
}
Loading…
Cancel
Save