Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
cb96d406
提交
cb96d406
authored
2月 23, 2022
作者:
郑伟娜
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化接口
上级
8a7e558f
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
73 行增加
和
30 行删除
+73
-30
Navbar.vue
src/layout/components/Navbar.vue
+24
-14
Logo.vue
src/layout/components/Sidebar/Logo.vue
+26
-14
index.vue
src/layout/index.vue
+7
-0
getters.js
src/store/getters.js
+2
-1
user.js
src/store/modules/user.js
+14
-1
没有找到文件。
src/layout/components/Navbar.vue
浏览文件 @
cb96d406
...
...
@@ -91,6 +91,9 @@ export default {
value
:
val
})
}
},
channelInfo
()
{
return
this
.
$store
.
getters
.
channelInfo
}
},
data
(){
...
...
@@ -101,23 +104,30 @@ export default {
},
created
()
{
/** 获取渠道id */
this
.
getChannelId
()
//
this.getChannelId()
},
methods
:
{
/** 判断渠道 值=0才显示 查看历史数据 链接 */
getChannelId
()
{
let
ssa
=
window
.
location
.
host
const
data
=
{
type
:
2
,
site_type
:
4
,
// domain: ssa,
watch
:
{
channelInfo
()
{
if
(
this
.
channelInfo
)
{
this
.
channel_id
=
this
.
channelInfo
.
channel
.
id
}
indexInfo
(
data
).
then
(
res
=>
{
if
(
res
.
code
==
1
)
{
this
.
channel_id
=
res
.
data
.
channel
.
id
}
});
},
},
methods
:
{
/** 判断渠道 值=0才显示 查看历史数据 链接 */
// getChannelId() {
// let ssa = window.location.host
// const data = {
// type: 2,
// site_type: 4,
// // domain: ssa,
// }
// indexInfo(data).then(res=> {
// if (res.code == 1) {
// this.channel_id = res.data.channel.id
// }
// });
// },
toggleSideBar
()
{
this
.
$store
.
dispatch
(
'app/toggleSideBar'
)
...
...
src/layout/components/Sidebar/Logo.vue
浏览文件 @
cb96d406
...
...
@@ -34,23 +34,35 @@ export default {
logo
:
logoImg
}
},
computed
:
{
channelInfo
()
{
return
this
.
$store
.
getters
.
channelInfo
}
},
watch
:
{
channelInfo
()
{
this
.
title
=
this
.
channelInfo
.
channel_site
[
0
].
base_setting_res
.
name
this
.
logo
=
this
.
channelInfo
.
channel_site
[
0
].
base_setting_res
.
logo
document
.
title
=
this
.
channelInfo
.
channel_site
[
0
].
base_setting_res
.
title
},
},
mounted
()
{
this
.
getBackDetailsView
()
//
this.getBackDetailsView()
},
methods
:
{
getBackDetailsView
()
{
let
params
=
{
type
:
2
,
site_type
:
4
}
backDetailsView
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
1
)
{
this
.
title
=
res
.
data
.
channel_site
[
0
].
base_setting_res
.
name
this
.
logo
=
res
.
data
.
channel_site
[
0
].
base_setting_res
.
logo
document
.
title
=
res
.
data
.
channel_site
[
0
].
base_setting_res
.
title
}
})
}
//
getBackDetailsView() {
//
let params = {
//
type: 2,
//
site_type: 4
//
}
//
backDetailsView(params).then(res => {
//
if (res.code == 1) {
//
this.title = res.data.channel_site[0].base_setting_res.name
//
this.logo = res.data.channel_site[0].base_setting_res.logo
//
document.title = res.data.channel_site[0].base_setting_res.title
//
}
//
})
//
}
}
}
</
script
>
...
...
src/layout/index.vue
浏览文件 @
cb96d406
...
...
@@ -49,6 +49,13 @@ export default {
}
}
},
mounted
()
{
const
data
=
{
type
:
2
,
site_type
:
4
}
this
.
$store
.
dispatch
(
'getChannelSiteInfo'
,
data
)
},
methods
:
{
handleClickOutside
()
{
this
.
$store
.
dispatch
(
'app/closeSideBar'
,
{
withoutAnimation
:
false
})
...
...
src/store/getters.js
浏览文件 @
cb96d406
...
...
@@ -10,6 +10,7 @@ const getters = {
introduction
:
state
=>
state
.
user
.
introduction
,
roles
:
state
=>
state
.
user
.
roles
,
permissions
:
state
=>
state
.
user
.
permissions
,
permission_routes
:
state
=>
state
.
permission
.
routes
permission_routes
:
state
=>
state
.
permission
.
routes
,
channelInfo
:
state
=>
state
.
user
.
channelInfo
}
export
default
getters
src/store/modules/user.js
浏览文件 @
cb96d406
import
{
login
,
login2
,
logout
,
getInfo
,
getStatistics
}
from
'@/api/login'
import
{
getssoUrl
}
from
'@/api/webSite'
import
{
getssoUrl
,
backDetailsView
}
from
'@/api/webSite'
import
{
getToken
,
setToken
,
removeToken
}
from
'@/utils/auth'
const
user
=
{
...
...
@@ -18,9 +18,13 @@ const user = {
// 3-审核拒绝;
applyState
:
-
1
,
cateFee
:
0
,
channelInfo
:
null
},
mutations
:
{
SET_CHANNELINFO
:
(
state
,
channelInfo
)
=>
{
state
.
channelInfo
=
channelInfo
},
SET_SSOURL
:(
state
,
ssourl
)
=>
{
state
.
ssourl
=
ssourl
},
...
...
@@ -51,6 +55,15 @@ const user = {
},
actions
:
{
getChannelSiteInfo
({
commit
},
data
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
backDetailsView
(
data
).
then
(
response
=>
{
if
(
response
.
code
==
1
)
{
commit
(
'SET_CHANNELINFO'
,
response
.
data
)
}
})
})
},
getssourl
({
commit
},
data
){
return
new
Promise
((
resolve
,
reject
)
=>
{
getssoUrl
(
data
).
then
(
response
=>
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论