提交 ad1160af 编写于 作者: chendeli's avatar chendeli

add

上级 a1156208
......@@ -3,7 +3,7 @@
<div :class="isFixed ? 'cource-header fixed' : 'cource-header'">
<div class="fixBox">
<div class="bgFill"></div>
<div class="bgFill" :style="{height:ptop}"></div>
<div class="font-title">
{{title}}
</div>
......@@ -94,11 +94,32 @@ export default {
this.ptop = this.popHeight + "px";
// this.getData();
},
created(){
let _this = this;
window.__getStatusBarHeight = function(parm){
if(window.__isAndroid){
_this.popHeight = parm.statusBarHeight/2
}else{
_this.popHeight = parm.statusBarHeight
}
_this.ptop = _this.popHeight+7+'px';
_this.menuptop = _this.popHeight+7+'px'
//alert(parm.statusBarHeight+'kkkkk');
}
this.getStatusHight()
},
watch:{
},
components:{
// LOADING
},
methods: {
getStatusHight(){
rocNative.getStatusBarHeight({
__funcName: '__getStatusBarHeight'
......
......@@ -6,7 +6,7 @@
<img v-if="searchFix" class="search-img" src='../../images/search-grey.png'>
<img v-else class="search-img" src='../../images/search-white.png'>
</div> -->
<div class="bgFill"></div>
<div class="bgFill" :style="{height:ptop}"></div>
<div class="fixBox">
<div class="header-right" @click="goToPage">
<img v-if="searchFix" class="info" src='../../images/msg2.png'>
......@@ -49,23 +49,33 @@ export default {
default:false,
}
},
watch:{
// searchFix:function(n){
// if(n){
// alert(this.searchFix)
// }
// }
},
created(){
let _this = this;
window.__getStatusBarHeight = function(parm){
if(window.__isAndroid){
_this.popHeight = parm.statusBarHeight/2
}else{
_this.popHeight = parm.statusBarHeight
}
_this.ptop = _this.popHeight+7+'px';
_this.menuptop = _this.popHeight+7+'px'
// alert(parm.statusBarHeight);
}
this.getStatusHight()
},
mounted(){
// this.getStatusHight();
// if(window.__isAndroid){
// this.popHeight = this.statusBarHeight/2
......
......@@ -130,7 +130,7 @@ export default {
msgCount:'',
userToken:'',
searchFix:false,
statusBarHeight:20,
statusBarHeight:0,
userMobile:'',
userToken:'',
isHeightFromApp:false,
......@@ -158,6 +158,7 @@ export default {
},
created () {
let _this = this;
_this.initAll()
_this.getUserInfo();
window.__nativeCallMsg = function(params){
......@@ -175,8 +176,8 @@ export default {
window.__refresh = function(params){
//__getToken()
alert('__refresh');
alert(JSON.stringify(params))
// alert('__refresh');
//alert(JSON.stringify(params))
//返回
if(_this.isRefreshFromBack){
......@@ -194,19 +195,20 @@ export default {
}
window.__getStatusBarHeight = function(parm){
alert("__getStatusBarHeight");
_this.statusBarHeight = parm.statusBarHeight;
_this.isHeightFromApp = true;
// alert(parm.statusBarHeight);
// window.__getStatusBarHeight = function(parm){
// alert(JSON.stringify(parm))
// _this.statusBarHeight = parm.statusBarHeight;
// _this.isHeightFromApp = true;
// // alert(parm.statusBarHeight);
}
// }
// alert("token之前");
window.__getUserInfo = function(parm){
alert("__getUserInfo");
alert(JSON.stringify(parm))
// alert("__getUserInfo");
// alert(JSON.stringify(parm))
_this.systemType = parm.systemType;
_this.appVersion = parm.appVersion;
_this.token = parm.userToken;
......@@ -220,12 +222,13 @@ export default {
_this.initByToken(parm.userToken);
}
_this.getStatusHight();
_this.initAll()
//_this.getStatusHight();
// _this.token = 'BE1D60CAE8F24649B4F72D47E964A58B';
// _this.msgCount = '2'
// _this.token = 'BE1D60CAE8F24649B4F72D47E964A58B';
// _this.msgCount = '2'
// _this.isShowKeep = true;
// _this.isHeightFromApp = true;
// _this.getKeepData(_this.userToken);
......@@ -242,6 +245,7 @@ export default {
mounted(){
this.wrapperHeight =document.documentElement.clientHeight - this.$refs.wrapper.getBoundingClientRect().top;
window.addEventListener('scroll', this.scrollFun);
},
beforeDestroyed(){
......@@ -306,7 +310,7 @@ export default {
this.getAdjustData(userToken);
this.getNewsData(userToken);
this.getEvaluctData(userToken);
window.addEventListener('scroll', this.scrollFun);
},
initAll(){
......@@ -672,7 +676,7 @@ export default {
}
var searchBox = document.querySelector('#search-top').offsetParent.offsetTop;
//console.log(newCourseTop);
//console.log(searchBox);
if(scrollTop +clientHeight/2 >= newCourseTop){
//alert('scrollTop:'+scrollTop+'newCourseTop:'+newCourseTop);
//this.showNewCorse = false;
......@@ -680,12 +684,7 @@ export default {
}else{
this.isShowBackTop = false;
}
if(scrollTop > searchBox){
///console.log(scrollTop,searchBox);
this.searchFix = true;
}else{
this.searchFix = false;
}
if(scrollTop+30 >= adjustTop){
this.isFixed = true;
this.searchFix = false;
......@@ -693,6 +692,14 @@ export default {
this.isFixed = false;
}
if(scrollTop > searchBox){
//alert("000");
///console.log(scrollTop,searchBox);
this.searchFix = true;
}else{
this.searchFix = false;
}
},
//五秒之后收起
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册