Commit 3f9b5462 authored by nature's avatar nature

ios闪退修复

parent db18f7fc
......@@ -112,4 +112,6 @@
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<engine name="android" spec="~6.2.0" />
<plugin name="cordova-plugin-ionic-webview" spec="~1.2.1" />
<plugin name="cordova-plugin-inappbrowser" spec="~4.0.0" />
</widget>
......@@ -2,7 +2,7 @@
module.exports = {
NODE_ENV: '"production"',
CONFIG_ENV: JSON.stringify(process.env.CONFIG_ENV),
debug: true,
debug: false,
isMobilePlatform: true,
loginPath: '"http://www.xcmgfs.com:8087/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=appadmin&password=" ',
basePath: '"http://www.xcmgfs.com:8087/r/api/interface?sysName=XCMG_PROD&apiName="',
......
......@@ -105,6 +105,9 @@
"ios",
"android"
],
"plugins": {}
"plugins": {
"cordova-plugin-inappbrowser": {},
"cordova-plugin-ionic-webview": {}
}
}
}
}
\ No newline at end of file
......@@ -177,8 +177,8 @@
},
"cordova-plugin-ionic-webview": {
"source": {
"type": "local",
"path": "/Volumes/work/APP/xugon/cordova-plugin-ionic-webview"
"type": "registry",
"id": "cordova-plugin-ionic-webview@2.0.0"
},
"is_top_level": true,
"variables": {}
......
......@@ -38,12 +38,6 @@
"cordova-plugin-image-picker": {
"PACKAGE_NAME": "com.xcmg.app"
},
"cordova-plugin-inappbrowser": {
"PACKAGE_NAME": "com.xcmg.app"
},
"cordova-plugin-ionic-webview": {
"PACKAGE_NAME": "com.xcmg.app"
},
"cordova-plugin-jcore": {
"PACKAGE_NAME": "com.xcmg.app"
},
......@@ -75,6 +69,12 @@
"jpush-phonegap-plugin": {
"APP_KEY": "bef4fd44dcf54b79b8ab27c3",
"PACKAGE_NAME": "com.xcmg.app"
},
"cordova-plugin-ionic-webview": {
"PACKAGE_NAME": "$(PRODUCT_BUNDLE_IDENTIFIER)"
},
"cordova-plugin-inappbrowser": {
"PACKAGE_NAME": "$(PRODUCT_BUNDLE_IDENTIFIER)"
}
},
"dependent_plugins": {
......@@ -101,4 +101,4 @@
"PACKAGE_NAME": "com.xcmg.app"
}
}
}
}
\ No newline at end of file
......@@ -121,9 +121,9 @@ let backButtonPressedOnceToExit
const errorHandler = (error, vm) => {
console.error(error.stack)
hlsHttp.post('http://hlsapp.hand-china.com/core/public/app/error', {
/* hlsHttp.post('http://hlsapp.hand-china.com/core/public/app/error', {
'error': error.stack,
})
}) */
}
Vue.config.errorHandler = errorHandler
......
......@@ -96,156 +96,156 @@
<script>
export default {
name: 'RepayDetail',
filters: {
lengthCheck: function (value) {
if ((value.toString()).length === 1) {
return `0${value}`
} else {
return value
}
},
export default {
name: 'RepayDetail',
filters: {
lengthCheck: function (value) {
if ((value.toString()).length === 1) {
return `0${value}`
} else {
return value
}
},
data () {
return {
lists: [],
pagenum: 1,
hidden: false,
detailInfo: {},
fileArray: [],
},
data () {
return {
lists: [],
pagenum: 1,
hidden: false,
detailInfo: {},
fileArray: [],
}
},
computed: {},
watch: {},
beforeRouteEnter (to, from, next) {
next(vm => {
if (from.name === 'ContractRecords') {
vm.pagenum = 1
vm.detailQuery()
vm.equipQuery()
}
})
},
methods: {
// val: contract_id
toRepayPlans (val) {
this.$router.push({
name: 'RepayPlans',
params: {
contract_id: val,
lease_num: this.detailInfo.lease_num,
},
})
},
computed: {},
watch: {},
beforeRouteEnter (to, from, next) {
next(vm => {
if (from.name === 'ContractRecords') {
vm.pagenum = 1
vm.detailQuery()
vm.equipQuery()
downLoad () {
let vm = this
let url = $config.basePath + 'get_download_app'
let param = {
project_id: vm.$route.params.project_id,
phone: window.localStorage.user_phone,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.fileArray = res.info
vm.fileArray.forEach(i => {
cordova.InAppBrowser.open(i.fileUrl, '_system', 'location=yes,hideurlbar=no,toolbarposition=top')
})
// vm.pdfDownload()
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
methods: {
// val: contract_id
toRepayPlans (val) {
this.$router.push({
name: 'RepayPlans',
params: {
contract_id: val,
lease_num: this.detailInfo.lease_num,
},
})
},
downLoad () {
let vm = this
let url = $config.basePath + 'get_download_app'
let param = {
project_id: vm.$route.params.project_id,
phone: window.localStorage.user_phone,
pdfDownload () {
// 下载pdf文件
let vm = this
vm.fileArray.forEach(element => {
if (element.fileUrl) {
console.log('vm.$refs.pdf' + vm.$refs.pdf)
// debugger
vm.$refs.pdf.downloadPDF(element.fileUrl, element.fileName)
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.fileArray = res.info
vm.fileArray.forEach(i => {
cordova.InAppBrowser.open(i.fileUrl, '_system', 'location=yes,hideurlbar=no,toolbarposition=top')
})
// vm.pdfDownload()
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
pdfDownload () {
// 下载pdf文件
let vm = this
vm.fileArray.forEach(element => {
if (element.fileUrl) {
console.log('vm.$refs.pdf' + vm.$refs.pdf)
// debugger
vm.$refs.pdf.downloadPDF(element.fileUrl, element.fileName)
}
})
},
// 合同明细
detailQuery () {
let vm = this
let url = $config.basePath + 'con_contract_detial'
let param = {
project_id: vm.$route.params.project_id,
})
},
// 合同明细
detailQuery () {
let vm = this
let url = $config.basePath + 'con_contract_detial'
let param = {
project_id: vm.$route.params.project_id,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.detailInfo = res.info
} else {
hlsPopup.showLongCenter(res.message)
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.detailInfo = res.info
} else {
hlsPopup.showLongCenter(res.message)
})
},
// 设备清单
equipQuery () {
let vm = this
let url = $config.basePath + 'con_equip_list'
let param = {
pagesize: 10,
pagenum: vm.pagenum,
project_id: vm.$route.params.project_id,
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.lists = res.lists
if (res.lists.length >= 0 && res.lists.length < 10) {
vm.$refs.scroll.update(true)
} else if (res.lists.length === 10) {
vm.$refs.scroll.update(false)
}
})
},
// 设备清单
equipQuery () {
let vm = this
let url = $config.basePath + 'con_equip_list'
let param = {
pagesize: 10,
pagenum: vm.pagenum,
project_id: vm.$route.params.project_id,
} else {
hlsPopup.showLongCenter(res.message)
}
vm.hlsPopup.showLoading('数据加载中')
vm.hlsHttp.post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
vm.lists = res.lists
if (res.lists.length >= 0 && res.lists.length < 10) {
vm.$refs.scroll.update(true)
} else if (res.lists.length === 10) {
vm.$refs.scroll.update(false)
}
} else {
hlsPopup.showLongCenter(res.message)
})
},
loadMore () {
let vm = this
let url = $config.basePath + 'con_equip_list'
vm.pagenum++
let param = {
pagesize: 10,
pagenum: vm.pagenum,
project_id: vm.$route.params.project_id,
}
vm.hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
let returnData = []
returnData = res.lists
if (returnData.length === 0) {
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
vum.forEach(returnData, function (data, index, array) {
vm.lists.push(array[index])
})
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
vm.lists.push(array[index])
})
vm.$refs.scroll.update(false)
}
})
},
loadMore () {
let vm = this
let url = $config.basePath + 'con_equip_list'
vm.pagenum++
let param = {
pagesize: 10,
pagenum: vm.pagenum,
project_id: vm.$route.params.project_id,
} else {
hlsPopup.showLongCenter(res.message)
}
vm.hlsPopup.showLoading('请稍候')
vm.$post(url, param).then(function (res) {
vm.hlsPopup.hideLoading()
if (res.result === 'S') {
let returnData = []
returnData = res.lists
if (returnData.length === 0) {
vm.$refs.scroll.update(true)
} else if (returnData.length > 0 && returnData.length < 10) {
vum.forEach(returnData, function (data, index, array) {
vm.lists.push(array[index])
})
vm.$refs.scroll.update(true)
} else if (returnData.length === 10) {
vum.forEach(returnData, function (data, index, array) {
vm.lists.push(array[index])
})
vm.$refs.scroll.update(false)
}
} else {
hlsPopup.showLongCenter(res.message)
}
})
},
})
},
}
},
}
</script>
<style lang='less'>
#repay-detail {
......
......@@ -12,7 +12,7 @@
</h-view>
</template>
<script>
import PDFJS from 'pdfjs-dist'
// import PDFJS from 'pdfjs-dist'
// const Base64 = require('js-base64').Base64
export default {
......
......@@ -41,6 +41,8 @@
<div class="both-button">
<div class="button submit" @click="access">登录</div>
<div class="button submit" @click="goHome">游客体验</div>
<!--<div class="button submit" @click="faceContrast">游客体验</div>
<div class="button submit" @click="openHttps">游客体验</div>-->
</div>
</div>
......@@ -319,6 +321,10 @@ export default {
vm.hlsPopup.showLongCenter('认证失败: ' + error.message)
})
},
openHttps () {
cordova.InAppBrowser.open('https://www.baidu.com/', '_blank', 'location=yes')
},
},
}
</script>
......
......@@ -727,28 +727,36 @@ export default {
})
switch (cdd_item) {
case 'NP_ID_CARD_F': // 承租人身份证正面
if (!vm.idCardFrontUrlFlag) {
vm.idCardFront = res.lists[0].url
if (res.lists.length) {
if (!vm.idCardFrontUrlFlag) {
vm.idCardFront = res.lists[0].url
}
vm.idCardFrontAttachmentId = res.lists[0].attachment_id
}
vm.idCardFrontAttachmentId = res.lists[0].attachment_id
break
case 'NP_ID_CARD_B': // 承租人身份证背面
if (!vm.idCardBackUrlFlag) {
vm.idCardBack = res.lists[0].url
if (res.lists.length) {
if (!vm.idCardBackUrlFlag) {
vm.idCardBack = res.lists[0].url
}
vm.idCardBackAttachmentId = res.lists[0].attachment_id
}
vm.idCardBackAttachmentId = res.lists[0].attachment_id
break
case 'MATE_ID_CARD_F': // 配偶身份证正面
if (!vm.idCardFrontSpUrlFlag) {
vm.idCardFrontSp = res.lists[0].url
if (res.lists.length) {
if (!vm.idCardFrontSpUrlFlag) {
vm.idCardFrontSp = res.lists[0].url
}
vm.idCardFrontSpAttachmentId = res.lists[0].attachment_id
}
vm.idCardFrontSpAttachmentId = res.lists[0].attachment_id
break
case 'MATE_ID_CARD_B': // 配偶身份证背面
if (!vm.idCardBackSpUrlFlag) {
vm.idCardBackSp = res.lists[0].url
if (res.lists.length) {
if (!vm.idCardBackSpUrlFlag) {
vm.idCardBackSp = res.lists[0].url
}
vm.idCardBackSpAttachmentId = res.lists[0].attachment_id
}
vm.idCardBackSpAttachmentId = res.lists[0].attachment_id
break
default:
vm.dowload_list.push(res.lists)
......@@ -1382,26 +1390,26 @@ export default {
let result = res.result.words_result
if (cardType === 'idCard') {
vm.baseInfo.id_card_date_from = vm.timeFormat(result.签发日期.words)
if(result.失效日期.words.indexOf('长期') != -1){
if (result.失效日期.words.indexOf('长期') != -1) {
hlsPopup.showPopup({
title: '提示',
content: `检测到您的身份证为长期有效,系统自动置为【9999-12-31】`,
onConfirm: () => {},
})
vm.baseInfo.id_card_date_to = '9999-12-31'
}else{
} else {
vm.baseInfo.id_card_date_to = vm.timeFormat(result.失效日期.words)
}
} else {
vm.baseInfo.id_card_date_from_sp = vm.timeFormat(result.签发日期.words)
if(result.失效日期.words.indexOf('长期') != -1){
if (result.失效日期.words.indexOf('长期') != -1) {
hlsPopup.showPopup({
title: '提示',
content: `检测到您的身份证为长期有效,系统自动置为【9999-12-31】`,
onConfirm: () => {},
})
vm.baseInfo.id_card_date_to_sp = '9999-12-31'
}else{
} else {
vm.baseInfo.id_card_date_to_sp = vm.timeFormat(result.失效日期.words)
}
}
......
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