Authored by htoooth

trace

... ... @@ -16,7 +16,7 @@ const indexController = require(`${cRoot}/index`);
const commentController = require(`${cRoot}/comment`);
const consultController = require(`${cRoot}/consult`);
// const complaintsController = require(`${cRoot}/complaints`);
//const complaintsController = require(`${cRoot}/complaints`);
const messageController = require(`${cRoot}/message`);
// const returnsController = require(`${cRoot}/returns`);
... ... @@ -43,19 +43,24 @@ const giftController = require(`${cRoot}/gift`);
// 首页
router.get(['/index', '/'], [tabsMiddleware.getHomeNav, tabsMiddleware.getCommonHeader], indexController.index);
router.get(['/index', '/'],
[tabsMiddleware.getHomeNav, tabsMiddleware.getCommonHeader], indexController.index);
// 查看二维码
router.get('/QRcode', [tabsMiddleware.getHomeNav, tabsMiddleware.getCommonHeader], personalController.QRcode);
// 我的评论
router.get('/comment', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], commentController.index);
router.get('/comment',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], commentController.index);
router.post('/comment/saveComment', commentController.saveComment);
router.get('/comment/order', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], commentController.commentList4Order);
router.get('/comment/order',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], commentController.commentList4Order);
// 我的咨询
router.get('/consult', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], consultController.index);
router.get('/consult',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], consultController.index);
// 我的投诉
// router.get('/complaints', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], complaintsController.index);
... ... @@ -63,8 +68,12 @@ router.get('/consult', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNa
// router.post('/complaints/cancel', complaintsController.cancel);
// 我的消息
router.get('/message', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], messageController.index);
router.get('/message/detail', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], messageController.detail);
router.get('/message',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], messageController.index);
router.get('/message/detail',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], messageController.detail);
router.get('/message/del', messageController.delMsg);
router.get('/message/read', messageController.readMsg);
router.get('/message/pickCoupon', messageController.pickCoupon);
... ... @@ -80,13 +89,16 @@ router.get('/message/pickCoupon', messageController.pickCoupon);
// router.get('/index', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], IndexController.index);
/* 我的YOHO币 */
router.get('/currency', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], currencyController.index);
router.get('/currency',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], currencyController.index);
/* 我的红包 */
router.get('/redenvelopes', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], redenvelopesController.index);
router.get('/redenvelopes',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], redenvelopesController.index);
/* 我的VIP */
router.get('/vip', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], vipController.index);
router.get('/vip',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], vipController.index);
/* 我的优惠卷 */
router.get('/coupons', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], couponsController.index);
... ... @@ -99,7 +111,8 @@ router.get('/favorite', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeN
router.get('/favorite/newproduct', favoriteController.newProduct);
// 降价提醒
router.get('/favorite/reduction', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], favoriteController.reduction);
router.get('/favorite/reduction',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], favoriteController.reduction);
// 设置降价提醒
router.get('/favorite/notice', favoriteController.notice);
... ... @@ -131,7 +144,8 @@ router.post('/orders/confirmOrder', ordersController.confirm);
router.post('/orders/cancelOrder', ordersController.cancel);
// 订单详情
router.get('/orders/detail', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], ordersController.detail);
router.get('/orders/detail',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], ordersController.detail);
// 物流信息
router.get('/orders/express', ordersController.express);
... ... @@ -191,31 +205,42 @@ router.get('/bind/renren/callback', bindController.renren.callback);
router.post('/cancelbind/:type', bindController.cancelBind);
// 账号安全
router.get('/account', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.index);
router.get('/account',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.index);
router.get('/account/userpwd', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.userPwd);
router.get('/account/userpwd',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.userPwd);
router.get('/account/email', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.userEmail);
router.get('/account/mobile', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.userMobile);
router.get('/account/mobile',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.userMobile);
router.post('/account/checkverifycode', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.checkVerifyCode);
router.post('/account/checkverifycode',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.checkVerifyCode);
router.post('/account/checkpassword', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.checkPassword);
router.post('/account/checkpassword',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.checkPassword);
router.post('/account/verifypassword', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.verifyPassword);
router.post('/account/verifypassword',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.verifyPassword);
router.post('/account/modifypwd', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.modifyPwd);
router.post('/account/modifypwd',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.modifyPwd);
router.post('/account/sendemail', AccountController.sendEmail);
router.post('/account/checkemail', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.checkEmail);
router.post('/account/checkemail',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.checkEmail);
router.post('/account/modifyemail', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.modifyEmail);
router.post('/account/modifyemail',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.modifyEmail);
router.get('/account/sendemailsuccess', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.sendEmailSuccess);
router.get('/account/sendemailsuccess',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.sendEmailSuccess);
router.get('/account/mailresult', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.mailResult);
router.get('/account/mailresult',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AccountController.mailResult);
router.post('/account/checkmobile', AccountController.checkMobile);
... ... @@ -227,7 +252,8 @@ router.post('/account/modifymobile', AccountController.modifyMobile);
// 地址管理
router.get('/address', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AddressController.index);
router.get('/address',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], AddressController.index);
router.get('/address/area', UserController.getProviceList);
... ... @@ -241,7 +267,8 @@ router.get('/address/defaultAddress', AddressController.defaultAddress);
// 兑换礼品卡
router.get('/gift', [tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], giftController.index);
router.get('/gift',
[tabsMiddleware.getCommonHeader, tabsMiddleware.getHomeNav], giftController.index);
router.post('/gift/exchange', giftController.exchange);
... ...
... ... @@ -1632,7 +1632,7 @@ const recommendAsync = (skn, page, limit) => {
/**
* 处理单个套餐
*/
function handlePackage(pack) {
function handlePackage(pack,index) {
const isPackage = type => type === BUNDLE_PACKAGE;
let bundleInfo = pack.bundleInfo || {};
... ... @@ -1643,6 +1643,7 @@ function handlePackage(pack) {
}
let item = {
index: index,
name: bundleInfo.tabName,
bundleId: bundleInfo.bundleId,
salesPrice: bundleInfo.salesPriceStr,
... ... @@ -1655,8 +1656,9 @@ function handlePackage(pack) {
let skuData = _getSkuDataByProductBaseInfo(value);
return {
id: value.product_id,
skn: value.product_skn,
url: helpers.urlFormat(url.parse(value.product_url).pathname, null, 'item'),
url: helpers.getUrlBySkc(value.product_id),
src: value.default_images,
productName: value.product_name,
productPrice: value.format_sales_price,
... ...
... ... @@ -18,9 +18,8 @@ module.exports = {
domains: {
// test3
singleApi: 'http://api-test3.yohops.com:9999/',
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
// prod
// singleApi: 'http://single.yoho.cn/',
... ... @@ -33,8 +32,8 @@ module.exports = {
// service: 'http://service.gray.yohops.com/',
// dev
api: 'http://dev-api.yohops.com:9999/',
service: 'http://dev-service.yohops.com:9999/',
//api: 'http://dev-api.yohops.com:9999/',
//service: 'http://dev-service.yohops.com:9999/',
imSocket: 'ws://socket.yohobuy.com:10240',
imCs: 'http://im.yohobuy.com/api'
... ...
<div class="pkgDg-header">
<p class="left">优惠套装</p>
<p class="left">{{name}}</p>
<span class="pkg-close close right"><i class="iconfont"></i></span>
</div>
<div class="pkgDg-prodetal">
<div class="pkgDg-prodetal" data-index="{{index}}">
{{#productList}}
<div class="pkg-product clearfix">
<a href="{{url}}" class="pkg-proImg"><img src="{{image2 src w=85 h=109}}" class="pro-img"/></a>
<div class="pkg-product clearfix" data-id="{{id}}" >
<a href="{{url}}" class="pkg-proImg">
<img src="{{image2 src w=85 h=109}}" class="pro-img"/>
</a>
<div class="type-chose">
<div class="chose-color row clearfix">
<span class="title pull-left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;色:</span>
... ... @@ -43,6 +46,7 @@
</div>
{{/productList}}
</div>
<div class="pkgDg-footer clearfix">
<p class="totalMoney left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;计:<em>{{pkgPrice}}</em></p>
<span class="pay-pkg buy-product red-color right" data-bundleid="{{bundleId}}">
... ...
<div class="title-header">
{{# packageList}}
<span class="{{#if_cond @index '==' 0}}active{{/if_cond}}" data-id="package-{{@index}}">{{name}}</span>
<span class="{{#if_cond @index '==' 0}}active{{/if_cond}}" data-index="{{index}}">{{name}}</span>
{{/packageList}}
</div>
<div class="package-list">
{{# packageList}}
<div class="package-pro clearfix {{#if_cond @index '>=' 1}}hide{{/if_cond}}" data-bundleid="{{bundleId}}">
<div class="package-pro clearfix {{#if_cond @index '>=' 1}}hide{{/if_cond}}"
data-bundleid="{{bundleId}}"
data-index="{{index}}">
{{#productList}}
<div class="good-info" data-skn="{{skn}}">
<div class="good-info" data-skn="{{skn}}" data-id="{{id}}">
<div class="good-detail-img">
<a class="good-thumb" href="{{url}}" target="_blank">
<img class="lazy" src="{{image src 100 135}}" style="display: block;">
... ... @@ -17,13 +20,17 @@
<div class="good-detail-text stu-good-detail ">
<a href="{{url}}" target="_blank">{{productName}}</a>
<p class="price ">
<span class="sale-price red-color">
{{productPrice}}
</span>
<span class="sale-price red-color">
{{productPrice}}
</span>
</p>
</div>
</div>
<div class="spliter">{{#if @last}}={{/if}}{{#unless @last}}+{{/unless}}</div>
<div class="spliter">
{{#if @last}}={{/if}}{{#unless @last}}+{{/unless}}
</div>
{{/productList}}
<div class="package-priceList">
<p>销售价:<em class="sale-price">{{salesPrice}}</em></p>
... ...
... ... @@ -1562,12 +1562,36 @@ $(function() {
.siblings().addClass('hide');
pkgData = pkgDataList[$this.index()];
var option = { // eslint-disable-line
PRD_ID: +$('.main').data('id'),
TAB_ID: $this.index() + 1
};
yas.givePoint('YB_GDS_PACKAGE_TAB_C', option);
});
// 详情页套餐区
$('.good-info .good-detail-text > a').dotdotdot({
wrap: 'letter'
});
$('#package').on('click', '.good-info', function() {
var $this = $(this);
var $index = $this.index() + 1;
var thisId = $this.data('id');
var index = $this.closest('.package-pro').data('index') + 1;
var option = { // eslint-disable-line
PRD_ID: +$('.main').data('id'),
PACKAGE_INDEX: $index,
PACKAGE_GOODS: thisId,
PACKAGE_DETAIL: 1,
TAB_ID: index
};
yas.givePoint('YB_GDS_PACKAGE_DT_GOODS_C', option);
});
}
});
... ... @@ -1633,21 +1657,15 @@ $('.package-box').on('click', '#buy-detail', function() {
pkgDialog.$el.on('click', '.pkg-product .pkg-proImg', function() {
var $this = $(this);
var $index = $this.parent('.pkg-product').index() + 1;
var product = pkgDialog.$el.find('.pkgDg-prodetal .pkg-product');
var idArr = [];
product.each(function() {
var $product = $(this);
var goodsId = $product.find('.pkg-proImg').attr('href').split('_')[1];
idArr.push(goodsId);
});
var thisId = $this.parent('.pkg-product').data('id');
var index = $this.closest('.pkgDg-prodetal').data('index') + 1;
var option = { // eslint-disable-line
PRD_ID: +$('.main').data('id'),
PACKAGE_INDEX: $index,
PACKAGE_GOODS: idArr.join(',')
PACKAGE_GOODS: thisId,
PACKAGE_DETAIL: 2,
TAB_ID: index
};
yas.givePoint('YB_GDS_PACKAGE_DT_GOODS_C', option);
... ...