Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_front_2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenqikuai
fns_front_2
Commits
661790e3
Commit
661790e3
authored
Sep 29, 2021
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退出
parent
8bdecc66
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
0 deletions
+36
-0
App.vue
src/App.vue
+26
-0
jsBridge2.js
src/utils/jsBridge2.js
+10
-0
No files found.
src/App.vue
View file @
661790e3
...
...
@@ -24,6 +24,7 @@ import { chatLoginActionMark, eLoginType } from "./store/chatStore";
import
{
Toast
}
from
"vant"
;
import
router
from
"./router"
;
import
{
useRoute
}
from
"vue-router"
;
import
Bridge
from
'@/utils/jsBridge2'
export
default
defineComponent
({
...
...
@@ -47,6 +48,8 @@ export default defineComponent({
return
;
}
fmp
.
authorize
({
appId
:
"dtalk"
,
...
...
@@ -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
(()
=>
{
if
(
getUserMsg
())
{
connect
();
...
...
src/utils/jsBridge2.js
View file @
661790e3
...
...
@@ -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
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment