parent
e5f0e9ec2e
commit
28bd0c455e
@ -0,0 +1,6 @@
|
||||
{
|
||||
"permissions": {
|
||||
"openapi": [
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "sendComment",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wx-server-sdk": "~2.6.3"
|
||||
}
|
||||
}
|
@ -1,66 +1,73 @@
|
||||
// pages/Detailed/detailed.js
|
||||
//const that = this;
|
||||
const db = wx.cloud.database().collection("student_Demands");
|
||||
// pages/MainTest/MainTest.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
currentTab: 0,
|
||||
showPopup: false,
|
||||
teacher: {},
|
||||
exist: false
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
var index = options.index; // 第一个页面传递过来的教师索引
|
||||
var teacherInfo = this.data.teacher[index];
|
||||
// 使用索引在教师数组中获取对应的教师信息
|
||||
// var teacherInfo = this.data.teacher[index];
|
||||
// 继续处理教师信息
|
||||
// 调用云函数获取教师信息
|
||||
wx.cloud.callFunction({
|
||||
name: "detailed",
|
||||
success: (res) => {
|
||||
this.setData({
|
||||
teacher: res.result.data
|
||||
})
|
||||
// console.log(this.data.teacher[1]);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
changeTab(e) {
|
||||
const index = e.currentTarget.dataset.index;
|
||||
this.setData({
|
||||
currentTab: parseInt(index)
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
onAddButtonTap: function() {
|
||||
this.setData({
|
||||
showPopup: true
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
onBackButtonTap: function() {
|
||||
this.setData({
|
||||
showPopup: false
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
handleSubmit: function() {
|
||||
// 处理....
|
||||
// 提交成功后隐藏弹窗
|
||||
this.setData({
|
||||
showPopup: false
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
navToComments: () => {
|
||||
wx.navigateTo({
|
||||
url: '/pages/Comments/Comments',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
inputChange(e) {
|
||||
this.setData({
|
||||
inputValue: e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
|
||||
})
|
@ -1 +1,56 @@
|
||||
/* pages/Detailed/detailed.wxss */
|
||||
/* pages/Detailed/detailed.wxss */
|
||||
.container {
|
||||
width: 99%;
|
||||
padding: 20rpx;
|
||||
border-radius: 20rpx;
|
||||
background-color: #8ab3c4;
|
||||
box-shadow: 0 2rpx 6rpx rgba(0, 0, 0, 0.2);
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.input-group {
|
||||
display: flex;
|
||||
/* align-items: center; */
|
||||
justify-content: flex-start;
|
||||
margin-bottom: 10rpx;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.text {
|
||||
width: 80rpx;
|
||||
font-size: 28rpx;
|
||||
text-align: left;
|
||||
}
|
||||
.row {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.cell {
|
||||
flex: 1;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
border: 1rpx solid #ccc;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.header-cell {
|
||||
flex: 1;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
text-align: center;
|
||||
font-size: 24rpx;
|
||||
border: 1rpx solid #ccc;
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
.checkbox-cell {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 24rpx;
|
||||
border: 1rpx solid #ccc;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
Loading…
Reference in new issue