diff --git a/apps/help/controllers/help.js b/apps/help/controllers/help.js index e8fcd55..f727250 100644 --- a/apps/help/controllers/help.js +++ b/apps/help/controllers/help.js @@ -12,15 +12,15 @@ const helpModel = require('../models/help'); * @param id * @returns {*} */ -/* const getData = (id)=> { - let contentData = helpModel.contentData().content; +const getData = (id)=> { + let contentData = helpModel.contentData().content; - for (var i = 0; i < contentData.length; i++) { - if (contentData[i].id === id) { - return contentData[i] - } - } - };*/ + for (let i = 0; i < contentData.length; i++) { + if (contentData[i].id === id) { + return contentData[i]; + } + } +}; /** * 根据id获取当前所在位置,拼接面包屑 @@ -57,48 +57,27 @@ const getNav = (id)=> { /** * 主界面 */ -const index = (req, res, next) => { - let id = req.query.id || '11'; - - helpModel.getHelpDetail('81', 1, 15, '').then(result=> { - let content = {content: result.helpdetail_list[0].content}; - let data = Object.assign(content, helpModel.menuData()); - let nav = [ - { - link: global.yoho.config.sitUrl, - name: 'YOHO!BLK首页' - }, - { - name: '帮助中心' - } - ]; - - if (!(typeof (getNav(id)) === 'undefined')) { - nav = nav.concat(getNav(id)); +const index = (req, res) => { + let id = req.query.id || '1'; + let data = Object.assign(getData(id), helpModel.menuData()); + let nav = [ + { + link: global.yoho.config.sitUrl, + name: 'YOHO!BLK首页' + }, + { + name: '帮助中心' } - res.display('detail', { - module: 'help', - page: 'help', - content: Object.assign({nav}, data) - }); - }).catch(next); + ]; - /* let data = Object.assign(getData(id), helpModel.menuData()); - let nav = [ - { - link: global.yoho.config.sitUrl, - name: 'YOHO!BLK首页' - }, - { - name: '帮助中心' - } - ]; - nav = nav.concat(getNav(id)); - res.display('detail', { - module: 'help', - page: 'help', - content: Object.assign({nav}, data) - });*/ + if (!(typeof (getNav(id)) === 'undefined')) { + nav = nav.concat(getNav(id)); + } + res.display('detail', { + module: 'help', + page: 'help', + content: Object.assign({nav}, data) + }); }; diff --git a/apps/help/models/help.js b/apps/help/models/help.js index 37fbbbe..fcf5e93 100644 --- a/apps/help/models/help.js +++ b/apps/help/models/help.js @@ -6,8 +6,6 @@ 'use strict'; -const api = global.yoho.API; - /** * 分类数据 * @returns {{}} @@ -72,41 +70,39 @@ const contentData = ()=> { return { content: [ { - id: '11', - content: '<h1>你好</h1><p>测试11</p>' + id: '1', + content: '<h1>购物指南</h1>' + }, + { + id: '2', + content: '<h1>支付方式</p>' }, { - id: '12', - content: '<h1>你好</h1><p>测试12</p>' + id: '31', + content: '<h1>配送方式-配送时间与范围</p>' }, { - id: '13', - content: '<h1>你好</h1><p>测试13</p>' + id: '32', + content: '<h1>配送方式-商品验收与签收</p>' + }, + + { + id: '41', + content: '<h1>售后服务-投诉与建议</p>' + }, + { + id: '42', + content: '<h1>售后服务-退换货流程</p>' + }, + { + id: '43', + content: '<h1>售后服务-退换货政策</p>' } ] }; }; -/** - * 查看问题详情 - * @param cateId - * @param page - * @param limit - * @param problem - */ -const getHelpDetail = (cateId, page, limit, problem)=> { - return api.get('', { - method: 'web.help.getHelpDetailList', - category_id: cateId, - page: page, - limit: limit, - problem: problem - }).then(result => result.data); -}; - - module.exports = { menuData, - contentData, - getHelpDetail + contentData }; diff --git a/apps/me/controllers/account.js b/apps/me/controllers/account.js index 171e517..adfed6e 100644 --- a/apps/me/controllers/account.js +++ b/apps/me/controllers/account.js @@ -31,7 +31,7 @@ const changePwd = (req, res, next) => { const checkVerifyMobile = (req, res, next)=> { let uid = req.user.uid; let mobile = req.body.mobile; - let area = req.body.area; + let area = req.body.area || '86'; accountModel.checkVerifyMobile(uid, mobile, area).then(result=> { res.send(result); @@ -47,7 +47,7 @@ const checkVerifyMobile = (req, res, next)=> { const sendMobileMsg = (req, res, next)=> { let uid = req.user.uid; let mobile = req.body.mobile; - let area = req.body.area || '+86'; + let area = req.body.area || '86'; accountModel.sendMobileMsg(uid, mobile, area).then(result=> { res.send(result); @@ -64,7 +64,7 @@ const sendMobileMsg = (req, res, next)=> { const checkVerifyMsg = (req, res, next)=> { let code = req.body.code; let mobile = req.body.mobile; - let area = req.body.area || '+86'; + let area = req.body.area || '86'; accountModel.checkVerifyMsg(code, mobile, area).then(result=> { res.send(result); diff --git a/apps/me/controllers/order.js b/apps/me/controllers/order.js index 287c4a4..47eb9f8 100644 --- a/apps/me/controllers/order.js +++ b/apps/me/controllers/order.js @@ -58,7 +58,7 @@ const getOrderList = (req, res) => { page: 'order', isMe: true, orderList: result.order.orderList, - orderData: result.order + orderData: result.order.orderData }); }); }; diff --git a/apps/me/models/order.js b/apps/me/models/order.js index 02c2d83..714283f 100644 --- a/apps/me/models/order.js +++ b/apps/me/models/order.js @@ -39,12 +39,12 @@ const btnMap = { classStr: 'btn red pay-btn mr' }, { - name: '修改订单', - classStr: 'btn white edit-btn mr' - }, - { name: '取消订单', classStr: 'btn white cancel-btn' + }, + { + name: '修改订单', + classStr: 'btn white edit-btn mr' } ], cancel: [ @@ -466,7 +466,7 @@ const getOrderData = (uid, type, page) => { } : false; return { - order: Object.assign(order, paginationOpts, empty) + order: Object.assign(order, paginationOpts, {orderData: empty}) }; }); }; diff --git a/apps/me/views/action/index.hbs b/apps/me/views/action/index.hbs index a78eeec..ba93f74 100644 --- a/apps/me/views/action/index.hbs +++ b/apps/me/views/action/index.hbs @@ -85,7 +85,7 @@ {{!-- 在线客服和返回顶部 --}} <div class="service-top"> - <a class="service" href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409" target="_blank"> + <a class="service" href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=703953&configID=149819&jid=1099911094" target="_blank"> <span class="iconfont"></span> <span class="hover-text hide">在线<br>客服</span> </a> diff --git a/apps/me/views/partial/exchange-detail.hbs b/apps/me/views/partial/exchange-detail.hbs index c8c5c46..4d30b02 100644 --- a/apps/me/views/partial/exchange-detail.hbs +++ b/apps/me/views/partial/exchange-detail.hbs @@ -30,7 +30,7 @@ <div class="way"> {{#if takeGoods}} - <p class="contact">我们会尽快将您的商品发出,请耐心等待,如有疑问,请联系<a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409"><span class="iconfont"></span></a>在线客服</p> + <p class="contact">我们会尽快将您的商品发出,请耐心等待,如有疑问,请联系<a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=703953&configID=149819&jid=1099911094"><span class="iconfont"></span></a>在线客服</p> {{/if}} {{#if reminder}} diff --git a/apps/me/views/partial/refund-detail.hbs b/apps/me/views/partial/refund-detail.hbs index f80b25e..6cdca9d 100644 --- a/apps/me/views/partial/refund-detail.hbs +++ b/apps/me/views/partial/refund-detail.hbs @@ -1,5 +1,6 @@ {{# refundDetail}} <div class="refund-datail-wrap" data-id="{{id}}"> + <a href="/help?id=43" class="refund-notice">退货须知</a> {{> returns/returns-status}} {{# orderReview}} @@ -36,7 +37,7 @@ </p> <p> 我们会在入库后的1-3个工作日内处理您的退款,如有疑问,请联系 - <a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409" class="online-service" target="_blank"> + <a href="http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=703953&configID=149819&jid=1099911094" class="online-service" target="_blank"> <span class="iconfont blue"></span> <span class="blue">在线客服</span> </a> diff --git a/apps/shopping/models/order.js b/apps/shopping/models/order.js index eb6b0b4..0733029 100644 --- a/apps/shopping/models/order.js +++ b/apps/shopping/models/order.js @@ -105,7 +105,7 @@ const _computeApi = (uid, deliveryWay, paymentType, yohoCoin) => api.get('', { */ const compute = (uid, yohoCoin) => { // 目前仅支持普通快递和在线支付 - let deliveryWay = 1; + let deliveryWay = 2; let paymentType = 1; let coin; diff --git a/config/common.js b/config/common.js index df0f0c8..8eeae73 100644 --- a/config/common.js +++ b/config/common.js @@ -22,8 +22,8 @@ module.exports = { }, cookieDomain: 'yohobuy.com', domains: { - api: 'http://testapi.yoho.cn:28078/', // devapi.yoho.cn:58078 testapi.yoho.cn:28078 devapi.yoho.cn:58078 - service: 'http://testservice.yoho.cn:28077/', // testservice.yoho.cn:28077 devservice.yoho.cn:58077 + api: 'http://devapi.yoho.cn:58078/', // devapi.yoho.cn:58078 testapi.yoho.cn:28078 devapi.yoho.cn:58078 + service: 'http://devservice.yoho.cn:58077/', // testservice.yoho.cn:28077 devservice.yoho.cn:58077 search: 'http://192.168.102.216:8080/yohosearch/' }, useOneapm: false, diff --git a/public/img/me/setting/default-head.png b/public/img/me/setting/default-head.png new file mode 100644 index 0000000..0eff423 Binary files /dev/null and b/public/img/me/setting/default-head.png differ diff --git a/public/js/help/help.page.js b/public/js/help/help.page.js index bca7a90..5ab6029 100644 --- a/public/js/help/help.page.js +++ b/public/js/help/help.page.js @@ -23,6 +23,8 @@ $subsets.click(function() { $child.hide(); $this.removeClass('open').children('.plus').css('background-image', 'url(\'../img/help/plus.png\')'); } else { + $('.smll-category').hide(); + $('.subsets').children('.plus').css('background-image', 'url(\'../img/help/plus.png\')'); $child.show(); $this.addClass('open').children('.plus').css('background-image', 'url(\'../img/help/minus.png\')'); } diff --git a/public/js/me/setting/operate.js b/public/js/me/setting/operate.js index 14ea684..a303658 100644 --- a/public/js/me/setting/operate.js +++ b/public/js/me/setting/operate.js @@ -11,6 +11,7 @@ var type = types[types.length - 1];// 界面操作类型 var $imgCaptchaInput = $('#captcha'); var second = 60; var $sms = $('#send-code2');// 发送短信验证码按钮 +var area = $('#country-code').text().substring(0);// 地区码 // 发送短信后倒计时显示 var disableSMSBtn = function() { second -= 1; @@ -55,7 +56,6 @@ $('#region').on('change', function() { // 校验手机号码 $('#real-mobile').blur(function() { var mobile = $(this).val(); - var area = $('#country-code').text(); var self = $('#real-mobile').parent(); if (validatePhoneNumLocal(mobile)) { @@ -85,7 +85,6 @@ $('#real-mobile').blur(function() { // 发送手机验证码 $sms.click(function() { var mobile = $('#real-mobile').val(); - var area = $('#country-code').text(); if ($(this).hasClass('disable')) { return; @@ -115,7 +114,7 @@ $('#mobile-step2').click(function() { var code = $('#msg-code').val(); var mobile = $('#real-mobile').val(); var self = $('#msg-code').parent(); - var area = $('#country-code').text(); + $.ajax({ type: 'POST', diff --git a/public/js/shopping/order/address.js b/public/js/shopping/order/address.js index e12ec45..cdace45 100644 --- a/public/js/shopping/order/address.js +++ b/public/js/shopping/order/address.js @@ -68,7 +68,7 @@ function validateAddress($el) { err: '手机号码不能为空' }, { - regx: /^\d{11}$/, + regx: /^\d{3}(\d|\*){4}\d{4}$/, // 验证正常数字或者**** err: '手机号码格式不正确' } ], diff --git a/public/scss/me/return/_refund-detail.css b/public/scss/me/return/_refund-detail.css index badbf30..ad0bc0b 100644 --- a/public/scss/me/return/_refund-detail.css +++ b/public/scss/me/return/_refund-detail.css @@ -1,5 +1,20 @@ .refund-datail-wrap { font-size: 14px; + position: relative; + + .refund-notice { + width: 70px; + height: 24px; + line-height: 26px; + text-align: center; + font-size: 12px; + border: 1px solid #eee; + display: block; + cursor: pointer; + position: absolute; + top: -64px; + right: 0; + } .top-tip { padding: 40px 0 20px; diff --git a/public/scss/me/setting/_content.css b/public/scss/me/setting/_content.css index 99f8409..e2106eb 100644 --- a/public/scss/me/setting/_content.css +++ b/public/scss/me/setting/_content.css @@ -77,7 +77,7 @@ .show-ico { height: 120px; width: 120px; - background-image: resolve('me/setting/normal-icon.png'); + background-image: resolve('me/setting/default-head.png'); background-repeat: no-repeat; background-size: 120px 120px; }