12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- <view class="container">
- <view class="box">
- <image class="img" :src="list.avatar" mode=""></image>
- <p class="nc">{{list.nickname}}</p>
- <p class="tj">我的推荐人</p>
- </view>
- </view>
- </template>
- <script>
- import {getUserInfo} from '@/api/user.js'
- export default {
-
- data() {
- return {
- list: {
- avatar:'',
- nickname:''
- } ,
- }
- },
-
- onShow() {
- this.getUserInfo()
- },
-
- methods: {
- async getUserInfo() {
- const res = await getUserInfo()
- console.log('123', res)
- this.list = res.data
- }
- },
-
- };
- </script>
- <style lang="scss">
- .container{
- width: 690rpx;
- height: 315rpx;
- background-image: url("../../static/img/tjr.png");
- margin-top: 162rpx;
- margin-left: 30rpx;
-
- }
- .img{
- width: 133rpx;
- height: 133rpx;
- margin-top: 42rpx;
- margin-left: 279rpx;
- }
- .nc{
- margin-left: 247rpx;
- margin-top: 25rpx;
- height: 23rpx;
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #6E4019;
- }
- .tj{
- margin-top: 19rpx;
- margin-left: 280rpx;
- height: 25rpx;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #6E4019;
- line-height: 40rpx;
- }
- </style>
|