fix-修复拨打电话未调用原生插件的问题

This commit is contained in:
zhang.weiwei
2025-02-19 23:20:18 +08:00
parent 228e992b99
commit f67cf5bf19
3 changed files with 39 additions and 23 deletions

View File

@@ -104,13 +104,16 @@ export default {
this.show = true // 显示确认对话框 this.show = true // 显示确认对话框
}, },
contact() { contact() {
const a = document.createElement('a') EWebBridge.webCallAppInJs('callSystem', {
a.href = `tel:'${this.ybOrderDTOList.appntPhone}'` system: 'tel',
a.click() number: this.ybOrderDTOList.appntPhone
this.show = false })
}, },
callPhone(phoneNumber) { callPhone(phoneNumber) {
window.location.href = 'tel://' + phoneNumber EWebBridge.webCallAppInJs('callSystem', {
system: 'tel',
number: phoneNumber
})
}, },
getYBRenewalInfo() { getYBRenewalInfo() {
// let params = { // let params = {

View File

@@ -242,7 +242,7 @@
:value.sync="pageShowInfo.showInsuredDTO.tap" :value.sync="pageShowInfo.showInsuredDTO.tap"
></select-radio> ></select-radio>
<div class="fs12 text-center pb15" style="color: #999999">拖动按钮查看不同年龄的保单利益</div> <div class="fs12 text-center pb15" style="color: #999999">拖动按钮查看不同年龄的保单利益</div>
<!-- 国富人寿富贵尊享终身寿险分红型添加利益演示提示 --> <!-- 国富人寿富贵尊享终身寿险分红型添加利益演示提示 -->
<div v-if="mainRiskCodes.includes('GFRS_M0095')" class="fs13 div_11 text-left"> <div v-if="mainRiskCodes.includes('GFRS_M0095')" class="fs13 div_11 text-left">
<b <b
@@ -547,7 +547,11 @@ export default {
/*end*/ /*end*/
callPhone() { callPhone() {
console.log('callPhone') console.log('callPhone')
window.location.href = 'tel://' + this.agent.phoneNo // window.location.href = 'tel://' + this.agent.phoneNo
EWebBridge.webCallAppInJs('callSystem', {
system: 'tel',
number: this.agent.phoneNo
})
}, },
checkInsure(insureId) { checkInsure(insureId) {
let that = this let that = this
@@ -795,7 +799,12 @@ export default {
that.pageShowInfo.insuredDTOs.forEach((item) => { that.pageShowInfo.insuredDTOs.forEach((item) => {
item.riskDTOLst.forEach((item01) => { item.riskDTOLst.forEach((item01) => {
if (item01.isMainRisk == '0') { if (item01.isMainRisk == '0') {
if (item01.mainRiskCode == 'GFRS_M0080' || item01.mainRiskCode == 'GFRS_M0083' || item01.mainRiskCode == 'GFRS_M0085' || item01.mainRiskCode == 'GFRS_M0098') { if (
item01.mainRiskCode == 'GFRS_M0080' ||
item01.mainRiskCode == 'GFRS_M0083' ||
item01.mainRiskCode == 'GFRS_M0085' ||
item01.mainRiskCode == 'GFRS_M0098'
) {
that.ispremshow = false that.ispremshow = false
} }
mainRiskNameList.push(item01.riskName) mainRiskNameList.push(item01.riskName)

View File

@@ -2,17 +2,17 @@
<div class="policy-list-container"> <div class="policy-list-container">
<!--封面--> <!--封面-->
<div v-if="showType == 'Cover'" class="mr2 ml2 mb60"> <div v-if="showType == 'Cover'" class="mr2 ml2 mb60">
<img style="width: 100%;" src="@/assets/images/gf_wjdc.png" /> <img style="width: 100%" src="@/assets/images/gf_wjdc.png" />
<div class="mt30 mr2 ml2"> <div class="mt30 mr2 ml2">
<van-button type="danger" style="width: 100%;" @click="clickEnter" :disabled="enterFlag">立即参加</van-button> <van-button type="danger" style="width: 100%" @click="clickEnter" :disabled="enterFlag">立即参加</van-button>
</div> </div>
</div> </div>
<!-- 数据提交页 --> <!-- 数据提交页 -->
<div v-if="showType == 'Detail'" style="margin-top: 10px;" class="mb60"> <div v-if="showType == 'Detail'" style="margin-top: 10px" class="mb60">
<van-row v-for="(item, index) in questionList" :key="index"> <van-row v-for="(item, index) in questionList" :key="index">
<div v-if="item.options"> <div v-if="item.options">
<van-col span="24" class="pb10 pt10 pl10 pr10 bg-white"> {{ item.orderCode }}.{{ item.title }} </van-col> <van-col span="24" class="pb10 pt10 pl10 pr10 bg-white"> {{ item.orderCode }}.{{ item.title }} </van-col>
<van-col span="24" class="bg-white" style="margin-bottom: 10px;"> <van-col span="24" class="bg-white" style="margin-bottom: 10px">
<van-radio-group v-model="anwerJson[item.orderCode]" class="flex pb10 pt10 pl10 pr10 justify-content-fs"> <van-radio-group v-model="anwerJson[item.orderCode]" class="flex pb10 pt10 pl10 pr10 justify-content-fs">
<van-radio <van-radio
icon-size="20px" icon-size="20px"
@@ -33,19 +33,19 @@
<van-field v-if="item.orderCode == '6'" :label="item.title" input-align="right" v-model="anwerJson[item.orderCode]" /> <van-field v-if="item.orderCode == '6'" :label="item.title" input-align="right" v-model="anwerJson[item.orderCode]" />
<van-field v-if="item.orderCode == '8'" :label="item.title" maxlength="3" input-align="right" v-model="anwerJson[item.orderCode]" /> <van-field v-if="item.orderCode == '8'" :label="item.title" maxlength="3" input-align="right" v-model="anwerJson[item.orderCode]" />
</van-col> </van-col>
<van-col span="24" class="pl10 pr10 bg-white" style="height:2px;"><div style="width: 100%;height: 100%;background-color: #f5f5f5;"></div></van-col> <van-col span="24" class="pl10 pr10 bg-white" style="height: 2px"><div style="width: 100%; height: 100%; background-color: #f5f5f5"></div></van-col>
</div> </div>
</van-row> </van-row>
<div class="mt10 mr2 ml2"> <div class="mt10 mr2 ml2">
<van-button type="danger" style="width: 100%;" @click="submitForm()">提交</van-button> <van-button type="danger" style="width: 100%" @click="submitForm()">提交</van-button>
</div> </div>
</div> </div>
<!--提交结果页--> <!--提交结果页-->
<div v-if="showType == 'Result'" class="mr2 ml2"> <div v-if="showType == 'Result'" class="mr2 ml2">
<img v-show="resultImgUrl == 'PHYSICAL'" style="width: 100%;" src="@/assets/images/shareSurveyResult.png" /> <img v-show="resultImgUrl == 'PHYSICAL'" style="width: 100%" src="@/assets/images/shareSurveyResult.png" />
<img v-show="resultImgUrl != 'PHYSICAL'" style="width: 100%;" src="@/assets/images/shareSurveyResult_1.png" /> <img v-show="resultImgUrl != 'PHYSICAL'" style="width: 100%" src="@/assets/images/shareSurveyResult_1.png" />
<div class="mt30 mr2 ml2"> <div class="mt30 mr2 ml2">
<van-button type="danger" style="width: 100%;" @click="closeWXWindow">返回</van-button> <van-button type="danger" style="width: 100%" @click="closeWXWindow">返回</van-button>
</div> </div>
</div> </div>
<!-- 底部透明 --> <!-- 底部透明 -->
@@ -143,9 +143,9 @@ export default {
// detail 页面 // detail 页面
getSurveyQuestionInfo() { getSurveyQuestionInfo() {
let that = this let that = this
getSurveyQuestion(that.surveyDetailReqDTO).then(res => { getSurveyQuestion(that.surveyDetailReqDTO).then((res) => {
if (res.result == '0') { if (res.result == '0') {
that.questionList.map(item => { that.questionList.map((item) => {
that.anwerJson[item.orderCode + ''] = '' that.anwerJson[item.orderCode + ''] = ''
}) })
that.questionList = res.content.questionList that.questionList = res.content.questionList
@@ -158,7 +158,7 @@ export default {
// 获取代理人信息 // 获取代理人信息
getSurveyAgentInfo() { getSurveyAgentInfo() {
let that = this let that = this
getSurveyAgentInfo(that.surveyAgentInfoReqDTO).then(res => { getSurveyAgentInfo(that.surveyAgentInfoReqDTO).then((res) => {
if (res.result == '0') { if (res.result == '0') {
that.agentInfo = res.content that.agentInfo = res.content
that.enterFlag = false that.enterFlag = false
@@ -171,7 +171,7 @@ export default {
// 校验是否选择 // 校验是否选择
let that = this let that = this
let returnFlag = true let returnFlag = true
that.questionList.map(item => { that.questionList.map((item) => {
if (!that.anwerJson[item.orderCode + '']) { if (!that.anwerJson[item.orderCode + '']) {
that.$toast('请认真填写问卷的全部内容!') that.$toast('请认真填写问卷的全部内容!')
returnFlag = false returnFlag = false
@@ -197,7 +197,7 @@ export default {
that.surveyAnswerReqDTO.agentCode = that.agentInfo.agentCode that.surveyAnswerReqDTO.agentCode = that.agentInfo.agentCode
that.surveyAnswerReqDTO.agentName = that.agentInfo.name that.surveyAnswerReqDTO.agentName = that.agentInfo.name
that.surveyAnswerReqDTO.tableId = that.tableId that.surveyAnswerReqDTO.tableId = that.tableId
saveSurveyAnswer(that.surveyAnswerReqDTO).then(res => { saveSurveyAnswer(that.surveyAnswerReqDTO).then((res) => {
if (res.result == '0') { if (res.result == '0') {
//跳转结果页面 //跳转结果页面
that.resultImgUrl = res.content that.resultImgUrl = res.content
@@ -221,7 +221,11 @@ export default {
}, },
callPhone() { callPhone() {
console.log('callPhone') console.log('callPhone')
window.location.href = 'tel://' + this.agentInfo.mobile // window.location.href = 'tel://' + this.agentInfo.mobile
EWebBridge.webCallAppInJs('callSystem', {
system: 'tel',
number: this.agentInfo.mobile
})
}, },
closeWXWindow() { closeWXWindow() {
closeWindow() closeWindow()