Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
live-management-web
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haojie
live-management-web
Commits
6b2fb3b7
Commit
6b2fb3b7
authored
Jul 28, 2023
by
haojie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
navbar改为动态添加
parent
a8070806
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
109 additions
and
6 deletions
+109
-6
src/layouts/components/ToolBar.vue
+6
-1
src/pages/ImageCustomization/index.vue
+11
-1
src/pages/VocalCustomization/index.vue
+11
-1
src/pages/createInteract/index.vue
+8
-0
src/pages/createLive/index.vue
+5
-0
src/store/index.ts
+2
-0
src/store/modules/navbar.ts
+63
-0
src/utils/request.ts
+3
-3
No files found.
src/layouts/components/ToolBar.vue
View file @
6b2fb3b7
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div
class=
"home-icon"
@
click=
"goHome"
>
<div
class=
"home-icon"
@
click=
"goHome"
>
<img
:src=
"imgs.home"
alt=
""
/>
<img
:src=
"imgs.home"
alt=
""
/>
</div>
</div>
<div
class=
"navigator-item"
v-for=
"item in nav
igato
rList"
:key=
"item.path"
@
click=
"jump(item)"
>
<div
class=
"navigator-item"
v-for=
"item in nav
ba
rList"
:key=
"item.path"
@
click=
"jump(item)"
>
<img
class=
"navigator-icon"
:src=
"item.icon"
alt=
""
/>
<img
class=
"navigator-icon"
:src=
"item.icon"
alt=
""
/>
<span
class=
"label"
>
<span
class=
"label"
>
{{
item
.
label
}}
{{
item
.
label
}}
...
@@ -19,9 +19,14 @@
...
@@ -19,9 +19,14 @@
import
routerConfig
from
'@/router/tool'
;
import
routerConfig
from
'@/router/tool'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
useRouter
}
from
'vue-router'
;
import
{
createLiveRouteKey
}
from
'@/constants/token'
;
import
{
createLiveRouteKey
}
from
'@/constants/token'
;
import
{
useStore
}
from
'vuex'
;
import
{
computed
}
from
'vue'
;
const
store
=
useStore
();
const
router
=
useRouter
();
const
router
=
useRouter
();
const
navbarList
=
computed
(()
=>
store
.
getters
[
'navbar/getNavbar'
]);
const
imgs
=
{
const
imgs
=
{
home
:
new
URL
(
'../../assets/svg/home/home.svg'
,
import
.
meta
.
url
).
href
,
home
:
new
URL
(
'../../assets/svg/home/home.svg'
,
import
.
meta
.
url
).
href
,
live
:
new
URL
(
'../../assets/svg/home/navLive.svg'
,
import
.
meta
.
url
).
href
,
live
:
new
URL
(
'../../assets/svg/home/navLive.svg'
,
import
.
meta
.
url
).
href
,
...
...
src/pages/ImageCustomization/index.vue
View file @
6b2fb3b7
...
@@ -27,9 +27,13 @@ import CustomTabs from '@/components/CustomTabs';
...
@@ -27,9 +27,13 @@ import CustomTabs from '@/components/CustomTabs';
import
CustomTabPanel
from
'@/components/CustomTabPanel'
;
import
CustomTabPanel
from
'@/components/CustomTabPanel'
;
import
Customizable
from
'@/components/Customizable'
;
import
Customizable
from
'@/components/Customizable'
;
import
PersonSvg
from
'@/assets/svg/custom/person.svg'
;
import
PersonSvg
from
'@/assets/svg/custom/person.svg'
;
import
{
ref
}
from
'vue'
;
import
{
onMounted
,
ref
}
from
'vue'
;
import
{
customizedImageSubmission
}
from
'@/utils/api/userApi'
;
import
{
customizedImageSubmission
}
from
'@/utils/api/userApi'
;
import
{
show_message
}
from
'@/utils/tool'
;
import
{
show_message
}
from
'@/utils/tool'
;
import
routerConfig
from
'@/router/tool'
;
import
{
useStore
}
from
'vuex'
;
const
store
=
useStore
();
const
currentTab
=
ref
(
'1'
);
const
currentTab
=
ref
(
'1'
);
...
@@ -67,6 +71,12 @@ const submit = async (params: any) => {
...
@@ -67,6 +71,12 @@ const submit = async (params: any) => {
console
.
log
(
e
);
console
.
log
(
e
);
}
}
};
};
onMounted
(()
=>
{
store
.
commit
(
'navbar/setNavbar'
,
{
path
:
routerConfig
.
ImageCustomization
.
path
,
});
});
</
script
>
</
script
>
<
style
lang=
"less"
></
style
>
<
style
lang=
"less"
></
style
>
src/pages/VocalCustomization/index.vue
View file @
6b2fb3b7
...
@@ -27,9 +27,13 @@ import MyDigitalPerson from './components/MyDigitalPerson.vue';
...
@@ -27,9 +27,13 @@ import MyDigitalPerson from './components/MyDigitalPerson.vue';
import
CustomTabs
from
'@/components/CustomTabs'
;
import
CustomTabs
from
'@/components/CustomTabs'
;
import
CustomTabPanel
from
'@/components/CustomTabPanel'
;
import
CustomTabPanel
from
'@/components/CustomTabPanel'
;
import
Customizable
from
'@/components/Customizable'
;
import
Customizable
from
'@/components/Customizable'
;
import
{
ref
}
from
'vue'
;
import
{
ref
,
onMounted
}
from
'vue'
;
import
{
customizedPhoneticSubmission
}
from
'@/utils/api/userApi'
;
import
{
customizedPhoneticSubmission
}
from
'@/utils/api/userApi'
;
import
{
show_message
}
from
'@/utils/tool'
;
import
{
show_message
}
from
'@/utils/tool'
;
import
{
useStore
}
from
'vuex'
;
import
routerConfig
from
'@/router/tool'
;
const
store
=
useStore
();
const
imgs
=
{
const
imgs
=
{
speak
:
new
URL
(
'../../assets/img/speaking.png'
,
import
.
meta
.
url
).
href
,
speak
:
new
URL
(
'../../assets/img/speaking.png'
,
import
.
meta
.
url
).
href
,
...
@@ -67,6 +71,12 @@ const submit = async (params: any) => {
...
@@ -67,6 +71,12 @@ const submit = async (params: any) => {
console
.
log
(
e
);
console
.
log
(
e
);
}
}
};
};
onMounted
(()
=>
{
store
.
commit
(
'navbar/setNavbar'
,
{
path
:
routerConfig
.
VocalCustomization
.
path
,
});
});
</
script
>
</
script
>
<
style
lang=
"less"
></
style
>
<
style
lang=
"less"
></
style
>
src/pages/createInteract/index.vue
View file @
6b2fb3b7
...
@@ -99,6 +99,10 @@ import YesSvg from '@/assets/svg/home/yes.svg';
...
@@ -99,6 +99,10 @@ import YesSvg from '@/assets/svg/home/yes.svg';
import
NoSvg
from
'@/assets/svg/home/no.svg'
;
import
NoSvg
from
'@/assets/svg/home/no.svg'
;
import
{
getLiveInteraction
}
from
'@/service/Common'
;
import
{
getLiveInteraction
}
from
'@/service/Common'
;
import
{
createInteraction
,
editGroupsInteractionName
,
deleteGroupsInteraction
}
from
'@/utils/api/userApi'
;
import
{
createInteraction
,
editGroupsInteractionName
,
deleteGroupsInteraction
}
from
'@/utils/api/userApi'
;
import
{
useStore
}
from
'vuex'
;
import
routerConfig
from
'@/router/tool'
;
const
store
=
useStore
();
const
interactRef
=
ref
<
HTMLDivElement
>
();
const
interactRef
=
ref
<
HTMLDivElement
>
();
const
maxHeight
=
ref
();
const
maxHeight
=
ref
();
...
@@ -258,6 +262,10 @@ onMounted(() => {
...
@@ -258,6 +262,10 @@ onMounted(() => {
let
client
=
getWindowClient
();
let
client
=
getWindowClient
();
maxHeight
.
value
=
client
.
height
-
obj
.
top
;
maxHeight
.
value
=
client
.
height
-
obj
.
top
;
getInteractList
();
getInteractList
();
// navbar
store
.
commit
(
'navbar/setNavbar'
,
{
path
:
routerConfig
.
createInteract
.
path
,
});
});
});
</
script
>
</
script
>
...
...
src/pages/createLive/index.vue
View file @
6b2fb3b7
...
@@ -411,6 +411,11 @@ onMounted(() => {
...
@@ -411,6 +411,11 @@ onMounted(() => {
store
.
commit
(
'live/setName'
,
route
.
query
.
title
?
route
.
query
.
title
:
''
);
store
.
commit
(
'live/setName'
,
route
.
query
.
title
?
route
.
query
.
title
:
''
);
// 记录本次路由
// 记录本次路由
window
.
localStorage
.
setItem
(
createLiveRouteKey
,
JSON
.
stringify
(
route
.
query
));
window
.
localStorage
.
setItem
(
createLiveRouteKey
,
JSON
.
stringify
(
route
.
query
));
// 添加导航
store
.
commit
(
'navbar/setNavbar'
,
{
path
:
routerConfig
.
createLive
.
path
,
query
:
route
.
query
,
});
});
});
onBeforeUnmount
(()
=>
{
onBeforeUnmount
(()
=>
{
...
...
src/store/index.ts
View file @
6b2fb3b7
...
@@ -4,6 +4,7 @@ import setting from './modules/setting';
...
@@ -4,6 +4,7 @@ import setting from './modules/setting';
import
theme
from
'./modules/theme'
;
import
theme
from
'./modules/theme'
;
import
language
from
'./modules/language'
;
import
language
from
'./modules/language'
;
import
live
from
'./modules/live'
;
import
live
from
'./modules/live'
;
import
navbar
from
'./modules/navbar'
;
export
const
store
=
createStore
({
export
const
store
=
createStore
({
modules
:
{
modules
:
{
...
@@ -12,6 +13,7 @@ export const store = createStore({
...
@@ -12,6 +13,7 @@ export const store = createStore({
theme
,
theme
,
language
,
language
,
live
,
live
,
navbar
,
},
},
});
});
...
...
src/store/modules/navbar.ts
0 → 100644
View file @
6b2fb3b7
import
routerConfig
from
'@/router/tool'
;
const
imgs
=
{
home
:
new
URL
(
'../../assets/svg/home/home.svg'
,
import
.
meta
.
url
).
href
,
live
:
new
URL
(
'../../assets/svg/home/navLive.svg'
,
import
.
meta
.
url
).
href
,
person
:
new
URL
(
'../../assets/svg/home/person.svg'
,
import
.
meta
.
url
).
href
,
speak
:
new
URL
(
'../../assets/svg/home/speaking.svg'
,
import
.
meta
.
url
).
href
,
interaction
:
new
URL
(
'../../assets/svg/home/interaction.svg'
,
import
.
meta
.
url
).
href
,
};
const
state
=
{
version
:
'v1'
,
navbarList
:
[],
};
type
StateType
=
typeof
state
;
interface
infoType
{
path
:
string
;
query
:
any
;
label
:
string
;
icon
:
string
;
}
const
mutations
=
{
setNavbar
(
state
:
StateType
,
info
:
infoType
)
{
let
index
=
state
.
navbarList
.
findIndex
((
item
:
any
)
=>
item
.
path
==
info
.
path
);
if
(
index
!==
-
1
)
{
// 替换
state
.
navbarList
[
index
].
query
=
info
.
query
;
}
else
{
if
(
info
.
path
==
routerConfig
.
createLive
.
path
)
{
info
.
icon
=
imgs
.
live
;
info
.
label
=
'直播创建'
;
}
else
if
(
info
.
path
==
routerConfig
.
ImageCustomization
.
path
)
{
info
.
icon
=
imgs
.
person
;
info
.
label
=
'形象定制'
;
}
else
if
(
info
.
path
==
routerConfig
.
VocalCustomization
.
path
)
{
info
.
icon
=
imgs
.
speak
;
info
.
label
=
'声音定制'
;
}
else
if
(
info
.
path
==
routerConfig
.
createInteract
.
path
)
{
info
.
icon
=
imgs
.
interaction
;
info
.
label
=
'互动回答'
;
}
state
.
navbarList
.
push
(
info
);
}
},
};
const
getters
=
{
getNavbar
:
(
state
:
StateType
)
=>
{
return
state
.
navbarList
;
},
};
const
actions
=
{};
export
default
{
namespaced
:
true
,
state
,
mutations
,
actions
,
getters
,
};
src/utils/request.ts
View file @
6b2fb3b7
...
@@ -8,7 +8,7 @@ const error_messaage = '请求错误';
...
@@ -8,7 +8,7 @@ const error_messaage = '请求错误';
const
getBaseUrl
=
()
=>
{
const
getBaseUrl
=
()
=>
{
if
(
isDev
())
{
if
(
isDev
())
{
//
//
return
'http://156.247.11.21:92/'
;
//
return 'http://156.247.11.21:92/';
return
''
;
return
''
;
}
}
// return 'http://video-assistant.test';
// return 'http://video-assistant.test';
...
@@ -17,8 +17,8 @@ const getBaseUrl = () => {
...
@@ -17,8 +17,8 @@ const getBaseUrl = () => {
const
instance
=
axios
.
create
({
const
instance
=
axios
.
create
({
baseURL
:
getBaseUrl
(),
baseURL
:
getBaseUrl
(),
withCredentials
:
false
,
//
withCredentials: false,
//
withCredentials: isDev() ? true : false,
withCredentials
:
isDev
()
?
true
:
false
,
});
});
// 请求头
// 请求头
...
...
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