增加bus, 测试修改原生按钮

This commit is contained in:
mengxiaolong
2021-03-03 10:37:58 +08:00
parent 1dd20275bb
commit fcfa634a3e
10 changed files with 154 additions and 65 deletions

View File

@@ -10,6 +10,9 @@
<van-tag plain color="#999999">状态</van-tag> <van-tag plain color="#999999">状态</van-tag>
<span class="ml5 span">重新投保失败</span> <span class="ml5 span">重新投保失败</span>
</p> </p>
<template #btns>
<van-button class="ml10" size="small" round type="danger">查看投保单</van-button>
</template>
</Order> </Order>
</van-list> </van-list>
</van-pull-refresh> </van-pull-refresh>

View File

@@ -4,11 +4,12 @@
<keep-alive> <keep-alive>
<component :is="componentName" /> <component :is="componentName" />
</keep-alive> </keep-alive>
<van-button type="danger" class="bottom-btn" v-no-more-click="1000" @click="nextStep">{{ nextStepText }}</van-button>
</div> </div>
</template> </template>
<script> <script>
import { bus } from './bus'
import { Dialog } from 'vant'
import InsureInformation from './InsureInformation' import InsureInformation from './InsureInformation'
import ProductInformation from './ProductInformation' import ProductInformation from './ProductInformation'
import NotificationInformation from './NotificationInformation' import NotificationInformation from './NotificationInformation'
@@ -39,17 +40,11 @@ export default {
default: default:
return 'InsureInformation' return 'InsureInformation'
} }
},
nextStepText() {
if (this.active === 3) {
return '提交'
} else {
return '下一步'
}
} }
}, },
data() { data() {
return { return {
isSpecialRead: false,
active: 0, active: 0,
progressItems: [ progressItems: [
{ name: '投保信息', icon: this.$assetsUrl + 'images/kmh/tbrxx_n.png', icon_active: this.$assetsUrl + 'images/kmh/tbrxx.png' }, { name: '投保信息', icon: this.$assetsUrl + 'images/kmh/tbrxx_n.png', icon_active: this.$assetsUrl + 'images/kmh/tbrxx.png' },
@@ -59,14 +54,28 @@ export default {
] ]
} }
}, },
created() {
bus.$on('isSpecialRead', this.specialRead)
},
methods: { methods: {
specialRead(payload) {
this.isSpecialRead = payload
},
nextStep() { nextStep() {
switch (this.active) { switch (this.active) {
case 0: case 0:
this.active++ this.active++
return return
case 1: case 1:
this.active++ if (!this.isSpecialRead) {
Dialog.alert({
title: '提示',
message: '亲,请您阅读和确认特别约定哦~',
confirmButtonColor: '#ff0000'
})
} else {
this.active++
}
return return
case 2: case 2:
this.active++ this.active++

View File

@@ -79,6 +79,8 @@
<InfoCell label="开户银行" /> <InfoCell label="开户银行" />
<InfoCell label="银行账号" /> <InfoCell label="银行账号" />
</DropdownBox> </DropdownBox>
<van-button type="danger" class="bottom-btn" v-no-more-click="1000">下一步</van-button>
</div> </div>
</template> </template>

View File

@@ -23,6 +23,8 @@
<p class="notifition bg-white p15"> <p class="notifition bg-white p15">
注意本次重新投保仅限于无其他补充告知的情况若您有其他补充告知您的条件不符合本重新投保流程请您联系保单服务专员或拨打4006946688咨询通过其他途径进行投保申请 注意本次重新投保仅限于无其他补充告知的情况若您有其他补充告知您的条件不符合本重新投保流程请您联系保单服务专员或拨打4006946688咨询通过其他途径进行投保申请
</p> </p>
<van-button type="danger" class="bottom-btn" v-no-more-click="1000">下一步</van-button>
</div> </div>
</template> </template>

View File

@@ -23,10 +23,7 @@
<div class="divider mb10" /> <div class="divider mb10" />
<slot></slot> <slot></slot>
<div class="btns"> <div class="btns">
<slot name="btns"> <slot name="btns" />
<van-button size="small" round type="danger" plain>查看详情</van-button>
<van-button class="ml10" size="small" round type="danger" @click="insureAgain">重新投保</van-button>
</slot>
</div> </div>
</div> </div>
</div> </div>
@@ -42,19 +39,7 @@ export default {
data() { data() {
return {} return {}
}, },
methods: { methods: {}
insureAgain() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/insureAgain/progress`,
forbidSwipeBack: '1',
needRefresh: '1'
},
routerInfo: { path: `/insureAgain/progress` }
})
}
}
} }
</script> </script>

View File

@@ -64,27 +64,21 @@
<van-popup v-model="show" position="right" :style="style"> <van-popup v-model="show" position="right" :style="style">
<ReadingAgreement :needTime="false"> <ReadingAgreement :needTime="false">
<h3 class="p10">重新投保声明提示</h3> <h3 class="p10">特别约定提示</h3>
<p class="pl10">尊敬的xxx先生/女士</p>
<p class="p10"> <p class="p10">
您好您于保单生效日期投保的保单号为保单号码的国富人寿国富民惠医疗保险2020保单即将到期到期日期详见保单以下简称旧保单为保护您的权益即日起至<期满日后第60天>期间您可以选择重新投保国富人寿国富民惠医疗保险2020本次申请投保的国富人寿国富民惠医疗保险2020保单以下简称新保单请您仔细阅读以下内容 尊敬的xxx先生/女士
1.国富人寿国富民惠医疗保险2020合同保险期间为一年到期后需要重新投保 投保国富人寿国富民惠医疗保险2020以有社保身份投保的保单理赔时若通过社会基本医疗保险或者公费医疗就诊并结算的意外伤害医疗保险金的赔付比例为80%免赔额为0元理赔时若未通过社会基本医疗保险或者公费医疗就诊并结算的意外伤害医疗保险金的赔付比例为60%免赔额为100元以无社保身份投保的保单理赔时若未通过社会基本医疗保险或者公费医疗就诊并结算的意外伤害医疗保险金的赔付比例为70%免赔额为100元理赔时若通过社会基本医疗保险或者公费医疗就诊并结算的意外伤害医疗保险金的赔付比例为90%免赔额为0元
2.本次重新投保我们将按照国富人寿国富民惠医疗保险2020费率表中的在上一保险期间届满后60日内申请重新投保时对应的费率计算保费
3.若本次重新投保成功新保单免除等待期
4.本次重新投保仅限于无其他补充告知的情况若您有其他补充告知您的条件不符合本重新投保流程请您联系保单服务专员通过新增投保单进行投保申请
5.若您于旧保单满期前申请重新投保且于满期前成功支付保险费则新保单在旧保单保险期满日对应日的次日零时生效旧保单在保险期满日24时终止若您于旧保单满期后60天包含内重新投保申请且成功支付保险费则新保单于支付次日零时生效旧保单在保险期满日24时终止
6.若您未在旧保单满期后60天包含内申请重新投保则您的重新投保资格将被取消后续您可再次申请投保但新单不再与旧保单关联需重新计算等待期具体详情可咨询保单服务专员
</p> </p>
<template #action> <template #action>
<van-radio-group class="m10" v-model="radio"> <!-- <van-radio-group class="m10" v-model="radio">
<van-radio name="1"> <van-radio name="1">
<span style="font-size: 14px;">本人已阅读知晓本投保声明内容同意重新投保</span> <span style="font-size: 14px;">本人已阅读知晓本投保声明内容同意重新投保</span>
</van-radio> </van-radio>
<!-- <p style="font-size: 14px;" class="mt10"> <p style="font-size: 14px;" class="mt10">
<span>投保人签字</span> <span>投保人签字</span>
<van-button size="small" type="danger" disabled>签名</van-button> <van-button size="small" type="danger" disabled>签名</van-button>
</p> --> </p>
</van-radio-group> </van-radio-group> -->
<div class="btns"> <div class="btns">
<van-button type="danger" @click="readAgreement">不同意</van-button> <van-button type="danger" @click="readAgreement">不同意</van-button>
<van-button type="danger" @click="readAgreement">同意</van-button> <van-button type="danger" @click="readAgreement">同意</van-button>
@@ -92,10 +86,13 @@
</template> </template>
</ReadingAgreement> </ReadingAgreement>
</van-popup> </van-popup>
<van-button type="danger" class="bottom-btn" v-no-more-click="1000">下一步</van-button>
</div> </div>
</template> </template>
<script> <script>
import { bus } from './bus'
import InfoCell from './InfoCell' import InfoCell from './InfoCell'
import DropdownBox from './DropdownBox' import DropdownBox from './DropdownBox'
import ReadingAgreement from './ReadingAgreement' import ReadingAgreement from './ReadingAgreement'
@@ -126,6 +123,7 @@ export default {
readAgreement() { readAgreement() {
this.show = false this.show = false
this.isRead = true this.isRead = true
bus.$emit('isSpecialRead', true)
} }
} }
} }

View File

@@ -35,6 +35,8 @@
</p> </p>
</div> </div>
</DropdownBox> </DropdownBox>
<van-button type="danger" class="bottom-btn" v-no-more-click="1000">提交</van-button>
</div> </div>
</template> </template>

View File

@@ -1,34 +1,72 @@
<template> <template>
<van-pull-refresh v-model="isLoading" @refresh="onRefresh"> <div>
<van-list ref="uncommitted" v-model="loading" @load="onLoad" :finished="finished" finished-text="没有更多数据了"> <van-pull-refresh v-model="isLoading" @refresh="onRefresh">
<Order v-for="item in list" :key="item" :title="item"> <van-list ref="uncommitted" v-model="loading" @load="onLoad" :finished="finished" finished-text="没有更多数据了">
<p class="name mb8"> <Order v-for="item in list" :key="item" :title="item">
<van-tag plain color="#999999">保单保障日截止日期</van-tag> <p class="name mb8">
<span class="ml5 span">23453524234324</span> <van-tag plain color="#999999">保单保障日截止日期</van-tag>
<span class="ml5 span">23453524234324</span>
</p>
<p class="name">
<van-tag plain color="#999999">状态</van-tag>
<span class="ml5 span">重新投保失败</span>
</p>
<template #btns>
<van-button size="small" round type="danger" plain>查看详情</van-button>
<van-button class="ml10" size="small" round type="danger" @click="insureAgain">重新投保</van-button>
</template>
</Order>
</van-list>
</van-pull-refresh>
<van-popup v-model="isAgreementShow" position="right" :style="{ height: '100vh', width: '100vw' }">
<ReadingAgreement :needTime="false">
<h3 class="p10">重新投保声明提示</h3>
<p class="pl10">尊敬的xxx先生/女士</p>
<p class="p10">
您好您于保单生效日期投保的保单号为保单号码的国富人寿国富民惠医疗保险2020保单即将到期到期日期详见保单以下简称旧保单为保护您的权益即日起至<期满日后第60天>期间您可以选择重新投保国富人寿国富民惠医疗保险2020本次申请投保的国富人寿国富民惠医疗保险2020保单以下简称新保单请您仔细阅读以下内容
1.国富人寿国富民惠医疗保险2020合同保险期间为一年到期后需要重新投保
2.本次重新投保我们将按照国富人寿国富民惠医疗保险2020费率表中的在上一保险期间届满后60日内申请重新投保时对应的费率计算保费
3.若本次重新投保成功新保单免除等待期
4.本次重新投保仅限于无其他补充告知的情况若您有其他补充告知您的条件不符合本重新投保流程请您联系保单服务专员通过新增投保单进行投保申请
5.若您于旧保单满期前申请重新投保且于满期前成功支付保险费则新保单在旧保单保险期满日对应日的次日零时生效旧保单在保险期满日24时终止若您于旧保单满期后60天包含内重新投保申请且成功支付保险费则新保单于支付次日零时生效旧保单在保险期满日24时终止
6.若您未在旧保单满期后60天包含内申请重新投保则您的重新投保资格将被取消后续您可再次申请投保但新单不再与旧保单关联需重新计算等待期具体详情可咨询保单服务专员
</p> </p>
<p class="name"> <template #action>
<van-tag plain color="#999999">状态</van-tag> <van-radio-group class="m10" v-model="radio">
<span class="ml5 span">重新投保失败</span> <van-radio name="1">
</p> <span style="font-size: 14px;">本人已阅读知晓本投保声明内容同意重新投保</span>
</Order> </van-radio>
</van-list> </van-radio-group>
</van-pull-refresh> <div class="btns">
<van-button type="danger" block @click="nextStep">下一步</van-button>
</div>
</template>
</ReadingAgreement>
</van-popup>
</div>
</template> </template>
<script> <script>
import { PullRefresh, list, Tag } from 'vant' import { PullRefresh, list, Tag, Popup, Radio, RadioGroup } from 'vant'
import ReadingAgreement from './ReadingAgreement'
import Order from './Order' import Order from './Order'
export default { export default {
name: 'Uncommitted', name: 'Uncommitted',
components: { components: {
Order, Order,
ReadingAgreement,
[PullRefresh.name]: PullRefresh, [PullRefresh.name]: PullRefresh,
[list.name]: list, [list.name]: list,
[Tag.name]: Tag [Tag.name]: Tag,
[Popup.name]: Popup,
[RadioGroup.name]: RadioGroup,
[Radio.name]: Radio
}, },
data() { data() {
return { return {
radio: 1,
isAgreementShow: false,
list: [], list: [],
loading: false, loading: false,
finished: false, finished: false,
@@ -36,15 +74,44 @@ export default {
scrollTop: 0 scrollTop: 0
} }
}, },
activated() {
document.documentElement.scrollTo({
top: this.scrollTop
})
},
deactivated() {
this.scrollTop = document.documentElement.scrollTop
},
methods: { methods: {
appCallBack(data) {
if (data.trigger == 'left_button_click') {
if (this.isAgreementShow) {
this.isAgreementShow = false
setTimeout(() => {
window.EWebBridge.webCallAppInJs('webview_left_button', {
intercept: '1'
})
}, 100)
} else {
this.$jump({
flag: 'service'
})
}
}
},
nextStep() {
this.$jump({
flag: 'h5',
extra: {
url: location.origin + `/#/insureAgain/progress`,
forbidSwipeBack: '1',
needRefresh: '1'
},
routerInfo: { path: `/insureAgain/progress` }
})
},
insureAgain() {
setTimeout(() => {
window.EWebBridge.webCallAppInJs('webview_left_button', {
img: this.$assetsUrl + 'images/del-close-btn@3x.png',
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
window.appCallBack = this.appCallBack
this.isAgreementShow = true
},
async onLoad() { async onLoad() {
setTimeout(() => { setTimeout(() => {
for (let i = 0; i < 10; i++) { for (let i = 0; i < 10; i++) {

View File

@@ -0,0 +1,5 @@
import Vue from 'vue'
let bus = new Vue()
export { bus }

View File

@@ -8,9 +8,7 @@
</van-tabs> </van-tabs>
</van-sticky> </van-sticky>
<div class="container"> <div class="container">
<keep-alive> <component :is="is" />
<component :is="is" />
</keep-alive>
</div> </div>
</div> </div>
</template> </template>
@@ -42,6 +40,24 @@ export default {
return 'Committed' return 'Committed'
} }
} }
},
mounted() {
setTimeout(() => {
// eslint-disable-next-line no-undef
window.EWebBridge.webCallAppInJs('webview_left_button', {
intercept: '1' //是否拦截原生返回事件 1是 其他否
})
}, 100)
window.appCallBack = this.appCallBack
},
methods: {
appCallBack(data) {
if (data.trigger == 'left_button_click') {
this.$jump({
flag: 'service'
})
}
}
} }
} }
</script> </script>