Authored by ccbikai

Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop

@@ -12,7 +12,7 @@ Name | Path | Note @@ -12,7 +12,7 @@ Name | Path | Note
12 资讯列表 | /news | 12 资讯列表 | /news |
13 资讯详情 | /news/{newsId} | 13 资讯详情 | /news/{newsId} |
14 个人中心 | /home | 14 个人中心 | /home |
15 -个人信息 | /mydetails | 15 +个人信息 | /home/mydetails |
16 全部订单 | /home/orders?type=1 | 16 全部订单 | /home/orders?type=1 |
17 待付款 | /home/orders?type=2 | 17 待付款 | /home/orders?type=2 |
18 待发货 | /home/orders?type=3 | 18 待发货 | /home/orders?type=3 |
@@ -26,8 +26,8 @@ yoho币 | /home/mycurrency | @@ -26,8 +26,8 @@ yoho币 | /home/mycurrency |
26 帮助中心详情 | /home/help-detail | 26 帮助中心详情 | /home/help-detail |
27 意见反馈 | /home/feedback | 27 意见反馈 | /home/feedback |
28 关于我们 | /home/about | 28 关于我们 | /home/about |
29 -物流详情 | /home/logistic?order_code=1609827614 |  
30 -退换货物流详情|home/logistic?order_code=1609827614&type=refund| 29 +物流详情 | /home/logistic?order_code=1609827614 |
  30 +退换货物流详情| /home/logistic?order_code=1609827614&type=refund|
