Commit b456ab8c authored by Jennie Shi's avatar Jennie Shi

插件更新

parent 85397e1d
......@@ -110,6 +110,5 @@
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="IdCardPlugin" spec="/Users/jeshi/Documents/徐工/card-plugin-test/IdCardPlugin" />
<engine name="ios" spec="^4.5.5" />
<engine name="android" spec="~6.2.0" />
</widget>
......@@ -2734,6 +2734,7 @@
"version": "4.5.5",
"resolved": "https://registry.npm.taobao.org/cordova-ios/download/cordova-ios-4.5.5.tgz",
"integrity": "sha1-r3PasGUOqKOP/w54Y/3l/HutdTw=",
"dev": true,
"requires": {
"abbrev": "*",
"ansi": "*",
......@@ -2775,27 +2776,33 @@
"dependencies": {
"abbrev": {
"version": "1.1.1",
"bundled": true
"bundled": true,
"dev": true
},
"ansi": {
"version": "0.3.1",
"bundled": true
"bundled": true,
"dev": true
},
"balanced-match": {
"version": "1.0.0",
"bundled": true
"bundled": true,
"dev": true
},
"base64-js": {
"version": "1.2.0",
"bundled": true
"bundled": true,
"dev": true
},
"big-integer": {
"version": "1.6.32",
"bundled": true
"bundled": true,
"dev": true
},
"bplist-creator": {
"version": "0.0.7",
"bundled": true,
"dev": true,
"requires": {
"stream-buffers": "~2.2.0"
}
......@@ -2803,6 +2810,7 @@
"bplist-parser": {
"version": "0.1.1",
"bundled": true,
"dev": true,
"requires": {
"big-integer": "^1.6.7"
}
......@@ -2810,6 +2818,7 @@
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
......@@ -2817,11 +2826,13 @@
},
"concat-map": {
"version": "0.0.1",
"bundled": true
"bundled": true,
"dev": true
},
"cordova-common": {
"version": "2.2.5",
"bundled": true,
"dev": true,
"requires": {
"ansi": "^0.3.1",
"bplist-parser": "^0.1.0",
......@@ -2838,11 +2849,13 @@
},
"cordova-registry-mapper": {
"version": "1.1.15",
"bundled": true
"bundled": true,
"dev": true
},
"elementtree": {
"version": "0.1.6",
"bundled": true,
"dev": true,
"requires": {
"sax": "0.3.5"
}
......@@ -2850,6 +2863,7 @@
"glob": {
"version": "5.0.15",
"bundled": true,
"dev": true,
"requires": {
"inflight": "^1.0.4",
"inherits": "2",
......@@ -2861,6 +2875,7 @@
"inflight": {
"version": "1.0.6",
"bundled": true,
"dev": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
......@@ -2868,11 +2883,13 @@
},
"inherits": {
"version": "2.0.3",
"bundled": true
"bundled": true,
"dev": true
},
"ios-sim": {
"version": "6.1.3",
"bundled": true,
"dev": true,
"requires": {
"bplist-parser": "^0.0.6",
"nopt": "1.0.9",
......@@ -2882,11 +2899,13 @@
"dependencies": {
"bplist-parser": {
"version": "0.0.6",
"bundled": true
"bundled": true,
"dev": true
},
"nopt": {
"version": "1.0.9",
"bundled": true,
"dev": true,
"requires": {
"abbrev": "1"
}
......@@ -2896,6 +2915,7 @@
"minimatch": {
"version": "3.0.4",
"bundled": true,
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
......@@ -2903,6 +2923,7 @@
"nopt": {
"version": "3.0.6",
"bundled": true,
"dev": true,
"requires": {
"abbrev": "1"
}
......@@ -2910,17 +2931,20 @@
"once": {
"version": "1.4.0",
"bundled": true,
"dev": true,
"requires": {
"wrappy": "1"
}
},
"path-is-absolute": {
"version": "1.0.1",
"bundled": true
"bundled": true,
"dev": true
},
"plist": {
"version": "2.1.0",
"bundled": true,
"dev": true,
"requires": {
"base64-js": "1.2.0",
"xmlbuilder": "8.2.2",
......@@ -2929,19 +2953,23 @@
},
"q": {
"version": "1.5.1",
"bundled": true
"bundled": true,
"dev": true
},
"sax": {
"version": "0.3.5",
"bundled": true
"bundled": true,
"dev": true
},
"shelljs": {
"version": "0.5.3",
"bundled": true
"bundled": true,
"dev": true
},
"simctl": {
"version": "1.1.1",
"bundled": true,
"dev": true,
"requires": {
"shelljs": "^0.2.6",
"tail": "^0.4.0"
......@@ -2949,13 +2977,15 @@
"dependencies": {
"shelljs": {
"version": "0.2.6",
"bundled": true
"bundled": true,
"dev": true
}
}
},
"simple-plist": {
"version": "0.2.1",
"bundled": true,
"dev": true,
"requires": {
"bplist-creator": "0.0.7",
"bplist-parser": "0.1.1",
......@@ -2964,11 +2994,13 @@
"dependencies": {
"base64-js": {
"version": "1.1.2",
"bundled": true
"bundled": true,
"dev": true
},
"plist": {
"version": "2.0.1",
"bundled": true,
"dev": true,
"requires": {
"base64-js": "1.1.2",
"xmlbuilder": "8.2.2",
......@@ -2979,31 +3011,38 @@
},
"stream-buffers": {
"version": "2.2.0",
"bundled": true
"bundled": true,
"dev": true
},
"tail": {
"version": "0.4.0",
"bundled": true
"bundled": true,
"dev": true
},
"underscore": {
"version": "1.9.1",
"bundled": true
"bundled": true,
"dev": true
},
"unorm": {
"version": "1.4.1",
"bundled": true
"bundled": true,
"dev": true
},
"uuid": {
"version": "3.0.1",
"bundled": true
"bundled": true,
"dev": true
},
"wrappy": {
"version": "1.0.2",
"bundled": true
"bundled": true,
"dev": true
},
"xcode": {
"version": "0.9.3",
"bundled": true,
"dev": true,
"requires": {
"pegjs": "^0.10.0",
"simple-plist": "^0.2.1",
......@@ -3012,18 +3051,25 @@
},
"xml-escape": {
"version": "1.1.0",
"bundled": true
"bundled": true,
"dev": true
},
"xmlbuilder": {
"version": "8.2.2",
"bundled": true
"bundled": true,
"dev": true
},
"xmldom": {
"version": "0.1.27",
"bundled": true
"bundled": true,
"dev": true
}
}
},
"cordova-plugin-hand-idcardplugin": {
"version": "file:../../plugins/cordova-plugin-hand-idcardplugin",
"dev": true
},
"core-js": {
"version": "2.6.11",
"resolved": "https://registry.npm.taobao.org/core-js/download/core-js-2.6.11.tgz",
......@@ -8508,7 +8554,8 @@
"pegjs": {
"version": "0.10.0",
"resolved": "https://registry.npm.taobao.org/pegjs/download/pegjs-0.10.0.tgz",
"integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0="
"integrity": "sha1-z4uvrm7d/0tafvsYUmnqr0YQ3b0=",
"dev": true
},
"performance-now": {
"version": "0.2.0",
......
......@@ -17,7 +17,6 @@
"autosize": "^3.0.20",
"better-scroll": "^1.10.3",
"cordova-android": "^6.2.0",
"cordova-ios": "^4.5.5",
"cordova-plugin-device": "2.0.2",
"cordova-plugin-splashscreen": "5.0.2",
"cordova-plugin-statusbar": "2.4.2",
......@@ -48,6 +47,8 @@
"chalk": "^2.0.1",
"connect-history-api-fallback": "^1.3.0",
"copy-webpack-plugin": "^4.0.1",
"cordova-ios": "^4.5.5",
"cordova-plugin-hand-idcardplugin": "file:../../plugins/cordova-plugin-hand-idcardplugin",
"cross-env": "^5.2.0",
"css-loader": "^0.28.0",
"eslint": "^4.15.0",
......@@ -117,7 +118,8 @@
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"ionic-plugin-keyboard": {},
"IdCardPlugin": {}
"IdCardPlugin": {},
"cordova-plugin-hand-idcardplugin": {}
}
}
}
\ No newline at end of file
Subproject commit be9a1c85eb9c2ab36e44b91a06a549dfd58c60f3
......@@ -223,5 +223,13 @@
},
"is_top_level": true,
"variables": {}
},
"cordova-plugin-hand-idcardplugin": {
"source": {
"type": "local",
"path": "/Users/jeshi/Documents/徐工/hls-xcmg-vue-app/node_modules/cordova-plugin-hand-idcardplugin"
},
"is_top_level": true,
"variables": {}
}
}
\ No newline at end of file
......@@ -7,6 +7,9 @@
"files": {}
},
"installed_plugins": {
"IdCardPlugin": {
"PACKAGE_NAME": "com.xcmg.app"
},
"com.handmobile.cordovaplugin.hotpatch": {
"PACKAGE_NAME": "com.xcmg.app"
},
......@@ -35,6 +38,9 @@
"cordova-plugin-file-transfer": {
"PACKAGE_NAME": "com.xcmg.app"
},
"cordova-plugin-hand-idcardplugin": {
"PACKAGE_NAME": "com.xcmg.app"
},
"cordova-plugin-hrms-faceidentify": {
"PACKAGE_NAME": "com.xcmg.app"
},
......@@ -75,9 +81,6 @@
"jpush-phonegap-plugin": {
"APP_KEY": "bef4fd44dcf54b79b8ab27c3",
"PACKAGE_NAME": "com.xcmg.app"
},
"IdCardPlugin": {
"PACKAGE_NAME": "com.xcmg.app"
}
},
"dependent_plugins": {
......
......@@ -394,19 +394,19 @@ export default {
getTabNum (i) {
this.tabNum = i
},
takePhonto () {
let vm = this
hlsPopup.showConfirm({
title: '提示',
content: '请自拍一张',
onConfirm: function (index) {
if (index === 1) {
vm.takePhontoOpenCamera()
// vm.goElectronicSign()
}
},
})
},
// takePhonto () {
// let vm = this
// hlsPopup.showConfirm({
// title: '提示',
// content: '请自拍一张',
// onConfirm: function (index) {
// if (index === 1) {
// vm.takePhontoOpenCamera()
// // vm.goElectronicSign()
// }
// },
// })
// },
// 图片上传
takePhontoOpenCamera () {
let vm = this
......@@ -478,42 +478,53 @@ export default {
},
// 新插件版本
// async takePhonto () {
// let vm = this
// let flag = await this.signCheck()
// if (flag) {
// vm.hlsPopup.showLongCenter('已经验证过!')
// return
// }
// let url = process.env.basePath + 'bp_query'
// let param = {
// bp_id: window.localStorage.bp_id,
// }
// hlsPopup.showLoading('请稍候')
// vm.hlsHttp.post(url, param).then(res => {
// hlsPopup.hideLoading()
// if (res.result === 'S') {
// let data = res.lists[0]
// cordova.plugins.IdCardPlugin.faceContrast({'idNum': data.id_card_no, 'idName': data.bp_name}, function (suc) {
// let success = JSON.parse(suc)
// if (success.code === 1) {
// let filePath = JSON.stringify(success.message, '\\', null)
// filePath = 'file:\/\/' + filePath.replace('\"', '')
// filePath = filePath.substr(0, filePath.length - 1)
// console.log('filePath ==== ' + filePath)
// // 回调成功上传图片
async takePhonto () {
let vm = this
let flag = await this.signCheck()
if (flag) {
vm.hlsPopup.showLongCenter('已经验证过!')
return
}
let url = process.env.basePath + 'bp_query'
let param = {
bp_id: window.localStorage.bp_id,
}
hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then(res => {
hlsPopup.hideLoading()
if (res.result === 'S') {
let data = res.lists[0]
if (vum.Platform.isAndroid()) {
cordova.plugins.IdCardPlugin.faceContrast({'idNum': data.id_card_no, 'idName': data.bp_name}, function (suc) {
let success = JSON.parse(suc)
if (success.code === 1) {
let filePath = JSON.stringify(success.message, '\\', null)
filePath = 'file:\/\/' + filePath.replace('\"', '')
filePath = filePath.substr(0, filePath.length - 1)
console.log('filePath ==== ' + filePath)
// 回调成功上传图片
// vm.uploadImg(filePath)
// vm.goElectronicSign()
// }
// }, function (reason) {
// let error = JSON.parse(reason)
// vm.hlsPopup.showLongCenter('认证失败: ' + error.message)
// })
// } else {
// vm.hlsPopup.showLongCenter(res.message)
// }
// })
// },
}
}, function (reason) {
let error = JSON.parse(reason)
vm.hlsPopup.showLongCenter('认证失败: ' + error.message)
})
} else {
cordova.plugins.IdCardPlugin.faceContrast({'idNum': data.id_card_no, 'idName': data.bp_name}, function (suc) {
let success = JSON.parse(suc)
alert('success' + success)
console.log('filePath ==== ' + JSON.stringify(success.message))
}, function (reason) {
let error = JSON.parse(reason)
vm.hlsPopup.showLongCenter('认证失败: ' + error.message)
})
}
} else {
vm.hlsPopup.showLongCenter(res.message)
}
})
},
// 查看大图
showBigPicture (pic) {
let vm = this
......
......@@ -974,56 +974,54 @@ export default {
// 认证入口
async certification () {
let vm = this
let authFlag = await vm.getNpCertificationUrl()
// if (authFlag === true) {
if (vm.bp_id) {
if (
vm.bp_identity === 'NP_NO' ||
vm.bp_identity === 'ORG_L_NO'
) {
let authUrl = await vm.getNpCertificationUrl()
if (authUrl) {
const u = navigator.userAgent
const isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)
if (isiOS) {
let ref = cordova.InAppBrowser.open(authUrl, '_blank', 'location=yes,toolbar=yes')
ref.addEventListener('exit', function () {
console.log('Browser is closed...')
if (vm.bp_identity === 'NP_NO' || vm.bp_identity === 'ORG_L_NO' || vm.bp_identity === 'ORG_AUTH_NO') {
let url = process.env.basePath + 'bp_query'
let param = {
bp_id: window.localStorage.bp_id,
}
hlsPopup.showLoading('请稍候')
vm.hlsHttp.post(url, param).then((result) => {
hlsPopup.hideLoading()
if (result.result === 'S') {
let data = result.lists[0]
cordova.plugins.IdCardPlugin.idCardIdentify(
{
idNum: data.id_card_no,
idName: data.bp_name,
phoneNum: window.localStorage.user_phone,
},
function (suc) {
let success = JSON.parse(suc)
if (success.code === true) {
vm.userQuery()
})
console.log('ios')
} else {
vm.$router.push({
name: 'Certification',
params: {
authUrl: authUrl,
}
},
})
console.log('android')
function (reason) {
let error = JSON.parse(reason)
vm.hlsPopup.showLongCenter('认证失败: ' + error.message)
}
)
} else {
// hlsPopup.showLongCenter('获取认证url失败')
}
} else if (vm.bp_identity === 'ORG_NO' ||
vm.bp_identity === 'ORG_AUTH_NO') {
// let authUrl = await vm.getOrgCertificationUrl()
// if (authUrl) {
// vm.$router.push({
// name: 'Certification',
// params: {
// authUrl: authUrl,
// },
// })
// } else {
// // hlsPopup.showLongCenter('获取认证url失败')
// }
hlsPopup.showLongCenter('请联系对应业务人员为企业进行认证')
vm.hlsPopup.showLongCenter(result.message)
}
})
} else if (vm.bp_identity === 'ORG_NO') {
hlsPopup.showLongCenter('APP端不支持认证企业账号,请移步PC端操作')
} else {
hlsPopup.showLongCenter('您已认证通过')
}
} else {
hlsPopup.showLongCenter('请先进行用户绑定')
hlsPopup.showLongCenter('请先进行用户绑定')
}
// } else if (authFlag === false) {
// hlsPopup.showLongCenter('用户已绑定!')
// }
},
// 获取个人认证url
async getNpCertificationUrl () {
let vm = this
let url = $config.basePath + 'auth_user_sign'
......@@ -1033,14 +1031,15 @@ export default {
hlsPopup.showLoading('请稍候')
let res = await vm.$post(url, param)
hlsPopup.hideLoading()
if ((res.info.code === 0) && (res.info.data.authUrl)) {
vm.authUrl = res.info.data.authUrl
return vm.authUrl
} else if ((res.info.code === 0) && (res.info.data.openId)) {
vm.authUrl = res.info.data.openId
return vm.authUrl
if (res.info.code === 0 && res.info.data.authUrl) {
// hlsPopup.showLongCenter('绑定失败!')
return true
} else if (res.info.code === 0 && res.info.data.openId) {
// hlsPopup.showLongCenter('绑定成功!')
// vm.userQuery()
return false
} else {
hlsPopup.showError(res.info.msg)
hlsPopup.showLongCenter(res.info.msg)
return ''
}
},
......@@ -1054,23 +1053,16 @@ export default {
hlsPopup.showLoading('请稍候')
let res = await vm.$post(url, param)
hlsPopup.hideLoading()
// if (res.info.code === 0) {
// return res.info.data.authUrl
// } else {
// hlsPopup.showLongCenter(res.info.msg)
// return null
// }
if ((res.info.code === 0) && (res.info.data.authUrl)) {
vm.authUrl = res.info.data.authUrl
return vm.authUrl
hlsPopup.showLongCenter('绑定失败!')
} else if ((res.info.code === 0) && (res.info.data.openId)) {
vm.authUrl = res.info.data.openId
return vm.authUrl
hlsPopup.showLongCenter('绑定成功!')
vm.userQuery()
} else {
hlsPopup.showError(res.info.msg)
return ''
}
},
goAbout () {
this.$router.push({
name: 'About',
......
......@@ -228,7 +228,7 @@ export default {
},
function (suc) {
let success = JSON.parse(suc)
if (success.code === 1) {
if (success.code === true) {
vm.getNpCertificationUrl()
}
},
......
......@@ -313,10 +313,23 @@ export default {
if(vum.Platform.isAndroid()){
return url
}else if (vum.Platform.isIOS()){
return window.Ionic.WebView.convertFileSrc(url)
return this.convertFileSrc(url)
}
},
convertFileSrc: function(url) {
if (!url) {
return url;
}
if (url.startsWith('/')) {
return 'http://localhost:8080' + '' + url;
}
if (url.startsWith('file://')) {
return 'http://localhost:8080' + url.replace('file://', '');
}
return url;
},
/**
* 录制视频
*/
......
<!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.378afda3d81b5cef04134ebabeaf759d.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.0a4e11017ea45af58444.js></script><script type=text/javascript src=./static/js/app.b15259f5feccd5b1c4b2.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