<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
|
|
:src="userInfo.headImage"
|
|
mode=""></image>
|
|
<view class="tit"
|
|
>
|
|
{{ userInfo.nickName }}
|
|
</view>
|
|
</view>
|
|
<view class="u-top" v-else>
|
|
<image
|
|
src="https://img2.baidu.com/it/u=2953585264,744730101&fm=253&fmt=auto&app=138&f=JPEG?w=360&h=360"
|
|
mode=""></image>
|
|
<view class="tit"
|
|
>
|
|
登录 / 注册
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="listBox">
|
|
<view class="lists">
|
|
<uni-section title="我的订单" type="line" titleFontSize="34rpx" style="border-radius: 10rpx;"></uni-section>
|
|
|
|
<view class="order-list">
|
|
<view v-for="(item,index) in 10" :key="index" class="order-item">
|
|
<view class="order-item-top">
|
|
<view class="order-id">420000243620240</view>
|
|
<view class="time">2024-12-12 12:12</view>
|
|
</view>
|
|
<div class="order-item-main">
|
|
<div class="title">付款金额</div>
|
|
<view class="money-detail">
|
|
<view class="unie">¥</view>
|
|
<view class="number">666</view>
|
|
</view>
|
|
</div>
|
|
</view>
|
|
</view>
|
|
|
|
<view v-if="false" class="no-data">
|
|
<image src="@/static/empty/noData.png" mode=""></image>
|
|
</view>
|
|
|
|
</view>
|
|
</view>
|
|
|
|
<showLogin ref="login"></showLogin>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import showLogin from '../../components/showLogin/showLogin.vue'
|
|
import { mapState } from 'vuex'
|
|
export default {
|
|
name : 'Center',
|
|
components : { showLogin },
|
|
computed : {
|
|
...mapState(['userInfo']),
|
|
},
|
|
data() {
|
|
return {}
|
|
},
|
|
onShow(){
|
|
if (!this.$refs.login.checkLogin()) {
|
|
this.$store.commit('getUserInfo')
|
|
}
|
|
},
|
|
methods: {
|
|
|
|
}
|
|
}
|
|
</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 image {
|
|
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;
|
|
}
|
|
|
|
.order-list {
|
|
padding-top: 20rpx;
|
|
}
|
|
|
|
.order-item {
|
|
width: 100%;
|
|
background: white;
|
|
border-radius: 20rpx;
|
|
margin-bottom: 20rpx;
|
|
}
|
|
|
|
.order-item .order-item-top {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
height: 80rpx;
|
|
font-size: 24rpx;
|
|
box-sizing: border-box;
|
|
padding: 0rpx 20rpx;
|
|
}
|
|
|
|
.order-item .order-item-main {
|
|
padding: 60rpx 0rpx;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
|
|
.order-item-main .title {
|
|
color: #5a5a5a;
|
|
}
|
|
|
|
.order-item-main .money-detail {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-top: 20rpx;
|
|
}
|
|
|
|
.money-detail .unit {
|
|
font-size: 34rpx;
|
|
}
|
|
|
|
.money-detail .number {
|
|
font-size: 60rpx;
|
|
}
|
|
|
|
.no-data {
|
|
padding: 30rpx;
|
|
box-sizing: border-box;
|
|
background-color: #fff;
|
|
display: flex;
|
|
justify-content: space-around;
|
|
align-items: center;
|
|
}
|
|
|
|
.o-item {
|
|
width: 25%;
|
|
text-align: center;
|
|
}
|
|
|
|
.o-item image {
|
|
width: 65rpx;
|
|
height: 55rpx;
|
|
}
|
|
|
|
.o-item .tit {
|
|
font-size: 28rpx;
|
|
margin-top: 10rpx;
|
|
}
|
|
|
|
.listBox {
|
|
margin: -10rpx auto 0;
|
|
padding: 20rpx;
|
|
box-sizing: border-box;
|
|
border-radius: 12rpx;
|
|
border-radius: 20rpx;
|
|
}
|
|
</style>
|