mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-16 02:56:45 +08:00
Merge branch 'hotfix/签名bug修改' into dev
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import request from '@/assets/js/utils/request'
|
import request from '@/assets/js/utils/request'
|
||||||
|
import request1 from '@/assets/js/utils/request1'
|
||||||
import getUrl from '@/assets/js/utils/get-url'
|
import getUrl from '@/assets/js/utils/get-url'
|
||||||
|
|
||||||
// 保费计算
|
// 保费计算
|
||||||
@@ -52,7 +53,13 @@ export function getOrderDetail(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
export function getOrderDetail1(data) {
|
||||||
|
return request1({
|
||||||
|
url: getUrl('/sale/order/orderDetail', 1),
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
// 获取验证码
|
// 获取验证码
|
||||||
export function getAuthCode(data) {
|
export function getAuthCode(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ let productStore = [
|
|||||||
'/customer/shop/getShopList', //获取商城列表/详情
|
'/customer/shop/getShopList', //获取商城列表/详情
|
||||||
'/customer/shop/getShareList' //查询分享轨迹(转发记录)
|
'/customer/shop/getShareList' //查询分享轨迹(转发记录)
|
||||||
]
|
]
|
||||||
|
|
||||||
// 卡单
|
// 卡单
|
||||||
let cardList = []
|
let cardList = []
|
||||||
//续期管理
|
//续期管理
|
||||||
@@ -112,12 +113,12 @@ service.interceptors.request.use(
|
|||||||
config => {
|
config => {
|
||||||
let relativePath = config.url && config.url.split('v1')[1]
|
let relativePath = config.url && config.url.split('v1')[1]
|
||||||
if (whiteList.includes(relativePath)) {
|
if (whiteList.includes(relativePath)) {
|
||||||
Toast.loading({
|
// Toast.loading({
|
||||||
duration: 0, // 持续展示 toast
|
// duration: 0, // 持续展示 toast
|
||||||
forbidClick: true, // 禁用背景点击
|
// forbidClick: true, // 禁用背景点击
|
||||||
loadingType: 'spinner',
|
// loadingType: 'spinner',
|
||||||
message: '加载中……'
|
// message: '加载中……'
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
|
|
||||||
config.headers['token'] = window.localStorage.getItem('token')
|
config.headers['token'] = window.localStorage.getItem('token')
|
||||||
@@ -134,6 +135,7 @@ service.interceptors.request.use(
|
|||||||
service.interceptors.response.use(
|
service.interceptors.response.use(
|
||||||
response => {
|
response => {
|
||||||
const res = response.data
|
const res = response.data
|
||||||
|
console.log(res, 'res')
|
||||||
Toast.clear()
|
Toast.clear()
|
||||||
if (res.code != 0) {
|
if (res.code != 0) {
|
||||||
if (res.code == 10001 || res.code == 10002) {
|
if (res.code == 10001 || res.code == 10002) {
|
||||||
|
|||||||
70
src/assets/js/utils/request1.js
Normal file
70
src/assets/js/utils/request1.js
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
import axios from 'axios'
|
||||||
|
import { Dialog, Toast } from 'vant'
|
||||||
|
|
||||||
|
let sale = ['/sale/order/orderDetail'] //在线投保
|
||||||
|
|
||||||
|
// 卡单
|
||||||
|
let cardList = []
|
||||||
|
let whiteList = [...sale]
|
||||||
|
|
||||||
|
// 创建axios实例
|
||||||
|
const service = axios.create({
|
||||||
|
timeout: 66666666 // 请求超时时间
|
||||||
|
})
|
||||||
|
|
||||||
|
// request拦截器
|
||||||
|
service.interceptors.request.use(
|
||||||
|
config => {
|
||||||
|
let relativePath = config.url && config.url.split('v1')[1]
|
||||||
|
if (whiteList.includes(relativePath)) {
|
||||||
|
// Toast.loading({
|
||||||
|
// duration: 0, // 持续展示 toast
|
||||||
|
// forbidClick: true, // 禁用背景点击
|
||||||
|
// loadingType: 'spinner',
|
||||||
|
// message: '加载中……'
|
||||||
|
// })
|
||||||
|
}
|
||||||
|
|
||||||
|
config.headers['token'] = window.localStorage.getItem('token')
|
||||||
|
// config.headers['token'] = ``
|
||||||
|
return config
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
// Do something with request error
|
||||||
|
Promise.reject(error)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
// respone拦截器
|
||||||
|
service.interceptors.response.use(
|
||||||
|
response => {
|
||||||
|
const res = response.data
|
||||||
|
console.log(res, 'res')
|
||||||
|
|
||||||
|
if (res.code != 0) {
|
||||||
|
if (res.code == 10001 || res.code == 10002) {
|
||||||
|
Dialog.confirm({
|
||||||
|
confirmButtonText: '重新登录',
|
||||||
|
message: '你已被登出,可以取消继续留在该页面,或者重新登录'
|
||||||
|
}).then(() => {
|
||||||
|
//eslint-disable-next-line
|
||||||
|
EWebBridge.webCallAppInJs('bridge', {
|
||||||
|
flag: 'login'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
//Toast.fail(res.msg)
|
||||||
|
}
|
||||||
|
return Promise.reject(res)
|
||||||
|
} else {
|
||||||
|
return response.data.content
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
console.log('err' + error) // for debug
|
||||||
|
//Toast.fail(error.message)
|
||||||
|
return Promise.reject(error)
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
export default service
|
||||||
15
src/assets/js/utils/toastLoading.js
Normal file
15
src/assets/js/utils/toastLoading.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
// 全屏loading工具类
|
||||||
|
import { Toast } from 'vant'
|
||||||
|
import Vue from 'vue'
|
||||||
|
Vue.use(Toast)
|
||||||
|
|
||||||
|
export function openLoading() {
|
||||||
|
Toast.loading({
|
||||||
|
mask: true,
|
||||||
|
message: '加载中...',
|
||||||
|
duration: 0 // 持续展示 toast
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function closeLoading() {
|
||||||
|
Toast.clear()
|
||||||
|
}
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { RadioGroup, Radio, Dialog, NoticeBar } from 'vant'
|
import { RadioGroup, Radio, Dialog, NoticeBar } from 'vant'
|
||||||
import { saveInformation, getOrderDetail } from '@/api/ebiz/sale/sale'
|
import { saveInformation, getOrderDetail } from '@/api/ebiz/sale/sale'
|
||||||
|
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
// import axios from 'axios'
|
// import axios from 'axios'
|
||||||
export default {
|
export default {
|
||||||
@@ -210,7 +211,17 @@ export default {
|
|||||||
},
|
},
|
||||||
// 点击签名
|
// 点击签名
|
||||||
sign(val) {
|
sign(val) {
|
||||||
console.log('签名参数',this.saleInsuredInfo.idNo,this.saleInsuredInfo.name,this.saleInsuredInfo.idType,'keyword'+':'+ '签字日期','pageNo'+':'+ '1','index'+':'+ '1','offset'+':'+ '-150','pos'+':'+ '3')
|
console.log(
|
||||||
|
'签名参数',
|
||||||
|
this.saleInsuredInfo.idNo,
|
||||||
|
this.saleInsuredInfo.name,
|
||||||
|
this.saleInsuredInfo.idType,
|
||||||
|
'keyword' + ':' + '签字日期',
|
||||||
|
'pageNo' + ':' + '1',
|
||||||
|
'index' + ':' + '1',
|
||||||
|
'offset' + ':' + '-150',
|
||||||
|
'pos' + ':' + '3'
|
||||||
|
)
|
||||||
let that = this
|
let that = this
|
||||||
this.$toast.loading({
|
this.$toast.loading({
|
||||||
duration: 0, // 持续展示 toast
|
duration: 0, // 持续展示 toast
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="insuranceInformation-container pb50 redRadioCheckbox">
|
<div class="insuranceInformation-container pb50 redRadioCheckbox">
|
||||||
<van-notice-bar :scrollable="false" v-if="!Time" class="notice">{{ `提示:阅读时长需在${this.Time ? this.time : this.number}秒以上` }}</van-notice-bar>
|
<van-notice-bar :scrollable="false" v-if="!Time" class="notice">{{ `提示:阅读时长需在${this.Time ? this.time : this.number}秒以上` }}</van-notice-bar>
|
||||||
|
<iframe :src="src + appntSign.policyUrl" class="iframe"></iframe>
|
||||||
<iframe :src="src" class="iframe"></iframe>
|
|
||||||
|
|
||||||
<van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14">
|
<van-radio-group v-model="radio" class="pb10 pt20 pl30 fs14">
|
||||||
<van-radio name="1" @click="click">
|
<van-radio name="1" @click="click">
|
||||||
本人确认已阅读
|
本人确认已阅读
|
||||||
@@ -25,8 +23,8 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { RadioGroup, Radio, Dialog, NoticeBar } from 'vant'
|
import { RadioGroup, Radio, Dialog, NoticeBar } from 'vant'
|
||||||
import { saveInformation, getOrderDetail } from '@/api/ebiz/sale/sale'
|
import { saveInformation, getOrderDetail1 } from '@/api/ebiz/sale/sale'
|
||||||
|
import { openLoading, closeLoading } from '@/assets/js/utils/toastLoading.js'
|
||||||
import config from '@/config'
|
import config from '@/config'
|
||||||
// import axios from 'axios'
|
// import axios from 'axios'
|
||||||
export default {
|
export default {
|
||||||
@@ -63,8 +61,7 @@ export default {
|
|||||||
saleInsuredInfo: {},
|
saleInsuredInfo: {},
|
||||||
// 是否从详情跳过来 如果为1 是
|
// 是否从详情跳过来 如果为1 是
|
||||||
detailJump: '',
|
detailJump: '',
|
||||||
src: '',
|
src: location.origin + '/pdfjs/web/viewer.html?file=',
|
||||||
src1: location.origin + '/pdfjs/web/viewer.html?file=',
|
|
||||||
//保险产品名称
|
//保险产品名称
|
||||||
riskName: localStorage.riskName
|
riskName: localStorage.riskName
|
||||||
}
|
}
|
||||||
@@ -79,6 +76,10 @@ export default {
|
|||||||
let that = this
|
let that = this
|
||||||
|
|
||||||
document.body.style.backgroundColor = '#fff'
|
document.body.style.backgroundColor = '#fff'
|
||||||
|
setTimeout(function() {
|
||||||
|
closeLoading()
|
||||||
|
that.timeOut()
|
||||||
|
}, 5000)
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
let that = this
|
let that = this
|
||||||
@@ -138,35 +139,26 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
console.log('````````````````````````')
|
console.log('````````````````````````')
|
||||||
console.log('第一次进入电子保单')
|
console.log('第一次进入电子保单')
|
||||||
this.timeOut()
|
setTimeout(function() {
|
||||||
|
closeLoading()
|
||||||
|
this.timeOut()
|
||||||
|
}, 5000)
|
||||||
|
|
||||||
this.getOrderDetail()
|
this.getOrderDetail()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
setTimeout(function() {
|
this.timeOut()
|
||||||
that.timeOut()
|
|
||||||
}, 5000)
|
|
||||||
if (this.detailJump != '1') {
|
if (this.detailJump != '1') {
|
||||||
this.getOrderDetail()
|
this.getOrderDetail()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadings() {
|
|
||||||
this.$toast.loading({
|
|
||||||
mask: true,
|
|
||||||
message: '加载中...',
|
|
||||||
duration: 2000
|
|
||||||
})
|
|
||||||
},
|
|
||||||
closeLoadings() {
|
|
||||||
this.$toast.clear()
|
|
||||||
},
|
|
||||||
timeOut() {
|
timeOut() {
|
||||||
let that = this
|
let that = this
|
||||||
let time = that.time
|
let time = that.time
|
||||||
that.Time = false
|
that.Time = false
|
||||||
that.number = `${time}`
|
that.number = `${time}`
|
||||||
|
|
||||||
let timer = setInterval(() => {
|
let timer = setInterval(() => {
|
||||||
time--
|
time--
|
||||||
if (time <= 0) {
|
if (time <= 0) {
|
||||||
@@ -181,13 +173,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 获取签名状态
|
// 获取签名状态
|
||||||
getOrderDetail() {
|
getOrderDetail() {
|
||||||
// showFullScreenLoading()
|
openLoading()
|
||||||
let that = this
|
let that = this
|
||||||
let data = {
|
let data = {
|
||||||
orderNo: window.localStorage.getItem('orderNo')
|
orderNo: window.localStorage.getItem('orderNo')
|
||||||
}
|
}
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getOrderDetail(data).then(res => {
|
getOrderDetail1(data).then(res => {
|
||||||
if (res.result == '0') {
|
if (res.result == '0') {
|
||||||
res.orderDTO.ebizSignDTOS.map(item => {
|
res.orderDTO.ebizSignDTOS.map(item => {
|
||||||
if (item.signType == '0' || item.signType == '2') {
|
if (item.signType == '0' || item.signType == '2') {
|
||||||
@@ -198,8 +190,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
that.appntSign.policyUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${that.appntSign.policyUrl}`)
|
that.appntSign.policyUrl = encodeURIComponent(config.imgDomain + `/returnDirectStream?imgPath=${that.appntSign.policyUrl}`)
|
||||||
this.src = location.origin + '/pdfjs/web/viewer.html?file=' + that.appntSign.policyUrl
|
|
||||||
console.log(location.origin + '/pdfjs/web/viewer.html?file=' + that.appntSign.policyUrl, 'that.appntSign.policyUrl')
|
|
||||||
if (that.isWeixin) {
|
if (that.isWeixin) {
|
||||||
if (res.orderDTO.ebizSignDTOS.length > 1) {
|
if (res.orderDTO.ebizSignDTOS.length > 1) {
|
||||||
if (that.appntSign.documentStatus == '3') {
|
if (that.appntSign.documentStatus == '3') {
|
||||||
|
|||||||
Reference in New Issue
Block a user