Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DiscuzWeb
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Discuz
DiscuzWeb
Commits
28b64af5
Commit
28b64af5
authored
Feb 03, 2021
by
xiongyuwen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://code.bailuntec.com/Discuz/DiscuzWeb
parents
9f6976ed
37568f03
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
25 deletions
+21
-25
Header.vue
components/Header.vue
+21
-25
No files found.
components/Header.vue
View file @
28b64af5
...
@@ -34,9 +34,9 @@
...
@@ -34,9 +34,9 @@
</el-input>
</el-input>
<template>
<template>
<div
<div
class=
"knowledge"
v-loading=
"showSyncWanPanloading"
v-if=
"showSyncWanPan"
v-if=
"showSyncWanPan"
v-loading=
"showSyncWanPanloading"
class=
"knowledge"
@
click=
"SyncWanPan"
@
click=
"SyncWanPan"
>
>
刷新知识库
刷新知识库
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
id: userInfo.id,
id: userInfo.id,
username: userInfo.username,
username: userInfo.username,
avatarUrl: userInfo.avatarUrl,
avatarUrl: userInfo.avatarUrl,
isReal: userInfo.isReal
,
isReal: userInfo.isReal
}"
}"
:size=
"35"
:size=
"35"
:round=
"true"
:round=
"true"
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
<span
<span
v-if=
"
v-if=
"
userInfo.unreadNotifications &&
userInfo.unreadNotifications &&
userInfo.unreadNotifications > 0
userInfo.unreadNotifications > 0
"
"
class=
"unread-notice"
class=
"unread-notice"
>
{{
>
{{
...
@@ -115,8 +115,8 @@ export default {
...
@@ -115,8 +115,8 @@ export default {
props
:
{
props
:
{
headImg
:
{
headImg
:
{
type
:
String
,
type
:
String
,
default
:
""
,
default
:
""
}
,
}
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -131,7 +131,7 @@ export default {
...
@@ -131,7 +131,7 @@ export default {
imgurl
:
require
(
"@/assets/logo.png"
),
imgurl
:
require
(
"@/assets/logo.png"
),
islogin
:
true
,
islogin
:
true
,
hideHeader
:
false
,
// 不需要头部右侧部分
hideHeader
:
false
,
// 不需要头部右侧部分
preurl
:
"/"
,
preurl
:
"/"
};
};
},
},
computed
:
{
computed
:
{
...
@@ -156,9 +156,9 @@ export default {
...
@@ -156,9 +156,9 @@ export default {
// console.log(res.data.result);
// console.log(res.data.result);
// })
// })
if
(
!!
this
.
$store
.
state
.
user
)
{
if
(
this
.
$store
.
state
.
user
)
{
le
t
users
=
this
.
$store
.
state
.
user
.
info
.
attributes
;
cons
t
users
=
this
.
$store
.
state
.
user
.
info
.
attributes
;
if
(
!!
users
)
{
if
(
users
)
{
console
.
log
(
users
,
22
);
console
.
log
(
users
,
22
);
if
(
users
.
username
==
"熊裕文"
)
{
if
(
users
.
username
==
"熊裕文"
)
{
this
.
showSyncWanPan
=
true
;
this
.
showSyncWanPan
=
true
;
...
@@ -166,7 +166,7 @@ export default {
...
@@ -166,7 +166,7 @@ export default {
}
}
}
}
return
this
.
$store
.
state
.
user
.
info
.
attributes
||
{};
return
this
.
$store
.
state
.
user
.
info
.
attributes
||
{};
}
,
}
},
},
watch
:
{
watch
:
{
// 监听路由变化
// 监听路由变化
...
@@ -176,7 +176,7 @@ export default {
...
@@ -176,7 +176,7 @@ export default {
}
else
{
}
else
{
this
.
siteClose
=
false
;
this
.
siteClose
=
false
;
}
}
}
,
}
},
},
mounted
()
{
mounted
()
{
this
.
showSyncWanPan
=
false
;
this
.
showSyncWanPan
=
false
;
...
@@ -194,8 +194,8 @@ export default {
...
@@ -194,8 +194,8 @@ export default {
// 更加微信用户id获取对应得用户信息并返回
// 更加微信用户id获取对应得用户信息并返回
axios
axios
.
get
(
`http://discuz.bailuntec.com/api/login?useid=
${
wxUserid
}
`
)
.
get
(
`http://discuz.bailuntec.com/api/login?useid=
${
wxUserid
}
`
)
//.get(`http://discuz.bailuntec.com/api/login?useid=chenqi`)
//
.get(`http://discuz.bailuntec.com/api/login?useid=chenqi`)
.
then
(
(
res
)
=>
{
.
then
(
res
=>
{
if
(
res
.
data
.
data
.
relationships
.
users
.
data
.
id
)
{
if
(
res
.
data
.
data
.
relationships
.
users
.
data
.
id
)
{
localStorage
.
setItem
(
localStorage
.
setItem
(
"user_id"
,
"user_id"
,
...
@@ -250,7 +250,7 @@ export default {
...
@@ -250,7 +250,7 @@ export default {
},
},
methods
:
{
methods
:
{
// 获取cookie
// 获取cookie
getCookie
:
function
(
cname
)
{
getCookie
:
function
(
cname
)
{
const
name
=
`
${
cname
}
=`
;
const
name
=
`
${
cname
}
=`
;
const
ca
=
document
.
cookie
.
split
(
";"
);
const
ca
=
document
.
cookie
.
split
(
";"
);
console
.
log
(
"获取cookie,现在循环"
);
console
.
log
(
"获取cookie,现在循环"
);
...
@@ -265,12 +265,12 @@ export default {
...
@@ -265,12 +265,12 @@ export default {
return
""
;
return
""
;
},
},
SyncWanPan
()
{
SyncWanPan
()
{
//alert('开始授权')
//
alert('开始授权')
//this.getCode();
//
this.getCode();
this
.
showSyncWanPanloading
=
true
;
this
.
showSyncWanPanloading
=
true
;
axios
axios
.
get
(
`
${
config
.
WEI_PAN_URL
}
/weipan/ProcessWeiPanWorker`
)
.
get
(
`
${
config
.
WEI_PAN_URL
}
/weipan/ProcessWeiPanWorker`
)
.
then
(
(
res
)
=>
{
.
then
(
res
=>
{
if
(
res
.
data
.
statusCode
==
200
)
{
if
(
res
.
data
.
statusCode
==
200
)
{
this
.
$message
.
success
(
res
.
data
.
result
);
this
.
$message
.
success
(
res
.
data
.
result
);
}
else
{
}
else
{
...
@@ -316,16 +316,12 @@ export default {
...
@@ -316,16 +316,12 @@ export default {
},
},
// 跳转首页
// 跳转首页
toIndex
()
{
toIndex
()
{
if
(
this
.
$route
.
path
===
"/"
)
{
this
.
$router
.
push
(
"/category"
);
window
.
location
.
href
=
"/"
;
}
else
{
this
.
$router
.
push
(
"/"
);
}
},
},
knowledge
()
{
knowledge
()
{
this
.
$router
.
push
(
`/knowledge`
);
this
.
$router
.
push
(
`/knowledge`
);
}
,
}
}
,
}
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
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