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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<template>
<div class="activity">
<div>
<div class="inviteContainer">
<img :src="inviteListTitle" class="invite-title"/>
<div class="flex-bt i-title">
<span>受邀好友</span>
<span>购买时间</span>
</div>
<ul class="p-list">
<li v-for="data in inviteList">
<div class="flex-start no-margin">
<img :src="data.avatar"/>
<span>{{data.nickname}}</span>
</div>
<span class="no-margin">{{data.pay_at | formatDate}}</span>
</li>
</ul>
</div>
</div>
</div>
</template>
<script>
import {getInviteListApi} from "../../service/api";
import invite_list_title from '../../assets/activity/invite_list_title.png'
export default {
name: "index",
data(){
return {
inviteListTitle: invite_list_title,
inviteList: []
}
},
filters: {
formatDate(value){
if(value) {
return value.split(' ')[0]
} else {
return ''
}
}
},
mounted(){
this.getInviteList();
},
methods:{
getInviteList(){
let json = {
page: 1,
limit: 100
}
let id=this.$route.query.shopId;
getInviteListApi(json,id).then(res=>{
this.inviteList = res.list
console.log('inviteList', res.list)
});
}
}
}
</script>
<style>
img,video{
max-width: 100%;
}
</style>
<style scoped lang="less">
@import "../../util/public";
@red: #fc4a1b;
@borderRadius: 8px;
.activity {
color: #fff;
background-color: #ffb400;
}
.inviteContainer {
position: relative;
text-align: center;
border-radius: @borderRadius;
padding-top: 10 / 2 * @toVw;
padding-bottom: 38 / 2 * @toVh;
}
.invite-title {
position: relative;
width: 60%;
height: auto;
margin: 20 * @toVw 0;
}
.invite-list {
margin-left: 32 / 2 * @toVw;
margin-right: 32 / 2 * @toVw;
padding: 28 / 2 * @toVh;
border: 1px solid @red;
border-radius: @borderRadius;
.i-title {
font-size: 14px;
margin: 10 * @toVw;
}
.i-num {
font-size: 18px;
}
}
.flex-center {
display: flex;
flex-flow: row nowrap;
justify-content: center;
align-items: center;
}
.flex-start {
display: flex;
flex-flow: row nowrap;
justify-content: flex-start;
align-items: center;
}
.flex-bt {
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
align-items: center;
}
.red{
color: @red;
}
.p-list {
margin: 16*@toVw;
padding: 0;
border: 2px solid #fff;
li {
display: flex;
flex-flow: row nowrap;
justify-content: space-between;
align-items: center;
margin: 0;
padding: 8 * @toVw;
img {
width: 74 / 2 * @toVw;
height: 74 / 2 * @toVw;
border-radius: 50%;
margin-right: 5px;
}
}
}
.no-margin {
margin: 0;
}
</style>