|
|
'use strict';
|
|
|
|
|
|
const serviceAPI = global.yoho.ServiceAPI;
|
|
|
const api = global.yoho.API;
|
|
|
const _ = require('lodash');
|
|
|
const logger = global.yoho.logger;
|
|
|
|
...
|
...
|
@@ -11,10 +9,10 @@ class myCurrencyModel extends global.yoho.BaseModel { |
|
|
}
|
|
|
|
|
|
_yohoCoin(uid) {
|
|
|
return api.get('', {
|
|
|
return this.get({data: {
|
|
|
method: 'app.yoho.yohocoin',
|
|
|
uid: uid
|
|
|
}).then((result) => {
|
|
|
}}).then((result) => {
|
|
|
let data = [];
|
|
|
|
|
|
if (result && result.code === 200) {
|
...
|
...
|
@@ -28,12 +26,18 @@ class myCurrencyModel extends global.yoho.BaseModel { |
|
|
}
|
|
|
|
|
|
bannerData(contentCode) {
|
|
|
|
|
|
return serviceAPI.get('operations/api/v5/resource/get', {
|
|
|
content_code: contentCode
|
|
|
}, {
|
|
|
cache: true
|
|
|
}).then((result) => {
|
|
|
let options = {
|
|
|
url: 'operations/api/v5/resource/get',
|
|
|
data: {
|
|
|
content_code: contentCode
|
|
|
},
|
|
|
param: {
|
|
|
cache: true
|
|
|
},
|
|
|
api: global.yoho.ServiceAPI
|
|
|
};
|
|
|
|
|
|
return this.get(options).then((result) => {
|
|
|
|
|
|
if (result && result.code === 200) {
|
|
|
|
...
|
...
|
@@ -60,12 +64,12 @@ class myCurrencyModel extends global.yoho.BaseModel { |
|
|
}
|
|
|
|
|
|
currencyDetail(uid, page, limit) {
|
|
|
return api.get('', {
|
|
|
return this.get({data: {
|
|
|
method: 'app.yohocoin.lists',
|
|
|
uid: uid,
|
|
|
page: page,
|
|
|
limit: limit
|
|
|
}).then((result) => {
|
|
|
}}).then((result) => {
|
|
|
let data = [];
|
|
|
|
|
|
if (result && result.code === 200) {
|
...
|
...
|
|