Authored by ccbikai(👎🏻🍜)

Merge branch 'qCloud' of git.yoho.cn:fe/yohobuywap-node into qCloud

... ... @@ -144,7 +144,7 @@ const index = (req, res, next) => {
};
indexModel.getArticle(param).then(result => {
res.render('guang-index', Object.assign(responseData, result));
res.render('guang', Object.assign(responseData, result));
}).catch(next);
};
... ...
... ... @@ -331,7 +331,7 @@ const getDynamicDataByIds = (ids, udid, other) => {
});
}
return serviceAPI.get('guang/api/*/article/getSimpleArticleList', params, {cache: true});
return serviceAPI.get('guang/api/v6/article/getSimpleArticleList', params, {cache: true});
};
/**
... ... @@ -340,7 +340,7 @@ const getDynamicDataByIds = (ids, udid, other) => {
* @returns {Promise.<T>|*}
*/
const getDynamicDataById = (id, uid, udid) => {
return serviceAPI.get('/gateway/guang/api/*/article/getArticlePraiseAndFavor', {
return serviceAPI.get('/gateway/guang/api/v6/article/getArticlePraiseAndFavor', {
id: id,
uid: uid,
udid: udid
... ...
<div class="guang-list-page guang-page yoho-page">
{{# guang}}
<ul id="guang-nav" class="guang-nav clearfix">
{{# navs}}
<li class="guang-nav-item {{#focus}}focus{{/focus}}" data-type={{typeId}}>
{{type}}
</li>
{{/ navs}}
</ul>
<div id="info-list" class="info-list-container">
{{# infos}}
<div class="info-list{{^show}} hide{{/show}}">
{{#if show}}
{{#if ../swiper}}
<div class="swiper-container swiper-cont-{{typeId}}">
<div class="swiper-wrapper swiper-wrap-{{typeId}}">
{{# ../swiper}}
<div class="swiper-slide">
<a href="{{url}}">
<img class="swiper-lazy" data-src="{{img}}">
</a>
<div class="swiper-lazy-preloader"></div>
</div>
{{/ ../swiper}}
</div>
<div class="swiper-pagination swiper-pagi-{{typeId}}"></div>
</div>
{{/if}}
{{/if}}
{{# info}}
{{> info}}
{{/ info}}
</div>
{{/ infos}}
</div>
<div id="load-more-info" class="load-more-info">
<div class="loading status hide">
正在加载...
</div>
<span class="no-more status">没有更多啦</span>
</div>
<input id="gender" type="hidden" value={{gender}}>
{{/ guang}}
</div>
\ No newline at end of file
... ... @@ -29,7 +29,7 @@ exports.index = (req, res, next) => {
indexModel.index(params).then(result => {
if (result) {
res.render('index', Object.assign(result, {
res.render('home', Object.assign(result, {
isLogin: params.uid ? true : false,
module: 'home',
page: 'index',
... ...
... ... @@ -3,17 +3,16 @@
const serviceAPI = global.yoho.ServiceAPI;
const api = global.yoho.API;
const _ = require('lodash');
const camelCase = global.yoho.camelCase;
const logger = global.yoho.logger;
const yohoCoin = (uid) => {
const _yohoCoin = (uid) => {
return api.get('', {
method: 'app.yoho.yohocoin',
uid: uid
}).then((result) => {
if (result && result.code === 200) {
return camelCase(result.data);
return result.data;
} else {
logger.error('youhocoin code no 200');
}
... ... @@ -38,7 +37,7 @@ const bannerData = (contentCode) => {
};
const myCurrency = (uid, contentCode) => {
return Promise.all([yohoCoin(uid), bannerData(contentCode)])
return Promise.all([_yohoCoin(uid), bannerData(contentCode)])
.then((result) => {
return {
... ... @@ -66,9 +65,9 @@ const currencyDetail = (uid, page, limit) => {
});
if (page && page <= total) {
return yohoCoin(uid).then(list => {
return _yohoCoin(uid).then(list => {
if (list.yohocoinNum && list.yohocoinNum !== 0) {
if (list.yohocoin_num && list.yohocoin_num !== 0) {
result.data = _.assign(result.data, {
money: true
});
... ... @@ -94,6 +93,5 @@ const currencyDetail = (uid, page, limit) => {
module.exports = {
myCurrency,
currencyDetail,
bannerData,
yohoCoin
bannerData
};
... ...
... ... @@ -2,7 +2,7 @@
<div class="coin">
{{# yohoCoin}}
<p class="coin-num">
{{yohocoinNum}}
{{yohocoin_num}}
</p>
<p class="info">
<span class="dollar"></span>
... ...
<div class="yoho-coin-page yoho-page">
{{# yohoCoin}}
<p class="coin-num">
<em>{{coinNum}}</em>
<em>{{coin_num}}</em>
有货币
</p>
... ...
... ... @@ -973,26 +973,6 @@ let _getFavorite = (productId, uid) => {
});
};
/**
* 获取默认咨询列表
*/
const _getCommonConsult = () => {
let params = {
method: 'app.consult.common'
};
return api.get('', params, {
code: 200
}).then(result => {
let data = {};
if (result.data) {
data = result.data;
}
return data;
});
};
// let getProductData = (data) => {
// let finalResult;
... ... @@ -1873,17 +1853,6 @@ let _detailDataPkgAsync = (origin, uid, vipLevel, ua) => {
});
};
let _getPromotionInfo = (skn) => {
return api.get('', {
method: 'app.product.promotion',
product_skn: _.toString(skn)
}, {
code: 200,
cache: true
}).then((result) => {
return result && result.data;
});
};
/**
* 获取默认咨询列表
... ...