...
|
...
|
@@ -155,7 +155,8 @@ class YoLuckService extends global.yoho.BaseModel { |
|
|
} else {
|
|
|
result.push(resFinished);
|
|
|
}
|
|
|
console.log('已参加:', result);
|
|
|
|
|
|
// console.log('已参加:', result);
|
|
|
return result;
|
|
|
} else {
|
|
|
result = await this.api.getList({page, type});
|
...
|
...
|
@@ -175,7 +176,7 @@ class YoLuckService extends global.yoho.BaseModel { |
|
|
}
|
|
|
|
|
|
async _getDetail(actPrizeId, uid) {
|
|
|
console.log('uid', uid);
|
|
|
// console.log('uid', uid);
|
|
|
try {
|
|
|
const result = await this.api.getDetail({actPrizeId, uid});
|
|
|
|
...
|
...
|
@@ -445,6 +446,8 @@ class YoLuckService extends global.yoho.BaseModel { |
|
|
try {
|
|
|
let userInfo = await this.api._getUsreInfo(uid);
|
|
|
|
|
|
console.log('获取抽奖码用户信息:', userInfo);
|
|
|
|
|
|
let userName = _.get(userInfo, 'data.nickname', '');
|
|
|
let userThumb = _.get(userInfo, 'data.head_ico', '');
|
|
|
|
...
|
...
|
@@ -456,6 +459,8 @@ class YoLuckService extends global.yoho.BaseModel { |
|
|
userName
|
|
|
});
|
|
|
|
|
|
console.log('获取抽奖码接口返回:', result);
|
|
|
|
|
|
if (result.code !== 200) {
|
|
|
logger.error(result);
|
|
|
|
...
|
...
|
@@ -487,23 +492,24 @@ class YoLuckService extends global.yoho.BaseModel { |
|
|
let nearAvatar = '//img10.static.yhbimg.com/headimg/2013/11/28/09/01cae078abe5fe320c88cdf4c220212688.gif?imageView/2/w/100/h/100'; // eslint-disable-line
|
|
|
|
|
|
_.forEach(_.get(result, 'data', []), value => {
|
|
|
if (value.prize_code) {
|
|
|
if (value.user_thumb.indexOf('headimg') > 0) {
|
|
|
value.user_thumb = nearAvatar;
|
|
|
if (value.prizeCode) {
|
|
|
if (value.userThumb.indexOf('headimg') > 0) {
|
|
|
value.userThumb = nearAvatar;
|
|
|
} else {
|
|
|
if (value.user_thumb.indexOf('?') > 0) {
|
|
|
value.user_thumb = _.split(value.user_thumb, '?')[0] + '?imageView2/2/w/70/h/70/q/60';
|
|
|
if (value.userThumb.indexOf('?') > 0) {
|
|
|
value.userThumb = _.split(value.userThumb, '?')[0] + '?imageView2/2/w/70/h/70/q/60';
|
|
|
}
|
|
|
nearAvatar = value.user_thumb;
|
|
|
nearAvatar = value.userThumb;
|
|
|
}
|
|
|
|
|
|
codeList.push({
|
|
|
prizeCode: value.prize_code,
|
|
|
userThumb: value.user_thumb
|
|
|
prizeCode: value.prizeCode,
|
|
|
userThumb: value.userThumb
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
console.log('mycode:', codeList);
|
|
|
|
|
|
// console.log('mycode:', codeList);
|
|
|
return codeList;
|
|
|
}
|
|
|
}
|
...
|
...
|
|