Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohoblk-wap
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
陈轩
9 years ago
Commit
5d62f48261a732b68c4f1e190fe5f9888c6fdd17
2 parents
b250206d
268bf275
Merge remote-tracking branch 'origin/develop' into develop
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
61 additions
and
55 deletions
public/vue/channel/tab.vue
public/vue/component/header.vue
public/vue/editorial/detail.vue
public/vue/editorial/index-box.vue
public/vue/me/fav-brand-list.vue
public/vue/me/fav-product-list.vue
public/vue/product/detail/top-nav.vue
public/vue/product/shop/share-box.vue
public/vue/product/shop/top-bar.vue
public/vue/channel/tab.vue
View file @
5d62f48
<template>
<div v-if="channel.length" class="channel-tab">
<div class="channel" v-for="(index, item) in channel" v-bind:class="{focus: index === current}" v-on:click="changeChannel(index)">
<div class="channel" v-for="(index, item) in channel" v-bind:class="{focus: index === current}" v-on:click="changeChannel(index)"
v-bind:style="{width: (1 / channel.length) * 100 + '%'}"
>
<span class="name">{{item.name | uppercase}}</span>
</div>
</div>
...
...
@@ -84,7 +84,6 @@
.channel {
display: inline-block;
line-height: 90px;
width: 33%;
color: #999;
&.focus {
...
...
public/vue/component/header.vue
View file @
5d62f48
<template>
<div class="blk-header-wrap" :class="class">
<div class="blk-header">
<div class="blk-header-left">
<div class="header-wrap" :class="class">
<div class="header">
<div class="header-left">
<slot name="left">
<i class="icon icon-left" @click="goBack"></i>
</slot>
</div>
<div class="
blk-
header-right">
<div class="header-right">
<slot name="right"></slot>
</div>
<div class="blk-header-main">
<span class="blk-header-title">{{title}}</span>
<div class="header-main">
<span class="header-title">{{title}}</span>
</div>
</div>
<div class="
blk-
header-gap"></div>
<div class="header-gap"></div>
</div>
</template>
<script>
...
...
@@ -29,7 +29,7 @@
};
</script>
<style>
.
blk-
header {
.header {
box-sizing: content-box;
position: fixed;
top: 0;
...
...
@@ -47,12 +47,12 @@
color: #000;
.icon,
.
blk-
header-title {
.header-title {
vertical-align: middle;
}
}
.
blk-
header-main {
.header-main {
display: block;
text-align: center;
margin-left: auto;
...
...
@@ -62,11 +62,11 @@
text-overflow: ellipsis;
}
.
blk-
header-left {
.header-left {
float: left;
}
.
blk-
header-right {
.header-right {
float: right;
.icon {
...
...
@@ -74,17 +74,17 @@
}
}
.
blk-
header-gap {
.header-gap {
height: 100px;
background-color: transparent;
}
.app.ios {
.
blk-
header {
.header {
padding-top: 60px;
}
.
blk-
header-gap {
.header-gap {
height: calc(70 + 60 + 10)px;
}
}
...
...
public/vue/editorial/detail.vue
View file @
5d62f48
...
...
@@ -183,9 +183,9 @@
module.exports = {
components: {
'content-block': require('./content-block.vue'),
'product-list': require('component/product/list.vue'),
'top-nav': require('./top-nav.vue')
contentBlock: require('./content-block.vue'),
productList: require('component/product/list.vue'),
topNav: require('./top-nav.vue')
},
data() {
return {
...
...
public/vue/editorial/index-box.vue
View file @
5d62f48
<template>
<resources v-bind:content-code.sync="contentCode"></resources>
<div v-infinite-scroll="getNewsList()"
infinite-scroll-disabled="scrollDisabled"
>
<div v-infinite-scroll="getNewsList()">
<div v-for="editorial in editorialList" class="editorial-box">
<div class="img">
<a href='{{"/editorial/" + editorial.id + ".html"}}'>
...
...
@@ -93,25 +93,30 @@
/* 获取资讯列表数据 */
getNewsList() {
if (this.scrollDisabled) {
return;
}
this.scrollDisabled = true;
$.get({
url: '/editorial/list.json',
data: {
page: this.page
++
,
page: this.page,
channel: this.channel
}
}).done(result => {
if (result.code === 200) {
if (this.editorialList.length > 0 && result.data.list.length > 0) {
this.$set('editorialList', this.editorialList.concat(result.data.list));
} else {
} else
if (result.data.list.length > 0)
{
this.editorialList = result.data.list;
}
this.page++;
this.scrollDisabled = false;
} else {
this.scrollDisabled = true;
tip('没有了...');
}
}).fail(() => {
t
ip('服务器错误')
;
t
his.scrollDisabled = false
;
});
},
...
...
public/vue/me/fav-brand-list.vue
View file @
5d62f48
...
...
@@ -40,7 +40,6 @@
const tip = require('common/tip');
const interceptClick = require('common/intercept-click');
const yoho = require('yoho');
const bus = require('common/vue-bus');
module.exports = {
data() {
...
...
@@ -92,11 +91,6 @@
}
this.nullbox = this.brandData.length ? 'hide' : '';
if (this.page === 1) {
yoho.showLoading(false);
this.updateNavBar();
}
}).fail(() => {
tip('网络错误');
});
...
...
@@ -149,7 +143,7 @@
return false;
} else {
this.pageX = event.targetTouches[0].pageX;
let
delBtn = $('#del-' + id);
var
delBtn = $('#del-' + id);
if (delBtn.hasClass('hide')) {
delBtn.removeClass('hide');
...
...
@@ -228,9 +222,15 @@
this.updateNavBar();
});
if (yoho.isApp) {
bus.$on('app.favourite.tabChange', this.updateNavBar);
}
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
this.updateNavBar();
}
});
},
ready() {
yoho.showLoading(false);
this.updateNavBar();
}
};
</script>
...
...
public/vue/me/fav-product-list.vue
View file @
5d62f48
...
...
@@ -45,7 +45,6 @@
const tip = require('common/tip');
const interceptClick = require('common/intercept-click');
const yoho = require('yoho');
const bus = require('common/vue-bus');
module.exports = {
data() {
...
...
@@ -73,7 +72,12 @@
if ($.isEmptyObject(data) || data.pageTotal === 0) {
this.busy = true;
} else {
this.busy = this.page === data.pageTotal;
if (this.page === data.pageTotal) {
this.busy = true;
} else {
this.busy = false;
}
const list = data.productList || [];
list.forEach(o => {
...
...
@@ -107,11 +111,6 @@
}
this.nullbox = this.productData.length ? 'hide' : '';
if (this.page === 1) {
yoho.showLoading(false);
this.updateNavBar();
}
}).fail(() => {
tip('网络错误');
});
...
...
@@ -163,7 +162,7 @@
return false;
} else {
this.pageX = event.targetTouches[0].pageX;
let
delBtn = $('#del-' + id);
var
delBtn = $('#del-' + id);
if (delBtn.hasClass('hide')) {
delBtn.removeClass('hide');
...
...
@@ -230,7 +229,6 @@
if (!this.productData.length) {
header.right.des = '';
}
yoho.updateNavigationBar({
header: header
});
...
...
@@ -243,9 +241,15 @@
this.updateNavBar();
});
if (yoho.isApp) {
bus.$on('app.favourite.tabChange', this.updateNavBar);
}
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
this.updateNavBar();
}
});
},
ready() {
yoho.showLoading(false);
this.updateNavBar();
}
};
</script>
...
...
public/vue/product/detail/top-nav.vue
View file @
5d62f48
...
...
@@ -5,11 +5,11 @@
</template>
<style>
.top-nav {
.
blk-
header {
.header {
background-color: transparent;
}
.
blk-
header-gap {
.header-gap {
display: none;
}
}
...
...
public/vue/product/shop/share-box.vue
View file @
5d62f48
...
...
@@ -25,7 +25,6 @@
.brand-intro {
margin: 30px;
min-height: 400px;
}
.tip {
...
...
@@ -45,7 +44,6 @@
width: 100%;
height: 365px;
}
}
</style>
<script>
...
...
public/vue/product/shop/top-bar.vue
View file @
5d62f48
...
...
@@ -11,23 +11,23 @@
<style>
.top-box {
.
blk-
header {
.header {
background-color: transparent;
color: #fff;
}
.
blk-
header-gap {
.header-gap {
display: none;
}
}
.top-change {
.
blk-
header {
.header {
background-color: #fff;
color: #000;
}
.
blk-
header-gap {
.header-gap {
display: block;
}
}
...
...
Please
register
or
login
to post a comment