上传文件至 'pages/teacher'

This commit is contained in:
a 2022-05-09 15:41:10 +08:00
parent cd5abfa5fa
commit f9eada03ab
4 changed files with 212 additions and 0 deletions

94
pages/teacher/teacher.js Normal file
View File

@ -0,0 +1,94 @@
// pages/mine/mine.js
Page({
/**
* 页面的初始数据
*/
data: {
userInfor:"",
show:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that =this;
// 判断是否授权
var userInfor = wx.getStorageSync('userInfor')
// console.log(userInfor)
if (userInfor==''){
}else{
// this.setData({
// userInfor:userInfor,
// show:true
// })
//判断登录是否过期
this.checksession();
}
},
house: function (e) {
var type = e.currentTarget.dataset.type
if(type==0){
wx.navigateTo({
url: `../calender/calender`,
})
}else if(type==1){
wx.navigateTo({
url: `../shenpijiaqi/shenpijiaqi`,
})
}
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return{
title:"a",
imageUrl:''
}
}
})

View File

@ -0,0 +1,4 @@
{
"usingComponents": {},
"navigationBarTitleText": "我的"
}

View File

@ -0,0 +1,26 @@
<!--pages/mine/mine.wxml-->
<view>
<view class="top">
<view class="bg"><image src="../../images/2.jpg"></image></view>
<!-- -->
<view class="info">
<image wx:if="{{!userInfor}}" src="../../images/touxiang.png" class="avatar" style="margin-bottom:5vw;" bindtap="goLog"></image>
<view wx:if="{{!userInfor}}" class="name" style="font-size:4vw;" bindtap="goLog">马老师</view>
</view>
</view>
<view class="bottom">
<!-- <view data-type="5" bindtap="house">
<image src="../../../images/Mine.png"></image>
我的
</view> -->
<view data-type="0" bindtap="house">
<image src="../../images/Collect.png"></image>
课程查询
</view>
<view data-type="1" bindtap="house">
<image src="../../images/fangyuan.png"></image>
请假审批
</view>
</view>
</view>

View File

@ -0,0 +1,88 @@
/* pages/mine/mine.wxss */
page{
/* overflow-y: hidden; */
}
/* 顶部标签 */
.top{
width: 100vw;
height: 63vw;
position: relative;
}
.top .bg>image{
width: 100vw;
height: 63vw;
}
/* 设置 */
.setting{
width: 8vw;
height: 8vw;
position: absolute;
top:3vw;
right:3vw;
z-index: 100;
}
.setting>image{
width:100%;
height: 100%;
}
.info{
width: 100%;
height: 100%;
position: absolute;
left:0;
top:0;
display: flex;
flex-direction:column;
align-items: center;
justify-content: center;
}
.avatar{
width: 21.47vw;
height: 21.47vw;
border-radius: 50%;
box-shadow: 0vw 0.53vw 1.6vw 0vw rgba(0, 0, 0, 0.15);
border: 0.4vw solid #ffffff;
margin-bottom:2.33vw;
margin-top:-6vw;
}
.name{
color:#ffffff;
font-size: 5.87vw;
/* font-weight: bold; */
}
.phone{
color:#ffffff;
font-size: 3.73vw;
margin-top: 1vw;
}
/* 标签 */
.bottom{
width: 92vw;
padding:0 4vw;
transform: translate(0,-8%);
}
.bottom>view{
width:88.13vw;
height: 14.67vw;
background: #ffffff;
box-shadow: 0.6vw 1.04vw 2.27vw 0vw rgba(0, 0, 0, 0.19);
border-radius: 2.67vw;
border: solid 0.16vw #eeeeee;
padding-left: 3.87vw;
display: flex;
align-items: center;
font-size: 4.27vw;
/* font-weight: bold; */
color: #333333;
margin-bottom:4vw;
}
/* .bottom>view:last-child{
margin-top: 4.13vw;
} */
.bottom>view>image{
width: 7.87vw;
height: 7.87vw;
border-radius: 1.6vw;
margin-right: 2.53vw;
}