mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 08:06:44 +08:00
【银保app】原生方法,获取首页高度
This commit is contained in:
@@ -26,7 +26,13 @@ export default {
|
||||
reload: this.reload
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
window['getMessage'] = this.getMessage(1)
|
||||
},
|
||||
methods: {
|
||||
getMessage(data){
|
||||
this.$store.commit('updateMessageStatus',data )
|
||||
},
|
||||
reload() {
|
||||
this.isRouterAlive = false
|
||||
this.$nextTick(() => {
|
||||
|
||||
@@ -28,6 +28,7 @@ export default new Vuex.Store({
|
||||
secondManageCode: '', //内勤所需参数
|
||||
thirdManageCode: '' ,//内勤所需参数
|
||||
orderDetail:{},//无优卡分享微信端订单信息
|
||||
messageStatus:false,
|
||||
},
|
||||
mutations: {
|
||||
setOrderDetail(state,data){
|
||||
@@ -73,6 +74,13 @@ export default new Vuex.Store({
|
||||
//更新 保全-续期账户变更保单信息
|
||||
updatePcPolicyInfo(state, val) {
|
||||
state.pcList = val
|
||||
},
|
||||
updateMessageStatus(state, val) {
|
||||
if(val){
|
||||
state.messageStatus = true
|
||||
}else{
|
||||
state.messageStatus = false
|
||||
}
|
||||
}
|
||||
},
|
||||
getters: {
|
||||
@@ -96,6 +104,10 @@ export default new Vuex.Store({
|
||||
},
|
||||
getPcPolicyInfo(state) {
|
||||
return state.pcList
|
||||
},
|
||||
getMessageStatus(state) {
|
||||
return state.messageStatus
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="public_container">
|
||||
<div class="public_container" :style="{marginTop:marginTop+'px'}">
|
||||
<div class="head" style="margin: 10px;border-radius: 5px;">
|
||||
<van-swipe :autoplay="3000" style="width: 100%; height: 200px">
|
||||
<van-swipe-item v-for="(item, index) in activity" :key="index">
|
||||
@@ -285,6 +285,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
config,
|
||||
marginTop:'80',
|
||||
getCodeValue:'',
|
||||
png8,
|
||||
activity: [],
|
||||
@@ -328,6 +329,7 @@ export default {
|
||||
mounted(){
|
||||
this.getHomeConfigYB()
|
||||
this.setAnimation()
|
||||
this.setMarginTop()
|
||||
if(this.thisValue >= 10){
|
||||
this.colorOne = true
|
||||
}
|
||||
@@ -339,6 +341,17 @@ export default {
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
setMarginTop(){
|
||||
EWebBridge.webCallAppInJs("top_bar_height").then(data => {
|
||||
let result = JSON.parse(data)
|
||||
if(result){
|
||||
// 获取高度成功
|
||||
let height = result.height
|
||||
// 设置高度
|
||||
this.marginTop = height
|
||||
}
|
||||
})
|
||||
},
|
||||
getHomeConfigYB(){
|
||||
let params = {
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<template>
|
||||
<div class="public_container" style="position: relative;">
|
||||
<p style="color: #fff;font-size: 20px;position: absolute;top: 50px;right: 10px;padding: 5px;background: #698ad9;border-radius: 20px;">
|
||||
<van-icon v-if="messages" name="chat-o" />
|
||||
<van-icon v-if="!messages" name="chat-o" dot/>
|
||||
<p style="color: #fff;font-size: 20px;position: absolute;top: 50px;right: 10px;padding: 5px;background: #698ad9;border-radius: 20px;width: 20px;display: flex;justify-content: center;align-items: center;">
|
||||
<van-icon v-if="!messages" name="chat-o" />
|
||||
<van-icon v-if="messages" name="chat-o" dot/>
|
||||
<!-- <van-icon name="chat-o" dot /> -->
|
||||
</p>
|
||||
|
||||
<div style="display:flex;justify-content: flex-start;padding: 65px 15px 15px 20px;align-items: center;">
|
||||
@@ -71,6 +72,8 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.messages = this.$store.state.messageStatus
|
||||
console.log(this.$store.state.messageStatus)
|
||||
this.getHomeConfigYB()
|
||||
},
|
||||
methods:{
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="public_container" style="position: relative;">
|
||||
<p style="color: #fff;font-size: 20px;position: absolute;top: 50px;right: 10px;padding: 5px;background: #698ad9;border-radius: 20px;">
|
||||
<van-icon v-if="messages" name="chat-o" />
|
||||
<van-icon v-if="!messages" name="chat-o" dot/>
|
||||
<p style="color: #fff;font-size: 20px;position: absolute;top: 50px;right: 10px;padding: 5px;background: #698ad9;border-radius: 20px;width: 20px;display: flex;justify-content: center;align-items: center;">
|
||||
<van-icon v-if="!messages" name="chat-o" />
|
||||
<van-icon v-if="messages" name="chat-o" dot/>
|
||||
</p>
|
||||
|
||||
<div class="head" style="color: #fff;font-size: 20px;padding-top: 50px;text-align: center;">
|
||||
@@ -74,6 +74,8 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.messages = this.$store.state.messageStatus
|
||||
console.log(this.messages)
|
||||
this.getHomeConfigYB()
|
||||
},
|
||||
methods:{
|
||||
|
||||
Reference in New Issue
Block a user