31 31
32 -------------------------------------------------------------------------------- 32 --------------------------------------------------------------------------------
33 33
@@ -31,7 +31,7 @@ const handleBrandList = origin => { @@ -31,7 +31,7 @@ const handleBrandList = origin => {
31 name: subValue.brand_name, 31 name: subValue.brand_name,
32 32
33 // link: helpers.urlFormat('/brand', {domain: subValue.brand_domain}), 33 // link: helpers.urlFormat('/brand', {domain: subValue.brand_domain}),
34 - link: '/brand?domain=' + subValue.brand_domain, 34 + link: '/product/shop?domain=' + subValue.brand_domain,
35 logo: subValue.brand_ico 35 logo: subValue.brand_ico
36 }); 36 });
37 }); 37 });
@@ -23,7 +23,7 @@ const fav = { @@ -23,7 +23,7 @@ const fav = {
23 } 23 }
24 }, 24 },
25 favpaging: (req, res, next) => { 25 favpaging: (req, res, next) => {
26 - const uid = req.user.uid || 14459668; 26 + const uid = req.user.uid;
27 const tab = req.query.tab; 27 const tab = req.query.tab;
28 const page = req.query.page; 28 const page = req.query.page;
29 29
@@ -40,7 +40,7 @@ const fav = { @@ -40,7 +40,7 @@ const fav = {
40 } 40 }
41 }, 41 },
42 deletefav: (req, res, next) => { 42 deletefav: (req, res, next) => {
43 - const uid = req.user.uid || 14459668; 43 + const uid = req.user.uid;
44 const favId = req.body.favId; 44 const favId = req.body.favId;
45 const type = req.body.type; 45 const type = req.body.type;
46 46
@@ -13,7 +13,7 @@ const helpers = global.yoho.helpers; @@ -13,7 +13,7 @@ const helpers = global.yoho.helpers;
13 */ 13 */
14 const component = { 14 const component = {
15 index: (req, res, next) => { 15 index: (req, res, next) => {
16 - const uid = req.user.uid || 14459668; 16 + const uid = req.user.uid;
17 17
18 if (!uid && req.xhr) { 18 if (!uid && req.xhr) {
19 return res.json({ 19 return res.json({
@@ -31,14 +31,14 @@ const component = { @@ -31,14 +31,14 @@ const component = {
31 head_ico: proData && proData.head_ico ? helpers.image(proData.head_ico, 200, 200) : '', 31 head_ico: proData && proData.head_ico ? helpers.image(proData.head_ico, 200, 200) : '',
32 nickname: proData ? proData.nickname : '登录/注册', 32 nickname: proData ? proData.nickname : '登录/注册',
33 userinfourl: proData ? '/home/mydetails' : '', 33 userinfourl: proData ? '/home/mydetails' : '',
34 - serviceUrl: 'http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409&' 34 + serviceUrl: '/home/service'
35 }; 35 };
36 36
37 res.render('index', _.merge(result, data[1])); 37 res.render('index', _.merge(result, data[1]));
38 }).catch(next); 38 }).catch(next);
39 }, 39 },
40 mydetails: (req, res, next) => { 40 mydetails: (req, res, next) => {
41 - const uid = req.user.uid || 14459668; 41 + const uid = req.user.uid;
42 42
43 homeModel.getUserProfileData(uid).then(data => { 43 homeModel.getUserProfileData(uid).then(data => {
44 data = data || {}; 44 data = data || {};
@@ -62,7 +62,7 @@ const component = { @@ -62,7 +62,7 @@ const component = {
62 }, 62 },
63 saveMydetails: (req, res, next) => { 63 saveMydetails: (req, res, next) => {
64 var params = { 64 var params = {
65 - uid: req.user.uid || 14459668 65 + uid: req.user.uid
66 }; 66 };
67 67
68 if (req.body.nickname !== undefined) { 68 if (req.body.nickname !== undefined) {
@@ -81,6 +81,9 @@ const component = { @@ -81,6 +81,9 @@ const component = {
81 return res.json(data); 81 return res.json(data);
82 }).catch(next); 82 }).catch(next);
83 }, 83 },
  84 + service: (req, res, next) => {
  85 + res.redirect('http://chat8.live800.com/live800/chatClient/chatbox.jsp?companyID=620092&configID=149091&jid=8732423409')
  86 + },
84 help: (req, res, next) => { 87 help: (req, res, next) => {
85 homeModel.getHelpInfo().then(helpList => { 88 homeModel.getHelpInfo().then(helpList => {
86 res.render('help', { 89 res.render('help', {
@@ -118,7 +121,6 @@ const component = { @@ -118,7 +121,6 @@ const component = {
118 }, 121 },
119 saveFeedback: (req, res, next) => { 122 saveFeedback: (req, res, next) => {
120 let saveFeedbackPara = { 123 let saveFeedbackPara = {
121 - uid: '14459668',  
122 content: req.body.content, 124 content: req.body.content,
123 suggest_type: 2 125 suggest_type: 2
124 }; 126 };
@@ -31,6 +31,7 @@ router.post('/confirm-order', order.confirmOrder); // 确认订单 @@ -31,6 +31,7 @@ router.post('/confirm-order', order.confirmOrder); // 确认订单
31 router.get('/mycurrency', order.coin); // yoho币 31 router.get('/mycurrency', order.coin); // yoho币
32 router.get('/coin-detail', order.getCoinDetail); // yoho币明细 32 router.get('/coin-detail', order.getCoinDetail); // yoho币明细
33 33
  34 +router.get('/service', home.service) // 在线客服
34 router.get('/help', home.help); // 帮助中心列表页 35 router.get('/help', home.help); // 帮助中心列表页
35 router.get('/help-detail', home.helpDetail); // 帮助中心详情页 36 router.get('/help-detail', home.helpDetail); // 帮助中心详情页
36 router.get('/feedback', home.feedback); // 个人中心-意见反馈 37 router.get('/feedback', home.feedback); // 个人中心-意见反馈
@@ -53,6 +53,13 @@ module.exports = { @@ -53,6 +53,13 @@ module.exports = {
53 53
54 /* 收藏店铺 */ 54 /* 收藏店铺 */
55 collectShop: (req, res, next) => { 55 collectShop: (req, res, next) => {
  56 + if (!req.user.uid) {
  57 + res.json({
  58 + code: 403,
  59 + message: '未登录'
  60 + });
  61 + }
  62 +
56 shopModel.collectShopData({ 63 shopModel.collectShopData({
57 shopId: req.body.shopId, 64 shopId: req.body.shopId,
58 favId: req.body.favId, 65 favId: req.body.favId,
1 <div class="select"> 1 <div class="select">
2 <ul> 2 <ul>
3 {{#each items}} 3 {{#each items}}
4 - <li class="item-li" key="{{key}}">{{val}}</li> 4 + <li class="item-li {{#if disabled}} disabled {{/if}}" key="{{key}}" status="{{disabled}}">{{val}}</li>
5 {{/each}} 5 {{/each}}
6 <li class="item-del"> 6 <li class="item-del">
7 <span>取消</span> 7 <span>取消</span>
@@ -110,7 +110,6 @@ const matchHeader = (url) => { @@ -110,7 +110,6 @@ const matchHeader = (url) => {
110 let u = url.split('?')[1]; 110 let u = url.split('?')[1];
111 111
112 u = parse(u); 112 u = parse(u);
113 -  
114 if (u.type === '1') { 113 if (u.type === '1') {
115 des = '我的订单'; 114 des = '我的订单';
116 } else if (u.type === '2') { 115 } else if (u.type === '2') {
@@ -125,6 +124,13 @@ const matchHeader = (url) => { @@ -125,6 +124,13 @@ const matchHeader = (url) => {
125 return header; 124 return header;
126 } 125 }
127 126
  127 + if (/\/home\/order-detail/.test(url)) {
  128 + header = titleMap[2];
  129 + header.title.des = '订单详情';
  130 + header.title.right.action = origin + '/home/service';
  131 + return header;
  132 + }
  133 +
128 if (/\/home\/refund\/orders/.test(url)) { 134 if (/\/home\/refund\/orders/.test(url)) {
129 header = titleMap[1]; 135 header = titleMap[1];
130 header.title.des = '退/换货'; 136 header.title.des = '退/换货';
@@ -160,7 +166,7 @@ const matchHeader = (url) => { @@ -160,7 +166,7 @@ const matchHeader = (url) => {
160 return header; 166 return header;
161 } 167 }
162 168
163 - if (/chat8.live800.com/.test(url)) { 169 + if (/\/home\/service$/.test(url)) {
164 header = titleMap[1]; 170 header = titleMap[1];
165 header.title.des = 'Yoho!Blk在线客服'; 171 header.title.des = 'Yoho!Blk在线客服';
166 return header; 172 return header;
@@ -28,40 +28,49 @@ function Select(items) { @@ -28,40 +28,49 @@ function Select(items) {
28 // 覆盖层 28 // 覆盖层
29 const overlay = new Overlay({ 29 const overlay = new Overlay({
30 onClose: function() { 30 onClose: function() {
  31 + elem.removeClass('slide-in');
31 elem.hide(); 32 elem.hide();
32 } 33 }
33 }); 34 });
34 35
35 - $(del).click(function() { 36 + const hide = function() {
  37 + elem.removeClass('slide-in');
36 overlay.hide(); 38 overlay.hide();
37 elem.hide(); 39 elem.hide();
38 - }); 40 + }
39 41
40 - return {  
41 - show: function(cb) {  
42 - if (elem.parent().length === 0) {  
43 - const lis = elem.find('.item-li'); 42 + const show = function(cb) {
  43 + if (elem.parent().length === 0) {
  44 + const lis = elem.find('.item-li');
44 45
45 - lis.each(function() { 46 + lis.each(function() {
  47 + if (!$(this).attr('status')) {
46 $(this).click(function(e) { 48 $(this).click(function(e) {
47 - overlay.hide();  
48 - elem.hide(); 49 + hide();
49 cb({ 50 cb({
50 key: $(e.target).attr('key'), 51 key: $(e.target).attr('key'),
51 val: e.target.innerHTML 52 val: e.target.innerHTML
52 }); 53 });
53 }); 54 });
54 - });  
55 - elem.appendTo('body').addClass('animation-target');  
56 - }  
57 -  
58 - overlay.show();  
59 - elem.show();  
60 - },  
61 - hide: function() {  
62 - overlay.hide();  
63 - elem.hide(); 55 + }
  56 + });
  57 + elem.appendTo('body');
64 } 58 }
  59 +
  60 + overlay.show();
  61 + elem.show();
  62 + setTimeout(() => {
  63 + elem.addClass('slide-in');
  64 + }, 200);
  65 + }
  66 +
  67 + $(del).click(function() {
  68 + hide();
  69 + });
  70 +
  71 + return {
  72 + show: show,
  73 + hide: hide
65 }; 74 };
66 } 75 }
67 76
@@ -4,6 +4,8 @@ @@ -4,6 +4,8 @@
4 width: 100%; 4 width: 100%;
5 background: #fff; 5 background: #fff;
6 z-index: 1001; 6 z-index: 1001;
  7 + transform: translate3d(0, 100%, 0);
  8 + transition: all 0.1s ease-in-out;
7 9
8 ul { 10 ul {
9 font-size: 34px; 11 font-size: 34px;
@@ -15,10 +17,18 @@ @@ -15,10 +17,18 @@
15 border-bottom: 1px solid #e0e0e0; 17 border-bottom: 1px solid #e0e0e0;
16 } 18 }
17 19
  20 + .disabled {
  21 + color: #b0b0b0;
  22 + }
  23 +
18 .item-del { 24 .item-del {
19 margin-top: 10px; 25 margin-top: 10px;
20 border-top: 1px solid #e0e0e0; 26 border-top: 1px solid #e0e0e0;
21 color: #5c99e4; 27 color: #5c99e4;
22 } 28 }
23 } 29 }
  30 +
  31 + &.slide-in {
  32 + transform: translate3d(0, 0, 0);
  33 + }
24 } 34 }
1 <template> 1 <template>
2 - <tab v-bind:page="page"></tab> 2 + <div class="cate-tab-fixed">
  3 + <tab v-bind:page="page"></tab>
  4 + </div>
3 <div class="cate-page" id='cate-page'> 5 <div class="cate-page" id='cate-page'>
4 <div class="cate-nav clearfix"> 6 <div class="cate-nav clearfix">
5 <ul> 7 <ul>
@@ -27,6 +29,12 @@ @@ -27,6 +29,12 @@
27 </div> 29 </div>
28 </template> 30 </template>
29 <style> 31 <style>
  32 +.cate-tab-fixed {
  33 + position: fixed;
  34 + top: 0;
  35 + left: 0;
  36 +}
  37 +
30 .cate-page { 38 .cate-page {
31 font-size: 36px; 39 font-size: 36px;
32 font-family: helvetica, Arial, "黑体"; 40 font-family: helvetica, Arial, "黑体";
1 <template> 1 <template>
2 <tab v-bind:page="page"></tab> 2 <tab v-bind:page="page"></tab>
  3 + <brand-search></brand-search>
3 <resources v-bind:content-code.sync="contentCode"></resources> 4 <resources v-bind:content-code.sync="contentCode"></resources>
4 <brand-list v-bind:channel="channel"></brand-list> 5 <brand-list v-bind:channel="channel"></brand-list>
5 </template> 6 </template>
@@ -10,6 +11,7 @@ @@ -10,6 +11,7 @@
10 const tab = require('channel/tab.vue'); 11 const tab = require('channel/tab.vue');
11 const resources = require('component/resources/index.vue'); 12 const resources = require('component/resources/index.vue');
12 const brandList = require('channel/brand-list.vue'); 13 const brandList = require('channel/brand-list.vue');
  14 + const brandSearch = require('channel/brand-search.vue');
13 15
14 16
15 module.exports = { 17 module.exports = {
@@ -21,6 +23,7 @@ @@ -21,6 +23,7 @@
21 }, 23 },
22 components: { 24 components: {
23 tab, 25 tab,
  26 + brandSearch,
24 resources, 27 resources,
25 brandList 28 brandList
26 } 29 }
  1 +<template>
  2 + <div class="search">
  3 + <input v-if="showInput" type="text" name="">
  4 + <div v-else class="input" @click="changeToInput()">
  5 + <span class="icon icon-search"></span> Search
  6 + </div>
  7 + </div>
  8 +</template>
  9 +<style>
  10 + .search {
  11 + width: 100%;
  12 + height: 85px;
  13 + padding: 15px 0;
  14 + background-color: #f6f6f6;
  15 + text-align: center;
  16 +
  17 + .input {
  18 + margin-left: auto;
  19 + margin-right: auto;
  20 + background-color: #fff;
  21 + text-align: center;
  22 + color: #b0b0b0;
  23 + height: 55px;
  24 + width: 92%;
  25 + font-size: 28px;
  26 + padding: 5px 0;
  27 + }
  28 +
  29 + input {
  30 + width: 92%;
  31 + height: 55px;
  32 + padding: 10px;
  33 + }
  34 + }
  35 +</style>
  36 +<script>
  37 + module.exports = {
  38 + data() {
  39 + return {
  40 + showInput: false
  41 + };
  42 + },
  43 + methods: {
  44 + changeToInput() {
  45 + this.showInput = true;
  46 + }
  47 + }
  48 + };
  49 +</script>
@@ -62,7 +62,6 @@ @@ -62,7 +62,6 @@
62 let _this = this; 62 let _this = this;
63 63
64 genderSel.show(function(item) { 64 genderSel.show(function(item) {
65 - console.log(item)  
66 _this.gender = item.val.toLowerCase(); 65 _this.gender = item.val.toLowerCase();
67 _this.saveDetails({ 66 _this.saveDetails({
68 nickname: _this.nickname, 67 nickname: _this.nickname,
1 <template> 1 <template>
2 <div class="brand-share"> 2 <div class="brand-share">
3 - <div class="brand-top-box" v-bind:style="{ 'background-image': `url(${shopInfo.brandBg})` }"></div> 3 + <img class="brand-top-box" v-bind:src="shopInfo.brandBg | resize 750 478">
4 <div class="brand-title">{{ shopInfo.brandName }}</div> 4 <div class="brand-title">{{ shopInfo.brandName }}</div>
5 <div class="brand-intro">{{ shopInfo.brandIntro }}</div> 5 <div class="brand-intro">{{ shopInfo.brandIntro }}</div>
6 <div class="tip">进入 BLK 选购潮品</div> 6 <div class="tip">进入 BLK 选购潮品</div>
7 <div class="icon arrow">&#xe602;</div> 7 <div class="icon arrow">&#xe602;</div>
8 - <a href="//m.yohoblk.com"><img v-lazy="shopInfo.brandBg | resize 752 365"></a> 8 + <a href="//m.yohoblk.com"><img v-bind:src="shopInfo.brandBg | resize 752 365"></a>
9 </div> 9 </div>
10 <share-bottom></share-bottom> 10 <share-bottom></share-bottom>
11 </template> 11 </template>
@@ -13,10 +13,6 @@ @@ -13,10 +13,6 @@
13 .brand-share { 13 .brand-share {
14 .brand-top-box { 14 .brand-top-box {
15 width: 100%; 15 width: 100%;
16 - height: 468px;  
17 - color: #fff;  
18 - background-color: #ccc;  
19 - position: relative;  
20 } 16 }
21 17
22 .brand-title { 18 .brand-title {
@@ -53,7 +49,7 @@ @@ -53,7 +49,7 @@
53 } 49 }
54 </style> 50 </style>
55 <script> 51 <script>
56 - const shareBottom = require('product/shop/share-bottom.vue'); 52 + const shareBottom = require('component/tool/share-bottom.vue');
57 const qs = require('yoho-qs'); 53 const qs = require('yoho-qs');
58 const tip = require('common/tip'); 54 const tip = require('common/tip');
59 55
@@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
76 this.shareData = { 76 this.shareData = {
77 title: result.brandName, 77 title: result.brandName,
78 des: shareSubTitle, 78 des: shareSubTitle,
79 - url: '/product/shop-share?domain=' + this.domain, 79 + url: '/product/shop/share?domain=' + this.domain,
80 img: result.brandBg, 80 img: result.brandBg,
81 isBlkShop: result.isBlkShop, 81 isBlkShop: result.isBlkShop,
82 shopId: result.shopId, // 不是分享的参数,收藏店铺使用 82 shopId: result.shopId, // 不是分享的参数,收藏店铺使用
1 <template> 1 <template>
2 - <div v-if="shopInfo.isBlkShop" class="brand-top-box" v-lazy:background-image="shopInfo.brandBg"> 2 + <div v-if="shopInfo.isBlkShop" class="brand-top-box" v-lazy:background-image="shopInfo.brandBg | resize 750 478">
3 <div class="brand-bottom"> 3 <div class="brand-bottom">
4 <img v-if="shopInfo.brandLogo" v-lazy="shopInfo.brandLogo | resize 80 80" alt="{{ shopInfo.brandName }}"> 4 <img v-if="shopInfo.brandLogo" v-lazy="shopInfo.brandLogo | resize 80 80" alt="{{ shopInfo.brandName }}">
5 <div v-else class="brand-title">{{ shopInfo.brandName }}</div> 5 <div v-else class="brand-title">{{ shopInfo.brandName }}</div>
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 height: 80px; 16 height: 80px;
17 padding: 10px 20px; 17 padding: 10px 20px;
18 position: fixed; 18 position: fixed;
19 - top: 60px; 19 + top: 40px;
20 left: 0; 20 left: 0;
21 z-index: 99; 21 z-index: 99;
22 color: #fff; 22 color: #fff;
@@ -43,13 +43,13 @@ @@ -43,13 +43,13 @@
43 } 43 }
44 44
45 .top-box-left { 45 .top-box-left {
46 - left: -655px; 46 + left: -665px;
47 } 47 }
48 48
49 .top-change { 49 .top-change {
50 background-color: #fff; 50 background-color: #fff;
51 color: #000; 51 color: #000;
52 - height: 140px; 52 + height: 120px;
53 top: 0; 53 top: 0;
54 padding: 70px 20px 10px; 54 padding: 70px 20px 10px;
55 } 55 }
@@ -97,6 +97,8 @@ @@ -97,6 +97,8 @@
97 tip(result.message); 97 tip(result.message);
98 if (result.code === 200) { 98 if (result.code === 200) {
99 this.shareData.isFav = !this.shareData.isFav; 99 this.shareData.isFav = !this.shareData.isFav;
  100 + } else if (result.code === 403) {
  101 + yoho.goLogin();
100 } 102 }
101 }).fail(() => { 103 }).fail(() => {
102 tip('网络错误'); 104 tip('网络错误');