diff --git a/src/miniprogram/app.json b/src/miniprogram/app.json index 4590d12..969961e 100644 --- a/src/miniprogram/app.json +++ b/src/miniprogram/app.json @@ -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" diff --git a/src/miniprogram/images/deploy_step1.png b/src/miniprogram/images/deploy_step1.png deleted file mode 100644 index 738b71c..0000000 Binary files a/src/miniprogram/images/deploy_step1.png and /dev/null differ diff --git a/src/miniprogram/images/deploy_step2.png b/src/miniprogram/images/deploy_step2.png deleted file mode 100644 index d77faab..0000000 Binary files a/src/miniprogram/images/deploy_step2.png and /dev/null differ diff --git a/src/miniprogram/images/slide_show1.png b/src/miniprogram/images/slide_show1.png new file mode 100644 index 0000000..b55af68 Binary files /dev/null and b/src/miniprogram/images/slide_show1.png differ diff --git a/src/miniprogram/images/slide_show2.png b/src/miniprogram/images/slide_show2.png new file mode 100644 index 0000000..9d69706 Binary files /dev/null and b/src/miniprogram/images/slide_show2.png differ diff --git a/src/miniprogram/images/slide_show3.png b/src/miniprogram/images/slide_show3.png new file mode 100644 index 0000000..efbac64 Binary files /dev/null and b/src/miniprogram/images/slide_show3.png differ diff --git a/src/miniprogram/pages/Detailed/detailed.js b/src/miniprogram/pages/Detailed/detailed.js new file mode 100644 index 0000000..1d824f2 --- /dev/null +++ b/src/miniprogram/pages/Detailed/detailed.js @@ -0,0 +1,66 @@ +// pages/Detailed/detailed.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/src/miniprogram/pages/MainTest/MainTest.json b/src/miniprogram/pages/Detailed/detailed.json similarity index 100% rename from src/miniprogram/pages/MainTest/MainTest.json rename to src/miniprogram/pages/Detailed/detailed.json diff --git a/src/miniprogram/pages/Detailed/detailed.wxml b/src/miniprogram/pages/Detailed/detailed.wxml new file mode 100644 index 0000000..3798504 --- /dev/null +++ b/src/miniprogram/pages/Detailed/detailed.wxml @@ -0,0 +1,2 @@ + +pages/Detailed/detailed.wxml diff --git a/src/miniprogram/pages/Detailed/detailed.wxss b/src/miniprogram/pages/Detailed/detailed.wxss new file mode 100644 index 0000000..4e6213b --- /dev/null +++ b/src/miniprogram/pages/Detailed/detailed.wxss @@ -0,0 +1 @@ +/* pages/Detailed/detailed.wxss */ \ No newline at end of file diff --git a/src/miniprogram/pages/Main/main.js b/src/miniprogram/pages/Main/main.js new file mode 100644 index 0000000..4f8f6c0 --- /dev/null +++ b/src/miniprogram/pages/Main/main.js @@ -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 + }); + }, + +}) \ No newline at end of file diff --git a/src/miniprogram/pages/Main/main.json b/src/miniprogram/pages/Main/main.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/src/miniprogram/pages/Main/main.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/src/miniprogram/pages/MainTest/MainTest.wxml b/src/miniprogram/pages/Main/main.wxml similarity index 61% rename from src/miniprogram/pages/MainTest/MainTest.wxml rename to src/miniprogram/pages/Main/main.wxml index 7bdcf20..82a0e12 100644 --- a/src/miniprogram/pages/MainTest/MainTest.wxml +++ b/src/miniprogram/pages/Main/main.wxml @@ -1,20 +1,30 @@ + + + + + + + + + + + + + + + - Recommend - Demand + 教员风采 + 学员情况 + - - - - - - @@ -22,21 +32,25 @@ - - + - + - 标题 + {{item.name}} - 描述信息 + + 电话号码:{{item.phone}} + email:{{item.email}} + 其他信息:null + - - + + + 这里是家教帮平台,再也不用担心孩子的学习了 @@ -76,10 +90,10 @@ - + - + diff --git a/src/miniprogram/pages/MainTest/MainTest.wxss b/src/miniprogram/pages/Main/main.wxss similarity index 98% rename from src/miniprogram/pages/MainTest/MainTest.wxss rename to src/miniprogram/pages/Main/main.wxss index 54011a7..9b03a7e 100644 --- a/src/miniprogram/pages/MainTest/MainTest.wxss +++ b/src/miniprogram/pages/Main/main.wxss @@ -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; /* 添加框线样式 */ diff --git a/src/miniprogram/pages/MainTest/MainTest.js b/src/miniprogram/pages/Order/order.js similarity index 57% rename from src/miniprogram/pages/MainTest/MainTest.js rename to src/miniprogram/pages/Order/order.js index a0def3b..561a5db 100644 --- a/src/miniprogram/pages/MainTest/MainTest.js +++ b/src/miniprogram/pages/Order/order.js @@ -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 - }); - } - }) \ No newline at end of file diff --git a/src/miniprogram/pages/Order/order.json b/src/miniprogram/pages/Order/order.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/src/miniprogram/pages/Order/order.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/src/miniprogram/pages/Order/order.wxml b/src/miniprogram/pages/Order/order.wxml new file mode 100644 index 0000000..1e303ae --- /dev/null +++ b/src/miniprogram/pages/Order/order.wxml @@ -0,0 +1,62 @@ + + + + + 已预约 + 进行中 + 已完成 + + + + + + + + 已预约订单名称 + + + 电话号码:{{item.phone}} + email:{{item.email}} + 其他信息:null + + + + + + + + + + + + + 进行中订单名称 + + + 电话号码:{{item.phone}} + email:{{item.email}} + 其他信息:null + + + + + + + + + + + + + 已完成订单名称 + + + 电话号码:{{item.phone}} + email:{{item.email}} + 其他信息:null + + + + + + \ No newline at end of file diff --git a/src/miniprogram/pages/Order/order.wxss b/src/miniprogram/pages/Order/order.wxss new file mode 100644 index 0000000..61de1bf --- /dev/null +++ b/src/miniprogram/pages/Order/order.wxss @@ -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); +} \ No newline at end of file diff --git a/src/miniprogram/pages/Tprofile/Tprofile.js b/src/miniprogram/pages/Tprofile/Tprofile.js index c9237ef..b7d60c6 100644 --- a/src/miniprogram/pages/Tprofile/Tprofile.js +++ b/src/miniprogram/pages/Tprofile/Tprofile.js @@ -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() { - } + }, + }) \ No newline at end of file diff --git a/src/miniprogram/pages/Tprofile/Tprofile.wxml b/src/miniprogram/pages/Tprofile/Tprofile.wxml index 695c012..e6a88f0 100644 --- a/src/miniprogram/pages/Tprofile/Tprofile.wxml +++ b/src/miniprogram/pages/Tprofile/Tprofile.wxml @@ -1,144 +1,147 @@ - - - 姓名: - - - - 科目: - - - - 时薪: - - - - - - - - - 就读学校: - - - - 年级专业: - - - - - - - 就读学校: - - - - 年级专业: - - - - - - 空闲时间: - - - - 周一 - 周二 - 周三 - 周四 - 周五 - 周六 - 周日 - - - 上午 - - - - - - - - - - - + +
+ + + 姓名: + - - + + 科目: + - - - - - + + 时薪: + - - 中午 - - - - - - - - - - - - - - + + + + 就读学校: + - - + + 年级专业: + - - + + 居住地址: + - - 下午 - - - - - - - - - - - - - - + + + + 空闲时间: + + + + 周一 + 周二 + 周三 + 周四 + 周五 + 周六 + 周日 + + + + 上午 + + + + + + + + + + + + + + + + + + + + + + + + 中午 + + + + + + + + + + + + + + + + + + + + + + + + 下午 + + + + + + + + + + + + + + + + + + + + + + - - + + + + + 教员风采: + - - + + + 风采展示图: + + + + - - + + + + - - - 教员风采: - - - - 风采展示图: - - - - - - - + diff --git a/src/miniprogram/pages/msg/msg.js b/src/miniprogram/pages/msg/msg.js index a4caa02..5d0ef02 100644 --- a/src/miniprogram/pages/msg/msg.js +++ b/src/miniprogram/pages/msg/msg.js @@ -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){ diff --git a/src/miniprogram/pages/msg/msg.wxml b/src/miniprogram/pages/msg/msg.wxml index 0611039..2c98e4a 100644 --- a/src/miniprogram/pages/msg/msg.wxml +++ b/src/miniprogram/pages/msg/msg.wxml @@ -1,25 +1,29 @@ - +
+ 任务标题: - + 任务内容: - + 截止时间: - + - + 附件: - - + + + + +
diff --git a/src/miniprogram/pages/profile/profile.wxml b/src/miniprogram/pages/profile/profile.wxml index 9b1e5d6..c0f63f3 100644 --- a/src/miniprogram/pages/profile/profile.wxml +++ b/src/miniprogram/pages/profile/profile.wxml @@ -1,7 +1,9 @@ - - + + + + diff --git a/src/miniprogram/pages/profile/profile.wxss b/src/miniprogram/pages/profile/profile.wxss index 9bb0adb..92bf1a8 100644 --- a/src/miniprogram/pages/profile/profile.wxss +++ b/src/miniprogram/pages/profile/profile.wxss @@ -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 {