miniprogram

kongweiyu_branch
温雍敬 1 year ago
parent 6ffd16b692
commit 197b30a141

@ -1,10 +1,11 @@
{
"pages": [
"pages/MainTest/MainTest",
"pages/Main/main",
"pages/Msg/msg",
"pages/Profile/profile",
"pages/Tprofile/Tprofile",
"pages/Comments/Comments"
"pages/Comments/Comments",
"pages/Order/order"
],
"window": {
"backgroundColor": "#FFF",
@ -16,13 +17,13 @@
"tabBar": {
"list": [
{
"pagePath": "pages/MainTest/MainTest",
"pagePath": "pages/Main/main",
"text": "main",
"iconPath": "images/main.png",
"selectedIconPath": "images/main_on.png"
},
{
"pagePath": "pages/Msg/msg",
"pagePath": "pages/Order/order",
"text": "msg",
"iconPath": "images/msg.png",
"selectedIconPath": "images/msg_on.png"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 328 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

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

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

@ -0,0 +1 @@
/* pages/Detailed/detailed.wxss */

@ -0,0 +1,74 @@
//const that = this;
const db = wx.cloud.database().collection("student_Demands");
// pages/MainTest/MainTest.js
Page({
/**
* 页面的初始数据
*/
data: {
currentTab: 0,
showPopup: false,
teacher: {}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
// 调用云函数获取教师信息
wx.cloud.callFunction({
name: "recommend",
success: (res) => {
this.setData({
teacher: res.result.data
})
// console.log(this.data.teacher[1]);
}
})
},
changeTab(e) {
const index = e.currentTarget.dataset.index;
this.setData({
currentTab: parseInt(index)
});
},
onAddButtonTap: function() {
this.setData({
showPopup: true
});
},
onBackButtonTap: function() {
this.setData({
showPopup: false
});
},
handleSubmit: function() {
// 处理....
// 提交成功后隐藏弹窗
this.setData({
showPopup: false
});
},
navToComments: () => {
wx.navigateTo({
url: '/pages/Comments/Comments',
})
},
// contactTeacher(event) {
// // console.log(event);
// wx.makePhoneCall({
// phoneNumber: event.currentTarget.dataset.item,
// })
// }
inputChange(e) {
this.setData({
inputValue: e.detail.value
});
},
})

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

@ -1,20 +1,30 @@
<!--pages/MainTest/MainTest.wxml-->
<view class="cover">
<swiper indicator-dots="{{true}}" autoplay="{{true}}" interval="{{3000}}" duration="{{500}}">
<swiper-item>
<image src="cloud://cloud1-7gyjwcyfbdf819da.636c-cloud1-7gyjwcyfbdf819da-1321167991/slide_show1.png" class="slide" />
</swiper-item>
<swiper-item>
<image src="cloud://cloud1-7gyjwcyfbdf819da.636c-cloud1-7gyjwcyfbdf819da-1321167991/slide_show2.png" class="slide" />
</swiper-item>
<swiper-item>
<image src="cloud://cloud1-7gyjwcyfbdf819da.636c-cloud1-7gyjwcyfbdf819da-1321167991/slide_show3.png" class="slide" />
</swiper-item>
</swiper>
</view>
<view class="tab">
<view class="tab-item" bindtap="changeTab" data-index="0">Recommend</view>
<view class="tab-item" bindtap="changeTab" data-index="1">Demand</view>
<view class="tab-item" bindtap="changeTab" data-index="0">教员风采</view>
<view class="tab-item" bindtap="changeTab" data-index="1">学员情况</view>
</view>
<view class="content">
<!-- 根据tab索引值显示不同内容 -->
<view wx:if="{{currentTab === 0}}">
<view >
<!-- 主页面中展示老师上传的信息 -->
<!-- 搜索框 -->
<view class="cover">
<scroll-view>
<image src="/images/app.png"class="app"/>
</scroll-view>
</view>
<view class="search-wrapper">
<view class="search-bar">
<input class="search-input" type="text" placeholder="请输入搜索内容"></input>
@ -22,21 +32,25 @@
</view>
</view>
<view class="show_information" wx:for="{{teacher}}">
<view class="show_information" wx:for="{{teacher}}" wx:key="_id">
<!-- //当每通过一个教员上传的简历信息则创建一个 -->
<view class="content-container">
<image class="image" src="图片地址"></image>
<image class="image" src="/images/user.png"></image>
<view class="text-container">
<text class="title">标题</text>
<text class="title">{{item.name}}</text>
<view>
<text class="description">描述信息</text>
<text class="description">
电话号码:{{item.phone}}
email{{item.email}}
其他信息null
</text>
</view>
</view>
</view>
<view class="button-container">
<button class="button">按钮一</button>
<button class="button">按钮二</button>
<button bind:tap="navToComments" class="button">评论</button>
<!-- <button bind:tap="contactTeacher" data-item="{{item.phone}}" class="button">联系</button> -->
<button bind:tap="reserved" class="button">预约</button>
</view>
</view>
<view class="desc">这里是家教帮平台,再也不用担心孩子的学习了</view>
@ -76,10 +90,10 @@
<input type="text" placeholder="请输入联系方式" bindinput="handleInputContact" />
</view>
</view>
<button class="btn-submit" bindtap="handleSubmit">提交</button>
<button type="primary" bindtap="onTapButton">提交</button>
<button class="btn-back" bindtap="onBackButtonTap">返回</button>
</view>
<!-- 弹窗内容 -->
<!-- 弹窗内容 -->
</view>
<image src="/images/add.png" class="add-button" bind:tap="onAddButtonTap" />
</view>

@ -1,10 +1,15 @@
/* pages/MainTest/MainTest.wxss */
/* pages/wechat2/wechat2.wxss */
.slide{
display: flex;
width: 100%;
height: 90%;
}
.tab {
display: flex;
justify-content: space-between;
align-items: center;
background-color: #708ec5;
background-color: #e8edf7;
}
.tab-item {
@ -17,7 +22,7 @@
}
.tab-item.active {
color: #333333;
color: #2eaa23;
font-weight: bold;
border-bottom: 2rpx solid #333333;
}
@ -67,7 +72,7 @@
.image {
width: 50%;
height: 200rpx;
height: 300rpx;
object-fit: cover;
border-radius: 10rpx 0 0 10rpx;
border: 2rpx solid #ccc; /* 添加框线样式 */

@ -1,27 +1,18 @@
// pages/MainTest/MainTest.js
// pages/Order/order.js
Page({
/**
* 页面的初始数据
*/
data: {
teacher: []
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
wx.cloud.callFunction({
name: "recommend",
success: (res) => {
this.setData({
teacher: res.result.data
})
// console.log(res.result.data);
}
}),
console.log(this.teacher);
},
/**
@ -71,10 +62,6 @@ Page({
*/
onShareAppMessage() {
},
data: {
currentTab: 0,
showPopup: false
},
changeTab(e) {
const index = e.currentTarget.dataset.index;
@ -82,23 +69,4 @@ Page({
currentTab: parseInt(index)
});
},
onAddButtonTap: function() {
this.setData({
showPopup: true
});
},
onBackButtonTap: function() {
this.setData({
showPopup: false
});
},
handleSubmit: function() {
// 处理....
// 提交成功后隐藏弹窗
this.setData({
showPopup: false
});
}
})

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

@ -0,0 +1,62 @@
<!--pages/Order/order.wxml-->
<!--pages/order/index.wxml-->
<view class="tab">
<view class="tab-item" bindtap="changeTab" data-index="0">已预约</view>
<view class="tab-item" bindtap="changeTab" data-index="1">进行中</view>
<view class="tab-item" bindtap="changeTab" data-index="2">已完成</view>
</view>
<view wx:if="{{currentTab==0}}">
<view class="reserved">
<view class="content-container">
<image class="image" src="/images/user.png"></image>
<view class="text-container">
<text class="title">已预约订单名称</text>
<view>
<text class="description">
电话号码:{{item.phone}}
email{{item.email}}
其他信息null
</text>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{currentTab==1}}">
<view class="reserved">
<view class="content-container">
<image class="image" src="/images/user.png"></image>
<view class="text-container">
<text class="title">进行中订单名称</text>
<view>
<text class="description">
电话号码:{{item.phone}}
email{{item.email}}
其他信息null
</text>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{currentTab==2}}">
<view class="reserved">
<view class="content-container">
<image class="image" src="/images/user.png"></image>
<view class="text-container">
<text class="title">已完成订单名称</text>
<view>
<text class="description">
电话号码:{{item.phone}}
email{{item.email}}
其他信息null
</text>
</view>
</view>
</view>
</view>
</view>

@ -0,0 +1,48 @@
/* pages/Order/order.wxss */
.tab{
display: flex;
justify-content: space-between;
background-color: #838d9e;
height: 45px;
border-radius: 10%;
}
.tab-item{
font-size: 25px;
}
.content-container {
display: flex;
align-items: center;
border: rgb(151, 68, 68);
}
.title {
font-size: 32rpx;
font-weight: bold;
color: #333;
margin-bottom: 10rpx;
}
.description {
font-size: 28rpx;
color: #666;
line-height: 1.5;
}
.image{
width: 50%;
height: 300rpx;
object-fit: cover;
border-radius: 10rpx 0 0 10rpx;
border: 2rpx solid #ccc; /* 添加框线样式 */
}
.reserved {
width: 90%;
/* height: 10%; */
margin: 10rpx auto;
padding: 25rpx;
background-color: #83acc4;
border-radius: 10rpx;
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
}

@ -7,10 +7,10 @@ Page({
* 页面的初始数据
*/
data: {
tempFilePaths: {}
},
submit: (e)=> {
submit: (e) => {
console.log(e.detail.value)
db.add({
@ -21,6 +21,22 @@ Page({
})
},
chooseFile: function() {
var that = this
wx.chooseMessageFile({
count: 10,
type: 'image',
success: function(res) {
// tempFilePath可以作为img标签的src属性显示图片
that.setData({
tempFilePaths: res.tempFiles
})
console.log(res.tempFiles);
console.log(that.data.tempFilePaths[0].path);
}
})
},
/**
* 生命周期函数--监听页面加载
*/
@ -75,5 +91,6 @@ Page({
*/
onShareAppMessage() {
}
},
})

@ -1,144 +1,147 @@
<!--pages/Tprofile/Tprofile.wxml-->
<view class="container">
<view class="input-group">
<text>姓名:</text>
<input type="text" placeholder="请输入您的姓名" class="input" />
</view>
<view class="input-group">
<text>科目:</text>
<input type="text" placeholder="请输入科目" class="input" />
</view>
<view class="input-group">
<text>时薪:</text>
<input type="number" placeholder="请输入时薪" class="input" />
</view>
</view>
<view class="container">
<view class="input-group">
<text>就读学校:</text>
<input type="text" placeholder="输入现/曾经就读学校" class="input" />
</view>
<view class="input-group">
<text>年级专业:</text>
<input type="text" placeholder="输入就读专业及年级" class="input" />
</view>
</view>
<view class="container">
<view class="input-group">
<text>就读学校:</text>
<input type="text" placeholder="输入现/曾经就读学校" class="input" />
</view>
<view class="input-group">
<text>年级专业:</text>
<input type="text" placeholder="输入就读专业及年级" class="input" />
</view>
</view>
<view class="container">
<text>空闲时间:</text>
<view class="table-container">
<view class="row">
<view class="cell"></view>
<view class="header-cell">周一</view>
<view class="header-cell">周二</view>
<view class="header-cell">周三</view>
<view class="header-cell">周四</view>
<view class="header-cell">周五</view>
<view class="header-cell">周六</view>
<view class="header-cell">周日</view>
</view>
<view class="row">
<view class="cell">上午</view>
<view class="checkbox-cell">
<checkbox></checkbox>
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
<view>
<form bindsubmit="submit">
<view class="container">
<view class="input-group">
<text>姓名:</text>
<input type="text" name="name" placeholder="请输入您的姓名" class="input" />
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
<view class="input-group">
<text>科目:</text>
<input type="text" name="subject" placeholder="请输入科目" class="input" />
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
<view class="input-group">
<text>时薪:</text>
<input type="number" name="salary" placeholder="请输入时薪" class="input" />
</view>
</view>
<view class="row">
<view class="cell">中午</view>
<view class="checkbox-cell">
<checkbox></checkbox>
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
<view class="container">
<view class="input-group">
<text>就读学校:</text>
<input type="text"name="school" placeholder="输入现/曾经就读学校" class="input" />
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
<view class="input-group">
<text>年级专业:</text>
<input type="text"name="calss" placeholder="输入就读专业及年级" class="input" />
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
<view class="input-group">
<text>居住地址:</text>
<input type="text"name="address" placeholder="输入就读专业及年级" class="input" />
</view>
</view>
<view class="row">
<view class="cell">下午</view>
<view class="checkbox-cell">
<checkbox></checkbox>
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
<view class="container">
<text>空闲时间:</text>
<view class="table-container">
<view class="row">
<view class="cell"></view>
<view class="header-cell">周一</view>
<view class="header-cell">周二</view>
<view class="header-cell">周三</view>
<view class="header-cell">周四</view>
<view class="header-cell">周五</view>
<view class="header-cell">周六</view>
<view class="header-cell">周日</view>
</view>
<view class="row">
<view class="cell">上午</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
</view>
<view class="row">
<view class="cell">中午</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
</view>
<view class="row">
<view class="cell">下午</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
<view class="checkbox-cell">
<checkbox bindchange="checkboxChange" value="1-0"></checkbox>
</view>
</view>
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
</view>
<view class="container">
<view class="input-group">
<text>教员风采:</text>
<input type="text" placeholder="输入个人简介、家教经验" class="input" />
</view>
<view class="checkbox-cell">
<checkbox></checkbox>
<view class="input-group">
<text>风采展示图:</text>
<button bind:tap="chooseFile">选择图片</button>
<!-- <view wx:for="{{tempFilePaths}}">
<image src="{{item}}"/>
</view> -->
<!-- <input type="text" placeholder="在此插入图片" class="input" /> -->
</view>
</view>
</view>
</view>
<view class="container">
<!-- 添加提交按钮 -->
<button class="submit-btn" form-type="submit">提交</button>
</view>
<view class="container">
<view class="input-group">
<text>教员风采:</text>
<input type="text" placeholder="输入个人简介、家教经验" class="input" />
</view>
<view class="input-group">
<text>风采展示图:</text>
<input type="text" placeholder="在此插入图片" class="input" />
</view>
</view>
<view class="container">
<!-- 添加提交按钮 -->
<button bindtap="submit" class="submit-btn">提交</button>
</form>
</view>

@ -1,21 +1,18 @@
Page({
goToPageA: function() {
wx.navigateTo({
url: '/pages/Homework/Homework',
})
},
goToPageB: function() {
wx.navigateTo({
url: '/pages/Tprofile/Tprofile',
})
},
data:{
date:"",
region:"",
},
submit:function(e){
console.log(e);
wx.cloud.database()
.collection("homeworks")
.add({
data: e.detail.value,
success: (res) =>{
console.log(res)
}
})
},
dateChange:function(e){

@ -1,25 +1,29 @@
<view class="container">
<view>
<form bindsubmit="submit">
<view class="form-group">
<text>任务标题:</text>
<input type="text" placeholder="请输入任务标题" />
<input type="text" name="title" placeholder="请输入任务标题" />
</view>
<view class="form-group">
<text>任务内容:</text>
<textarea placeholder="请输入任务内容"></textarea>
<textarea name="details" placeholder="请输入任务内容"></textarea>
</view>
<view class="form-group">
<text>截止时间:</text>
<input type="datetime-local" />
<input name="deadLine" type="datetime-local" />
</view>
<view class="form-group">
<view class="form-group">
<text>附件:</text>
<button class="btn-attachment">上传附件</button>
</view>
</view>
<button class="btn-submit">提交</button>
<button form-type="submit" class="btn-submit">提交</button>
</form>
</view>

@ -1,7 +1,9 @@
<view class="body">
<view class="button-container" >
<button bindtap="navigateToPageTpro">Be a teacher</button>
<view class="button-container">
<button bindtap="navigateToPageTpro" style="background-color: rgb(38, 141, 73);">教员入驻</button>
</view>
<view class="user-avatar">
<image src="{{avatarUrl}}" mode="aspectFill"/>

@ -28,6 +28,8 @@
/* position: relative; */
display: flex;
justify-content: flex-end;
/* align-items: flex-end; */
}
@ -35,7 +37,7 @@
.button-container > button {
position: relative;
left: 200rpx;
top: -10rpx
top: -10rpx;
}
.small-button {

Loading…
Cancel
Save