You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
3.5 KiB
77 lines
3.5 KiB
3 years ago
|
let Configs = {
|
||
|
///名字,由后台定义
|
||
|
name : "英雄榜",
|
||
|
///最后更新时间
|
||
|
lastUpdateTime : 1639967212,
|
||
|
///顶部背景图
|
||
|
image : "../../static/images/mainview/banner_yingxiongbang.png",
|
||
|
}
|
||
|
///tabs标签的定义
|
||
|
let TabList = [
|
||
|
{
|
||
|
name:"合伙人成交榜",
|
||
|
},{
|
||
|
name:"分佣榜",
|
||
|
}
|
||
|
]
|
||
|
|
||
|
///测试用排行榜数据格式 1:合伙人成交榜
|
||
|
let heroListDatasOne = [
|
||
|
{
|
||
|
//排名
|
||
|
rankIndex : 1,
|
||
|
//用户名
|
||
|
name : "花满楼",
|
||
|
//头像地址
|
||
|
headUrl : "https://cdn.uviewui.com/uview/album/1.jpg",
|
||
|
//金额
|
||
|
money : 100000,
|
||
|
|
||
|
rankImage : "../../static/images/mainview/p_1.png",
|
||
|
},
|
||
|
{
//排名
rankIndex : 2,
//用户名
name : "霜降",
//头像地址
headUrl : "https://cdn.uviewui.com/uview/album/2.jpg",
//金额
money : 90000,
rankImage : "../../static/images/mainview/p_2.png",
},
{
//排名
rankIndex : 3,
//用户名
name : "七块田",
//头像地址
headUrl : "https://cdn.uviewui.com/uview/album/3.jpg",
//金额
money : 80000,
rankImage : "../../static/images/mainview/p_3.png",
},
{
//排名
rankIndex : 4,
//用户名
name : "拼多多",
//头像地址
headUrl : "https://cdn.uviewui.com/uview/album/4.jpg",
//金额
money : 70000,
},
{
//排名
rankIndex : 5,
//用户名
name : "淘宝",
//头像地址
headUrl : "https://cdn.uviewui.com/uview/album/5.jpg",
//金额
money : 60000,
},
{
//排名
rankIndex : 6,
//用户名
name : "京东",
//头像地址
headUrl : "https://cdn.uviewui.com/uview/album/6.jpg",
//金额
money : 50000,
}
|
||
|
]
|
||
|
|
||
|
///测试用排行榜数据格式 1:分佣榜
|
||
|
let heroListDatasTwo = [
|
||
|
{
|
||
|
//排名
|
||
|
rankIndex : 1,
|
||
|
//用户名
|
||
|
name : "Uzi",
|
||
|
//头像地址
|
||
|
headUrl : "https://cdn.uviewui.com/uview/album/1.jpg",
|
||
|
//金额
|
||
|
money : 100000,
|
||
|
|
||
|
rankImage : "../../static/images/mainview/p_1.png",
|
||
|
},
|
||
|
{
//排名
rankIndex : 2,
//用户名
name : "jacklove",
//头像地址
headUrl : "https://cdn.uviewui.com/uview/album/2.jpg",
//金额
money : 90000,
rankImage : "../../static/images/mainview/p_2.png",
},
{
//排名
rankIndex : 3,
//用户名
name : "theshy",
//头像地址
headUrl : "https://cdn.uviewui.com/uview/album/3.jpg",
//金额
money : 80000,
rankImage : "../../static/images/mainview/p_3.png",
},
{
//排名
rankIndex : 4,
//用户名
name : "facker",
//头像地址
headUrl : "https://cdn.uviewui.com/uview/album/4.jpg",
//金额
money : 70000,
},
{
//排名
rankIndex : 5,
//用户名
name : "showmaker",
//头像地址
headUrl : "https://cdn.uviewui.com/uview/album/5.jpg",
//金额
money : 60000,
},
{
//排名
rankIndex : 6,
//用户名
name : "京东",
//头像地址
headUrl : "https://cdn.uviewui.com/uview/album/6.jpg",
//金额
money : 50000,
}
|
||
|
]
|
||
|
|
||
|
///格式化显示时间
|
||
|
let formatTime = function(time,format = 'YY.MM.DD hh:mm'){
|
||
|
let date = new Date(time * 1000);
|
||
|
let year = date.getFullYear();
|
||
|
let mouth = date.getMonth() + 1;
|
||
|
let day = date.getDay();
|
||
|
let hour = date.getHours();
|
||
|
let min = date.getMinutes();
|
||
|
//sec = date.getSeconds(),
|
||
|
let preArr = Array.apply(null,Array(10)).map(function(elem,index){
|
||
|
return '0' + index;
|
||
|
});
|
||
|
let newTime = format.replace(/YY/g,year).replace(/MM/g,preArr[mouth] || mouth)
|
||
|
.replace(/DD/g,preArr[day] || day)
|
||
|
.replace(/hh/g,preArr[hour] || hour)
|
||
|
.replace(/mm/g,preArr[min] || min);
|
||
|
return newTime;
|
||
|
}
|
||
|
|
||
|
export default{
|
||
|
Configs,
|
||
|
TabList,
|
||
|
formatTime,
|
||
|
heroListDatasOne,
|
||
|
heroListDatasTwo,
|
||
|
}
|