Authored by 邱骏

yohood答题

... ... @@ -382,7 +382,8 @@ class ShoesModel extends global.yoho.BaseModel {
ON U.id = S.user_id
WHERE S.act_id=:actId
group by S.user_id
order by count desc, playTime asc) A, (SELECT @rowNo := 0) B) C`;
order by count desc, playTime asc) A, (SELECT @rowNo := 0) B) C
limit 0, 100`;
let scoreInfo = await mySqlCli.query(strScore, {
... ... @@ -398,10 +399,10 @@ class ShoesModel extends global.yoho.BaseModel {
friendObj.score = scoreInfo[i].count * perScore;
friendObj.rank = scoreInfo[i].rownum;
friendObj.unionid = scoreInfo[i].union_id;
friendObj.userAvatar = scoreInfo[i].user_avatar;
friendObj.userName = scoreInfo[i].user_name;
friendObj.headimgurl = scoreInfo[i].user_avatar;
friendObj.nickname = scoreInfo[i].user_name;
friendObj.playTime = scoreInfo[i].playTime;
friendObj.createTime = parseInt(scoreInfo[i].create_time, 10);
friendObj.createTime = parseInt((new Date()).getTime() / 1000, 10) - parseInt(scoreInfo[i].create_time, 10);
friendList.push(friendObj);
}
... ...