Commit 661790e3 authored by xhx's avatar xhx

退出

parent 8bdecc66
...@@ -24,6 +24,7 @@ import { chatLoginActionMark, eLoginType } from "./store/chatStore"; ...@@ -24,6 +24,7 @@ import { chatLoginActionMark, eLoginType } from "./store/chatStore";
import { Toast } from "vant"; import { Toast } from "vant";
import router from "./router"; import router from "./router";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import Bridge from '@/utils/jsBridge2'
export default defineComponent({ export default defineComponent({
...@@ -47,6 +48,8 @@ export default defineComponent({ ...@@ -47,6 +48,8 @@ export default defineComponent({
return; return;
} }
fmp fmp
.authorize({ .authorize({
appId: "dtalk", appId: "dtalk",
...@@ -73,6 +76,29 @@ export default defineComponent({ ...@@ -73,6 +76,29 @@ export default defineComponent({
} }
}) })
const checkRoute = (n: string) => {
switch(n) {
case '/home':
return true
case '/chatList':
return true
case '/loan':
return true
case '/mine':
return true
default:
return false
}
}
watch(() => route.path,(n) => {
console.log(n)
const result = checkRoute(n)
console.log(result,' result')
new Bridge().bridge_getGps(result)
}
)
onMounted(() => { onMounted(() => {
if (getUserMsg()) { if (getUserMsg()) {
connect(); connect();
......
...@@ -521,5 +521,15 @@ jsBridge.prototype.bridge_getGps = function (params, success) { ...@@ -521,5 +521,15 @@ jsBridge.prototype.bridge_getGps = function (params, success) {
} }
} }
/* 退出 */
jsBridge.prototype.bridge_quitApp = function (params, success) {
if (this.curApp == ANDROID) {
dsBridge.call('bridge_getGps', params)
}
else if (this.curApp == IOS) {
this.callHandler('bridge_getGps', params, success)
}
}
export default jsBridge; export default jsBridge;
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