|
|
<template>
|
|
|
<div id="header" class="blk-header-wrap top-box">
|
|
|
<div class="blk-header">
|
|
|
<div class="blk-header-left">
|
|
|
<span class="icon icon-setting" id="setting"></span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<cheader title="我的" class="ghost" fixed v-ref:header>
|
|
|
<i slot="left" class="icon icon-setting" id="setting"></i>
|
|
|
</cheader>
|
|
|
<div class="my-header">
|
|
|
<a class="user-info auth" id="user-info" href='/me/mydetails'>
|
|
|
<span class="user-avatar" :style="data.headIco ? 'background-image: url(' + data.headIco + ')' : ''"></span>
|
...
|
...
|
@@ -80,6 +76,7 @@ |
|
|
const yoho = require('yoho');
|
|
|
const $ = require('jquery');
|
|
|
const interceptClick = require('common/intercept-click');
|
|
|
const cheader = require('component/header.vue');
|
|
|
|
|
|
module.exports = {
|
|
|
data() {
|
...
|
...
|
@@ -87,6 +84,9 @@ |
|
|
data: {}
|
|
|
};
|
|
|
},
|
|
|
components: {
|
|
|
cheader
|
|
|
},
|
|
|
methods: {
|
|
|
reload() {
|
|
|
$('#address').off('click', this.addressClick)
|
...
|
...
|
@@ -154,6 +154,16 @@ |
|
|
}
|
|
|
});
|
|
|
|
|
|
window.addEventListener('scroll', () => {
|
|
|
let transparent = true;
|
|
|
|
|
|
if (window.scrollY > 20 ) {
|
|
|
transparent = false;
|
|
|
}
|
|
|
|
|
|
this.$refs.header.$el.classList.toggle('ghost', transparent);
|
|
|
});
|
|
|
|
|
|
document.addEventListener('visibilitychange', () => {
|
|
|
if (!document.hidden) {
|
|
|
this.reload();
|
...
|
...
|
@@ -172,29 +182,6 @@ |
|
|
color: #000;
|
|
|
}
|
|
|
|
|
|
.blk-header {
|
|
|
box-sizing: content-box;
|
|
|
position: fixed;
|
|
|
top: 0;
|
|
|
right: 0;
|
|
|
left: 0;
|
|
|
z-index: 210;
|
|
|
padding: 20px 30px;
|
|
|
height: 70px;
|
|
|
max-width: 750px;
|
|
|
margin-left: auto;
|
|
|
margin-right: auto;
|
|
|
line-height: 70px;
|
|
|
font-size: 48px;
|
|
|
background-color: #fff;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
color: #000;
|
|
|
|
|
|
.icon {
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.top-box {
|
|
|
.blk-header {
|
|
|
background-color: transparent;
|
...
|
...
|
@@ -208,15 +195,6 @@ |
|
|
}
|
|
|
}
|
|
|
|
|
|
.blk-header-left {
|
|
|
float: left;
|
|
|
}
|
|
|
|
|
|
.blk-header-gap {
|
|
|
height: calc(70 + 20 * 2 + 1)px;
|
|
|
background-color: transparent;
|
|
|
}
|
|
|
|
|
|
.my-header {
|
|
|
height: 469px;
|
|
|
background: resolve("me/header-bg.png");
|
...
|
...
|
|