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
eb6ee53b
Commit
eb6ee53b
authored
Oct 19, 2021
by
xhx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
7b11c98a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
+30
-2
index.ts
src/service/StaffService/index.ts
+7
-0
index.ts
src/service/index.ts
+2
-0
appList.ts
src/views/withMenu/Home/appList.ts
+21
-2
No files found.
src/service/StaffService/index.ts
View file @
eb6ee53b
...
...
@@ -6,3 +6,10 @@ export function getStaffOnDutyStatus() {
method
:
'get'
,
})
}
export
function
enableLive
()
{
return
baseAxios
({
url
:
'/staff/enable_live'
,
method
:
'get'
})
}
src/service/index.ts
View file @
eb6ee53b
...
...
@@ -19,6 +19,8 @@ baseAxios.interceptors.response.use(
}
else
if
(
ret
.
code
===
1000
)
{
Toast
(
'您好,非常抱歉,该网点暂无营业人员。'
)
}
else
if
(
ret
.
code
!==
200
)
{
console
.
log
(
baseRet
.
transformResponse
)
// if (baseRet.config.url === '/staff/enable_live') return baseRet.data
Toast
.
fail
(
ret
.
msg
)
}
return
baseRet
.
data
...
...
src/views/withMenu/Home/appList.ts
View file @
eb6ee53b
import
Bridge
from
"@/utils/jsBridge2"
import
{
Toast
}
from
'vant'
;
import
{
enableLive
}
from
'@/service/StaffService/index'
export
default
[
...
...
@@ -48,10 +49,28 @@ export default [
Toast
(
'请先登录'
)
return
}
console
.
log
(
'bridge'
)
let
allow
=
false
let
time_section
=
''
enableLive
().
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
allow
=
res
.
data
.
allow
time_section
=
res
.
data
.
time_section
}
else
{
}
new
Bridge
().
bridge_live
({
phone
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'USER_MSG'
)
as
string
)?.
userInfo
.
phone
,
avatar
:
window
.
location
.
host
+
require
(
'../../../assets/icons/avatar.png'
),
allow
,
time_section
})
}).
catch
(()
=>
{
new
Bridge
().
bridge_live
({
phone
:
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'USER_MSG'
)
as
string
)?.
userInfo
.
phone
,
avatar
:
window
.
location
.
host
+
require
(
'../../../assets/icons/avatar.png'
)
avatar
:
window
.
location
.
host
+
require
(
'../../../assets/icons/avatar.png'
),
allow
,
time_section
})
})
},
},
...
...
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