Authored by ccbikai

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

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