Authored by 石坚

edit camelcase

... ... @@ -61,7 +61,25 @@ const index = (req, res, next) => {
beginTime: beginTime
};
}
console.log(JSON.stringify({
module: 'me',
page: 'currency',
isMe: true,
content: {
nav: mcHandler.getMeCrumb('我的有货币'),
navigation: mcHandler.getSideMenu('我的有货币'),
banner: thumb,
currency: true,
tabs: result[0].list.tabs,
title: '我的有货币',
currentYear: new Date().getFullYear(),
data: result[0].list.coinList,
paginationOpts: result[0].list.paginationOpts,
num: result[0].num.data,
selects: result[0].list.selects,
total: result[0].list.total ? result[0].list.total : 0
}
}));
res.display('index', {
module: 'me',
page: 'currency',
... ...
... ... @@ -7,7 +7,6 @@
'use strict';
const _ = require('lodash');
const camelCase = global.yoho.camelCase;
const config = global.yoho.config;
const mcHandler = require('../models/menu-crumb-handler');
const FavoriteData = require('../models/favorite');
... ... @@ -44,7 +43,7 @@ const favorite = {
let thumb = result[1];
if (result[0] && result[0].code === 200 && result[0].data) {
let data = camelCase(result[0].data);
let data = result[0].data;// camelCase(result[0].data);
let retData = {
siteUrl: config.siteUrl
};
... ... @@ -58,7 +57,7 @@ const favorite = {
queryParams: q
};
retData.categoryList = data.categoryList;
retData.categoryList = data.category_list;
retData.categoryList.unshift({
categoryId: '',
... ... @@ -70,7 +69,7 @@ const favorite = {
c.checked = c.categoryId === sort;
});
retData.products = data.productList.filter(p => {
retData.products = data.product_list.filter(p => {
return !sort || sort === p.categoryId;
}).slice((page - 1) * 16, page * 16);
... ... @@ -125,7 +124,7 @@ const favorite = {
let thumb = result[1];
if (result[0] && result[0].code === 200 && result[0].data) {
let data = camelCase(result[0].data);
let data = result[0].data;// camelCase(result[0].data);
let retData = {
siteUrl: config.siteUrl
};
... ... @@ -135,10 +134,10 @@ const favorite = {
page: page,
limit: limit,
total: data.total,
pageTotal: data.pageTotal,
pageTotal: data.page_total,
queryParams: q
};
retData.brandList = data.brandList;
retData.brandList = data.brand_list;
if (retData.brandList) {
_.each(retData.brandList, b => {
... ... @@ -195,15 +194,15 @@ const favorite = {
let thumb = result[1];
if (result[0] && result[0].code === 200 && result[0].data) {
let data = camelCase(result[0].data);
let data = result[0].data;// camelCase(result[0].data);
let retData = {
siteUrl: config.siteUrl,
editorialList: data.data
};
_.forEach(retData.editorialList, function(val) {
val.publishTime = val.publishTime.replace(/年|月/g, '/');
val.publishTime = val.publishTime.replace(/日/g, '');
val.publish_time = val.publish_time.replace(/年|月/g, '/');
val.publish_time = val.publish_time.replace(/日/g, '');
});
... ...
... ... @@ -7,7 +7,6 @@
'use strict';
const api = global.yoho.API;
const camelCase = global.yoho.camelCase;
/**
* 有货币列表数据
... ... @@ -33,7 +32,7 @@ const yohoCoinList = (uid, page, queryType, beginTime) => {
let curPage = 1;
if (result && result.data) {
coinList = camelCase(result.data.coinlist);
coinList = result.data.coinlist;// camelCase(result.data.coinlist);
total = result.data.total;
curPage = result.data.page;
}
... ...
... ... @@ -10,16 +10,16 @@
<div class="check">
{{> icon/checkbox}}
</div>
<div class="brand-info" data-id="{{brandId}}" data-type="{{brandOrShopType}}">
<div class="brand-info" data-id="{{brand_id}}" data-type="{{brandOrShopType}}">
<div class="brand-icon">
<img src="{{image brandIco 145 126}}" alt="" width="145" height="126">
<img src="{{image brand_ico 145 126}}" alt="" width="145" height="126">
</div>
<div class="brand-name">
{{brandName}}
{{brand_name}}
</div>
<div class="tool-area clearfix">
<a class="btn white"
href="/product/shop/{{brandDomain}}{{#if shopId}}?shopId={{shopId}}{{/if}}"
href="/product/shop/{{brand_domain}}{{#if shopId}}?shopId={{shopId}}{{/if}}"
target="_blank">去店铺页</a>
<span class="btn white cancel">取消收藏</span>
</div>
... ... @@ -27,7 +27,7 @@
<div class="brand-products slide-container">
{{#if noNewProduct}}
<p class="no-product-info">
暂无新品, 去<a href="/product/shop/{{brandDomain}}{{#if shopId}}?shopId={{shopId}}{{/if}}" target="_blank">名牌频道</a>看看吧
暂无新品, 去<a href="/product/shop/{{brand_domain}}{{#if shopId}}?shopId={{shopId}}{{/if}}" target="_blank">名牌频道</a>看看吧
</p>
{{^}}
<div class="slide-switch">
... ... @@ -45,7 +45,7 @@
{{#each this}}
{{#if more}}
<div class="goods-more">
<a href="/product/shop/{{../../brandDomain}}{{#if ../../shopId}}?shopId={{../../shopId}}{{/if}}"
<a href="/product/shop/{{../../brand_domain}}{{#if ../../shopId}}?shopId={{../../shopId}}{{/if}}"
target="_blank">
<div class="more-text">MORE</div>
<p>查看更多</p>
... ... @@ -55,11 +55,11 @@
<div class="goods-info">
<a href="{{url}}" target="_blank">
<img class="lazy thumb"
src="{{image defaultImages 148 196}}"
src="{{image default_images 148 196}}"
style="display: block;">
<div class="desc">
<span class="name">{{productName}}</span>
<p class="price">¥{{round salesPrice 2}}</p>
<span class="name">{{product_name}}</span>
<p class="price">¥{{round sales_price 2}}</p>
</div>
</a>
</div>
... ...
... ... @@ -23,9 +23,9 @@
</div>
<div class="editorial-some">
<span class="author">{{author.name}}</span>
<span class="time brown-light">{{publishTime}}</span>
<span>浏览: <b class="brown-light">{{viewsNum}}</b></span>
<span>评论: <b class="brown-light">{{praiseNum}}</b></span>
<span class="time brown-light">{{publish_time}}</span>
<span>浏览: <b class="brown-light">{{views_num}}</b></span>
<span>评论: <b class="brown-light">{{praise_num}}</b></span>
</div>
<p class="summer">
{{intro}}
... ...
... ... @@ -28,7 +28,7 @@
<div class="desc">
<div class="brand-name"><a href="{{https url}}" target="_blank">{{brandName}}</a></div>
<div class="product-name"><a href="{{https url}}" target="_blank">{{productName}}</a></div>
<p class="price">¥{{round salesPrice 2}}</p>
<p class="price">¥{{round sales_price 2}}</p>
</div>
<div class="tool-area clearfix">
... ...
... ... @@ -15,11 +15,11 @@
<link rel="dns-prefetch" href="//static.yohobuy.com">
<link rel="dns-prefetch" href="//img12.static.yhbimg.com">
<link rel="dns-prefetch" href="//img13.static.yhbimg.com">
{{#if devEnv}}
{{#unless devEnv}}
<link rel="stylesheet" href="//localhost:5003/css/index.css">
{{^}}
<link rel="stylesheet" href="//cdn.yoho.cn/yoho-blk/{{version}}/index.css">
{{/if}}
{{/unless}}
</head>
<body>
{{> header}}
... ... @@ -27,13 +27,13 @@
{{{body}}}
{{> footer}}
{{#if devEnv}}
{{#unless devEnv}}
<script src="//localhost:5003/libs.js"></script>
<script src="//localhost:5003/{{module}}.{{page}}.js"></script>
{{^}}
<script src="//cdn.yoho.cn/yoho-blk/{{version}}/libs.js"></script>
<script src="//cdn.yoho.cn/yoho-blk/{{version}}/{{module}}.{{page}}.js"></script>
{{/if}}
{{/unless}}
{{#unless devEnv}}
{{> analysis}}
... ...