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
1a78506067fab5e36291882def4f3ed2cb2351db
2 parents
03748359
99c666f3
Merge remote-tracking branch 'origin/develop' into develop
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
28 deletions
apps/channel/models/brand.js
public/vue/channel/brand-list.vue
public/vue/me/fav-brand-list.vue
public/vue/me/fav-product-list.vue
apps/channel/models/brand.js
View file @
1a78506
...
...
@@ -28,7 +28,8 @@ const handleBrandList = origin => {
brands
.
push
({
name
:
subValue
.
brand_name
,
link
:
'/brand/'
+
subValue
.
brand_domain
,
logo
:
subValue
.
brand_ico
logo
:
subValue
.
brand_ico
,
domain
:
subValue
.
brand_domain
});
});
...
...
public/vue/channel/brand-list.vue
View file @
1a78506
...
...
@@ -4,7 +4,7 @@
<div class="index"><a href="#{{item.index}}" name="{{item.index}}">{{item.index}}</a></div>
<div class="brand-big-box clearfix">
<div class="brand-box" v-for="brand in item.brands">
<a href="{{brand.
link
}}">
<a href="{{brand.
domain | brandUrl
}}">
<div class="brand-logo">
<img v-lazy="brand.logo | resize 150 150" alt="{{brand.name}}">
</div>
...
...
public/vue/me/fav-brand-list.vue
View file @
1a78506
...
...
@@ -40,6 +40,7 @@
const tip = require('common/tip');
const interceptClick = require('common/intercept-click');
const yoho = require('yoho');
const bus = require('common/vue-bus');
module.exports = {
data() {
...
...
@@ -91,6 +92,11 @@
}
this.nullbox = this.brandData.length ? 'hide' : '';
if (this.page === 1) {
yoho.showLoading(false);
this.updateNavBar();
}
}).fail(() => {
tip('网络错误');
});
...
...
@@ -143,7 +149,7 @@
return false;
} else {
this.pageX = event.targetTouches[0].pageX;
var
delBtn = $('#del-' + id);
let
delBtn = $('#del-' + id);
if (delBtn.hasClass('hide')) {
delBtn.removeClass('hide');
...
...
@@ -222,15 +228,9 @@
this.updateNavBar();
});
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
this.updateNavBar();
}
});
},
ready() {
yoho.showLoading(false);
this.updateNavBar();
if (yoho.isApp) {
bus.$on('app.favourite.tabChange', this.updateNavBar);
}
}
};
</script>
...
...
public/vue/me/fav-product-list.vue
View file @
1a78506
...
...
@@ -45,6 +45,7 @@
const tip = require('common/tip');
const interceptClick = require('common/intercept-click');
const yoho = require('yoho');
const bus = require('common/vue-bus');
module.exports = {
data() {
...
...
@@ -72,12 +73,7 @@
if ($.isEmptyObject(data) || data.pageTotal === 0) {
this.busy = true;
} else {
if (this.page === data.pageTotal) {
this.busy = true;
} else {
this.busy = false;
}
this.busy = this.page === data.pageTotal;
const list = data.productList || [];
list.forEach(o => {
...
...
@@ -111,6 +107,11 @@
}
this.nullbox = this.productData.length ? 'hide' : '';
if (this.page === 1) {
yoho.showLoading(false);
this.updateNavBar();
}
}).fail(() => {
tip('网络错误');
});
...
...
@@ -162,7 +163,7 @@
return false;
} else {
this.pageX = event.targetTouches[0].pageX;
var
delBtn = $('#del-' + id);
let
delBtn = $('#del-' + id);
if (delBtn.hasClass('hide')) {
delBtn.removeClass('hide');
...
...
@@ -229,6 +230,7 @@
if (!this.productData.length) {
header.right.des = '';
}
yoho.updateNavigationBar({
header: header
});
...
...
@@ -241,15 +243,9 @@
this.updateNavBar();
});
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
this.updateNavBar();
}
});
},
ready() {
yoho.showLoading(false);
this.updateNavBar();
if (yoho.isApp) {
bus.$on('app.favourite.tabChange', this.updateNavBar);
}
}
};
</script>
...
...
Please
register
or
login
to post a comment