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
7f3dba8f
Commit
7f3dba8f
authored
Feb 25, 2021
by
zhangzhongjie
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://code.bailuntec.com/Discuz/DiscuzWeb
parents
aff28358
fc7813e9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
27 deletions
+56
-27
Advertising.vue
components/Advertising.vue
+16
-13
_id.vue
pages/category/_id.vue
+15
-1
index.vue
pages/knowledge/index.vue
+25
-13
No files found.
components/Advertising.vue
View file @
7f3dba8f
...
...
@@ -8,19 +8,19 @@
</div>
</
template
>
<
script
>
const
QRCode
=
process
.
client
&&
require
(
'qrcodejs2'
);
const
QRCode
=
process
.
client
&&
require
(
"qrcodejs2"
);
export
default
{
name
:
'Advertising'
,
name
:
"Advertising"
,
data
()
{
return
{
qrcode
:
null
,
siteName
:
''
siteName
:
""
,
};
},
computed
:
{
forums
()
{
return
this
.
$store
.
state
.
site
.
info
.
attributes
||
{};
}
}
,
},
watch
:
{
forums
:
{
...
...
@@ -28,17 +28,17 @@ export default {
if
(
val
&&
val
.
set_site
)
{
this
.
siteName
=
val
.
set_site
.
site_name
?
val
.
set_site
.
site_name
:
'Discuz! Q'
;
:
"Discuz! Q"
;
}
},
deep
:
true
}
deep
:
true
,
}
,
},
mounted
()
{
this
.
siteName
=
this
.
forums
&&
this
.
forums
.
set_site
&&
this
.
forums
.
set_site
.
site_name
this
.
siteName
=
this
.
forums
&&
this
.
forums
.
set_site
&&
this
.
forums
.
set_site
.
site_name
?
this
.
forums
.
set_site
.
site_name
:
'Discuz! Q'
;
:
"Discuz! Q"
;
this
.
createQrcode
(
window
.
location
.
href
);
},
destroyed
()
{
...
...
@@ -52,18 +52,21 @@ export default {
* createQrcode('https://xxx.com/')
*/
createQrcode
(
link
)
{
if
(
link
==
"http://wiki.bailuntec.com/category"
)
{
link
=
"http://wiki.bailuntec.com/"
;
}
if
(
process
.
client
)
{
this
.
qrcode
=
null
;
this
.
$nextTick
(()
=>
{
this
.
qrcode
=
new
QRCode
(
this
.
$refs
.
qrcode
,
{
width
:
70
,
height
:
70
,
// 高度
text
:
link
// 二维码内容
text
:
link
,
// 二维码内容
});
});
}
}
}
}
,
}
,
};
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
pages/category/_id.vue
View file @
7f3dba8f
...
...
@@ -220,6 +220,7 @@ export default {
});
resData
.
categoryData
=
_categoryData
;
}
if
(
Array
.
isArray
(
recommendUser
))
{
resData
.
recommendUserData
=
recommendUser
;
}
else
if
(
recommendUser
&&
recommendUser
.
_jv
&&
recommendUser
.
_jv
.
json
)
{
...
...
@@ -281,6 +282,8 @@ export default {
}
},
mounted
()
{
//var isMobile = window.navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i); // 是否手机端
if
(
this
.
$route
.
params
.
id
)
{
this
.
categoryId
=
this
.
$route
.
params
.
id
;
this
.
getCategoryList
();
...
...
@@ -306,6 +309,10 @@ export default {
clearInterval
(
this
.
timer
);
},
methods
:
{
_isMobile
(){
let
flag
=
navigator
.
userAgent
.
match
(
/
(
phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone
)
/i
)
return
flag
;
},
// 置顶主题
getThreadsSticky
()
{
this
.
threadsStickyData
=
[];
...
...
@@ -394,6 +401,7 @@ export default {
});
},
// 获取分类列表 用于head title显示
getCategoryList
()
{
this
.
$store
.
dispatch
(
'jv/get'
,
[
'categories'
,
{}]).
then
(
res
=>
{
...
...
@@ -402,6 +410,7 @@ export default {
const
currentCategory
=
resData
.
find
(
item
=>
{
return
item
.
_jv
&&
+
item
.
_jv
.
id
===
+
this
.
categoryId
;
});
if
(
currentCategory
)
{
this
.
title
=
currentCategory
.
name
;
}
...
...
@@ -503,7 +512,12 @@ export default {
this
.
threadVideo
=
video
;
this
.
showVideoPop
=
true
;
}
}
},
head
()
{
return
{
title
:
"百伦维基论坛"
,
};
},
};
</
script
>
...
...
pages/knowledge/index.vue
View file @
7f3dba8f
...
...
@@ -39,20 +39,20 @@ export default {
userInfo
:
""
,
qywxUserid
:
""
,
loading
:
false
,
knowledgeList
:
[]
knowledgeList
:
[]
,
};
},
computed
:
{},
mounted
()
{
const
params
=
{
include
:
"groups,wechat"
include
:
"groups,wechat"
,
};
if
(
!
this
.
userId
)
{
this
.
getCode
();
}
this
.
$store
.
dispatch
(
"jv/get"
,
[
`users/
${
this
.
userId
}
`
,
{
params
}])
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
this
.
userInfo
=
JSON
.
parse
(
res
.
wechat_info
);
this
.
qywxUserid
=
this
.
userInfo
.
userid
;
if
(
!
this
.
qywxUserid
)
{
...
...
@@ -64,14 +64,21 @@ export default {
.
get
(
`
${
config
.
WEI_PAN_URL
}
/weipan/getfirstfilelist?userId=
${
this
.
qywxUserid
}
`
)
.
then
(
res
=>
{
.
then
(
(
res
)
=>
{
if
(
res
.
data
.
result
.
file_list
!=
null
)
{
const
filelist
=
res
.
data
.
result
.
file_list
.
item
;
this
.
knowledgeList
=
[];
filelist
.
forEach
(
element
=>
{
filelist
.
forEach
(
(
element
)
=>
{
if
(
element
.
file_status
==
"1"
)
{
var
date
=
element
.
ctime
.
split
(
' '
)[
0
].
split
(
"/"
)[
2
]
+
'/'
+
element
.
ctime
.
split
(
' '
)[
0
].
split
(
"/"
)[
1
]
+
'/'
+
element
.
ctime
.
split
(
' '
)[
0
].
split
(
"/"
)[
0
]
+
' '
+
element
.
ctime
.
split
(
' '
)[
1
];
var
date
=
element
.
ctime
.
split
(
" "
)[
0
].
split
(
"/"
)[
2
]
+
"/"
+
element
.
ctime
.
split
(
" "
)[
0
].
split
(
"/"
)[
1
]
+
"/"
+
element
.
ctime
.
split
(
" "
)[
0
].
split
(
"/"
)[
0
]
+
" "
+
element
.
ctime
.
split
(
" "
)[
1
];
const
knowledge
=
{
title
:
element
.
file_name
,
...
...
@@ -79,7 +86,7 @@ export default {
time
:
date
,
fileid
:
element
.
fileid
,
fatherid
:
element
.
fatherid
,
filetype
:
element
.
file_type
filetype
:
element
.
file_type
,
};
this
.
knowledgeList
.
push
(
knowledge
);
}
...
...
@@ -102,7 +109,7 @@ export default {
)
{
// 静默授权
//const code = this.getUrlParam("code"); // 截取路径中的code,如果没有就去微信授权,如果已经获取到了就直接传code给后台获取openId
const
local
=
"http://
discuz
.bailuntec.com/user/login"
;
const
local
=
"http://
wiki
.bailuntec.com/user/login"
;
const
APPID
=
"ww833808f6b8dc0745"
;
// 企业微信
window
.
location
.
href
=
"https://open.weixin.qq.com/connect/oauth2/authorize?appid="
+
...
...
@@ -110,7 +117,7 @@ export default {
"&redirect_uri="
+
encodeURIComponent
(
local
)
+
"&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect"
;
}
else
{
}
else
{
this
.
$message
.
warning
(
`请先登录`
);
}
}
...
...
@@ -121,11 +128,16 @@ export default {
query
:
{
id
:
fileid
,
fatherid
:
fatherid
,
useid
:
this
.
qywxUserid
}
useid
:
this
.
qywxUserid
,
}
,
});
}
}
},
},
head
()
{
return
{
title
:
"知识库"
,
};
},
};
</
script
>
<
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