小程序个人中心页面代码
时间: 2023-09-09 10:10:01 浏览: 29
以下是一个简单的个人中心页面代码示例:
```
<view class="container">
<view class="header">
<image class="avatar" src="{{userInfo.avatarUrl}}"></image>
<text class="nickname">{{userInfo.nickName}}</text>
</view>
<view class="content">
<view class="item">
<text class="label">我的收藏</text>
<text class="value">{{favoriteCount}}</text>
</view>
<view class="item">
<text class="label">我的订单</text>
<text class="value">{{orderCount}}</text>
</view>
<view class="item">
<text class="label">我的地址</text>
<text class="value">{{addressCount}}</text>
</view>
</view>
</view>
```
其中,`userInfo`、`favoriteCount`、`orderCount`、`addressCount` 都是从后台接口获取的数据,可以通过 `wx.request` 等方法获取。样式可以根据自己的需要进行定义。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![doc](https://img-home.csdnimg.cn/images/20210720083327.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![-](https://csdnimg.cn/download_wenku/file_type_column_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)