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({
|
Page({
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
|
currentTab: 0,
|
||||||
|
showPopup: false,
|
||||||
|
teacher: {},
|
||||||
|
exist: false
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
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]);
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
changeTab(e) {
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
const index = e.currentTarget.dataset.index;
|
||||||
*/
|
this.setData({
|
||||||
onReady() {
|
currentTab: parseInt(index)
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
onAddButtonTap: function() {
|
||||||
/**
|
this.setData({
|
||||||
* 生命周期函数--监听页面显示
|
showPopup: true
|
||||||
*/
|
});
|
||||||
onShow() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
onBackButtonTap: function() {
|
||||||
/**
|
this.setData({
|
||||||
* 生命周期函数--监听页面隐藏
|
showPopup: false
|
||||||
*/
|
});
|
||||||
onHide() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
handleSubmit: function() {
|
||||||
* 生命周期函数--监听页面卸载
|
// 处理....
|
||||||
*/
|
// 提交成功后隐藏弹窗
|
||||||
onUnload() {
|
this.setData({
|
||||||
|
showPopup: false
|
||||||
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
navToComments: () => {
|
||||||
* 页面相关事件处理函数--监听用户下拉动作
|
wx.navigateTo({
|
||||||
*/
|
url: '/pages/Comments/Comments',
|
||||||
onPullDownRefresh() {
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
inputChange(e) {
|
||||||
/**
|
this.setData({
|
||||||
* 页面上拉触底事件的处理函数
|
inputValue: e.detail.value
|
||||||
*/
|
});
|
||||||
onReachBottom() {
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户点击右上角分享
|
|
||||||
*/
|
|
||||||
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