Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
Project
Project
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
front-end-dev
techbook
Commits
26ed7262
Commit
26ed7262
authored
May 17, 2020
by
anxixi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文章开发
parent
9d4ede8b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
330 additions
and
40 deletions
+330
-40
common.scss
public/css/common.scss
+12
-0
PageTop.vue
src/components/index/PageTop.vue
+7
-15
router.js
src/router.js
+12
-2
api.js
src/views/conmanagementpage/api/api.js
+25
-1
articleservice.vue
src/views/conmanagementpage/articleservice.vue
+0
-1
articlesettings.vue
src/views/conmanagementpage/articlesettings.vue
+26
-18
conmanagement.vue
src/views/conmanagementpage/conmanagement.vue
+1
-0
contentall.vue
src/views/conmanagementpage/contentall.vue
+0
-0
contentarticle.vue
src/views/conmanagementpage/contentarticle.vue
+17
-3
contentdetail.vue
src/views/conmanagementpage/contentdetail.vue
+0
-0
contentdetails.vue
src/views/conmanagementpage/contentdetails.vue
+35
-0
hotarticlepage.vue
src/views/conmanagementpage/hotarticlepage.vue
+190
-0
api.js
src/views/index/api/api.js
+5
-0
No files found.
public/css/common.scss
View file @
26ed7262
...
...
@@ -714,6 +714,10 @@ i {
padding
:
30px
0
;
}
}
.dialogWrap640
.el-dialog
{
width
:
640px
!
important
;
}
.dialogWrap500
.el-dialog
{
width
:
500px
;
min-height
:
246px
;
...
...
@@ -1319,6 +1323,14 @@ i {
color
:
#3a3a3a
;
}
//最新资讯
.content_tab
.el-tabs__item
{
color
:
#3F3F53
;
padding
:
0
10px
;
}
//表格
.tableList.el-table
.el-table__header
th
:nth-child
(
1
)
{
padding-left
:
15px
;
...
...
src/components/index/PageTop.vue
View file @
26ed7262
...
...
@@ -11,14 +11,11 @@
<ul
class=
"navListLi"
>
<li
@
click
.
stop=
"handleClick(index)"
@
mouseenter=
"handleShowChildren(index)"
@
mouseout=
"handleHideChildren(index)"
:class=
"[currentIndex==index?'activeLi':'',
{'relative':index === 3}]"
v-for="(item,index) in list">
{{
$t
(
'topNav.'
+
item
.
name
)
}}
<div
class=
"childrenLi"
v-if=
"isShowChildren && index === 3"
@
mouseleave=
"handleIsHide"
>
<p
@
click=
"handleToIndustryFocus"
>
{{
$t
(
'topNav.professionfocusing'
)
}}
</p>
<p
@
click=
"handleToCase"
>
{{
$t
(
'topNav.cooperationcase'
)
}}
</p>
</div>
<!--
<div
class=
"childrenLi"
v-if=
"isShowChildren && index === 3"
@
mouseleave=
"handleIsHide"
>
-->
<!--
<p
@
click=
"handleToCase"
>
{{
$t
(
'topNav.cooperationcase'
)
}}
</p>
-->
<!--
</div>
-->
</li>
...
...
@@ -180,10 +177,10 @@
name
:
"findCustomer"
},
{
id
:
4
,
name
:
"
industryActiv
e"
name
:
"
newsArticl
e"
},
{
id
:
6
,
name
:
"
useHelp
"
name
:
"
cooperationcase
"
}],
currentIndex
:
this
.
publicFun
.
getCookie
(
"currentNav"
)
==
null
||
this
.
publicFun
.
getCookie
(
"currentNav"
)
==
undefined
||
this
.
publicFun
.
getCookie
(
"currentNav"
)
==
1
||
this
.
publicFun
.
getCookie
(
"currentNav"
)
==
2
?
0
:
this
.
publicFun
.
getCookie
(
"currentNav"
),
lang
:
this
.
$i18n
.
locale
,
...
...
@@ -226,14 +223,9 @@
}
this
.
currentIndex
=
index
;
this
.
publicFun
.
setUserInfoCookie
(
"currentNav"
,
index
);
// if((index==1||index==2)&&!this.userInfo) {
// this.$router.push('/login');
// }
// if(index==5) this.$router.push("/knowledge");
if
(
index
==
4
)
this
.
$router
.
push
(
"/useHelp"
);
if
(
index
==
4
)
this
.
$router
.
push
(
"/successfulcase"
);
if
(
index
==
3
)
this
.
$router
.
push
(
"/contentall"
);
if
(
index
==
0
)
this
.
$router
.
push
(
"/"
);
// if(index==4) this.$router.push("/successfulcase");
// if(index==3) this.$router.push("/lndustryfocus");
if
(
index
==
1
)
this
.
$router
.
push
(
"/seeprojectlist"
);
else
if
(
index
==
2
)
this
.
$router
.
push
(
"/bigBusiness/list"
);
if
(
index
!=
3
){
...
...
src/router.js
View file @
26ed7262
...
...
@@ -152,6 +152,16 @@ export default new Router({
component
:
resolve
=>
require
([
'views/cooperationcaseview/casedetails.vue'
],
resolve
),
meta
:
{
title
:
'合作案例详情'
}
},
{
path
:
'/contentall'
,
component
:
resolve
=>
require
([
'views/conmanagementpage/contentall.vue'
],
resolve
),
meta
:
{
title
:
'最新资讯'
}
},
{
path
:
'/contentdetail'
,
component
:
resolve
=>
require
([
'views/conmanagementpage/contentdetails.vue'
],
resolve
),
meta
:
{
title
:
'最新资讯详情'
}
},
// {
// path: '/knowledge',
// component: resolve => require(['views/knowledge/computer/computerlist.vue'], resolve),
...
...
@@ -1152,7 +1162,7 @@ export default new Router({
path
:
"/articleList"
,
components
:{
default
:
resolve
=>
require
([
'views/mobile/article/list.vue'
],
resolve
),
other
:
resolve
=>
require
([
'views/
mobile/article/detai
l.vue'
],
resolve
)
other
:
resolve
=>
require
([
'views/
conmanagementpage/contental
l.vue'
],
resolve
)
}
}
...
...
@@ -1184,7 +1194,7 @@ export default new Router({
path
:
"/articleDetail"
,
components
:{
default
:
resolve
=>
require
([
'views/mobile/article/detail.vue'
],
resolve
),
other
:
resolve
=>
require
([
'views/
mobile/article/list
.vue'
],
resolve
)
other
:
resolve
=>
require
([
'views/
conmanagementpage/contentdetails
.vue'
],
resolve
)
}
}
...
...
src/views/conmanagementpage/api/api.js
View file @
26ed7262
...
...
@@ -159,5 +159,28 @@ export default {
selectContentList
(
params
)
{
return
api
.
fetchPost
(
'/business/content/selectContentList'
,
params
);
},
//热门文章
selectHotContent
()
{
return
api
.
fetchPost
(
'/business/content/selectHotContent'
);
},
//专家推荐
selectProfessorRecommendedContent
()
{
return
api
.
fetchPost
(
'/business/content/selectProfessorRecommendedContent'
);
},
//文章详情
selectContentById
(
params
)
{
return
api
.
fetchPost
(
'/business/content/selectContentById'
,
Qs
.
stringify
(
params
));
},
//查询文章评论
selectContentCommentsList
(
params
)
{
return
api
.
fetchPost
(
'/business/content/selectContentCommentsList'
,
params
);
},
//查询文章评论
addContentComments
(
params
)
{
return
api
.
fetchPost
(
'/business/content/addContentComments'
,
params
);
},
//文章点赞
addOrSubtractHot
(
params
)
{
return
api
.
fetchPost
(
'/business/content/addOrSubtractHot'
,
params
);
},
}
\ No newline at end of file
src/views/conmanagementpage/articleservice.vue
View file @
26ed7262
...
...
@@ -310,7 +310,6 @@
api
.
markContent
(
params
).
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
this
.
$message
.
success
(
'操作成功'
);
this
.
cur_page
=
1
;
this
.
getsearchContents
();
}
else
{
this
.
$message
.
error
(
response
.
msg
);
...
...
src/views/conmanagementpage/articlesettings.vue
View file @
26ed7262
...
...
@@ -28,7 +28,9 @@
data
()
{
return
{
value
:
true
,
infoData
:{},
infoData
:{
settingStatementContent
:
''
},
}
},
methods
:
{
...
...
@@ -38,7 +40,7 @@
}
else
{
this
.
infoData
.
isOpenComment
=
0
;
}
api
.
get
SettingInfo
(
this
.
infoData
).
then
(
response
=>
{
api
.
save
SettingInfo
(
this
.
infoData
).
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
this
.
$message
.
success
(
'保存成功'
);
}
else
{
...
...
@@ -50,24 +52,30 @@
return
false
;
});
},
settingAxios
(){
api
.
getSettingInfo
().
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
if
(
response
.
result
){
this
.
infoData
=
response
.
result
;
if
(
this
.
infoData
.
isOpenComment
==
1
){
this
.
value
=
true
;
}
else
{
this
.
value
=
false
;
}
}
}
else
{
this
.
$message
.
error
(
response
.
msg
);
}
})
.
catch
(
error
=>
{
console
.
log
(
"提交出错"
);
return
false
;
});
},
},
mounted
(){
api
.
getSettingInfo
().
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
this
.
infoData
=
response
.
result
;
if
(
this
.
infoData
.
isOpenComment
==
1
){
this
.
value
=
true
;
}
else
{
this
.
value
=
false
;
}
}
else
{
this
.
$message
.
error
(
response
.
msg
);
}
})
.
catch
(
error
=>
{
console
.
log
(
"提交出错"
);
return
false
;
});
}
}
</
script
>
...
...
src/views/conmanagementpage/conmanagement.vue
View file @
26ed7262
...
...
@@ -50,6 +50,7 @@
}
else
if
(
tab
.
name
==
'third'
){
this
.
$refs
.
childthree
.
searchContentClassify
();
}
else
if
(
tab
.
name
==
'fourth'
){
this
.
$refs
.
childfour
.
settingAxios
();
}
},
...
...
src/views/conmanagementpage/contentall.vue
0 → 100644
View file @
26ed7262
This diff is collapsed.
Click to expand it.
src/views/conmanagementpage/contentarticle.vue
View file @
26ed7262
...
...
@@ -47,7 +47,7 @@
<div
v-show=
"false"
v-html=
"contentDiv"
id=
"content1"
></div>
</el-form-item>
<el-form-item
label=
"活动封面:"
prop=
"contentCoverUrl"
ref=
"formimg"
style=
"width: 100%;"
>
<el-checkbox
@
change=
"coverchange(formData.firstPic)"
v-model=
"formData.firstPic"
>
选取文中图片作为封面图
</el-checkbox>
<el-checkbox
@
change=
"coverchange(formData.firstPic)"
v-model=
"formData.firstPic
==1?true:false
"
>
选取文中图片作为封面图
</el-checkbox>
<p
class=
"imgTitle"
>
封面图只支持PNG、JPG、jpeg格式,最大支持400K;建议图片尺寸500x400
</p>
<div
class=
"uploadImg"
>
<up-img
:actionUrl=
"'/base/upload/uploadOriginalImg'"
@
dataEvent=
"uploadimg"
:channelPic=
"formData.contentCoverUrl"
:upmax=
"0.4"
></up-img>
...
...
@@ -224,7 +224,7 @@
</el-form>
<el-row
style=
"padding-top: 20px;text-align: center"
>
<el-button
type=
"primary"
@
click=
"addexpert"
>
保存
</el-button>
<el-button
@
click=
"
expert
Visible = false"
>
取 消
</el-button>
<el-button
@
click=
"
add
Visible = false"
>
取 消
</el-button>
</el-row>
</el-dialog>
...
...
@@ -254,7 +254,7 @@
channelIds
:[],
classifyIds
:[],
contentChoose
:[],
firstPic
:
true
,
firstPic
:
1
,
isCover
:
0
,
isOpenComment
:
0
,
dataKeywordList
:[],
...
...
@@ -330,6 +330,19 @@
this
.
$message
.
error
(
'请输入文章来源'
)
return
}
//
if
(
this
.
$route
.
query
.
contentId
){
if
(
this
.
formData
.
isRecommended
==
1
&&
!
this
.
formData
.
contentProfessor
){
this
.
$message
.
error
(
'请选择专家'
)
return
}
}
else
{
if
(
this
.
formData
.
isRecommended
==
1
&&
!
this
.
objfessorData
.
empName
){
this
.
$message
.
error
(
'请选择专家'
)
return
}
}
if
(
this
.
formData
.
keywordList
&&
this
.
formData
.
contentLabels
){
if
(
this
.
formData
.
keywordList
.
length
+
this
.
formData
.
contentLabels
.
length
>
10
){
this
.
$message
.
error
(
'标签最多10个'
)
...
...
@@ -567,6 +580,7 @@
recommendedchange
(
val
){
if
(
val
==
0
){
this
.
objfessorData
=
{};
this
.
formData
.
contentProfessor
=
null
;
}
},
//添加专家
...
...
src/views/conmanagementpage/contentdetail.vue
0 → 100644
View file @
26ed7262
This diff is collapsed.
Click to expand it.
src/views/conmanagementpage/contentdetails.vue
0 → 100644
View file @
26ed7262
<
template
>
<div>
<contentdetail
v-if=
'showNum/2 === 0'
:key=
'showNum'
></contentdetail>
<contentdetail
v-else
:key=
'showNum'
></contentdetail>
</div>
</
template
>
<
script
>
import
contentdetail
from
'./contentdetail'
;
export
default
{
name
:
"projectrelease"
,
components
:
{
contentdetail
},
data
()
{
return
{
showNum
:
2
}
},
methods
:{
fetchData
(){
++
this
.
showNum
}
},
watch
:
{
// 监听路由变化,当路由发生变化的时候,重新加载子组件,通过v-if来判断,记得加key值,这样vue就会重新渲染页面
'$route'
:
'fetchData'
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/views/conmanagementpage/hotarticlepage.vue
0 → 100644
View file @
26ed7262
<
template
>
<div>
<div
class=
"content_right"
>
<p><span>
</span>
热门文章
</p>
<div
class=
"hto_content"
>
<div
style=
"cursor: pointer;"
v-for=
"(item,index) in hotlist"
:key=
"index"
@
click=
"gocontent(item)"
>
<p><img
:src=
"item.contentCoverUrl?item.contentCoverUrl:item.contentUrl.split(',')[0]?item.contentUrl.split(',')[0]:''"
alt=
"图片"
></p>
<p>
{{
item
.
contentTitle
}}
</p>
</div>
</div>
</div>
<div
class=
"content_right"
>
<p><span>
</span>
专家推荐
</p>
<div
class=
"content_view0"
v-if=
"isview == 0"
>
<ul>
<li
style=
"cursor: pointer;"
v-for=
"(item,index) in recommendedlist"
:key=
"index"
@
click=
"gocontent(item)"
>
{{
item
.
contentTitle
}}
</li>
</ul>
</div>
<div
class=
"content_view2 content_view1"
v-if=
"isview == 1"
>
<div>
<p
style=
"cursor: pointer;"
v-if=
"index == 0"
v-for=
"(item,index) in recommendedlist"
:key=
"index"
@
click=
"gocontent(item)"
>
<img
style=
"width: 320px;height: 180px;"
:src=
"item.contentCoverUrl"
>
<span>
{{
item
.
contentTitle
}}
</span>
</p>
</div>
<div
class=
"content_view0"
>
<ul>
<li
style=
"cursor: pointer;"
v-if=
"index > 0"
v-for=
"(item,index) in recommendedlist"
:key=
"index"
@
click=
"gocontent(item)"
>
{{
item
.
contentTitle
}}
</li>
</ul>
</div>
</div>
<div
class=
"content_view2"
v-if=
"isview == 2"
>
<div>
<p
style=
"cursor: pointer;"
v-if=
"index
<
=
1
"
v-for=
"(item,index) in recommendedlist"
:key=
"index"
@
click=
"gocontent(item)"
>
<img
:src=
"item.contentCoverUrl"
>
<span>
{{
item
.
contentTitle
}}
</span>
</p>
</div>
<div
class=
"content_view0"
>
<ul>
<li
style=
"cursor: pointer;"
v-if=
"index >= 1"
v-for=
"(item,index) in recommendedlist"
:key=
"index"
@
click=
"gocontent(item)"
>
{{
item
.
contentTitle
}}
</li>
</ul>
</div>
</div>
</div>
</div>
</
template
>
<
script
>
import
api
from
"./api/api"
;
export
default
{
name
:
"hotarticlepage"
,
data
()
{
return
{
hotlist
:[],
recommendedlist
:[],
isview
:
0
,
}
},
methods
:{
getselectHotContent
(){
api
.
selectHotContent
().
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
this
.
hotlist
=
response
.
result
;
}
else
{
this
.
$message
.
error
(
response
.
msgCode
);
}
})
.
catch
(
error
=>
{
console
.
log
(
"提交出错"
);
return
false
;
});
},
selectProfessorRecommendedContent
(){
api
.
selectProfessorRecommendedContent
().
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
let
num
=
0
;
for
(
let
i
in
response
.
result
){
if
(
response
.
result
[
i
].
contentCoverUrl
||
response
.
result
[
i
].
contentUrl
){
this
.
recommendedlist
.
push
(
response
.
result
[
i
]);
num
++
}
else
{
this
.
recommendedlist
.
push
(
response
.
result
[
i
]);
}
};
if
(
num
==
1
){
this
.
isview
=
1
;
}
else
if
(
num
>=
2
){
this
.
isview
=
2
;
}
else
if
(
num
==
0
){
this
.
isview
=
0
;
}
}
else
{
this
.
$message
.
error
(
response
.
msgCode
);
}
})
.
catch
(
error
=>
{
console
.
log
(
"提交出错"
);
return
false
;
});
},
gocontent
(
row
){
this
.
$router
.
push
({
path
:
"/contentdetail"
,
query
:{
id
:
row
.
contentId
}});
},
},
mounted
()
{
this
.
getselectHotContent
();
this
.
selectProfessorRecommendedContent
();
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.content_right
{
width
:
320px
;
text-align
:
left
;
>
p
{
line-height
:
38px
;
color
:
#3F3F53
;
font-size
:
16px
;
font-weight
:
bold
;
border-bottom
:
2px
solid
#E8EAF3
;
>
span
{
border-left
:
2px
solid
#5D78FF
;
margin-right
:
10px
;
}
}
}
.hto_content
{
>
div
{
display
:
flex
;
margin
:
20px
0
;
>
p
:nth-child
(
1
)
{
margin-right
:
15px
;
>
img
{
border-radius
:
3px
;
border
:
1px
solid
#DCDFF1
;
width
:
80px
;
height
:
56px
;
}
}
>
p
{
font-size
:
14px
;
color
:
#1A1A1E
;
line-height
:
24px
;
}
}
}
.content_view0
{
margin
:
10px
0
10px
30px
;
>
ul
{
>
li
{
color
:
#1A1A1E
;
line-height
:
24px
;
list-style
:
disc
;
font-size
:
14px
;
}
}
}
.content_view2
{
>
div
:nth-child
(
1
)
{
display
:
flex
;
padding-top
:
20px
;
>
p
{
position
:
relative
;
>
img
{
border-radius
:
3px
;
border
:
1px
solid
#DCDFF1
;
width
:
150px
;
height
:
85px
;
}
>
span
{
position
:
absolute
;
left
:
0
;
bottom
:
0px
;
width
:
100%
;
line-height
:
24px
;
padding-left
:
5px
;
color
:
#FFFFFF
;
background
:rgba
(
0
,
0
,
0
,
0
.5
)
;
}
}
>
p
:nth-child
(
1
)
{
margin-right
:
20px
;
}
}
}
</
style
>
\ No newline at end of file
src/views/index/api/api.js
View file @
26ed7262
...
...
@@ -7,6 +7,11 @@ export default {
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexCount"
);
},
//获取首页推荐文章信息
getIndexTopNArticle
(
params
){
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexTopNArticle"
);
},
//获取首页推荐公司展示信息
getCompanyInfoAxios
(
params
){
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexTopNBusiness"
);
...
...
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