show-data.vue
2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<template>
<view class="show-data">
<image class="bg" src="/static/frame.png" mode=""></image>
<view class="show-title">数据展示</view>
<view class="wrap">
<view :class="['data-panel',index == 1?'right':'']" v-for="(item,index) in dataPanelList" :key="index">
<view class="delivery-count">{{item.title}}</view>
<view class="count">
<text>{{item.count}}</text>
<image :src="item.iconurl" mode=""></image>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
dataPanelList: [
{ iconurl: '/static/icon1.png', title: '今日配送数量', count: '20' },
{ iconurl: '/static/icon2.png', title: '累加派送数量', count: '200' }
],
}
},
mounted() {
this.dataPanelList[0].count = uni.getStorageSync('orderData').today_give_num //今天配送数量
this.dataPanelList[1].count = uni.getStorageSync('orderData').total_give_num //累计配送数量
}
}
</script>
<style lang="scss">
.show-data {
position: relative;
.bg {
margin-top: 24rpx;
width: 702rpx;
height: 284rpx;
}
.show-title {
// @include flexCj(center);
font-size: 32rpx;
font-weight: 700;
position: absolute;
padding-left: 28rpx;
top: 24rpx;
left: 0;
width: 225rpx;
height: 72rpx;
line-height: 72rpx;
background: url('/static/show.png') no-repeat;
background-size: contain;
}
.wrap {
@include flexCj();
.data-panel {
@include wrapPadding(314rpx, 24rpx, 22rpx, 18rpx, 20rpx);
position: absolute;
margin-left: 28rpx;
top: 120rpx;
height: 164rpx;
border-radius: 16rpx;
background: #ffffffff;
.delivery-count {
font-size: 28rpx;
}
.count {
@include flexCj();
font-size: 48rpx;
font-weight: bold;
image {
width: 96rpx;
height: 84rpx;
}
}
}
}
.right {
position: absolute;
right: 24rpx;
}
}
</style>