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
ccbikai
9 years ago
Commit
268bf275017568eb4bbd0c6ada4aa6b783a6e503
2 parents
5cdf83d4
f976a126
Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
45 deletions
public/vue/component/header.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/component/header.vue
View file @
268bf27
<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/me/fav-brand-list.vue
View file @
268bf27
...
...
@@ -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 @
268bf27
...
...
@@ -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 @
268bf27
...
...
@@ -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 @
268bf27
...
...
@@ -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 @
268bf27
...
...
@@ -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