Authored by 陈峰

header

Showing 50 changed files with 450 additions and 289 deletions
... ... @@ -13,8 +13,6 @@ const component = {
res.render('help', {
module: 'me',
page: 'help',
noLocalJS: true,
noLocalCSS: true,
helpList: [{
caption: '1',
name: '购物流程'
... ... @@ -46,9 +44,8 @@ const component = {
const caption = req.query.caption;
const data = {
module: 'me',
page: 'help',
noLocalJS: true,
noLocalCSS: true
page: 'help-detail',
title: req.query.title
};
data['helpDetail_' + caption] = true;
... ...
... ... @@ -116,7 +116,6 @@ const component = {
res.render('feedback', {
module: 'me',
page: 'feedback',
noLocalCSS: true
});
},
saveFeedback: (req, res, next) => {
... ... @@ -145,15 +144,12 @@ const component = {
res.render('about', {
module: 'me',
page: 'about',
noLocalCSS: true
});
},
provisions: (req, res) => {
res.render('provisions', {
module: 'me',
page: 'provisions',
noLocalJS: true,
noLocalCSS: true
});
},
agreement: (req, res) => {
... ...
<div class="about-us">
<div id="header">
<div class="blk-header-wrap" class="is-fixed">
<div class="blk-header">
<div class="blk-header-left">
<i class="icon icon-back go-back-btn"></i>
</div>
<div class="blk-header-right">
</div>
<div class="blk-header-main">
<span class="blk-header-title">关于</span>
</div>
</div>
<div class="blk-header-gap"></div>
</div>
</div>
<div class="icon-container">
<span class="blk-start-icon"></span>
<p class="icon-label">BLK</p>
... ...
<div class="yoho-coin" id="coin-detail-list">
<div class="coin-total">
<p>您目前拥有</p>
<p><b>{{coin.data.total}}</b></p>
<p>个有货币</p>
</div>
<coin-detail></coin-detail>
<div id="app">
<coin :total="{{coin.data.total}}"></coin>
</div>
\ No newline at end of file
... ...
<div class="yoho-suggest-sub-page yoho-page">
<div id="header">
<div class="blk-header-wrap" class="is-fixed">
<div class="blk-header">
<div class="blk-header-left">
<i class="icon icon-back go-back-btn"></i>
</div>
<div class="blk-header-right">
</div>
<div class="blk-header-main">
<span class="blk-header-title">意见反馈</span>
</div>
</div>
<div class="blk-header-gap"></div>
</div>
</div>
<div class="suggest-sub-form">
<textarea name="" id="suggest-textarea" placeholder="请写下对于BLK的意见和建议,我们将及时根据您的意见作出改进"></textarea>
</div>
... ...
<div class="help">
<div id="header">
<div class="blk-header-wrap" class="is-fixed">
<div class="blk-header">
<div class="blk-header-left">
<i class="icon icon-back go-back-btn"></i>
</div>
<div class="blk-header-right">
</div>
<div class="blk-header-main">
<span class="blk-header-title">帮助中心</span>
</div>
</div>
<div class="blk-header-gap"></div>
</div>
</div>
<ul>
{{# helpList}}
<li><a href="/help-detail?title={{name}}&caption={{caption}}"><span class="name">{{name}}</span>
... ...
<div id="header">
<div class="blk-header-wrap" class="is-fixed">
<div class="blk-header">
<div class="blk-header-left">
<i class="icon icon-back go-back-btn"></i>
</div>
<div class="blk-header-right">
</div>
<div class="blk-header-main">
<span class="blk-header-title">{{title}}</span>
</div>
</div>
<div class="blk-header-gap"></div>
</div>
</div>
{{#if helpDetail_1}}
{{> helpDetail_1}}
{{/if}}
... ...
<div class="provisions">
<div id="header">
<div class="blk-header-wrap" class="is-fixed">
<div class="blk-header">
<div class="blk-header-left">
<i class="icon icon-back go-back-btn"></i>
</div>
<div class="blk-header-right">
</div>
<div class="blk-header-main">
<span class="blk-header-title">隐私条款</span>
</div>
</div>
<div class="blk-header-gap"></div>
</div>
</div>
<section class="detail">
<p>欢迎访问BLK APP!我们以本隐私申明声明对访问者隐私保护的许诺。</p>
<br>
... ...
... ... @@ -25,13 +25,13 @@
{{#list}}
<li class="card">
<div class="card-pic">
<a href="{{goodsUrl this}}">
<a>
<img src="{{resizeImage default_images 330 440}}" alt="{{product_name}}">
</a>
</div>
<div class="card-bd">
<h2 class="card-label">
<a href="{{goodsUrl this}}" class="line-clamp-1">{{product_name}}</a>
<a class="line-clamp-1">{{product_name}}</a>
</h2>
<span class="good-price {{#if market_price}}sale-price{{/if}}">¥ {{toFixed sales_price
2}}</span>
... ...
... ... @@ -18,9 +18,9 @@ module.exports = {
app_type: 1
},
domains: {
api: 'http://api-test3.yohops.com:9999/',
service: 'http://service-test3.yohops.com:9999/',
singleApi: 'http://api-test3.yohops.com:9999/'
// api: 'http://api-test3.yohops.com:9999/',
// service: 'http://service-test3.yohops.com:9999/',
// singleApi: 'http://api-test3.yohops.com:9999/'
// api: 'http://api-test2.yohops.com:9999/',
// service: 'http://service-test2.yohops.com:9999/',
... ... @@ -29,8 +29,8 @@ module.exports = {
// service: 'http://dev-service.yohops.com:9999/',
// singleApi: 'http://192.168.102.27:8092/'
// //
// api: 'http://api.yoho.cn/',
// service: 'http://service.yoho.cn/',
api: 'http://api.yoho.cn/',
service: 'http://service.yoho.cn/',
// singleApi: 'http://single.yoho.cn/'
},
subDomains: {
... ...
const info = {
host: '127.0.0.1',
host: 'm.yohoblk.com',
port: 5004,
publicPath: 'http://127.0.0.1:5004/'
publicPath: 'http://m.yohoblk.com:5004/'
};
module.exports = info;
... ...
... ... @@ -305,23 +305,25 @@ const intercept = (url) => {
}
const args = {
header: matchHeader(path, qs, titleMap),
// header: matchHeader(path, qs, titleMap),
url: /^(https?:)?\/\//i.test(url) ? url : origin + url
};
if (/\/me\/service$/.test(path)) {
args.header = titleMap[1];
args.header.title.des = 'BLK在线客服';
// args.header = titleMap[1];
// args.header.title.des = 'BLK在线客服';
args.showLoading = 'no';
}
// 处理 feature.yoho.cn 等域名下的站外链接
if (/^(https?:)?\/\//i.test(path) && !/m\.yohoblk\.com/.test(path)) {
args.header = titleMap[1];
args.header.title.des = qs.title || '';
// args.header = titleMap[1];
// args.header.title.des = qs.title || '';
args.showLoading = 'no';
}
args.header = {
headerid: '-1'
};
yoho.goNewPage(args);
} else {
location.href = url;
... ...
... ... @@ -4,7 +4,9 @@
* @Last Modified by: Targaryen
* @Last Modified time: 2016-08-02 17:42:26
*/
import yoho from 'yoho';
import util from 'common/util';
function ImgSrcBinding(el, binding) {
if (binding.value === binding.oldValue) {
return;
... ... @@ -31,12 +33,24 @@ function GoodHrefBinding(el, binding) {
if (binding.value === binding.oldValue) {
return;
}
let {product_id, goods_id, cn_alphabet} = binding.value;
let {product_id, goods_id, cn_alphabet, product_skn} = binding.value;
if (!binding.modifiers.collect) {
goods_id = binding.value.goods_list.length ? binding.value.goods_list[0].goods_id : '';
}
el.href = `/product/pro_${product_id}_${goods_id}/${cn_alphabet}.html`;
let href = `/product/pro_${product_id}_${goods_id}/${cn_alphabet}.html`;
if (yoho.isYohoBuy) {
let goParams = {
action: 'go.productDetail',
params: {
product_skn: product_skn
}
};
href += `?yohobuy=${JSON.stringify(goParams)}`;
}
el.href = href;
}
function BlkHrefBinding(el, binding) {
let value = binding.value;
... ...
// import yoho from './yoho';
// import cookie from 'yoho-cookie';
import yoho from './yoho';
import cookie from 'yoho-cookie';
// cookie.set('_YOHOUID', '50000582', {
// path: '/',
// domain: '.yohoblk.com'
// });
// cookie.set('_YOHOTOKEN', '26ea92e1f3fc39dbdcdbb63125c58b2b', {
// path: '/',
// domain: '.yohoblk.com'
// });
// yoho.isApp = true;
// yoho.ready = cb => cb();
cookie.set('_YOHOUID', '50000582', {
path: '/',
domain: '.yohoblk.com'
});
cookie.set('_YOHOTOKEN', '26ea92e1f3fc39dbdcdbb63125c58b2b', {
path: '/',
domain: '.yohoblk.com'
});
yoho.isApp = true;
yoho.ready = cb => cb();
... ...
import yoho from 'yoho';
import interceptClick from 'common/intercept-click';
import HeaderBox from 'component/header.vue';
import Vue from 'vue';
new Vue({
el: '#header',
render: h => h(HeaderBox, {
props: {
title: '关于'
}
})
});
yoho.ready(() => {
const header = Object.assign({}, interceptClick.defaultTitleMap[1]);
... ...
... ... @@ -14,8 +14,8 @@ Vue.use(infiniteScroll);
new Vue({
el: '#coin-detail-list',
el: '#app',
components: {
'coin-detail': coin
coin
}
});
... ...
... ... @@ -7,6 +7,17 @@ import $ from 'jquery';
import tip from 'common/tip';
import yoho from 'yoho';
import interceptClick from 'common/intercept-click';
import HeaderBox from 'component/header.vue';
import Vue from 'vue';
new Vue({
el: '#header',
render: h => h(HeaderBox, {
props: {
title: '意见反馈'
}
})
});
$(() => {
setTimeout(() => {
... ...
import Vue from 'vue';
import HeaderBox from 'component/header.vue';
import qs from 'yoho-qs';
new Vue({
el: '#header',
render: h => h(HeaderBox, {
props: {
title: decodeURIComponent(qs.title)
}
})
});
... ...
import Vue from 'vue';
import HeaderBox from 'component/header.vue';
new Vue({
el: '#header',
render: h => h(HeaderBox, {
props: {
title: '帮助中心'
}
})
});
... ...
import Vue from 'vue';
import HeaderBox from 'component/header.vue';
new Vue({
el: '#header',
render: h => h(HeaderBox, {
props: {
title: '隐私条款'
}
})
});
... ...
... ... @@ -22,9 +22,10 @@ const yoho = {
/**
* 判断是否是 APP
*/
isApp: /yh_blk/i.test(navigator.userAgent || ''),
isiOS: /\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(navigator.userAgent || ''),
isApp: /yh_blk/i.test(navigator.userAgent || '') || /YH_BLK/i.test(navigator.userAgent || ''),
isiOS: true,///\(i[^;]+;( U;)? CPU.+Mac OS X/i.test(navigator.userAgent || ''),
isAndroid: /Android/i.test(navigator.userAgent || ''),
isYohoBuy: /YohoBuy/i.test(navigator.userAgent || ''),
/**
* store
... ... @@ -261,7 +262,7 @@ const yoho = {
arguments: args
});
} else {
tip(tipInfo);
// tip(tipInfo);
}
},
... ... @@ -278,7 +279,7 @@ const yoho = {
arguments: args
});
} else {
tip(tipInfo);
// tip(tipInfo);
}
},
... ...
<template>
<div class="cate-page" id='cate-page'>
<header-box title="全部品类" ref="header"></header-box>
<div class="cate-container clearfix">
<div class="content">
<ul class="primary-level">
... ... @@ -237,6 +238,7 @@
</style>
<script>
import $ from 'jquery';
import HeaderBox from 'component/header.vue';
export default {
props: {
... ... @@ -365,6 +367,7 @@
c.css('height', h1);
}
});
}
},
components: {HeaderBox}
};
</script>
... ...
<template>
<div>
<header-box title="品牌" ref="header"></header-box>
<resources :content-code="contentCode"></resources>
<brand-list :channel="channel"></brand-list>
</div>
... ... @@ -13,6 +14,7 @@
import resources from 'component/resources/index.vue';
import brandList from 'channel/brand-list.vue';
import brandSearch from 'channel/brand-search.vue';
import HeaderBox from 'component/header.vue';
const detaultChannel = qs.channel || cookie.get('_Channel') || 'men';
... ... @@ -28,7 +30,8 @@
tab,
brandSearch,
resources,
brandList
brandList,
HeaderBox
}
};
</script>
... ...
... ... @@ -9,10 +9,17 @@
.search {
width: 100%;
height: 88px;
padding: 15px 16px;
padding: 15px 15px;
background-color: #fff;
text-align: center;
border-bottom: 1px solid #f6f6f6;
background-color: #fff;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 99;
.input {
margin-left: auto;
... ...
<template>
<div class="cate-res" :class="{'fix-ios-top': needFix}">
<div class="top-space" v-if="needFix"></div>
<div class="fixed-top">
<brand-search></brand-search>
<tab :page="page" class="fixed-tab"></tab>
</div>
<div class="cate-res">
<brand-search></brand-search>
<tab :page="page" class="fixed-tab"></tab>
<resources :content-code="contentCode" class="fixed-resource"></resources>
</div>
</template>
... ... @@ -38,30 +35,6 @@
}
}
.fix-ios-top {
.top-space {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 20px;
background-color: #fff;
z-index: 999;
}
.fixed-top {
padding-top: 20px;
}
.fixed-tab {
margin-top: 20px;
}
.fixed-resource {
margin-top: 20px;
}
}
</style>
<script>
import contentCode from 'content-code';
... ... @@ -81,7 +54,6 @@
return {
page: 'cate',
contentCode: contentCode.cate[detaultChannel],
needFix: false
};
},
components: {
... ... @@ -90,9 +62,6 @@
brandSearch
},
created() {
if (yoho.isiOS) {
this.needFix = true;
}
}
};
</script>
... ...
<template>
<div v-if="channel.length" class="channel-tab" :class="{'fix-ios-top': fixIosTop}">
<div v-if="channel.length" class="channel-tab">
<div class="channel ellipsis" v-for="(item, index) in channel" :key="index" :class="{focus: index === currentChannel}"
@click="changeChannel(index, item.id)" :style="{width: (1 / channel.length) * 100 + '%'}">
<span class="name">{{item.name && item.name.toUpperCase()}}</span>
... ... @@ -101,7 +101,7 @@
.channel-tab {
position: fixed;
top: 0;
left: 50%;
left: 0;
z-index: 1;
width: 100%;
max-width: 750px;
... ... @@ -109,14 +109,9 @@
font-size: 26px;
text-align: center;
background: #fff;
transform: translate(-50%, 0);
border-bottom: 1px solid #f6f6f6;
font-family: "BrownStd", "PingFang SC", Helvetica, Roboto, "Heiti SC", "黑体", Arial;
&.fix-ios-top {
margin-top: 20px;
}
.channel {
display: inline-block;
line-height: 80px;
... ...
... ... @@ -20,6 +20,7 @@
import yoho from 'yoho';
export default {
name: 'header-box',
props: {
title: String,
className: [String, Object, Array],
... ...
... ... @@ -9,7 +9,7 @@
</div>
</dd>
</dl>
<index-list class="filter-index-list" :index-list="indexData" :class="{'fix-ios-top': needFix}"></index-list>
<index-list class="filter-index-list" :index-list="indexData"></index-list>
</div>
</template>
<script>
... ... @@ -44,7 +44,6 @@
indexData: [],
currentData: [],
currentValue: this.value,
needFix: yoho.isiOS
};
},
watch: {
... ... @@ -105,8 +104,5 @@
top: calc(70 + 20 * 2 + 1)px!important;
}
.fix-ios-top {
margin-top: 20px;
}
</style>
... ...
<template>
<div class="filter-sub" :class="{'filter-sub-open': isVisible}">
<c-header class="filter-sub-header" :title="filterType">
<header-box class="filter-sub-header" :title="filterType">
<i class="icon icon-back" slot="left" @click="hide"></i>
<button class="btn-clear" slot="right" @click="clear">清空</button>
</c-header>
</header-box>
<div class="filter-sub-select">
<brand-filter
v-if="subType === 'brand'"
... ... @@ -25,7 +25,7 @@
</div>
</template>
<script>
import cHeader from 'component/header.vue';
import HeaderBox from 'component/header.vue';
import brandFilter from './brand.vue';
import normalFilter from './normal.vue';
import sortFilter from 'channel/brand-cate.vue';
... ... @@ -42,7 +42,7 @@
ageLevel: '年龄'
};
export default {
components: {cHeader, brandFilter, normalFilter, sortFilter},
components: {HeaderBox, brandFilter, normalFilter, sortFilter},
props: {
type: {
type: String,
... ...
<template>
<div class="top-filter clearfix" :class="{'search-page': searchPage, 'fix-ios-top': fixIosTop}">
<div class="top-filter clearfix" :class="{'search-page': searchPage}">
<div class="filter-overlay" v-show="layFlag" @click="close"></div>
<div class="filter-content">
<ul class="filter-type">
... ... @@ -322,13 +322,6 @@ export default {
z-index: 220;
border-top: 1px solid #eee;
&.fix-ios-top {
margin-top: 15px;
.filter-overlay {
top: 135px!important;
}
}
&.search-page {
top: 0;
... ...
<template>
<div class="top-nav">
<navbar>
<header-box>
<template slot="right">
<a class="right-button no-intercept" @click="like">
<span class="count">{{likeCount ? likeCount : ''}}</span>
... ... @@ -16,7 +16,7 @@
<span class="icon icon-share2"></span>
</a>
</template>
</navbar>
</header-box>
</div>
</template>
<style>
... ... @@ -50,7 +50,7 @@
import yoho from 'yoho';
import tip from 'common/tip';
import util from 'common/util';
import Header from 'component/header.vue';
import HeaderBox from 'component/header.vue';
export default {
props: {
... ... @@ -58,7 +58,7 @@
article: Object
},
components: {
navbar: Header
HeaderBox
},
data() {
return {
... ...
<template>
<div class="reason-list">
<span v-for="val in options" :key="val.id" @click="select(val.id, val.reason)">{{val.reason}}</span>
<div>
<header-box title="取消订单理由" ref="header"></header-box>
<div class="reason-list">
<span v-for="val in options" :key="val.id" @click="select(val.id, val.reason)">{{val.reason}}</span>
</div>
</div>
</template>
... ... @@ -10,6 +13,7 @@
import $ from 'jquery';
import yoho from 'yoho';
import tip from 'common/tip';
import HeaderBox from 'component/header.vue';
export default {
data() {
... ... @@ -41,7 +45,8 @@
yoho.goBack();
}
}
},
components: {HeaderBox}
};
</script>
... ...
<template>
<div class="coin-detail" v-if="coinList && coinList.length">
<p>明细列表</p>
<ul class="coin-detail-list" v-infinite-scroll="getCoinData" infinite-scroll-disabled="busy" infinite-scroll-distance="10">
<li v-for="(coin, index) in coinList" :key="index">
<div class="coin-source">
<p>{{coin.message}}</p>
<time>{{coin.date}}</time>
</div>
<div class="coin-num"><i v-if="coin.num>0">+</i>{{coin.num}}</div>
</li>
</ul>
<div class="yoho-coin" id="coin-detail-list">
<header-box title="有货币" ref="header"></header-box>
<div class="coin-total">
<p>您目前拥有</p>
<p><b>{{total}}</b></p>
<p>个有货币</p>
</div>
<div class="coin-detail" v-if="coinList && coinList.length">
<p>明细列表</p>
<ul class="coin-detail-list" v-infinite-scroll="getCoinData" infinite-scroll-disabled="busy" infinite-scroll-distance="10">
<li v-for="(coin, index) in coinList" :key="index">
<div class="coin-source">
<p>{{coin.message}}</p>
<time>{{coin.date}}</time>
</div>
<div class="coin-num"><i v-if="coin.num>0">+</i>{{coin.num}}</div>
</li>
</ul>
</div>
</div>
</template>
<script>
... ... @@ -17,8 +25,10 @@
import $ from 'jquery';
import tip from 'common/tip';
import HeaderBox from 'component/header.vue';
export default {
props: ['total'],
data() {
return {
page: 0,
... ... @@ -49,7 +59,7 @@
if (result.code === 200) {
this.busy = false;
if (result.data.coinlist.length > 0) {
this.coinList = this.this.coinList.concat(result.data.coinlist);
this.coinList = this.coinList.concat(result.data.coinlist);
this.pageTotal = result.data.page_total;
}
}
... ... @@ -57,7 +67,8 @@
tip('网络错误');
});
}
}
},
components: {HeaderBox}
};
</script>
<style>
... ...
<template>
<div class="return return-exchange">
<product-list :list="goodsArr" :data="exchangeData" type="exchange">
</product-list>
<!--换货信息-->
<div class="list exchange-info">
<!--address-->
<div class="list-item exchange-address" @click="changeAddress">
<div class="consignee">
<span class="mr50">{{address.consignee}}</span>
<span>{{address.mobile}}</span>
<div>
<header-box title="换货申请" ref="header"></header-box>
<div class="return return-exchange">
<product-list :list="goodsArr" :data="exchangeData" type="exchange">
</product-list>
<!--换货信息-->
<div class="list exchange-info">
<!--address-->
<div class="list-item exchange-address" @click="changeAddress">
<div class="consignee">
<span class="mr50">{{address.consignee}}</span>
<span>{{address.mobile}}</span>
</div>
<p class="address address-region">{{address.area}}</p>
<p class="address address-detail">{{address.address}}</p>
</div>
<!--mode-->
<div class="list-item exchange-mode">
<span>换货方式</span>
<i class="icon icon-right right"></i>
<select class="right select-mode" v-model="deliveryTpye">
<option v-for="mode in delivery" :key="mode.id" :value="mode.id">{{mode.name}}</option>
</select>
</div>
<p class="address address-region">{{address.area}}</p>
<p class="address address-detail">{{address.address}}</p>
</div>
<!--mode-->
<div class="list-item exchange-mode">
<span>换货方式</span>
<i class="icon icon-right right"></i>
<select class="right select-mode" v-model="deliveryTpye">
<option v-for="mode in delivery" :key="mode.id" :value="mode.id">{{mode.name}}</option>
</select>
</div>
</div>
<feature-selector
:is-visible="showFeatureSelector"
:entity="entity"
:on-add-to-cart="whenFeatureChange"
button-text="确定">
</feature-selector>
<feature-selector
:is-visible="showFeatureSelector"
:entity="entity"
:on-add-to-cart="whenFeatureChange"
button-text="确定">
</feature-selector>
</div>
</div>
</template>
... ... @@ -44,6 +47,7 @@
import productList from 'me/return/list.vue';
import featureSelector from 'component/product/feature-selector.vue';
import reasonConfig from 'me/return/reason';
import HeaderBox from 'component/header.vue';
export default {
data() {
... ... @@ -281,7 +285,8 @@
},
components: {
featureSelector,
productList
productList,
HeaderBox
}
};
... ...
<template>
<div :class="{'fix-ios-top': needFix}">
<cheader title="我的" class="ghost" fixed ref="header">
<div>
<header-box title="我的" class="ghost" fixed ref="header">
<i slot="left"></i>
</cheader>
<div class="fix-top-space" v-if="needFix"></div>
</header-box>
<div class="my-header" v-if="data.nickName">
<a class="user-info auth" id="user-info" href='/me/mydetails'>
<img class="user-avatar" :src="headIco" @error="setEmptyimg">
... ... @@ -107,7 +106,7 @@
import yoho from 'yoho';
import $ from 'jquery';
import interceptClick from 'common/intercept-click';
import cheader from 'component/header.vue';
import HeaderBox from 'component/header.vue';
import channel from 'component/toggle-channel.vue';
import cookie from 'yoho-cookie';
import 'vue-swipe/dist/vue-swipe.css';
... ... @@ -143,11 +142,10 @@
floorHeight: 0,
isShowChannel: false,
curChannel: channelLabel[+cookie.get('_ChannelIndex')] || 'MEN',
needFix: yoho.isiOS
};
},
components: {
cheader,
HeaderBox,
channel,
swipe: Swipe,
swipeItem: SwipeItem
... ... @@ -346,19 +344,6 @@
</script>
<style>
.fix-ios-top {
padding-top: 30px;
.fix-top-space {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 30px;
background: #fff;
}
}
.my-page {
color: #444;
background: #f0f0f0;
... ...
<template>
<ul>
<li>
<label @click="setAvatar">头像
<span class="details-icon">
<img class="head-portrait user-avatar" :src="currentIco" @error="imgerror">
<span class="icon icon-right"></span>
</span>
</label>
</li>
<li>
<label>昵称<input class="nickname" v-model='currentNick' maxlength="16" @input="setNickname" @change="checkNickname"></label>
</li>
<li>
<label @click="setAender">性别
<span class="details-gender">
<span class="gender">{{ currentGender ? currentGender : '选择性别' }}</span>
<span class="icon icon-right"></span>
</span>
</label>
</li>
<li>
<label>生日
<span class="details-birthday">
<span class="birthday-span">{{spanbirthday}}</span>
<input class="birthday" type="date" v-model='currentBirthday' @change="setBirthday" required></input>
</span>
</label>
</li>
<li>
<label>会员等级
<a class="grade" href="/me/grade">
<span class="icon icon-right"></span>
</a>
</label>
</li>
</ul>
<div>
<header-box title="个人信息" ref="header"></header-box>
<ul>
<li>
<label @click="setAvatar">头像
<span class="details-icon">
<img class="head-portrait user-avatar" :src="currentIco" @error="imgerror">
<span class="icon icon-right"></span>
</span>
</label>
</li>
<li>
<label>昵称<input class="nickname" v-model='currentNick' maxlength="16" @input="setNickname" @change="checkNickname"></label>
</li>
<li>
<label @click="setAender">性别
<span class="details-gender">
<span class="gender">{{ currentGender ? currentGender : '选择性别' }}</span>
<span class="icon icon-right"></span>
</span>
</label>
</li>
<li>
<label>生日
<span class="details-birthday">
<span class="birthday-span">{{spanbirthday}}</span>
<input class="birthday" type="date" v-model='currentBirthday' @change="setBirthday" required></input>
</span>
</label>
</li>
<li>
<label>会员等级
<a class="grade" href="/me/grade">
<span class="icon icon-right"></span>
</a>
</label>
</li>
</ul>
</div>
</template>
<script>
... ... @@ -42,6 +45,7 @@
import yoho from 'yoho';
import tip from 'common/tip';
import select from 'common/select';
import HeaderBox from 'component/header.vue';
const genderSel = select([{
key: '1',
... ... @@ -120,7 +124,8 @@
tip('网络错误');
});
}
}
},
components: {HeaderBox}
};
</script>
... ...
<template>
<div>
<header-box title="订单详情" ref="header"></header-box>
<template v-if="show">
<div class="order-status">
<p v-if="order.is_cancel === 'Y'">交易已取消</p>
... ... @@ -72,6 +73,7 @@
import yoho from 'yoho';
import interceptClick from 'common/intercept-click';
import genderSelect from 'common/select';
import HeaderBox from 'component/header.vue';
export default {
props: ['order_code'],
... ... @@ -281,7 +283,8 @@
return false;
});
}
}
},
components: {HeaderBox}
};
</script>
<style>
... ...
<template>
<div class="logistic-page yoho-page">
<header-box title="物流信息" ref="header"></header-box>
<div class="overview">
<div class="left" >
<img class="logoicon" v-img-src="{src: logo, width: 90, height: 90}"/>
... ... @@ -161,6 +162,7 @@ $border_color_light: #eee;
import $ from 'jquery';
import qs from 'yoho-qs';
import tip from 'common/tip';
import HeaderBox from 'component/header.vue';
export default {
data() {
... ... @@ -187,7 +189,8 @@ $border_color_light: #eee;
}).fail(() => {
tip('网络错误');
});
}
},
components: {HeaderBox}
};
</script>
... ...
<template>
<div>
<header-box :title="title" ref="header"></header-box>
<div class="order-wrapper" v-show="orderList.length > 0">
<ul id="order-list" v-infinite-scroll="getOrderData" infinite-scroll-disabled="busy" infinite-scroll-distance="10">
<li class="order-item" v-for="(order, index) in orderList" :key="index">
... ... @@ -69,6 +70,8 @@
import Modal from 'common/modal';
import interceptClick from 'common/intercept-click';
import yoho from 'yoho';
import qs from 'yoho-qs';
import HeaderBox from 'component/header.vue';
export default {
props: ['type'],
... ... @@ -83,6 +86,19 @@
orderList: []
};
},
computed: {
title() {
if (qs.type === '1') {
return '我的订单';
} else if (qs.type === '2') {
return '待付款';
} else if (qs.type === '3') {
return '待发货';
} else if (qs.type === '4') {
return '待收货';
}
}
},
created() {
this.getOrderData();
... ... @@ -260,7 +276,8 @@
});
});
}
}
},
components: {HeaderBox}
};
</script>
... ...
<template>
<div>
<header-box title="浏览记录" ref="header"></header-box>
<div v-if="hasdata">
<div class='nav'>
<div class="fixed">
... ... @@ -35,6 +36,7 @@ import $ from 'jquery';
import swiperList from 'component/me/swiperList.vue';
import modal from 'common/modal';
import interceptClick from 'common/intercept-click';
import HeaderBox from 'component/header.vue';
let originList, originCategory, categoryLen;
export default {
... ... @@ -47,7 +49,8 @@ export default {
};
},
components: {
swiperList
swiperList,
HeaderBox
},
methods: {
imgerror() {
... ...
<template>
<div>
<header-box title="退/换货" ref="header"></header-box>
<div class="order-wrapper return-goods" v-show="orderList.length > 0">
<ul v-infinite-scroll="getRefundData" infinite-scroll-disabled="busy" infinite-scroll-distance="10">
<li class="order-item" v-for="(order, index) in orderList" :key="index">
... ... @@ -56,6 +57,7 @@
import tip from 'common/tip';
import Modal from 'common/modal';
import yoho from 'yoho';
import HeaderBox from 'component/header.vue';
export default {
data() {
... ... @@ -141,7 +143,8 @@
});
});
}
}
},
components: {HeaderBox}
};
</script>
<style>
... ...
<template>
<div>
<header-box :title="title" ref="header"></header-box>
<template v-if="show">
<div class="status-desc">
<p>{{detail.status_name}}</p>
... ... @@ -115,6 +116,7 @@
import tip from 'common/tip';
import yoho from 'yoho';
import Modal from 'common/modal';
import HeaderBox from 'component/header.vue';
export default {
props: ['applyid', 'type'],
... ... @@ -136,6 +138,16 @@
}
});
},
computed: {
title() {
if (this.type === 'refund') {
return '退货状态';
} else if (this.type === 'exchange') {
return '换货状态';
}
return '';
}
},
methods: {
reload() {
this.id = '';
... ... @@ -201,7 +213,8 @@
});
});
}
}
},
components: {HeaderBox}
};
</script>
... ...
<template>
<div class="return return-refund">
<product-list :list="list" :data="refundData" type="refund"></product-list>
<div class="return-amount">
<!-- TODO:退货信息优化为组件 -->
<div class="return-amount-item">
退款方法
<span class="icon icon-right"></span>
<select v-model="amount.return_amount_mode" name="amount-mode">
<option v-for="mode in refundData.return_amount_mode" :key="mode.id" :value="mode.id">{{mode.name}}</option>
</select>
</div>
<template v-if="amount.return_amount_mode === 2">
<div class="return-amount-item">
<span class="name">银行</span>
<input v-model="amount.bank_name" type="text" placeholder="请填写银行名称">
</div>
<div class="return-amount-item">
<span class="name">卡号</span>
<input v-model="amount.bank_card" type="text" placeholder="请填写银行卡卡号">
</div>
<div>
<header-box title="退货申请" ref="header"></header-box>
<div class="return return-refund">
<product-list :list="list" :data="refundData" type="refund"></product-list>
<div class="return-amount">
<!-- TODO:退货信息优化为组件 -->
<div class="return-amount-item">
<span class="name">姓名</span>
退款方法
<input v-model="amount.payee_name" type="text" placeholder="收款人姓名">
<span class="icon icon-right"></span>
<select v-model="amount.return_amount_mode" name="amount-mode">
<option v-for="mode in refundData.return_amount_mode" :key="mode.id" :value="mode.id">{{mode.name}}</option>
</select>
</div>
</template>
<template v-if="amount.return_amount_mode === 3">
<div class="return-amount-item">
<span class="name">帐号</span>
<input v-model="amount.alipay_account" type="text" placeholder="请填写支付宝帐号">
</div>
<div class="return-amount-item">
<span class="name">姓名</span>
<input v-model="amount.alipay_name" type="text" placeholder="收款人姓名">
</div>
</template>
</div>
<div v-if="refundData.return_amount_info" class="return-amount-info">
{{refundData.return_amount_info}}
<template v-if="amount.return_amount_mode === 2">
<div class="return-amount-item">
<span class="name">银行</span>
<input v-model="amount.bank_name" type="text" placeholder="请填写银行名称">
</div>
<div class="return-amount-item">
<span class="name">卡号</span>
<input v-model="amount.bank_card" type="text" placeholder="请填写银行卡卡号">
</div>
<div class="return-amount-item">
<span class="name">姓名</span>
<input v-model="amount.payee_name" type="text" placeholder="收款人姓名">
</div>
</template>
<template v-if="amount.return_amount_mode === 3">
<div class="return-amount-item">
<span class="name">帐号</span>
<input v-model="amount.alipay_account" type="text" placeholder="请填写支付宝帐号">
</div>
<div class="return-amount-item">
<span class="name">姓名</span>
<input v-model="amount.alipay_name" type="text" placeholder="收款人姓名">
</div>
</template>
</div>
<div v-if="refundData.return_amount_info" class="return-amount-info">
{{refundData.return_amount_info}}
</div>
</div>
</div>
</template>
... ... @@ -56,6 +59,7 @@
import yoho from 'yoho';
import productList from 'me/return/list.vue';
import reasonConfig from 'me/return/reason';
import HeaderBox from 'component/header.vue';
export default {
data() {
... ... @@ -172,7 +176,8 @@
}
},
components: {
productList
productList,
HeaderBox
}
};
</script>
... ...
<template>
<div class="edit-logistics-page">
<header-box title="商品寄回" ref="header"></header-box>
<div class="edit-logistics">
<label @click="companylist">
选择快递公司<input class="company-val" type="text" :value="company_name" readonly>
... ... @@ -19,6 +20,7 @@
import tip from 'common/tip';
import yoho from 'yoho';
import modal from 'common/modal';
import HeaderBox from 'component/header.vue';
export default {
props: ['applyid', 'type', 'company_id', 'company_name'],
... ... @@ -72,7 +74,8 @@
});
});
}
}
},
components: {HeaderBox}
};
</script>
... ...
<template>
<cheader title="商品详情" class="product-header ghost" ref="header"></cheader>
<header-box title="商品详情" class="product-header ghost" ref="header"></header-box>
</template>
<style>
.product-header {
... ... @@ -16,7 +16,7 @@
</style>
<script>
import yoho from 'yoho';
import cheader from 'component/header.vue';
import HeaderBox from 'component/header.vue';
export default {
data() {
... ... @@ -29,7 +29,7 @@
img: String
},
components: {
cheader
HeaderBox
},
methods: {
toggle() {
... ...
<template>
<div>
<cheader :title="sortName" class="list-header"></cheader>
<filter-box :val="order" :filter="filterConfig" v-if="enableOrder" :fix-ios-top="fixIosTop"></filter-box>
<header-box :title="sortName" class="list-header"></header-box>
<filter-box :val="order" :filter="filterConfig" v-if="enableOrder"></filter-box>
<product-list :data="productList" :state="listState" class="list-items"></product-list>
<shopping-bag :cart-count="cartCount" v-if="isApp"></shopping-bag>
</div>
... ... @@ -15,7 +15,7 @@
import qs from 'yoho-qs/parse';
import bus from 'common/vue-bus';
import tip from 'common/tip';
import cheader from 'component/header.vue';
import HeaderBox from 'component/header.vue';
import ProductList from 'component/product/list.vue';
import ShoppingBag from 'component/product/shopping-bag.vue';
import FilterBox from 'component/product/filter/index.vue';
... ... @@ -76,7 +76,7 @@
}
},
components: {
cheader,
HeaderBox,
ProductList,
ShoppingBag,
FilterBox
... ...
<template>
<div>
<cheader title="新品抢先看"></cheader>
<filter-box :val="order" :filter="filterConfig" v-if="enableOrder" :fix-ios-top="needFix"></filter-box>
<header-box title="新品抢先看"></header-box>
<filter-box :val="order" :filter="filterConfig" v-if="enableOrder"></filter-box>
<product-list :data="productList" :state="listState" class="list-items"></product-list>
<shopping-bag :cart-count="cartCount" v-if="isApp"></shopping-bag>
</div>
... ... @@ -13,7 +13,7 @@
import qs from 'yoho-qs/parse';
import bus from 'common/vue-bus';
import tip from 'common/tip';
import cheader from 'component/header.vue';
import HeaderBox from 'component/header.vue';
import lazyload from 'vue-lazyload';
import infinitScroll from 'vue-infinite-scroll';
import ProductList from 'component/product/list.vue';
... ... @@ -48,7 +48,6 @@
enableOrder: false,
order: '',
cartCount: 0,
needFix: yoho.isiOS
};
},
computed: {
... ... @@ -71,7 +70,7 @@
}
},
components: {
cheader,
HeaderBox,
ProductList,
FilterBox,
shoppingBag
... ...
... ... @@ -2,10 +2,9 @@
<div>
<top-bar :share-data="shareData" :show-top-bar="showTopBar"></top-bar>
<div :class='{"shop-goods-top": true}' class="list-items">
<goods-list :data="productList" :state="listState"></goods-list>
<product-list :data="productList" :state="listState"></product-list>
</div>
<filter-box :val="order" :filter="filterConfig" v-if="enableOrder" ref="filter"
:fix-ios-top="fixIosTop"></filter-box>
<filter-box :val="order" :filter="filterConfig" v-if="enableOrder" ref="filter"></filter-box>
</div>
</template>
<style>
... ... @@ -29,7 +28,7 @@
import topBar from 'product/shop/top-bar.vue'; // 顶部栏,包括返回、收藏店铺、分享,打开筛选页面
import shopTop from 'product/shop/shop-top.vue'; // 店铺头部信息
import goodsList from 'component/product/list.vue';
import ProductList from 'component/product/list.vue';
import FilterBox from 'component/product/filter/index.vue';
const $shop = $('#shop');
... ... @@ -179,7 +178,7 @@
components: {
topBar,
shopTop,
goodsList,
ProductList,
FilterBox
},
created() {
... ...
<template>
<div :style="{display: topBarDisplay}">
<cheader :title="title" ref="header"></cheader>
<header-box :title="title" ref="header"></header-box>
</div>
</template>
... ... @@ -17,7 +17,7 @@
<script>
import yoho from 'yoho';
import $ from 'jquery';
import cheader from 'component/header.vue';
import HeaderBox from 'component/header.vue';
import tip from 'common/tip';
export default {
... ... @@ -41,7 +41,7 @@
}
},
components: {
cheader
HeaderBox
},
methods: {
goBack() {
... ...
... ... @@ -7772,9 +7772,9 @@ vm-browserify@0.0.4:
dependencies:
indexof "0.0.1"
vue-awesome-swiper@^2.5.4:
version "2.5.4"
resolved "http://npm.yoho.cn/vue-awesome-swiper/-/vue-awesome-swiper-2.5.4.tgz#265a2a3ec2f9830d6b0175ea06784c36a261c54a"
vue-awesome-swiper@^2.6.0:
version "2.6.2"
resolved "http://npm.yoho.cn/vue-awesome-swiper/-/vue-awesome-swiper-2.6.2.tgz#e268882b2be1cef738226270b820d8e63277b689"
dependencies:
swiper "^3.4.2"
... ...