上传文件至 'pages/mine'

This commit is contained in:
a 2022-05-07 12:47:40 +08:00
parent cc1c70184f
commit 0635665555
4 changed files with 236 additions and 0 deletions

115
pages/mine/mine.js Normal file
View File

@ -0,0 +1,115 @@
// pages/mine/mine.js
Page({
/**
* 页面的初始数据
*/
data: {
userInfor:"",
name:'',
show:false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
var that =this;
// 判断是否授权
wx.getStorage({key:"data",
success:(res)=>{
console.log(res.data.name)
this.setData({name:res.data.name})
}
})
// 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: `../../timetable/timetable`,
})
}else if(type==1){
wx.navigateTo({
url: `../../chengjiliebiao/chengjiliebiao`,
})
}else if(type==2){
wx.navigateTo({
url: `../../qingjiaxuanqu/qingjiaxuanqu`,
})
}
},
// 跳转到设置
goSetting:function(){
wx.navigateTo({
url: `userSetting`,
})
},
//跳转到授权
goLog:function(){
wx.navigateTo({
url: `../../log/log?type=mine`,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
return{
title:"a",
imageUrl:''
}
}
})

4
pages/mine/mine.json Normal file
View File

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

29
pages/mine/mine.wxml Normal file
View File

@ -0,0 +1,29 @@
<!--pages/mine/mine.wxml-->
<view>
<view class="top">
<view class="bg"><image src="../../../images/2.jpg"></image></view>
<!-- -->
<view class="info">
<image src="../../../images/touxiang.png" class="avatar" style="margin-bottom:5vw;" bindtap="goLog"></image>
<view class="name" style="font-size:4vw;" bindtap="goLog">{{name}}</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 data-type="2" bindtap="house">
<image src="../../../images/options.png"></image>
请假申请
</view>
</view>
</view>

88
pages/mine/mine.wxss Normal file
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;
}