Files
zhxg_app_v1.0/pages/userinfo/userinfo.vue

135 lines
2.2 KiB
Vue
Raw Normal View History

2025-07-16 15:34:34 +08:00
<template>
<!-- 个人资料 -->
<view class="Userinformation">
<view class="list">
<view class="sm-list">
<text>姓名</text>
<text>{{stu_name}}</text>
</view>
<view class="sm-list">
<text>性别</text>
<text>{{gender}}</text>
</view>
<view class="sm-list">
<text>学号</text>
<text>{{stu_no}}</text>
</view>
<!-- <view class="sm-list">
<text>身份证号</text>
<text>{{sfzh}}</text>
</view> -->
<view class="sm-list">
<text>手机号</text>
<text>{{sjh}}</text>
</view>
<view class="sm-list">
<text>学院</text>
<text>{{xy}}</text>
</view>
<view class="sm-list">
<text>专业</text>
<text>{{zy}}</text>
</view>
</view>
</view>
</template>
<script>
import {
getOwnInfo
} from "@/api/person/person.js";
export default {
data() {
return {
reset_pwd: "",
stu_name: "",
gender: "",
stu_no: "",
sfzh: "",
sjh: "",
zy: "",
xy: ""
}
},
mounted() {
this.getUserInfo()
},
methods: {
// 获取个人信息
getUserInfo() {
getOwnInfo().then(res => {
if (res.code == 200) {
this.stu_name = res.data.stuName
this.gender = res.data.gender
this.stu_no = res.data.stuNo
this.studentClass = res.data.className
this.sfzh = res.data.idCard
this.sjh = res.data.stuPhone
this.zy = res.data.majorName
this.xy = res.data.deptName
} else {
}
});
}
}
}
</script>
<style lang="less" scoped>
.Userinformation {
margin-bottom: 10rpx;
.list {
display: flex;
align-items: center;
flex-direction: column;
width: 100%;
.sm-list {
display: flex;
justify-content: space-between;
align-items: center;
width: 722rpx;
height: 100rpx;
border-bottom: 1px solid #EFEFEF;
text:nth-child(1) {
color: #0F0F0F;
}
text:nth-child(2) {
color: #575757;
}
.password {
display: flex;
align-items: center;
justify-content: flex-end;
width: 200rpx;
}
}
}
button {
position: fixed;
bottom: 100rpx;
margin-left: 60rpx;
width: 80%;
border-radius: 50rpx;
color: white;
}
}
</style>