...
|
...
|
@@ -388,8 +388,12 @@ class YoLuckService extends global.yoho.BaseModel { |
|
|
|
|
|
async getResourceCode(params) {
|
|
|
const result = await this.api._getResourceCode(params);
|
|
|
const url = _.get(result, '[0].data.list[0]', {});
|
|
|
|
|
|
return _.get(result, '[0].data.list[0]', '');
|
|
|
url.width = _.get(result, '[0].data.imageWidth', 0);
|
|
|
url.height = _.get(result, '[0].data.imageHeight', 0);
|
|
|
|
|
|
return url;
|
|
|
}
|
|
|
|
|
|
async getDetailBanner() {
|
...
|
...
|
@@ -398,6 +402,11 @@ class YoLuckService extends global.yoho.BaseModel { |
|
|
contentCode: 'ccc32dbedf164a52b4efa34383878860'
|
|
|
});
|
|
|
|
|
|
if (!result.width) {
|
|
|
result.width = 750;
|
|
|
result.height = 140;
|
|
|
}
|
|
|
|
|
|
return result;
|
|
|
} catch (e) {
|
|
|
return {
|
...
|
...
|
@@ -412,6 +421,11 @@ class YoLuckService extends global.yoho.BaseModel { |
|
|
contentCode: '5a2203f5656fbc9788bd8af70f2823d3'
|
|
|
});
|
|
|
|
|
|
if (!result.width) {
|
|
|
result.width = 750;
|
|
|
result.height = 234;
|
|
|
}
|
|
|
|
|
|
return result;
|
|
|
} catch (e) {
|
|
|
return {
|
...
|
...
|
@@ -424,8 +438,8 @@ class YoLuckService extends global.yoho.BaseModel { |
|
|
try {
|
|
|
let userInfo = await this.api._getUsreInfo(uid);
|
|
|
|
|
|
let userName = userInfo.data.nickname || '';
|
|
|
let userThumb = userInfo.data.head_ico || '';
|
|
|
let userName = _.get(userInfo, 'data.nickname', '');
|
|
|
let userThumb = _.get(userInfo, 'data.head_ico', '');
|
|
|
|
|
|
const result = await this.api.fetchCode({
|
|
|
shareUid,
|
...
|
...
|
|