|
|
/**
|
|
|
* 帮助中心首页
|
|
|
* @author: wsl<shuiling.wang@yoho.cn>
|
|
|
* @date: 2016/12/13
|
|
|
*/
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
const api = global.yoho.API;
|
|
|
|
|
|
// 获取热词搜索
|
|
|
const getHotSearch = () => {
|
|
|
return api.get('', {
|
|
|
method: 'app.help.hotSearch',
|
|
|
platformName: 'yohobuy_pc'
|
|
|
}).then(result => {
|
|
|
|
|
|
// return {
|
|
|
// 'alg': 'SALT_MD5',
|
|
|
// 'code': 200,
|
|
|
// 'data':
|
|
|
// [
|
|
|
// {
|
|
|
// 'id': 2,
|
|
|
// 'keyword': '5CM',
|
|
|
// 'link': '5cm',
|
|
|
// 'orderBy': 1
|
|
|
// },
|
|
|
// {
|
|
|
// 'id': 4,
|
|
|
// 'keyword': '有货',
|
|
|
// 'link': 'Yoho',
|
|
|
// 'orderBy': 2
|
|
|
// }
|
|
|
// ],
|
|
|
// 'md5': 'c0dcdb4194c935b41ebd5f9b4329e24f',
|
|
|
// 'message': '操作成功'
|
|
|
// };
|
|
|
|
|
|
return result;
|
|
|
});
|
|
|
};
|
|
|
|
|
|
// 获取首页帮助分类以及常见问题
|
|
|
const gethomeCategoryFaq = () => {
|
|
|
return api.get('', {
|
|
|
method: 'app.help.homeCategoryFaq',
|
|
|
showPlatform: 'yohobuy_pc'
|
|
|
}).then(result => {
|
|
|
|
|
|
// return {
|
|
|
// 'alg': 'SALT_MD5',
|
|
|
// 'code': 200,
|
|
|
// 'data': {
|
|
|
// 'categorys': [
|
|
|
// {
|
|
|
// 'categoryDescription': '新手指南',
|
|
|
// 'categoryIco': '/2016/12/09/17/025c8608fd0b33a283afe595046d67793b.jpg',
|
|
|
// 'categoryItems': [
|
|
|
// {
|
|
|
// 'categoryDescription': '登录注册',
|
|
|
// 'categoryIco': '/2016/12/09/17/025c8608fd0b33a283afe595046d67793b.jpg',
|
|
|
// 'categoryLevel': 2,
|
|
|
// 'categoryName': '登录注册',
|
|
|
// 'id': 10,
|
|
|
// 'orderBy': 1
|
|
|
// },
|
|
|
// {
|
|
|
// 'categoryDescription': '搜索商品',
|
|
|
// 'categoryIco': '/2016/12/09/17/025c8608fd0b33a283afe595046d67793b.jpg',
|
|
|
// 'categoryLevel': 2,
|
|
|
// 'categoryName': '搜索商品',
|
|
|
// 'id': 12,
|
|
|
// 'orderBy': 2
|
|
|
// }
|
|
|
// ],
|
|
|
// 'categoryLevel': 1,
|
|
|
// 'categoryName': '新手指南',
|
|
|
// 'id': 8,
|
|
|
// 'orderBy': 1
|
|
|
// },
|
|
|
// {
|
|
|
// 'categoryDescription': '这是一个公告',
|
|
|
// 'categoryIco': '/2016/12/09/17/025c8608fd0b33a283afe595046d67793b.jpg',
|
|
|
// 'categoryLevel': 1,
|
|
|
// 'categoryName': '公告',
|
|
|
// 'contentItems': [
|
|
|
// {
|
|
|
// 'caption': '差价返还公告',
|
|
|
// 'content': '差价返还公告',
|
|
|
// 'helperType': 1,
|
|
|
// 'id': 8,
|
|
|
// 'orderBy': 1
|
|
|
// },
|
|
|
// {
|
|
|
// 'caption': '警惕网络诈骗公告',
|
|
|
// 'content': '警惕网络诈骗公告',
|
|
|
// 'helperType': 1,
|
|
|
// 'id': 10,
|
|
|
// 'orderBy': 2
|
|
|
// },
|
|
|
// {
|
|
|
// 'caption': '差价返还公告',
|
|
|
// 'content': '差价返还公告1',
|
|
|
// 'helperType': 1,
|
|
|
// 'id': 8,
|
|
|
// 'orderBy': 1
|
|
|
// },
|
|
|
// {
|
|
|
// 'caption': '警惕网络诈骗公告',
|
|
|
// 'content': '警惕网络诈骗公告2',
|
|
|
// 'helperType': 1,
|
|
|
// 'id': 10,
|
|
|
// 'orderBy': 2
|
|
|
// }
|
|
|
// ],
|
|
|
// 'id': 14,
|
|
|
// 'orderBy': 2
|
|
|
// },
|
|
|
// {
|
|
|
// 'categoryDescription': '会员中心',
|
|
|
// 'categoryIco': '/2016/12/09/17/025c8608fd0b33a283afe595046d67793b.jpg',
|
|
|
// 'categoryItems': [
|
|
|
// {
|
|
|
// 'categoryDescription': '账户管理',
|
|
|
// 'categoryIco': '/2016/12/09/17/025c8608fd0b33a283afe595046d67793b.jpg',
|
|
|
// 'categoryLevel': 2,
|
|
|
// 'categoryName': '账户管理',
|
|
|
// 'contentItems': [
|
|
|
// {
|
|
|
// 'caption': '账号管理',
|
|
|
// 'content': '账号如何管理?',
|
|
|
// 'helperType': 1,
|
|
|
// 'id': 12,
|
|
|
// 'orderBy': 1
|
|
|
// },
|
|
|
// {
|
|
|
// 'caption': '账号管理2',
|
|
|
// 'content': '账号还可以这么管理',
|
|
|
// 'helperType': 1,
|
|
|
// 'id': 14,
|
|
|
// 'orderBy': 2
|
|
|
// }
|
|
|
// ],
|
|
|
// 'id': 20,
|
|
|
// 'orderBy': 1
|
|
|
// },
|
|
|
// {
|
|
|
// 'categoryDescription': '密码管理',
|
|
|
// 'categoryIco': '/2016/12/09/17/025c8608fd0b33a283afe595046d67793b.jpg',
|
|
|
// 'categoryLevel': 2,
|
|
|
// 'categoryName': '密码管理',
|
|
|
// 'contentItems': [
|
|
|
// {
|
|
|
// 'caption': '密码管理',
|
|
|
// 'content': '密码这么管理',
|
|
|
// 'helperType': 1,
|
|
|
// 'id': 16,
|
|
|
// 'orderBy': 1
|
|
|
// }
|
|
|
// ],
|
|
|
// 'id': 22,
|
|
|
// 'orderBy': 2
|
|
|
// },
|
|
|
// {
|
|
|
// 'categoryDescription': '无图标会员中心',
|
|
|
// 'categoryIco': '',
|
|
|
// 'categoryLevel': 2,
|
|
|
// 'categoryName': '无图标会员中心',
|
|
|
// 'id': 24,
|
|
|
// 'orderBy': 3
|
|
|
// }
|
|
|
// ],
|
|
|
// 'categoryLevel': 1,
|
|
|
// 'categoryName': '会员中心',
|
|
|
// 'id': 18,
|
|
|
// 'orderBy': 3
|
|
|
// }
|
|
|
// ],
|
|
|
// 'faqs': [
|
|
|
// {
|
|
|
// 'caption': '账号帮助',
|
|
|
// 'content': '<p>\r\n\t请上传证件\r\n</p>\r\n<p>\r\n\t<img src="http://img11.static.yhbimg.com/goodsimg/2016/12/09/17/016ae11a9445207acc3a01286f4eeee83e.jpg" alt="" />\r\n</p>',
|
|
|
// 'helperType': 2,
|
|
|
// 'id': 2,
|
|
|
// 'orderBy': 1
|
|
|
// },
|
|
|
// {
|
|
|
// 'caption': '账号管理',
|
|
|
// 'content': '账号如何管理?',
|
|
|
// 'helperType': 1,
|
|
|
// 'id': 12,
|
|
|
// 'orderBy': 1
|
|
|
// },
|
|
|
// {
|
|
|
// 'caption': '密码管理',
|
|
|
// 'content': '密码这么管理',
|
|
|
// 'helperType': 1,
|
|
|
// 'id': 16,
|
|
|
// 'orderBy': 1
|
|
|
// }
|
|
|
// ]
|
|
|
// },
|
|
|
// 'md5': '56e926453c4b165b117bc163610e490b',
|
|
|
// 'message': '操作成功'
|
|
|
// };
|
|
|
|
|
|
return result;
|
|
|
});
|
|
|
};
|
|
|
|
|
|
// 获取自助服务
|
|
|
const getSelfService = () => {
|
|
|
return api.get('', {
|
|
|
method: 'app.help.selfService',
|
|
|
showPlatform: 'yohobuy_pc'
|
|
|
}).then(result => {
|
|
|
|
|
|
// return {
|
|
|
// 'alg': 'SALT_MD5',
|
|
|
// 'code': 200,
|
|
|
// 'data':
|
|
|
// [
|
|
|
// {
|
|
|
// 'categoryDescription': '测试',
|
|
|
// 'categoryIco': '/2016/12/09/18/025c8608fd0b33a283afe595046d67793b.jpg',
|
|
|
// 'categoryName': '测试1',
|
|
|
// 'id': 8,
|
|
|
// 'jumpType': 2,
|
|
|
// 'jumpUrl': 'http://www.yohobuy.com',
|
|
|
// 'orderBy': 0
|
|
|
// },
|
|
|
// {
|
|
|
// 'categoryDescription': '说明22',
|
|
|
// 'categoryIco': '/2016/12/09/19/0235925818a92b5d9b7c1d9f5029cfdc1a.jpg',
|
|
|
// 'categoryName': '帮助分类',
|
|
|
// 'id': 12,
|
|
|
// 'jumpType': 2,
|
|
|
// 'jumpUrl': '跳转',
|
|
|
// 'orderBy': 0
|
|
|
// },
|
|
|
// {
|
|
|
// 'categoryDescription': '登录问题',
|
|
|
// 'categoryIco': '/2016/12/09/18/025c8608fd0b33a283afe595046d67793b.jpg',
|
|
|
// 'categoryName': '登录问题',
|
|
|
// 'id': 4,
|
|
|
// 'jumpType': 2,
|
|
|
// 'jumpUrl': 'http://www.yohobuy.com',
|
|
|
// 'orderBy': 10
|
|
|
// },
|
|
|
// {
|
|
|
// 'categoryDescription': '分类说明',
|
|
|
// 'categoryIco': '/2016/12/09/17/0235925818a92b5d9b7c1d9f5029cfdc1a.jpg',
|
|
|
// 'categoryName': '登录问题',
|
|
|
// 'id': 2,
|
|
|
// 'jumpType': 2,
|
|
|
// 'jumpUrl': 'http://erp.yohobuy.com/helper/self/add',
|
|
|
// 'orderBy': 22
|
|
|
// },
|
|
|
// {
|
|
|
// 'categoryDescription': '22',
|
|
|
// 'categoryIco': '/2016/12/09/19/0135925818a92b5d9b7c1d9f5029cfdc1a.jpg',
|
|
|
// 'categoryName': '测试验',
|
|
|
// 'id': 10,
|
|
|
// 'jumpType': 2,
|
|
|
// 'jumpUrl': '22',
|
|
|
// 'orderBy': 22
|
|
|
// }
|
|
|
// ],
|
|
|
// 'md5': '1c5929f72fd3df3d139d1207b3b24277',
|
|
|
// 'message': '操作成功'
|
|
|
// };
|
|
|
|
|
|
return result;
|
|
|
});
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
|
|
getHotSearch,
|
|
|
gethomeCategoryFaq,
|
|
|
getSelfService
|
|
|
}; |
...
|
...
|
|