|
|
const api = global.yoho.API;
|
|
|
const service = global.yoho.ServiceAPI;
|
|
|
const _ = require('lodash');
|
|
|
|
|
|
module.exports = class extends global.yoho.BaseModel {
|
...
|
...
|
@@ -9,11 +7,13 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
|
|
|
// 文字说明
|
|
|
invitionText(uid) {
|
|
|
return api.get('', {
|
|
|
method: 'app.invitecode.my',
|
|
|
uid: uid
|
|
|
}, {
|
|
|
code: 200
|
|
|
return this.get({
|
|
|
data: {
|
|
|
method: 'app.invitecode.my',
|
|
|
uid: uid
|
|
|
},
|
|
|
api: global.yoho.API,
|
|
|
param: {code: 200}
|
|
|
}).then((result) => {
|
|
|
|
|
|
if (result && result.code === 200 && result.data) {
|
...
|
...
|
@@ -27,10 +27,13 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
|
|
|
// 资源位图
|
|
|
resources(contentCode) {
|
|
|
return service.get('operations/api/v5/resource/get', {
|
|
|
content_code: contentCode
|
|
|
}, {
|
|
|
code: 200
|
|
|
return this.get({
|
|
|
url: 'operations/api/v5/resource/get',
|
|
|
data: {
|
|
|
content_code: contentCode
|
|
|
},
|
|
|
api: global.yoho.ServiceAPI,
|
|
|
param: {code: 200}
|
|
|
}).then((result) => {
|
|
|
if (result && result.data) {
|
|
|
|
...
|
...
|
@@ -40,7 +43,7 @@ module.exports = class extends global.yoho.BaseModel { |
|
|
}
|
|
|
|
|
|
invitionData(uid, contentCode) {
|
|
|
return api.all([this.invitionText(uid), this.resources(contentCode)]).then((result) => {
|
|
|
return Promise.all([this.invitionText(uid), this.resources(contentCode)]).then((result) => {
|
|
|
let finaData = {};
|
|
|
|
|
|
finaData = Object.assign(finaData, result[0]);
|
...
|
...
|
|