Authored by 邱骏

修改获取用户手机号返回,修改用户排名列表返回

... ... @@ -343,12 +343,13 @@ const shoes = {
let htmlHead = `<table cellpadding="0" cellspacing="0" border="1" width="100%">
<tr style="background-color: #00aeef;">
<td width="15%" height="30px">名次</td>
<td width="15%" height="30px">手机</td>
<td width="15%" height="30px">昵称</td>
<td width="15%" height="30px">得分</td>
<td width="15%" height="30px">时间</td>
<td width="15%" height="30px">userId</td>
<td width="14%" height="30px">名次</td>
<td width="14%" height="30px">手机</td>
<td width="14%" height="30px">昵称</td>
<td width="14%" height="30px">得分</td>
<td width="14%" height="30px">时间</td>
<td width="14%" height="30px">userId</td>
<td width="14%" height="30px">日期</td>
</tr>`;
let innerHtml = '';
... ... @@ -359,7 +360,8 @@ const shoes = {
<td>${item.nickname}</td>
<td>${item.score}</td>
<td>${item.playTime / 1000}s</td>
<td>${item.userId}</td></tr>`;
<td>${item.userId}</td>
<td>${item.createTime}</td></tr>`;
});
let htmlEnd = '</table>';
... ...
... ... @@ -507,7 +507,7 @@ class ShoesModel extends global.yoho.BaseModel {
friendObj.headimgurl = scoreInfo[i].user_avatar;
friendObj.nickname = scoreInfo[i].user_name;
friendObj.playTime = scoreInfo[i].playTime;
friendObj.createTime = parseInt((new Date()).getTime() / 1000, 10) - parseInt(scoreInfo[i].create_time, 10);
friendObj.createTime = new Date(scoreInfo[i].create_time * 1000).toLocaleString();
// friendObj.unionid = scoreInfo[i].union_id.split('').reverse().join(''); // unionId反过来排列后再输出
... ...
... ... @@ -96,7 +96,7 @@ class UserModel extends global.yoho.BaseModel {
if (findData && findData.length > 0 && !force) {
if (findData[0].union_id === union_id) {
return {
code: 203,
code: 202,
message: '该手机号已存在!',
data: findData
};
... ... @@ -121,7 +121,7 @@ class UserModel extends global.yoho.BaseModel {
};
} else {
return {
code: 203,
code: 204,
message: '您的微信号不存在!',
data: result
};
... ...