Commit 26d8ecfe authored by jiacheng.mao's avatar jiacheng.mao

手机号增加校验,合同明细下载pdf文件调整,pdf预览逻辑调整

parent 694f29f0
...@@ -45,6 +45,11 @@ import hlsPopup from './scripts/hlsPopup' ...@@ -45,6 +45,11 @@ import hlsPopup from './scripts/hlsPopup'
*/ */
import {post, get} from './scripts/hlsHttp' import {post, get} from './scripts/hlsHttp'
/**
* PDFJS
*/
import PDFJS from 'pdfjs-dist'
/** 全局函数hlsUtil**/ /** 全局函数hlsUtil**/
import hlsUtil from './scripts/hlsUtil' import hlsUtil from './scripts/hlsUtil'
...@@ -95,6 +100,8 @@ let hlsHttp = { ...@@ -95,6 +100,8 @@ let hlsHttp = {
} }
Vue.prototype.hlsHttp = window.hlsHttp = hlsHttp Vue.prototype.hlsHttp = window.hlsHttp = hlsHttp
Vue.prototype.PDFJS = window.PDFJS = PDFJS
Vue.prototype.hlsUtil = window.hlsUtil = hlsUtil Vue.prototype.hlsUtil = window.hlsUtil = hlsUtil
Vue.prototype.Jpush = window.Jpush = Jpush Vue.prototype.Jpush = window.Jpush = Jpush
......
...@@ -151,7 +151,15 @@ ...@@ -151,7 +151,15 @@
if (res.result === 'S') { if (res.result === 'S') {
vm.fileArray = res.info vm.fileArray = res.info
vm.fileArray.forEach(i => { vm.fileArray.forEach(i => {
cordova.InAppBrowser.open(i.fileUrl, '_system', 'location=yes,hideurlbar=no,toolbarposition=top') //cordova.InAppBrowser.open(i.fileUrl, '_system', 'location=yes,hideurlbar=no,toolbarposition=top')
//cordova.InAppBrowser.open(i.fileUrl, '_system', 'location=yes')
if(vum.Platform.isAndroid()) { //android终端
window.open(i.fileUrl,"_system","location=yes")
}else if(vum.Platform.isIOS() || vum.Platform.isIPad()) { //ios终端
window.location.href = i.fileUrl;
}else{
window.open(i.fileUrl,"_system","location=yes")
}
}) })
// vm.pdfDownload() // vm.pdfDownload()
} else { } else {
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</h-view> </h-view>
</template> </template>
<script> <script>
import PDFJS from 'pdfjs-dist' //import PDFJS from 'pdfjs-dist'
// const Base64 = require('js-base64').Base64 // const Base64 = require('js-base64').Base64
export default { export default {
...@@ -76,7 +76,7 @@ export default { ...@@ -76,7 +76,7 @@ export default {
}, },
_loadFile (url) { _loadFile (url) {
console.log('URL ==== ' + url) console.log('URL ==== ' + url)
PDFJS.getDocument(url).then((pdf) => { this.PDFJS.getDocument(url).then((pdf) => {
this.pdfDoc = pdf this.pdfDoc = pdf
// debugger // debugger
console.log('pdf ==== ' + pdf) console.log('pdf ==== ' + pdf)
......
...@@ -1055,6 +1055,8 @@ export default { ...@@ -1055,6 +1055,8 @@ export default {
vm.hlsPopup.showLongCenter('配偶联系地址不能为空!') vm.hlsPopup.showLongCenter('配偶联系地址不能为空!')
} else if (!vm.hlsUtil.phoneNumber(vm.baseInfo.cell_phone)) { } else if (!vm.hlsUtil.phoneNumber(vm.baseInfo.cell_phone)) {
vm.hlsPopup.showLongCenter('手机号码有误!') vm.hlsPopup.showLongCenter('手机号码有误!')
} else if (vm.baseInfo.marital_status_n === '已婚' && !vm.hlsUtil.phoneNumber(vm.baseInfo.spouse_phone)) {
vm.hlsPopup.showLongCenter('配偶手机号码有误!')
} else { } else {
let bpId = await vm.saveProtocol() let bpId = await vm.saveProtocol()
return true return true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment