Commit 8c7629a2 authored by linxin's avatar linxin

add

parent 03d31774
......@@ -988,6 +988,22 @@ export default {
}
})
},
loadstartCallback (event) {
console.log('Loading started: ' + event.url)
},
loadstopCallback (event) {
console.log('Loading finished: ' + event.url)
},
loaderrorCallback (error) {
console.log('Loading error: ' + error.message)
},
exitCallback () {
console.log('Browser is closed...')
},
// 认证入口
async certification () {
let vm = this
......@@ -1002,7 +1018,11 @@ export default {
const isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/)
if (isiOS) {
let ref = cordova.InAppBrowser.open(authUrl, '_blank', 'location=yes')
ref.addEventListener('exit', vm.userQuery())
ref.addEventListener('loadstart', vm.loadstartCallback())
ref.addEventListener('loadstop', vm.loadstopCallback())
ref.addEventListener('loadloaderror', vm.loaderrorCallback())
ref.addEventListener('exit', vm.exitCallback())
// ref.addEventListener('exit', vm.userQuery())
console.log('ios')
} else {
vm.$router.push({
......
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