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