|
|
|
@ -1,6 +1,7 @@ |
|
|
|
<template> |
|
|
|
<view class="member-scroll"> |
|
|
|
<view class="member-item" v-for="(item, index) in memberList" :key="index"> |
|
|
|
<view v-for="(item2, index2) in memberList" :key="index"></view> |
|
|
|
<text class="member-name">{{ encryptString(item.name) }}</text> |
|
|
|
<text class="member-time">{{ calculateTimeDifference(item.time) }}</text> |
|
|
|
<text class="member-info">购买了{{ item.duration }}个月{{ item.vipName }}</text> |
|
|
|
@ -13,7 +14,8 @@ export default { |
|
|
|
name: "MemberScroll", |
|
|
|
data() { |
|
|
|
return { |
|
|
|
memberList: [] |
|
|
|
memberList: [], |
|
|
|
vipList:['月卡','季卡','年卡'] |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
@ -26,7 +28,7 @@ export default { |
|
|
|
'张三', '李四', '王五', '赵六', '钱七', '孙八', '周九', '吴十', |
|
|
|
'郑十一', '王十二', '陈十三', '杨十四', '朱十五', '秦十六', '许十七', '何十八' |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
const currentDateTime = new Date(); |
|
|
|
|
|
|
|
const memberCount = Math.floor(Math.random() * 6) + 5; // 生成5-10个数据 |
|
|
|
@ -39,7 +41,7 @@ export default { |
|
|
|
name: randomName, |
|
|
|
time: randomDateTime, |
|
|
|
duration: Math.floor(Math.random() * 12) + 1, |
|
|
|
vipName: "全站VIP权益" |
|
|
|
vipName: "月卡" |
|
|
|
}; |
|
|
|
this.memberList.push(member); |
|
|
|
} |
|
|
|
|