Commit b456ab8c authored by Jennie Shi's avatar Jennie Shi

插件更新

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