mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-23 15:32:52 +08:00
增加空签
This commit is contained in:
@@ -4,6 +4,7 @@ const detail = () => import('@/views/ebiz/serve/Detail')
|
||||
const policyList = () => import('@/views/ebiz/serve/PolicyList')
|
||||
const caseApplication = () => import('@/views/ebiz/serve/CaseApplication')
|
||||
const Result = () => import('@/views/ebiz/serve/Result')
|
||||
const airSign = () => import('@/views/ebiz/serve/AirSign')
|
||||
|
||||
export default [
|
||||
{
|
||||
@@ -46,6 +47,16 @@ export default [
|
||||
index: 4
|
||||
}
|
||||
},
|
||||
{
|
||||
// 空中签名
|
||||
path: '/serve/airSign',
|
||||
name: 'airSign',
|
||||
component: airSign,
|
||||
meta: {
|
||||
title: '空中签名',
|
||||
index: 4
|
||||
}
|
||||
},
|
||||
// 结果页
|
||||
{
|
||||
path: '/serve/result',
|
||||
|
||||
120
src/views/ebiz/serve/AirSign.vue
Normal file
120
src/views/ebiz/serve/AirSign.vue
Normal file
@@ -0,0 +1,120 @@
|
||||
<template>
|
||||
<div class="detail-container pb50">
|
||||
<van-uploader
|
||||
name="appntImg"
|
||||
v-model="appntImg"
|
||||
:after-read="afterRead"
|
||||
:before-delete="beforeDelete"
|
||||
class="mt10 ml20"
|
||||
:max-count="1"
|
||||
@delete="deleteImg"
|
||||
/>
|
||||
<div class="bottom-btn bg-white">
|
||||
<van-button type="danger" size="large">确定</van-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Button, Uploader, Dialog } from 'vant'
|
||||
import { getReceiptSign } from '@/api/ebiz/serve/serve'
|
||||
import { uploadImg } from '@/api/ebiz/sale/sale'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
appntImg: ''
|
||||
}
|
||||
},
|
||||
created() {},
|
||||
components: {
|
||||
[Button.name]: Button,
|
||||
[Uploader.name]: Uploader,
|
||||
[Dialog.name]: Dialog
|
||||
},
|
||||
methods: {
|
||||
// 回执签收
|
||||
next() {
|
||||
let params = {
|
||||
contNo: window.localStorage.getItem('policyNo')
|
||||
}
|
||||
getReceiptSign(params).then(res => {
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
window.localStorage.setItem('insurance-policyUrl', res.signUrl)
|
||||
window.localStorage.setItem('detailJump', '1')
|
||||
window.localStorage.setItem('contNo', this.OrderInfoDTO.contNo)
|
||||
window.localStorage.setItem('orderNo', this.OrderInfoDTO.orderNo)
|
||||
window.localStorage.setItem('orderStatus', this.OrderInfoDTO.orderStatus)
|
||||
window.localStorage.setItem('saleInsuredInfo', JSON.stringify(this.appntDTO))
|
||||
this.$jump({
|
||||
flag: 'h5',
|
||||
extra: {
|
||||
url: location.origin + '/#/sale/signatureOfElectronic',
|
||||
forbidSwipeBack: '1'
|
||||
},
|
||||
routerInfo: {
|
||||
path: '/sale/signatureOfElectronic'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$toast(res.resultMessage)
|
||||
}
|
||||
})
|
||||
},
|
||||
deleteImg(file) {},
|
||||
uploadImg() {
|
||||
let that = this
|
||||
this.$toast.loading({
|
||||
duration: 0, // 持续展示 toast
|
||||
forbidClick: true, // 禁用背景点击
|
||||
loadingType: 'spinner',
|
||||
message: '加载中……'
|
||||
})
|
||||
let formdata = new FormData()
|
||||
console.log('file-----------------', that.file)
|
||||
console.log('name-----------------', that.imgName)
|
||||
formdata.append('imgPath', that.dataURLtoFile(that.file, that.imgName))
|
||||
uploadImg(formdata).then(res => {
|
||||
// console.log(res)
|
||||
if (res.result == '0') {
|
||||
this.$toast.clear()
|
||||
}
|
||||
})
|
||||
},
|
||||
afterRead(file) {
|
||||
let that = this
|
||||
// console.log(type)
|
||||
// 此时可以自行将文件上传至服务器
|
||||
that.file = file.content
|
||||
that.imgName = Math.floor(Math.random() * 100).toString() + new Date().getTime() + file.file.name //为图片名加随机数 与时间戳
|
||||
that.uploadImg()
|
||||
},
|
||||
beforeDelete(file) {
|
||||
Dialog.confirm({
|
||||
title: '提示',
|
||||
message: '您确定要删除吗'
|
||||
}).then(() => {
|
||||
this.deleteImg(file)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.detail-container {
|
||||
.van-hairline--top-bottom::after {
|
||||
border: none;
|
||||
}
|
||||
/deep/ .van-collapse-item__content {
|
||||
padding-top: 0;
|
||||
}
|
||||
/deep/.van-collapse-item__title {
|
||||
padding-left: 30px;
|
||||
}
|
||||
/deep/ .van-cell__value {
|
||||
text-align: left !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -106,6 +106,17 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
setTimeout(() => {
|
||||
// 右上角的显示
|
||||
window.EWebBridge.webCallAppInJs('webview_right_button', {
|
||||
btns: [
|
||||
{
|
||||
img: this.$assetsUrl + 'images/share@3x.png'
|
||||
}
|
||||
]
|
||||
})
|
||||
}, 1000)
|
||||
window['appCallBack'] = this.appCallBack
|
||||
// 获取保单详情
|
||||
this.getPolicyDetail()
|
||||
},
|
||||
@@ -194,6 +205,20 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
appCallBack(data) {
|
||||
if (data.trigger == 'right_button_click') {
|
||||
EWebBridge.webCallAppInJs('bridge', {
|
||||
flag: 'share',
|
||||
extra: {
|
||||
title: this.wxTitle,
|
||||
content: '国富人寿保单回执签收',
|
||||
url: location.origin + '/#/serve/airSign?policyNo=' + localStorage.policyNo + '&token=' + localStorage.token,
|
||||
// url: 'http://47.96.143.111/#/proposal/exhibition?proposalNo=' + localStorage.orderNo + '&token=' + localStorage.token,
|
||||
img: this.$assetsUrl + 'images/logo.png'
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
//根据数据字典 将后端返回的数据渲染到页面中
|
||||
filterData(dictionary, key, pageData) {
|
||||
dictionary.forEach(item => {
|
||||
|
||||
Reference in New Issue
Block a user