Authored by 邱骏

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

@@ -343,12 +343,13 @@ const shoes = { @@ -343,12 +343,13 @@ const shoes = {
343 343
344 let htmlHead = `<table cellpadding="0" cellspacing="0" border="1" width="100%"> 344 let htmlHead = `<table cellpadding="0" cellspacing="0" border="1" width="100%">
345 <tr style="background-color: #00aeef;"> 345 <tr style="background-color: #00aeef;">
346 - <td width="15%" height="30px">名次</td>  
347 - <td width="15%" height="30px">手机</td>  
348 - <td width="15%" height="30px">昵称</td>  
349 - <td width="15%" height="30px">得分</td>  
350 - <td width="15%" height="30px">时间</td>  
351 - <td width="15%" height="30px">userId</td> 346 + <td width="14%" height="30px">名次</td>
  347 + <td width="14%" height="30px">手机</td>
  348 + <td width="14%" height="30px">昵称</td>
  349 + <td width="14%" height="30px">得分</td>
  350 + <td width="14%" height="30px">时间</td>
  351 + <td width="14%" height="30px">userId</td>
  352 + <td width="14%" height="30px">日期</td>
352 </tr>`; 353 </tr>`;
353 354
354 let innerHtml = ''; 355 let innerHtml = '';
@@ -359,7 +360,8 @@ const shoes = { @@ -359,7 +360,8 @@ const shoes = {
359 <td>${item.nickname}</td> 360 <td>${item.nickname}</td>
360 <td>${item.score}</td> 361 <td>${item.score}</td>
361 <td>${item.playTime / 1000}s</td> 362 <td>${item.playTime / 1000}s</td>
362 - <td>${item.userId}</td></tr>`; 363 + <td>${item.userId}</td>
  364 + <td>${item.createTime}</td></tr>`;
363 }); 365 });
364 366
365 let htmlEnd = '</table>'; 367 let htmlEnd = '</table>';
@@ -507,7 +507,7 @@ class ShoesModel extends global.yoho.BaseModel { @@ -507,7 +507,7 @@ class ShoesModel extends global.yoho.BaseModel {
507 friendObj.headimgurl = scoreInfo[i].user_avatar; 507 friendObj.headimgurl = scoreInfo[i].user_avatar;
508 friendObj.nickname = scoreInfo[i].user_name; 508 friendObj.nickname = scoreInfo[i].user_name;
509 friendObj.playTime = scoreInfo[i].playTime; 509 friendObj.playTime = scoreInfo[i].playTime;
510 - friendObj.createTime = parseInt((new Date()).getTime() / 1000, 10) - parseInt(scoreInfo[i].create_time, 10); 510 + friendObj.createTime = new Date(scoreInfo[i].create_time * 1000).toLocaleString();
511 511
512 // friendObj.unionid = scoreInfo[i].union_id.split('').reverse().join(''); // unionId反过来排列后再输出 512 // friendObj.unionid = scoreInfo[i].union_id.split('').reverse().join(''); // unionId反过来排列后再输出
513 513
@@ -96,7 +96,7 @@ class UserModel extends global.yoho.BaseModel { @@ -96,7 +96,7 @@ class UserModel extends global.yoho.BaseModel {
96 if (findData && findData.length > 0 && !force) { 96 if (findData && findData.length > 0 && !force) {
97 if (findData[0].union_id === union_id) { 97 if (findData[0].union_id === union_id) {
98 return { 98 return {
99 - code: 203, 99 + code: 202,
100 message: '该手机号已存在!', 100 message: '该手机号已存在!',
101 data: findData 101 data: findData
102 }; 102 };
@@ -121,7 +121,7 @@ class UserModel extends global.yoho.BaseModel { @@ -121,7 +121,7 @@ class UserModel extends global.yoho.BaseModel {
121 }; 121 };
122 } else { 122 } else {
123 return { 123 return {
124 - code: 203, 124 + code: 204,
125 message: '您的微信号不存在!', 125 message: '您的微信号不存在!',
126 data: result 126 data: result
127 }; 127 };