120 lines
2.1 KiB
Vue
120 lines
2.1 KiB
Vue
|
<template>
|
||
|
<view class="my">
|
||
|
<!-- 头像信息 -->
|
||
|
<view class="avater">
|
||
|
<image :src="avater" mode=""></image>
|
||
|
<text style="color: white;">{{name}}</text>
|
||
|
</view>
|
||
|
<!-- 列表 -->
|
||
|
<view class="List">
|
||
|
<view class="ListBox" v-for="(item,index) in ListBox" :key="index" @click="goTopage(item.path)">
|
||
|
<text>{{item.text}}</text>
|
||
|
<uni-icons type="right" size="20" color="#babbbf"></uni-icons>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
avater: require('../../static/Avatar.png'),
|
||
|
name: '',
|
||
|
ListBox: [
|
||
|
// {
|
||
|
// text: "个人信息",
|
||
|
// path: "/pages/userinfo/userinfo"
|
||
|
// },
|
||
|
// {
|
||
|
// text: "住宿记录",
|
||
|
// path: "/pages/record/record"
|
||
|
// },
|
||
|
// {
|
||
|
// text: "我的成绩",
|
||
|
// path: "/pages/achievement/achievement"
|
||
|
// },
|
||
|
// {
|
||
|
// text: "综合素质评分",
|
||
|
// path: "/pages/score/score"
|
||
|
// },
|
||
|
{
|
||
|
text: "退出登录",
|
||
|
path: "/pages/login"
|
||
|
},
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
created() {
|
||
|
this.name = uni.getStorageSync('stuName');
|
||
|
},
|
||
|
methods: {
|
||
|
goTopage(path) {
|
||
|
uni.navigateTo({
|
||
|
url: path
|
||
|
})
|
||
|
},
|
||
|
// nextLogin() {
|
||
|
// uni.navigateTo({
|
||
|
// url: "/pages/Login/Login"
|
||
|
// })
|
||
|
// }
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style lang="less" scoped>
|
||
|
.my {
|
||
|
max-height: 100vh;
|
||
|
background-color: #F5F5F7;
|
||
|
|
||
|
.avater {
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
align-items: center;
|
||
|
width: 100%;
|
||
|
height: 280rpx;
|
||
|
background: url("../../static/top.png");
|
||
|
|
||
|
image {
|
||
|
margin-top: 20rpx;
|
||
|
width: 160rpx;
|
||
|
height: 160rpx;
|
||
|
}
|
||
|
|
||
|
text {
|
||
|
margin-top: 20rpx;
|
||
|
font-size: 40rpx;
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
.List {
|
||
|
width: 100%;
|
||
|
height: 400rpx;
|
||
|
background-color: white;
|
||
|
display: flex;
|
||
|
flex-direction: column;
|
||
|
align-items: center;
|
||
|
|
||
|
.ListBox {
|
||
|
display: flex;
|
||
|
justify-content: space-between;
|
||
|
align-items: center;
|
||
|
width: 100%;
|
||
|
padding: 20px 10px;
|
||
|
border-bottom: 1px solid #EDEDED;
|
||
|
|
||
|
image {
|
||
|
width: 40rpx;
|
||
|
height: 40rpx;
|
||
|
}
|
||
|
|
||
|
text {
|
||
|
font-weight: 500;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</style>
|