123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- <template>
- <view class="content">
- <view class="top">
- <image :src="avatar" mode="widthFix"></image>
- <view class="detail">
- <text class="name">{{nick}}</text>
- <text class="motto">心若冰清,天塌不惊。万变犹定,神怡气清。</text>
- </view>
- </view>
- <view class="middle">
- <view class="item">
- <text>用户ID</text>
- <text>{{id}}</text>
- </view>
- <view class="item">
- <text>账号</text>
- <text>{{account}}</text>
- </view>
- <view class="item">
- <text>姓名</text>
- <text>{{name}}</text>
- </view>
- <view class="item">
- <text>电话</text>
- <text>{{phone||''}}</text>
- </view>
- <view class="item" style="border-bottom:#d9d9d9 solid 0upx">
- <text>邮箱</text>
- <text>{{email||''}}</text>
- </view>
- </view>
- <view class="bottom" @click="exit">
- <text>退出登录</text>
- </view>
- </view>
- </template>
- <script>
- import auth from "../../utils/js/auth.js"
- export default {
- data() {
- return {
- id:'',
- name:'',
- account:'',
- nick:'',
- avatar:'',
- phone:'',
- email:''
- }
- },
- onLoad() {
- this.id=auth.getId()
- this.name=auth.getName()
- this.account=auth.getAccount()
- this.nick=auth.getNick()
- this.avatar=auth.getAvatar()
- this.phone=auth.getPhone()
- this.email=auth.getEmail()
- },
- methods: {
- exit() {
- uni.removeStorageSync("token")
- uni.reLaunch({
- url: "../login/login"
- })
- }
- }
- }
- </script>
- <style>
- page {
- height: 100vh;
- }
- .content {
- width: 100vw;
- height: 100vh;
- background-color: #e7e7e7;
- }
- .top {
- height: 250upx;
- display: flex;
- align-items: center;
- background-color: white;
- }
- .top image {
- width: 200upx;
- margin-left: 30upx;
- }
- .top .detail {
- height: 200upx;
- margin-left: 50upx;
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
- .top .name {
- color: #0055FF;
- font-family: 华文彩云;
- height: 50upx;
- line-height: 50upx;
- font-size: 50upx;
- }
- .top .motto {
- color: #0055FF;
- font-family: 楷体;
- height: 50upx;
- line-height: 50upx;
- font-size: 20upx;
- }
- .middle {
- margin-top: 20upx;
- background-color: white;
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .item {
- height: 100upx;
- width: 90%;
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: #d9d9d9 solid 1upx;
- }
- .bottom {
- height: 100upx;
- margin-top: 20upx;
- background-color: white;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- }
- </style>
|