computed: {
ifNative() {
return typeof HostApp !== 'undefined';
},
},
proxyRequest(funName, param = {}, callBack = () => {}) {
if (this.ifNative) {
if (this.$utils.versions().ios) {
// eslint-disable-next-line
WebViewJavascriptBridge.callHandler(funName, JSON.stringify(param), callBack);
} else if (this.$utils.versions().android) {
// eslint-disable-next-line
HostApp.callHandler(funName, JSON.stringify(param), callBack);
}
} else {
console.log(funName);
}
},
if (res.data.code === 0) {
WebViewJavascriptBridge.callHandler(
'getLocation'
, {}
, function (response) {
that.appParams = JSON.parse(response)
that.dialogMode = true
that.timekeepingControl()
}
)
that.sendAndroidCount()
}
网友评论