Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
X
XiTianSenMall
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
leiqingsong
XiTianSenMall
Commits
ff7f8f90
Commit
ff7f8f90
authored
Mar 15, 2021
by
leiqingsong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
7a1f861f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
4 deletions
+50
-4
customer.js
H5/src/api/customer.js
+3
-2
index.js
H5/src/router/index.js
+29
-1
bridgeToAppFun.js
H5/src/utils/bridgeToAppFun.js
+9
-0
customer-service.vue
H5/src/views/customer-service.vue
+9
-1
No files found.
H5/src/api/customer.js
View file @
ff7f8f90
...
...
@@ -3,9 +3,10 @@ import request from "@/utils/request";
/**
* 获取专属客服
*/
export
function
getCustomer
()
{
export
function
getCustomer
(
params
)
{
return
request
({
url
:
"/customerService/service"
,
method
:
"get"
method
:
"get"
,
params
});
}
H5/src/router/index.js
View file @
ff7f8f90
...
...
@@ -8,7 +8,7 @@ const routes = [
path
:
"/my-status"
,
name
:
"MyStatus"
,
component
:
()
=>
import
(
"../views/my/myStatus.vue"
),
meta
:
{
title
:
"我的直推"
,
noNav
:
false
}
meta
:
{
title
:
"我的直推"
,
noNav
:
false
}
},
{
path
:
"/publish"
,
...
...
@@ -156,10 +156,38 @@ const routes = [
}
];
const
router
=
new
VueRouter
({
mode
:
"history"
,
base
:
process
.
env
.
BASE_URL
,
routes
});
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
console
.
log
(
'to'
,
to
);
const
whiteList
=
[
"MyStatus"
,
"Publish"
,
"FastestProgress"
,
"MonthAward"
,
"Settings"
,
"Grade"
,
"AirDrop"
,
"Invite"
,
"AboutUs"
,
"customerService"
,
"Wallet"
];
const
token
=
localStorage
.
getItem
(
"token"
);
if
(
whiteList
.
indexOf
(
to
.
name
)
>
-
1
)
{
if
(
token
)
{
next
()
}
else
{
console
.
log
(
'未登录'
);
}
}
else
{
next
()
}
})
export
default
router
;
H5/src/utils/bridgeToAppFun.js
View file @
ff7f8f90
...
...
@@ -78,6 +78,15 @@ class bridgeToAppFun {
jsBridge
.
callhandler
(
"showBottomBar"
,
params
);
}
}
redirectToLogin
()
{
console
.
log
(
"去登陆"
);
if
(
this
.
userAgent
===
"android"
)
{
console
.
log
(
"an"
);
window
.
android
.
redirectToLogin
();
}
else
{
jsBridge
.
callhandler
(
"redirectToLogin"
);
}
}
}
export
default
bridgeToAppFun
;
H5/src/views/customer-service.vue
View file @
ff7f8f90
...
...
@@ -5,7 +5,7 @@
name=
"arrow-left"
size=
"20"
class=
"nav-left"
@
click=
"
$router.go(-1)
"
@
click=
"
handlerBack
"
/>
<span
class=
"nav-title"
>
专属客服
</span>
</div>
...
...
@@ -39,6 +39,14 @@ export default {
},
mounted
()
{},
methods
:
{
handlerBack
()
{
try
{
this
.
$bridgeToAppFun
.
navigateBack
();
}
catch
{
console
.
log
(
"不能和App交互"
);
this
.
$router
.
go
(
-
1
);
}
},
handleUrl
(
urlName
)
{
this
.
$router
.
push
({
name
:
urlName
});
},
...
...
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