parent
27ee2e6871
commit
cdcc21bc72
@ -1,6 +0,0 @@
|
||||
{
|
||||
"permissions": {
|
||||
"openapi": [
|
||||
]
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
const cloud = require('wx-server-sdk');
|
||||
|
||||
cloud.init({
|
||||
env: cloud.DYNAMIC_CURRENT_ENV
|
||||
});
|
||||
|
||||
// 获取openId云函数入口函数
|
||||
exports.main = async (event, context) => {
|
||||
// 获取基础信息
|
||||
const wxContext = cloud.getWXContext();
|
||||
|
||||
return {
|
||||
openid: wxContext.OPENID,
|
||||
appid: wxContext.APPID,
|
||||
unionid: wxContext.UNIONID,
|
||||
};
|
||||
};
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"name": "getOpenId",
|
||||
"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,6 +0,0 @@
|
||||
{
|
||||
"permissions": {
|
||||
"openapi": [
|
||||
]
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 906 B |
@ -1,70 +0,0 @@
|
||||
// pages/Detailed/detailed.js
|
||||
const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
|
||||
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data:{
|
||||
avatarUrl: defaultAvatarUrl,
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
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({
|
||||
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',
|
||||
})
|
||||
},
|
||||
inputChange(e) {
|
||||
this.setData({
|
||||
inputValue: e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
})
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
<!--pages/Detailed/detailed.wxml-->
|
||||
<view style="background-color: #FFFFFF; margin: 15rpx; border-radius: 25rpx;">
|
||||
<view class="avatar-wrapper">
|
||||
<image class="avatar" src="{{avatarUrl}}"></image>
|
||||
<text>
|
||||
姓名: 老师
|
||||
科目: NULL
|
||||
空闲时间: NULL
|
||||
学历: NULL
|
||||
时薪: NULL
|
||||
</text>
|
||||
</view>
|
||||
|
||||
<view style="margin: 20rpx;">综合评分: 10.0</view>
|
||||
</view>
|
@ -1,15 +0,0 @@
|
||||
/* pages/Detailed/detailed.wxss */
|
||||
.avatar-wrapper {
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
}
|
||||
|
||||
/* 子元素选择器 */
|
||||
.avatar-wrapper > image {
|
||||
height: 100px;
|
||||
width: 100px;
|
||||
border-style: solid;
|
||||
border-color: #000;
|
||||
border-width: 1px;
|
||||
margin: 20px;
|
||||
}
|
Loading…
Reference in new issue