Authored by lijing

个人中心优化

... ... @@ -29,4 +29,4 @@ const index = (req, res, next) => {
module.exports = {
index,
};
\ No newline at end of file
};
... ...
... ... @@ -24,12 +24,35 @@ const getOnlineServiceInfo = (req, res, next) => {
}),
title: '在线客服',
pageFooter: true,
service: result
service: result,
serviceUrl: 'http://chat80.live800.com/live800/chatClient/chatbox.jsp?companyID=493979&configID=123576&jid=9277320930'
});
}).catch(next);
};
const getOnlineServiceDetail = (req, res, next) => {
let cateId = parseInt(req.query.cateInfo, 10);
let title = req.query.cateInfo.substring(req.query.cateInfo.indexOf('_') + 1);
onlineModel.getOnlineServiceDetail(cateId).then((result) => {
res.render('online-service-detail', {
module: 'home',
page: 'online-service',
pageHeader: _.assign(headerModel.setNav({
navTitle: title
}), {
navBtn: false
}),
title: title,
pageFooter: true,
service: result
});
}).catch(next);
};
module.exports = {
getOnlineServiceInfo
getOnlineServiceInfo,
getOnlineServiceDetail
};
... ...
... ... @@ -5,13 +5,13 @@ const api = global.yoho.API;
const couponData = (params) => {
return api.get('', params).then(result => {
if(result && result.data && result.data.info){
for(let item of result.data.info){
if (result && result.data && result.data.info) {
for (let item of result.data.info) {
item.used = ((params.status === '1') ? true : false);
}
return result.data.info;
}
else{
else {
return 0;
}
});
... ...
... ... @@ -11,7 +11,7 @@ const getOnlineServiceInfo = (contentCode) => {
return serviceAPI.get('operations/api/v1/help/getCategory', {
content_code: contentCode
}).then((result) => {
// console.log(result)
if (result && result.code === 200) {
let formData = {
... ... @@ -57,7 +57,17 @@ const getOnlineServiceInfo = (contentCode) => {
});
};
const getOnlineServiceDetail = (cateId) => {
return serviceAPI.get('operations/api/v1/help/getHelp', {
category_id: cateId
}).then((result) => {
return result;
});
};
module.exports = {
getOnlineServiceInfo
getOnlineServiceInfo,
getOnlineServiceDetail
};
... ...
... ... @@ -65,17 +65,8 @@ const saveSuggest = (uid, content, image, suggestType) => {
return serviceAPI.get('suggest/api/v1/suggest/saveSuggest', per);
};
// 图片上传
// const suggestimgUpload = (name) => {
// };
module.exports = {
suggestData,
upAndDown,
saveSuggest
// suggestimgUpload
};
... ...
... ... @@ -91,6 +91,7 @@ router.post('/ajaxDelMes', message.ajaxDelMes);
router.post('/pickCoupon', message.pickCoupon);
// 在线客服
router.get('/onlineService', onlineService.getOnlineServiceInfo);
router.get('/onlineservice', onlineService.getOnlineServiceInfo);
router.get('/onlineservicedetail', onlineService.getOnlineServiceDetail);
module.exports = router;
... ...
<div class="online-service-detail-page yoho-page">
<div class="qa-list">
{{# service}}
{{# data}}
<div class="question-item">
<div class="question">Q:{{title}}</div>
<div class="answer">{{content}}</div>
</div>
{{/ data}}
{{/ service}}
</div>
</div>
\ No newline at end of file
... ...
{{#if this}} {{!-- 剔除值为false的项 --}}
{{#each this}}
{{#this}}
<div class="good-info {{#if @root.saleViplogin}}sale-vip{{/if}}" data-id="{{productSkn}}" data-bp-id="guang_goodList_{{productName}}_false">
<div class="tag-container clearfix">
{{# tags}}
... ... @@ -60,5 +60,5 @@
{{/if}}
</div>
</div>
{{/each}}
{{/this}}
{{/if}}
... ...
... ... @@ -5,7 +5,7 @@ var $ = require('yoho-jquery'),
dialog = require('./dialog');
var $page = $('.massage-page'),
page = 1,
page = 1,
stopLoading = false;
function massageAJAX(page) {
... ...
... ... @@ -7,6 +7,8 @@ var $ = require('yoho-jquery');
var $questionTab = $('.question-tab .tab-item');
require('../common');
$questionTab.on('touchend', function() {
var clickTab = $(this).data('tab');
... ...
... ... @@ -20,6 +20,8 @@ var orderId = $('#order-detail').data('id'),
optHammer,
$createTime = new Date($('.createTime').text() * 1000);
require('../common');
lazyLoad({
try_again_css: 'order-failure'
});
... ...
... ... @@ -22,7 +22,7 @@ var $uploadImgList = $('.upload-img-list'),
uploadImgNum = 0;
require('./jquery.upload');
require('../common');
imgTpl = '{{# imgList}}' +
'<li>' +
... ...