You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
129 lines
3.0 KiB
129 lines
3.0 KiB
<template> |
|
<view> |
|
<view class="person_box"> |
|
<image v-if="userInfo.avatar" :src="userInfo.avatar" class="avatar"></image> |
|
<button v-else open-type="chooseAvatar" @chooseavatar="chooseavatar" class="avatar"></button> |
|
<view class="nickname"> |
|
{{userInfo.username}} |
|
</view> |
|
</view> |
|
<view class="cnt-box"> |
|
<view class="title">用户功能</view> |
|
<view class="li_box" @click="returnOrder"> |
|
<view class="li_left"> |
|
<image src="../../../static/image/icon-order.png" style="width: 40rpx; height: 40rpx;margin-right: 13rpx;"></image> |
|
我的订单 |
|
</view> |
|
<image src="../../../static/image/icon-arrow-right.png" style="width: 40rpx; height: 40rpx;"></image> |
|
</view> |
|
<view class="li_box" @click="returnAddress"> |
|
<view class="li_left"> |
|
<image src="../../../static/image/icon-address.png" style="width: 40rpx; height: 40rpx;margin-right: 13rpx;"></image> |
|
收货地址管理 |
|
</view> |
|
<image src="../../../static/image/icon-arrow-right.png" style="width: 40rpx; height: 40rpx;"></image> |
|
</view> |
|
<view class="li_box" @click="returnContact"> |
|
<view class="li_left"> |
|
<image src="../../../static/image/icon-contact.png" style="width: 40rpx; height: 40rpx;margin-right: 13rpx;"></image> |
|
售后服务 |
|
</view> |
|
<image src="../../../static/image/icon-arrow-right.png" style="width: 40rpx; height: 40rpx;"></image> |
|
</view> |
|
</view> |
|
</view> |
|
</template> |
|
|
|
<script> |
|
export default { |
|
data() { |
|
return { |
|
userInfo: { |
|
username: '', |
|
avatar: '' |
|
} |
|
} |
|
}, |
|
onShow() { |
|
let userInfo = uni.getStorageSync('userInfo'); |
|
if (userInfo) { |
|
this.userInfo = JSON.parse(userInfo); |
|
} |
|
}, |
|
methods: { |
|
//获取头像 |
|
chooseavatar() { |
|
const { avatarUrl } = e.detail |
|
this.userInfo.avatar = avatarUrl; |
|
}, |
|
returnOrder(){ |
|
uni.navigateTo({ |
|
url:"/pages/pages_zhentou/order/order" |
|
}) |
|
}, |
|
returnContact(){ |
|
uni.navigateTo({ |
|
url:"/pages/pages_zhentou/contact/contact" |
|
}) |
|
}, |
|
returnAddress(){ |
|
uni.navigateTo({ |
|
url:"/pages/pages_zhentou/myPage/address" |
|
}) |
|
}, |
|
} |
|
} |
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
.person_box{ |
|
display: flex; |
|
align-items: center; |
|
margin: 30rpx; |
|
padding: 30rpx; |
|
background-color: #fff; |
|
border-radius: 30rpx; |
|
.avatar{ |
|
width: 100rpx; |
|
height: 100rpx; |
|
background: #D6D6D6; |
|
border-radius: 20rpx; |
|
margin-right: 30rpx; |
|
} |
|
.nickname{ |
|
color: #333; |
|
font-size: 32rpx; |
|
font-weight: bold; |
|
font-family: PingFang SC-Bold, PingFang SC; |
|
} |
|
} |
|
.cnt-box{ |
|
min-height: calc(100vh - 220rpx - 30rpx); |
|
background-color: #fff; |
|
margin: 0 30rpx; |
|
border-radius: 30rpx; |
|
.title{ |
|
font-size: 28rpx; |
|
font-family: PingFang SC-Bold, PingFang SC; |
|
font-weight: bold; |
|
color: #333333; |
|
line-height: 40rpx; |
|
padding: 30rpx 30rpx 42rpx 30rpx; |
|
} |
|
} |
|
.li_box{ |
|
display: flex; |
|
align-items: center; |
|
justify-content: space-between; |
|
font-size: 26rpx; |
|
font-family: PingFang SC-Bold, PingFang SC; |
|
font-weight: bold; |
|
color: #333333; |
|
line-height: 37rpx; |
|
margin: 0 16rpx 52rpx 30rpx; |
|
.li_left{ |
|
display: flex; |
|
align-items: center; |
|
} |
|
} |
|
</style>
|
|
|