12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <template>
- <view class="content">
- <view class="box">
- <p class="z">{{list.stock*1}}</p>
- <p class="c">我的资产</p>
- <view class="left">
- <div></div>
- <p>*资产市值:{{list.stock*list.stock_price}}</p>
- </view>
- </view>
-
- </view>
- </template>
- <script>
- import {getUserInfo} from '@/api/user.js'
- export default {
-
- data() {
- return {
- list: {
- stock:0,
- stock_price:0,
- }
- };
- },
- onShow() {
- this.getUserInfo()
- },
-
- methods: {
- async getUserInfo() {
- const res = await getUserInfo()
- console.log('123', res)
- this.list = res.data
-
- }
- },
-
- };
- </script>
- <style lang="scss">
- .box{
- margin-top: 162rpx;
- margin-left: 30rpx;
- background-image: url("../../static/img/tjr.png");
- width: 690rpx;
- height: 315rpx;
- border-radius: 20rpx;
- overflow: hidden;
- }
- .z{
- margin-top: 99rpx;
- margin-left: 283rpx;
- height: 40rpx;
- font-size: 53rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #6E4019;
- line-height: 40rpx;
- }
- .c {
- margin-top: 25rpx;
- margin-left: 293rpx;
- height: 25rpx;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #6E4019;
- line-height: 40rpx;
- }
- div {
- margin-top: 63rpx;
- margin-left: 43rpx;
- border-bottom: 1px solid #E3C5A8;
- width: 604rpx;
- }
- p{
- margin-left: 56rpx;
- // margin-bottom: 22rpx;
- margin-top: 16rpx;
- height: 25rpx;
- font-size: 26rpx;
- font-family: PingFang SC;
- font-weight: bold;
- color: #6E4019;
- line-height: 40rpx;
- }
- </style>
|