parent
a37ea6826e
commit
664bde5164
@ -0,0 +1,66 @@
|
||||
// pages/Comments/Comments.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<!--pages/Comments/Comments.wxml-->
|
||||
<view>
|
||||
|
||||
</view>
|
||||
<text>pages/Comments/Comments.wxml</text>
|
@ -0,0 +1 @@
|
||||
/* pages/Comments/Comments.wxss */
|
@ -0,0 +1,3 @@
|
||||
<view class="root">
|
||||
Demand 页面
|
||||
</view>
|
@ -0,0 +1,66 @@
|
||||
// pages/Homework/Homework.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<!--pages/Homework/Homework.wxml-->
|
||||
<text>pages/Homework/Homework.wxml</text>
|
@ -0,0 +1 @@
|
||||
/* pages/Homework/Homework.wxss */
|
@ -0,0 +1,66 @@
|
||||
// pages/Message/Message.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<!--pages/Message/Message.wxml-->
|
||||
<text>pages/Message/Message.wxml</text>
|
@ -0,0 +1 @@
|
||||
/* pages/Message/Message.wxss */
|
@ -0,0 +1,3 @@
|
||||
Page({
|
||||
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
<view>
|
||||
欢迎来到Recomm界面
|
||||
</view>
|
@ -0,0 +1,66 @@
|
||||
// pages/Tprofile/Tprofile.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<!--pages/Tprofile/Tprofile.wxml-->
|
||||
<text>pages/Tprofile/Tprofile.wxml</text>
|
@ -0,0 +1 @@
|
||||
/* pages/Tprofile/Tprofile.wxss */
|
@ -1,10 +0,0 @@
|
||||
Page({
|
||||
data:{
|
||||
hello:'Hi~'
|
||||
},
|
||||
change:function(){
|
||||
this.setData({
|
||||
hello:this.data.hello+'~~',
|
||||
});
|
||||
},
|
||||
});
|
@ -1,16 +0,0 @@
|
||||
<view >
|
||||
<view>
|
||||
<view class="button-wrapper">
|
||||
<button class="custom-button" onclick="goToPageA()">Recommend</button>
|
||||
<button class="custom-button" onclick="goToPageB()">Demand</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="cover">
|
||||
<image src="/images/app.png"class="app"/>
|
||||
</view>
|
||||
|
||||
<view class="title" bind:tap="change">{{hello}}</view>
|
||||
<view class="desc">这里是家教帮平台,再也不用担心孩子的学习了</view>
|
||||
|
||||
</view>
|
@ -1,39 +0,0 @@
|
||||
.button-wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between; /* 将两个按钮分别放置在容器的两端 */
|
||||
}
|
||||
.custom-button {
|
||||
padding: 10px 20px;
|
||||
background-color: #007bff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.custom-button:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
|
||||
.cover{
|
||||
background-color: #f1f1f1;
|
||||
text-align: center;
|
||||
padding: 80rpx;
|
||||
}
|
||||
.app{
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
.title{
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
font-size: 44rpx;
|
||||
margin: 50rpx 32rpx;
|
||||
}
|
||||
.desc{
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
font-size: 44rpx;
|
||||
margin: 50rpx 32rpx;
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
Page({
|
||||
data:{
|
||||
hello:'Hi~'
|
||||
},
|
||||
change:function(){
|
||||
this.setData({
|
||||
hello:this.data.hello+'~~',
|
||||
});
|
||||
},
|
||||
goToPageHom: function() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/Recommend/Recommend',
|
||||
})
|
||||
},
|
||||
goToPageMes: function() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/Demand/Demand',
|
||||
})
|
||||
},
|
||||
});
|
@ -0,0 +1,81 @@
|
||||
<view >
|
||||
<!-- 主页面中展示老师上传的信息 -->
|
||||
<view>
|
||||
<view class="button-wrapper">
|
||||
<button bindtap="goToPageHom">Recommend</button>
|
||||
<button bindtap="goToPageMes">Demand</button>
|
||||
</view>
|
||||
</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>
|
||||
<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="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>
|
||||
|
||||
</view>
|
@ -0,0 +1,137 @@
|
||||
.show_information {
|
||||
width: 90%;
|
||||
margin: 20rpx auto;
|
||||
padding: 20rpx;
|
||||
background-color: #83acc4;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0 2rpx 4rpx rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.search-wrapper {
|
||||
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.1); /* 设置阴影 */
|
||||
padding: 10px; /* 设置内边距 */
|
||||
}
|
||||
|
||||
.search-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #fff; /* 设置背景色 */
|
||||
border-radius: 5px; /* 设置圆角 */
|
||||
padding: 10px; /* 设置内边距 */
|
||||
}
|
||||
|
||||
.search-input {
|
||||
margin-right: 10px;
|
||||
border: none; /* 去掉输入框默认边框 */
|
||||
outline: none; /* 去掉获得焦点时的虚线框 */
|
||||
}
|
||||
|
||||
.search-button {
|
||||
background-color: #838fa3; /* 设置按钮背景色 */
|
||||
color: #fff; /* 设置按钮文字颜色 */
|
||||
border: none; /* 去掉按钮默认边框 */
|
||||
border-radius: 5px; /* 设置按钮圆角 */
|
||||
padding: 1px 0px; /* 设置按钮内边距 */
|
||||
width: 2px;
|
||||
}
|
||||
|
||||
.content-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 50%;
|
||||
height: 200rpx;
|
||||
object-fit: cover;
|
||||
border-radius: 10rpx 0 0 10rpx;
|
||||
border: 2rpx solid #ccc; /* 添加框线样式 */
|
||||
}
|
||||
|
||||
|
||||
.text-container {
|
||||
flex: 1;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.description {
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.button-container {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.button {
|
||||
flex: 1;
|
||||
background-color: #48477c;
|
||||
color: #fff;
|
||||
font-size: 28rpx;
|
||||
padding: 10rpx;
|
||||
border-radius: 5rpx;
|
||||
text-align: center;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.button-wrapper {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
button {
|
||||
background-color: #838fa3;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
padding: 10px 20px;
|
||||
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2); /* 设置阴影 */
|
||||
}
|
||||
|
||||
|
||||
.custom-button {
|
||||
padding: 10px 20px;
|
||||
background-color: #007bff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.custom-button:hover {
|
||||
background-color: #0056b3;
|
||||
}
|
||||
|
||||
.cover{
|
||||
background-color: #f1f1f1;
|
||||
text-align: center;
|
||||
padding: 80rpx;
|
||||
}
|
||||
.app{
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
}
|
||||
.title{
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
font-size: 44rpx;
|
||||
margin: 50rpx 32rpx;
|
||||
}
|
||||
.desc{
|
||||
font-weight: 500;
|
||||
color: #000;
|
||||
font-size: 44rpx;
|
||||
margin: 50rpx 32rpx;
|
||||
}
|
@ -1,359 +0,0 @@
|
||||
|
||||
// var utils = require("../../utils/util.js")
|
||||
// const app = getApp()
|
||||
// const api = require('../../utils/request.js'); //相对路径
|
||||
// Page({
|
||||
|
||||
// /**
|
||||
// * 页面的初始数据
|
||||
// */
|
||||
// data: {
|
||||
// receivebaseInfo:{},
|
||||
// sendAvatar:'',
|
||||
// newsList:[
|
||||
// {
|
||||
// date: "2020.10.19",
|
||||
// message:'哈喽,好久不见',
|
||||
// type: 0
|
||||
// },
|
||||
// {
|
||||
// date: "2020.10.20",
|
||||
// message:'是呀,好久不见',
|
||||
// type: 1
|
||||
// },
|
||||
// {
|
||||
// date: "2020.10.20",
|
||||
// message:'是呀,好久不见',
|
||||
// type: 1
|
||||
// },
|
||||
// ],//消息列表
|
||||
// historyList:[],
|
||||
// input:null,
|
||||
// openid:null,
|
||||
// connectemoji: ["😘","😡","😔","😄","❤"],
|
||||
// emoji_list: ['emoji1i1', 'emoji2i2', 'emoji3i3', 'emoji4i4', 'emoji5i5'],
|
||||
// emotionVisible: false,
|
||||
// inputShowed: false,
|
||||
// scrollTop: 0,
|
||||
// inputBottom: '0px',
|
||||
// receiveMemberId:null,
|
||||
// sendMemberId:null,
|
||||
// scrollid:'scrollid',
|
||||
// scrollHeight:'300px',
|
||||
// // 下拉刷新
|
||||
// triggered:true,
|
||||
// // 历史记录当前页
|
||||
// pageNo: 1,
|
||||
// },
|
||||
|
||||
// /**
|
||||
// * 生命周期函数--监听页面加载
|
||||
// */
|
||||
// onLoad: function (options) {
|
||||
// var receiveMemberId = options.receiveMemberId
|
||||
// var sendMemberId = app.globalData.open_id
|
||||
// var sendAvatar = app.globalData.sendAvatar
|
||||
// var _this = this;
|
||||
// _this.setData({
|
||||
// receiveMemberId,
|
||||
// sendMemberId,
|
||||
// sendAvatar
|
||||
// })
|
||||
// console.log(app.globalData.sendAvatar,'hahha')
|
||||
// // 获取内存中的数据
|
||||
// this.getStorageBaseInfo()
|
||||
// // 设置滚动区域的高度
|
||||
// this.setScrollHeight()
|
||||
// // 获取历史记录
|
||||
// this.getHistory()
|
||||
// // 初始化websocket
|
||||
// this.initWebSocket()
|
||||
// // 页面进入滚动到底部
|
||||
// this.scrollBottom()
|
||||
// },
|
||||
|
||||
// /**
|
||||
// * 生命周期函数--监听页面初次渲染完成
|
||||
// */
|
||||
// onReady: function () {
|
||||
|
||||
// },
|
||||
|
||||
// // websocket初始化
|
||||
// initWebSocket: function(){
|
||||
// var _this = this;
|
||||
// var {receiveMemberId, sendMemberId} = this.data
|
||||
// //建立连接
|
||||
// wx.connectSocket({
|
||||
// url: `ws://10.200.18.18:1818/zxxt/${sendMemberId}/${receiveMemberId}`,//本地
|
||||
// success: function () {
|
||||
// console.log('websocket连接成功~')
|
||||
// },
|
||||
// fail: function () {
|
||||
// console.log('websocket连接失败~')
|
||||
// },
|
||||
// })
|
||||
|
||||
// //连接成功
|
||||
// wx.onSocketOpen(function () {
|
||||
// console.log('onSocketOpen','连接成功,真正的成功');
|
||||
// })
|
||||
|
||||
// // 接收服务器的消息事件
|
||||
// wx.onSocketMessage(function(res){
|
||||
|
||||
// // 接收到的消息{date,message,type} type类型为 1 是对方的消息 为 0 是自己的消息
|
||||
|
||||
// var list = [];
|
||||
// list = _this.data.newsList;
|
||||
// var _data = JSON.parse(res.data);
|
||||
|
||||
// list.push(_data);
|
||||
// console.log(list)
|
||||
// _this.setData({
|
||||
// newsList:list
|
||||
// })
|
||||
// _this.scrollBottom()
|
||||
// },
|
||||
// )
|
||||
|
||||
// // 监听连接关闭
|
||||
// wx.onSocketClose(function(){
|
||||
// console.log('监听 WebSocket 连接关闭事件')
|
||||
// })
|
||||
|
||||
// },
|
||||
|
||||
// // 获取历史记录
|
||||
// getHistory: function(){
|
||||
// var {receiveMemberId, sendMemberId,pageNo} = this.data
|
||||
// var params = {
|
||||
// receiveMemberId,
|
||||
// sendMemberId,
|
||||
// pageNo,
|
||||
// pageSize:5,
|
||||
// }
|
||||
// api.get("/zxxt/chat/msg/list", params, (res) => {
|
||||
// if (res.code == 'success') {
|
||||
// // var historyList = res.data.data
|
||||
// var historyList = [...res.data.data,...this.data.historyList]
|
||||
// if (historyList && historyList.length > 0) {
|
||||
// historyList.forEach(item => {
|
||||
// if (item.send_member_id == sendMemberId) {
|
||||
// item.type = 0
|
||||
// }else {
|
||||
// item.type = 1
|
||||
// }
|
||||
// });
|
||||
// this.setData({
|
||||
// historyList
|
||||
// })
|
||||
// console.log(this.data.historyList,'历史记录数据')
|
||||
// }else {
|
||||
// // 判断是否是第一次进入查看历史记录:是(不显示弹框,不是则显示弹框)
|
||||
// if(this.data.pageNo > 1) {
|
||||
// wx.showToast({
|
||||
// title: "没有更多历史记录了",
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// } else {
|
||||
// if (res.message) {
|
||||
// wx.showToast({
|
||||
// title: res.message,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// }, (res) => {
|
||||
// if (res.message) {
|
||||
// wx.showToast({
|
||||
// title: res.message,
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
|
||||
// // 滚动到底部
|
||||
// scrollBottom:function() {
|
||||
// var {newsList} = this.data
|
||||
// var scrollid = `scrollid${newsList.length - 1}`
|
||||
// this.setData({
|
||||
// scrollid
|
||||
// })
|
||||
// },
|
||||
|
||||
// // 设置滚动区域的高度
|
||||
// setScrollHeight:function(){
|
||||
// const client = wx.getSystemInfoSync().windowHeight // 获取当前窗口的高度
|
||||
// var scrollHeight = (client - 236) + 'px'
|
||||
// this.setData({
|
||||
// scrollHeight
|
||||
// })
|
||||
// },
|
||||
|
||||
// // 获取内存中聊天列表的用户信息
|
||||
// getStorageBaseInfo: function(){
|
||||
// //获取存储信息
|
||||
// wx.getStorage({
|
||||
// key: 'receivebaseInfo',
|
||||
// success: (res)=>{
|
||||
// this.setData({
|
||||
// receivebaseInfo:res.data
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
|
||||
// // 自定义下拉刷新
|
||||
// refresh: function(){
|
||||
// // 下拉的实际操作
|
||||
// var pageNo = this.data.pageNo + 1
|
||||
// this.setData({
|
||||
// pageNo
|
||||
// })
|
||||
// if (this.timer) {
|
||||
// clearTimeout(this.timer)
|
||||
// }
|
||||
// this.timer = setTimeout(()=>{
|
||||
// this.setData({
|
||||
// triggered:false
|
||||
// })
|
||||
// this.getHistory()
|
||||
// },2000)
|
||||
// },
|
||||
|
||||
// /**
|
||||
// * 生命周期函数--监听页面显示
|
||||
// */
|
||||
// onShow: function () {
|
||||
|
||||
// },
|
||||
|
||||
// /**
|
||||
// * 生命周期函数--监听页面隐藏
|
||||
// */
|
||||
// onHide: function () {
|
||||
|
||||
// },
|
||||
|
||||
// /**
|
||||
// * 生命周期函数--监听页面卸载
|
||||
// */
|
||||
// onUnload: function () {
|
||||
|
||||
// },
|
||||
|
||||
// /**
|
||||
// * 页面相关事件处理函数--监听用户下拉动作
|
||||
// */
|
||||
// onPullDownRefresh: function () {
|
||||
|
||||
// },
|
||||
|
||||
// /**
|
||||
// * 页面上拉触底事件的处理函数
|
||||
// */
|
||||
// onReachBottom: function () {
|
||||
|
||||
// },
|
||||
|
||||
// /**
|
||||
// * 用户点击右上角分享
|
||||
// */
|
||||
// onShareAppMessage: function () {
|
||||
|
||||
// },
|
||||
// send :function(){
|
||||
// var _this = this;
|
||||
// if(_this.data.input){
|
||||
// wx.sendSocketMessage({
|
||||
// data: _this.data.input,
|
||||
// success: (res) =>{
|
||||
// console.log(res)
|
||||
// },
|
||||
// fail: (err)=>{
|
||||
// console.log('sendSocketMessage','失败')
|
||||
// }
|
||||
// })
|
||||
// var list = [];
|
||||
// list = this.data.newsList;
|
||||
// var temp = { 'message': _this.data.input, 'date': utils.formatTime(new Date()), type: 0 };
|
||||
// list.push(temp);
|
||||
// this.setData({
|
||||
// newsList:list,
|
||||
// input:null
|
||||
// })
|
||||
|
||||
// this.scrollBottom()
|
||||
// // 表情选择隐藏
|
||||
// this.setData({
|
||||
// emotionVisible:false,
|
||||
// })
|
||||
|
||||
// }
|
||||
|
||||
// // this.bottom()
|
||||
// const client = wx.getSystemInfoSync().windowHeight // 获取当前窗口的高度
|
||||
// console.log(client,'shurugaodu')
|
||||
|
||||
// },
|
||||
// bindChange:function(res){
|
||||
// this.setData({
|
||||
// input: res.detail.value,
|
||||
// })
|
||||
// },
|
||||
// back:function(){
|
||||
// wx.closeSocket();
|
||||
// console.log('连接断开');
|
||||
// },
|
||||
// emotionChange:function(){
|
||||
// this.setData({
|
||||
// emotionVisible:!this.data.emotionVisible
|
||||
// })
|
||||
// },
|
||||
// addemotion:function(e){
|
||||
// console.log(e.currentTarget.dataset.index,"点了设默默")
|
||||
// let {connectemoji,input} = this.data
|
||||
// if (input) {
|
||||
// input = input + connectemoji[e.currentTarget.dataset.index];
|
||||
// }else {
|
||||
// input = connectemoji[e.currentTarget.dataset.index]
|
||||
// }
|
||||
|
||||
// console.log(input,'输入框额值')
|
||||
// this.setData({
|
||||
// input
|
||||
// })
|
||||
// },
|
||||
// // 公共聚焦方法,方法比较笨,但是过度效果平滑流畅
|
||||
// bottom: function() {
|
||||
|
||||
// var that = this;
|
||||
|
||||
// // 获取元素的高度
|
||||
// let query = wx.createSelectorQuery();
|
||||
// query.select('.news').boundingClientRect(rect => {
|
||||
// //获取到元素
|
||||
// let scrollTop = rect.height;
|
||||
// this.setData({
|
||||
// scrollTop
|
||||
// })
|
||||
// }).exec();
|
||||
|
||||
// console.log(this.data.scrollTop,'hahah')
|
||||
|
||||
// wx.pageScrollTo({
|
||||
// // scrollTop: this.data.scrollTop + 30,
|
||||
// scrollTop: 10000,
|
||||
// // duration: 0
|
||||
// })
|
||||
// },
|
||||
// })
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
<view>
|
||||
欢迎来到Homework 界面
|
||||
</view>
|
@ -1,28 +0,0 @@
|
||||
<view class="root">
|
||||
<scroll-view class="sv" scroll-y scroll-into-view="{{toBottom}}">
|
||||
|
||||
<view class="box" wx:for="{{content}}" id="item{{index}}">
|
||||
<view class="item" wx:if="{{item.id == 1}}">
|
||||
<image src="{{mineAvatorSrc}}" class="mineAvatorSrc"></image>
|
||||
<view class="mineTextBox">
|
||||
<text class="mineText">{{item.text}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="item" wx:if="{{item.id == 0}}">
|
||||
<view class="himTextBox">
|
||||
<text class="himText">{{item.text}}</text>
|
||||
</view>
|
||||
<image src="{{himAvatorSrc}}" class="himAvatorSrc"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
|
||||
<view class="sendBar">
|
||||
<input type="text" model:value="{{mess}}" class="input"/>
|
||||
<view class="button" bindtap="sendMess">
|
||||
<text class="buttonText">发送</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
@ -0,0 +1,66 @@
|
||||
// pages/profile/profile_teacher.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -0,0 +1,2 @@
|
||||
<!--pages/profile/profile_teacher.wxml-->
|
||||
<text>pages/profile/profile_teacher.wxml</text>
|
@ -0,0 +1 @@
|
||||
/* pages/profile/profile_teacher.wxss */
|
Loading…
Reference in new issue