Commit 9bf3ce46 authored by Jennie Shi's avatar Jennie Shi

人脸识别插件前的上线版本

parent 445c1daf
......@@ -39,6 +39,7 @@
<param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
<preference name="CordovaWebViewEngine" value="CDVUIWebViewEngine" />
<platform name="android">
<allow-intent href="market:*" />
<hook src="hooks/copy-build-extras-gradle.js" type="before_build" />
......
......@@ -11,5 +11,5 @@ module.exports = {
ocrPath:'"http://180.104.121.66:8088/r/api"',
fileUploadSvcPath:'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="',
appId: '"com.xcmg.app.dev"',
currentVersion: '"2.7.7"'
currentVersion: '"2.7.9"'
}
......@@ -615,12 +615,6 @@ export default {
vm.saveInfo[i] = ''
}
})
/* console.log('@@@@@@@@@@@@@@@@@@'+JSON.stringify(vm.saveInfo))
Object.keys(vm.productInfo).forEach(i => { // 置空productInfo
if (i !== 'project_id') {
vm.productInfo[i] = ''
}
}) */
setTimeout(() => {
vm.getProductLine() // 产品线查询
vm.repayPeriod()// 还款周期查询
......@@ -691,51 +685,56 @@ export default {
})
},
saveRent () {
let vm = this
let url = process.env.basePath + 'prj_leases_info_save'
if (this.rentInfo.frame_number === '') {
if (vm.rentInfo.frame_number === '') {
hlsPopup.showLongCenter('车架号不能为空!')
} else if (this.rentInfo.engine === '') {
} else if (vm.rentInfo.engine === '') {
hlsPopup.showLongCenter('发动机号不能为空!')
} else if (this.rentInfo.vehicle_model === '') {
} else if (vm.rentInfo.vehicle_model === '') {
hlsPopup.showLongCenter('车辆型号不能为空!')
} else if (this.rentInfo.certificate_number === '') {
} else if (vm.rentInfo.certificate_number === '') {
hlsPopup.showLongCenter('合格证编号不能为空!')
} else if (this.rentInfo.departure_date === '') {
} else if (vm.rentInfo.departure_date === '') {
hlsPopup.showLongCenter('发车日期不能为空!')
} else if (this.rentInfo.invoice_date === '') {
} else if (vm.rentInfo.invoice_date === '') {
hlsPopup.showLongCenter('开票日期不能为空!')
} else {
let param = {
master: {
project_lease_item_id: this.rentInfo.project_lease_item_id,
project_lease_item_id: vm.rentInfo.project_lease_item_id,
project_id: window.localStorage.project_id,
frame_number: this.rentInfo.frame_number,
engine: this.rentInfo.engine,
vehicle_model: this.rentInfo.vehicle_model,
certificate_number: this.rentInfo.certificate_number,
departure_date: this.rentInfo.departure_date,
invoice_date: this.rentInfo.invoice_date,
frame_number: vm.rentInfo.frame_number,
engine: vm.rentInfo.engine,
vehicle_model: vm.rentInfo.vehicle_model,
certificate_number: vm.rentInfo.certificate_number,
departure_date: vm.rentInfo.departure_date,
invoice_date: vm.rentInfo.invoice_date,
},
}
this.$post(url, param).then((res) => {
this.hlsPopup.hideLoading()
vm.$post(url, param).then((res) => {
vm.hlsPopup.hideLoading()
console.log(res)
if (res.result === 'S') {
hlsPopup.showLongCenter('保存成功')
this.downNum = false
this.rentInfo.project_lease_item_id = res.master.project_lease_item_id
if (this.uploadList.length > 0) {
this.uploadList[0].pkvalue = this.rentInfo.project_lease_item_id
}
this.savePicture(this.uploadList)
vm.downNum = false
vm.rentInfo.project_lease_item_id = res.master.project_lease_item_id
let ifPush = true
this.leaseList.forEach(item => {
vm.leaseList.forEach(item => {
if (item.project_lease_item_id === res.master.project_lease_item_id) {
ifPush = false
}
})
console.log('leaseList1 === ' + JSON.stringify(vm.leaseList))
console.log('ifPush === ' + ifPush)
if (ifPush) {
this.leaseList.push(this.rentInfo)
vm.leaseList.push(vm.rentInfo)
}
console.log('leaseList2 === ' + JSON.stringify(vm.leaseList))
if (vm.uploadList.length > 0) {
vm.uploadList[0].pkvalue = vm.rentInfo.project_lease_item_id
}
vm.savePicture(vm.uploadList)
} else {
hlsPopup.showLongCenter(res.message)
}
......@@ -801,7 +800,7 @@ export default {
vm.vehicleIdentify(imgdata)
obj.filePath = imgdata
vm.uploadList = []
vm.uploadList.push(imgdata)
vm.uploadList.push(obj)
}
}
let error = function () {
......
......@@ -66,11 +66,11 @@ export default {
watch: {},
beforeRouteEnter (to, from, next) {
next(vm => {
if (from.name === 'HomePage') {
// if (from.name === 'HomePage') {
vm.pagenum = 1
vm.lists = []
vm.getList()
}
// }
})
},
methods: {
......
......@@ -436,7 +436,7 @@ export default {
if (res.result === 'S') {
return true
} else {
// vm.hlsPopup.showLongCenter(res.message)
vm.hlsPopup.showLongCenter(res.message)
}
},
async goContent (item, index) {
......
......@@ -9,11 +9,17 @@
<h-content>
<canvas v-for="page in pages" :id="'the-canvas'+page" :key="page"/>
</h-content>
<!-- <h-content v-if="platform === 'ios'">
<iframe
:src="attachUrl"
frameborder="0" scrolling="yes" width="100%"
height="100%" />
</h-content> -->
</h-view>
</template>
<script>
import PDFJS from 'pdfjs-dist'
// const Base64 = require('js-base64').Base64
// import pdfWorker from 'pdfjs-dist/build/pdf.worker'
export default {
data () {
......@@ -21,30 +27,27 @@ export default {
attachUrl: this.$route.params.attachUrl,
pages: 0,
pdfDoc: null,
platform: 'android',
}
},
created () {
let vm = this
if (vum.Platform.isAndroid()) {
vm.platform = 'android'
} else {
vm.platform = 'ios'
}
},
// beforeRouteEnter (to, from, next) {
// next(vm => {
// // let attachUrl = vm.attachUrl.substr(vm.attachUrl.indexOf('/xcmg_file'))
// vm.hlsPopup.showLoading('请稍候...')
// // debugger
// // let url = Base64.decode(vm.attachUrl)
// vm.attachUrl = vm.$route.params.attachUrl
// console.log('vm.attachUrl === ' + vm.attachUrl)
// vm._loadFile(vm.attachUrl)
// vm.hlsPopup.hideLoading()
// })
// },
mounted () {
let vm = this
// let attachUrl = vm.attachUrl.substr(vm.attachUrl.indexOf('/xcmg_file'))
vm.hlsPopup.showLoading('请稍候...')
// debugger
// let url = Base64.decode(vm.attachUrl)
vm.attachUrl = vm.$route.params.attachUrl
console.log('vm.attachUrl === ' + vm.attachUrl)
vm._loadFile(vm.attachUrl)
vm.hlsPopup.hideLoading()
// if (vm.platform === 'android') {
vm.loadFile(vm.attachUrl)
// }
},
methods: {
_renderPage (num) {
......@@ -74,17 +77,33 @@ export default {
}
})
},
_loadFile (url) {
loadFile (url) {
let vm = this
console.log('URL ==== ' + url)
if (vm.platform === 'android') {
PDFJS.getDocument(url).then((pdf) => {
this.pdfDoc = pdf
// debugger
console.log('pdf ==== ' + pdf)
this.pages = this.pdfDoc.numPages
this.$nextTick(() => {
this._renderPage(1)
vm.pdfDoc = pdf
console.log('pdf ==== ' + JSON.stringify(pdf))
vm.pages = vm.pdfDoc.numPages
console.log('pages === ' + vm.pages)
vm.$nextTick(() => {
vm._renderPage(1)
})
})
} else {
PDFJS.getDocument(url).promise.then((pdf) => {
vm.pdfDoc = pdf
console.log('pdf ==== ' + JSON.stringify(pdf))
vm.pages = vm.pdfDoc.numPages
console.log('pages === ' + vm.pages)
vm.$nextTick(() => {
vm._renderPage(1)
})
}).catch(reason => {
console.log(reason)
}
)
}
},
},
}
......
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,width=device-width,viewport-fit=cover"><meta name=format-detection content="telephone=no"><meta name=format-detection content="email=no"><meta name=apple-mobile-web-app-capable content=yes><meta name=apple-mobile-web-app-status-bar-style content=black><script type=text/javascript src=./static/vuePlatform.js></script><script type=text/javascript src=./static/prototype.js></script><script type=text/javascript src=./cordova.js></script><script type=text/javascript src="http://api.map.baidu.com/api?v=2.0&ak=Eoo0EtfjYCdAy7r8D19gZ0vMojdZpHqU"></script><title>徐工金服</title><link href=./static/css/app.5be6246a68f603d585a566ffdad754dd.css rel=stylesheet></head><body><div id=app-box></div><script type=text/javascript src=./static/js/manifest.6a178e8d77c32e3c385d.js></script><script type=text/javascript src=./static/js/vendor.7191c48e0b160a3ab672.js></script><script type=text/javascript src=./static/js/app.b82e50b08f604fc1a223.js></script></body></html>
\ No newline at end of file
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