123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- <template>
- <view>
- <!-- 等级 -->
- <view class="level d-flex align-items-center justify-content-between">
- <view class="left">
- <view class="curLevel">
- <view class="top d-flex align-items-center">
- <image :src="data.image" mode=""></image>
- <text class="level-name">{{ data.name ? data.name : '默认等级' }}</text>
- </view>
- <view class="progress">
- <u-line-progress :percent="data.diff_growth_percent * 100" :showText="false"
- activeColor="#687B8B" inactiveColor="#ffffff" height="4"
- :showPercent="false"></u-line-progress>
- </view>
- <text class="used">已消费{{ userInfo.total_order_amount }}金额</text>
- </view>
- </view>
- <view class="right d-flex ">
- <view class="item text-center">
- <view class="icon"><text class="iconfont"></text></view>
- <text>消费返券</text>
- </view>
- <view class="item text-center">
- <view class="icon"><text class="iconfont"></text></view>
- <text>新人有礼</text>
- </view>
- <text class="iconfont more"></text>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapGetters,
- mapActions
- } from 'vuex';
- export default {
- name: 'hua-level-bar',
- props: {
- data: {}
- },
- data() {
- return {};
- },
- onLoad() {
- console.log(this.data);
- },
- computed: {
- ...mapGetters(['userInfo'])
- }
- };
- </script>
- <style lang="scss">
- .level {
- width: 100%;
- background: url('https://shop.xianghuaqi.net.cn/images/levelbg.png') no-repeat;
- background-size: 100% 100%;
- margin: 24upx auto;
- padding: 18upx 30upx;
- box-sizing: border-box;
- .left {
- width: 176upx;
- .top {
- image {
- width: 32upx;
- height: 36upx;
- margin-right: 20upx;
- }
- text {
- font-size: 28upx;
- font-weight: bold;
- color: #5d707f;
- }
- }
- .progress {
- // margin: 12upx 0 8upx;
- }
- .used {
- font-size: 20upx;
- color: #5d707f;
- line-height: 1;
- }
- }
- .right {
- position: relative;
- .item {
- margin-left: 80upx;
- }
- .icon {
- width: 52upx;
- height: 52upx;
- background-color: #d7eaf4;
- border-radius: 50%;
- text-align: center;
- line-height: 52upx;
- color: #93a2aa;
- margin: 0 auto;
- .iconfont {
- font-size: 40upx;
- }
- }
- text {
- color: #5d707f;
- font-size: 20upx;
- }
- .more {
- position: relative;
- right: 0;
- top: 0;
- display: block;
- }
- }
- }
- </style>
|