|
|
- <template>
- <view class="">
- <uni-nav-bar dark :fixed="true" background-color="#00aaff" :border="false" status-bar title="个人中心" />
- <view class="content">
- <view class="topBox">
- <view class="users">
- <view class="u-top" v-if="userInfo.appletOpenid">
- <image class="img" :src="userInfo.headImage" mode="widthFix"></image>
- <view class="tit">
- {{ userInfo.nickName }}
- </view>
- </view>
- <view class="u-top" v-else>
- <image class="img"
- src="https://img2.baidu.com/it/u=2953585264,744730101&fm=253&fmt=auto&app=138&f=JPEG?w=360&h=360"
- mode="widthFix"></image>
- <view class="tit">
- 登录 / 注册
- </view>
- </view>
- </view>
- </view>
-
- <view class="lists">
- <uni-list>
- <uni-list-item :show-extra-icon="true" :extra-icon="extraIcon1" showArrow title="我的报修" clickable
- @click="clickList" />
- </uni-list>
- </view>
- </view>
- </view>
- </template>
-
- <script>
- import {
- mapState,
- } from 'vuex'
- export default {
- name: 'Center',
- computed: {
- ...mapState(['userInfo']),
- },
- data() {
- return {
- queryParams: {
- pageNo: 1,
- pageSize: 10
- },
- orderList: [],
- extraIcon1: {
- color: '#666666',
- size: '22',
- type: 'auth'
- }
- }
- },
- onShow() {
- if (uni.getStorageSync('token')) {
- this.$store.commit('getUserInfo')
- }
- },
- methods: {
- clickList() {
- uni.navigateTo({
- url: '/pages/repairList/repairList'
- })
- }
- }
- }
- </script>
-
- <style scoped>
- .content {
- background: #F1F5F8;
- min-height: 100vh;
- }
-
- /* 弧形背景 */
- .topBox {
- width: 100%;
- position: relative;
- z-index: 1;
- overflow: hidden;
- padding: 60rpx 20rpx 20rpx;
- box-sizing: border-box;
- }
-
- .topBox::after {
- content: "";
- width: 140%;
- height: 100px;
- position: absolute;
- left: -20%;
- top: 0;
- z-index: -1;
- border-radius: 0 0 30% 50%;
- /* background: #00aaff; */
- }
-
- .txt {
- color: #fff;
- font-size: 30rpx;
- }
-
- .set-right .uni-icons {
- margin-right: 10rpx;
- }
-
- .users {
- display: flex;
- align-items: center;
- margin-top: 0rpx;
- padding: 0rpx 30rpx;
- box-sizing: border-box;
- height: 200rpx;
- background-color: #fff;
- box-shadow: 1px 10rpx 20rpx #ececec;
- border-radius: 12rpx;
- }
-
- .u-top {
- display: flex;
- justify-content: flex-start;
- align-items: center;
- }
-
- .users .u-top .img {
- width: 130rpx;
- height: 130rpx;
- border-radius: 50%;
- margin-right: 20rpx;
- }
-
- .u-top .tit {
- font-size: 30rpx;
- font-weight: 700;
- color: #333;
- }
-
- .u-item {
- text-align: center;
- }
-
- .u-item .u-tit {
- color: #757575;
- font-size: 26rpx;
- margin-top: 10rpx;
- }
-
- .u-item .num {
- color: #000000;
- font-size: 33rpx;
- font-weight: 700;
- }
-
- .bottomBox {
- padding: 20rpx;
- box-sizing: border-box;
- }
-
- .listBox {
- margin: -10rpx auto 0;
- padding: 20rpx;
- box-sizing: border-box;
- border-radius: 20rpx;
- }
- </style>
|