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
1118f7dc
Commit
1118f7dc
authored
Apr 08, 2021
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
友情链接改成动态的
parent
068d6041
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
602 additions
and
123 deletions
+602
-123
router.js
src/router.js
+5
-0
api.js
src/views/friendLink/api.js
+29
-0
add.vue
src/views/friendLink/pages/add.vue
+418
-0
api.js
src/views/index/api/api.js
+69
-67
index.vue
src/views/index/pages/index.vue
+81
-56
No files found.
src/router.js
View file @
1118f7dc
...
...
@@ -1072,6 +1072,11 @@ const router = new Router({
component
:
resolve
=>
require
([
'views/categorypage/category.vue'
],
resolve
).
catch
(
routerUtils
.
catchImport
),
meta
:
{
title
:
'项目分类'
}
},
{
path
:
'/addFriendLink'
,
component
:
resolve
=>
require
([
'views/friendLink/pages/add.vue'
],
resolve
).
catch
(
routerUtils
.
catchImport
),
meta
:
{
title
:
'添加友情链接'
}
},
]
},
//需要登录的
...
...
src/views/friendLink/api.js
0 → 100644
View file @
1118f7dc
import
api
from
'../../api/api'
;
import
Qs
from
'qs'
;
export
default
{
//友情链接
addFriendLinkAxios
(
url
,
params
)
{
return
api
.
fetchPost
(
url
,
params
);
},
//编辑友情链接单个数据
getActivityLink
(
params
)
{
return
api
.
fetchGet
(
"/base/website/getWebsitePartner?id="
+
params
);
},
//友情链接排序
changeSort
(
params
)
{
return
api
.
fetchPost
(
"/base/website/changeWebsitePartnerSort"
,
params
);
},
//友情链接列表
getActivityLinkList
()
{
return
api
.
fetchGet
(
"/base/website/getWebsitePartnerList"
);
},
//删除友情链接
removeLink
(
params
)
{
return
api
.
fetchGet
(
"/base/website/removeWebsitePartner?id="
+
params
);
},
}
src/views/friendLink/pages/add.vue
0 → 100644
View file @
1118f7dc
<
template
>
<div
class=
"soutform loginedWrapper"
>
<div
class=
"breadcrumb"
>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item
:to=
"
{ path: publicFun.isgetUserRoleFunc(5)?'/salerequire/list':publicFun.isgetUserRoleFunc(2)?'/projectdynamics':'/litemlist' }">
{{
$t
(
"releasejson.wrkbench"
)
}}
</el-breadcrumb-item>
<el-breadcrumb-item>
友情链接
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"contentPadding"
>
<el-form
:inline=
"true"
>
<el-form-item>
<el-button
type=
"primary"
@
click=
"friendLinkVisible = true"
>
添加友情链接
</el-button>
</el-form-item>
</el-form>
<el-table
:data=
"tableData"
tooltip-effect=
"dark"
class=
"projectTable2"
>
<el-table-column
:label=
"$t('releasejson.numberin')"
type=
"index"
width=
"70"
align=
"center"
>
</el-table-column>
<el-table-column
label=
"企业logo"
align=
"center"
width=
"150"
>
<template
slot-scope=
"scope"
>
<img
:src=
"scope.row.partnerLogo"
alt=
""
style=
"width: 88px;height: 45px;object-fit: contain;"
>
</
template
>
</el-table-column>
<el-table-column
label=
"企业名称"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
placement=
"top"
effect=
"light"
>
<div
slot=
"content"
style=
"width: 200px;"
>
{{
scope
.
row
.
partnerName
}}
</div>
<p
class=
"dwwo-2"
>
{{
scope
.
row
.
partnerName
}}
</p>
</el-tooltip>
</
template
>
</el-table-column>
<el-table-column
label=
"网站URL"
>
<
template
slot-scope=
"scope"
>
<el-tooltip
placement=
"top"
effect=
"light"
>
<div
slot=
"content"
style=
"width: 200px;"
>
{{
scope
.
row
.
partnerUrl
}}
</div>
<p
class=
"dwwo-2"
>
{{
scope
.
row
.
partnerUrl
}}
</p>
</el-tooltip>
</
template
>
</el-table-column>
<el-table-column
:label=
"$t('listjson.action')"
width=
"120"
align=
'center'
>
<
template
slot-scope=
"scope"
>
<el-button
type=
"text"
@
click=
"handleEdit(scope.row)"
>
编辑
</el-button>
<el-button
type=
"text"
@
click=
"handleRemove(scope.row)"
>
删除
</el-button>
</
template
>
</el-table-column>
<el-table-column
label=
"排序"
width=
"120"
align=
'center'
>
<
template
slot-scope=
"scope"
>
<el-button
:disabled=
"scope.$index===0"
type=
"text"
@
click=
"moveUp(scope.$index,scope.row)"
>
上移
</el-button>
<el-button
:disabled=
"scope.$index===(tableData.length-1)"
type=
"text"
@
click=
"moveDown(scope.$index,scope.row)"
>
下移
</el-button>
</
template
>
</el-table-column>
<
template
slot=
"empty"
>
<i
class=
"iconfont icon-hezi501 datai"
></i>
<p
class=
"datap"
>
{{
$t
(
'listjson.notfoundyet'
)
}}
</p>
</
template
>
</el-table>
</div>
<el-dialog
title=
"友情链接"
:visible
.
sync=
"friendLinkVisible"
:append-to-body=
"true"
:close-on-click-modal=
"false"
@
close=
"closeSensor"
width=
"700px"
class=
"dialogWrap"
>
<el-form
label-position=
"right"
label-width=
"120px"
:model=
"friendLinkData"
:rules=
"rules"
ref=
"friendLinkData"
style=
"margin:0 100px 0 60px"
>
<el-form-item
label=
"企业logo:"
ref=
"guestimg"
prop=
"partnerLogo"
>
<p
class=
"imgTitle"
>
仅支持PNG,JPG,JPEG,最大不超过400K;
</p>
<div
class=
"uploadImg"
>
<up-img
:actionUrl=
"'/base/upload/uploadOriginalImg'"
@
dataEvent_size=
"dataEventSize"
@
dataEvent=
"backimg"
:iseventPartner=
"true"
:channelPic=
"friendLinkData.partnerLogo"
:upmax=
"0.4"
></up-img>
<!--<uploadCmpt :title="$t('commonTitle.pictureCropper')" @postErrorText="postErrorText"-->
<!--:hasLogo="true" :limit="1" :channelPic="friendLinkData.partnerLogo"-->
<!--@postFormData="postFormData" @postFormItem="postFormItem" :autoCropWidth="88"-->
<!--:autoCropHeight="45" :portionWidth="2" :imageSize="0.4">-->
<!--</uploadCmpt>-->
</div>
<div
class=
"errorTitle"
>
<span
class=
"errorText"
v-if=
"isShowErrorText1"
>
{{$t("workPlace.basicForm.emptyLogo")}}
</span>
<span
class=
"errorText"
v-if=
"isShowErrorText2"
>
{{$t("personalAuth.errorformatCard")}}
</span>
<span
class=
"errorText"
v-if=
"isShowErrorText3"
>
{{$t("personalAuth.errorSizeCard")}}
</span>
<span
class=
"errorText"
v-if=
"isShowErrorText4"
>
{{$t("personalAuth.uploadingCard")}}
</span>
<span
class=
"errorText"
v-if=
"isShowErrorText5"
>
{{$t("personalAuth.errorExceedCard")}}
</span>
</div>
</el-form-item>
<el-form-item
label=
"企业名称:"
prop=
"partnerName"
>
<el-input
v-model=
"friendLinkData.partnerName"
maxlength=
"40"
placeholder=
"请输入企业名称"
></el-input>
</el-form-item>
<el-form-item
label=
"网站URL:"
prop=
"partnerUrl"
>
<el-input
v-model=
"friendLinkData.partnerUrl"
maxlength=
"150"
placeholder=
"请输入网站URL"
></el-input>
</el-form-item>
<el-row
style=
"padding-top: 20px;text-align: center"
>
<el-button
type=
"primary"
:disabled=
"disabledFlag>0"
@
click=
"addPartner"
>
保存
</el-button>
<el-button
@
click=
"closeSensor"
>
取 消
</el-button>
</el-row>
</el-form>
</el-dialog>
</div>
</template>
<
script
>
import
api
from
'../api'
;
import
upImg
from
'../../publishactivity/upimg'
import
uploadCmpt
from
'../../../components/common/uploadCoverCmpt'
;
export
default
{
name
:
"add"
,
components
:
{
upImg
,
uploadCmpt
},
data
()
{
return
{
isdataEventSize
:
false
,
friendLinkVisible
:
false
,
tableData
:
[],
friendLinkData
:
{
partnerLogo
:
""
,
partnerName
:
""
,
partnerUrl
:
""
},
rules
:
{
partnerName
:
[{
required
:
true
,
message
:
'请输入企业名称'
,
trigger
:
'blur'
}],
partnerLogo
:
[{
required
:
true
,
message
:
'请上传企业logo'
,
trigger
:
'blur'
}],
},
isShowErrorText1
:
false
,
isShowErrorText2
:
false
,
isShowErrorText3
:
false
,
isShowErrorText4
:
false
,
isShowErrorText5
:
false
,
disabledFlag
:
0
,
flag
:
0
,
}
},
methods
:
{
dataEventSize
(
state
)
{
this
.
isdataEventSize
=
state
;
},
//校验必填图片
requiredImgFunc
(){
if
(
this
.
flag
==
0
)
{
this
.
isShowErrorText1
=
true
;
this
.
isShowErrorText2
=
false
;
this
.
isShowErrorText3
=
false
;
this
.
isShowErrorText4
=
false
;
this
.
isShowErrorText5
=
false
;
return
false
;
}
else
if
(
this
.
flag
==
1
)
{
this
.
isShowErrorText4
=
true
;
this
.
isShowErrorText1
=
false
;
this
.
isShowErrorText2
=
false
;
this
.
isShowErrorText3
=
false
;
this
.
isShowErrorText5
=
false
;
return
false
;
}
else
{
this
.
isShowErrorText1
=
false
;
this
.
isShowErrorText2
=
false
;
this
.
isShowErrorText3
=
false
;
this
.
isShowErrorText4
=
false
;
this
.
isShowErrorText5
=
false
;
}
},
addPartner
()
{
this
.
$refs
.
friendLinkData
.
validate
((
valid
)
=>
{
if
(
valid
)
{
var
that
=
this
;
if
(
this
.
disabledFlag
==
0
){
this
.
disabledFlag
++
;
let
url
=
this
.
friendLinkData
.
id
?
'/base/website/editWebsitePartner'
:
'/base/website/addWebsitePartners'
;
api
.
addFriendLinkAxios
(
url
,
this
.
friendLinkData
).
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
this
.
friendLinkVisible
=
false
;
this
.
$message
.
success
(
this
.
friendLinkData
.
id
?
'保存成功'
:
'添加成功'
);
this
.
activityLinkList
();
setTimeout
(
function
(){
that
.
disabledFlag
=
0
;
return
false
;
},
1000
)
}
else
{
this
.
$message
.
error
(
response
.
msg
);
setTimeout
(
function
(){
that
.
disabledFlag
=
0
;
return
false
;
},
1000
)
}
})
.
catch
(
error
=>
{
console
.
log
(
"提交出错"
);
setTimeout
(
function
(){
that
.
disabledFlag
=
0
;
return
false
;
},
1000
)
return
false
;
});
}
else
{
setTimeout
(
function
(){
that
.
disabledFlag
=
0
;
return
false
;
},
1000
)
}
}
});
},
postErrorText
(
data
,
errorData
)
{
this
.
flag
=
data
;
if
(
errorData
==
0
)
{
this
.
isShowErrorText1
=
false
;
this
.
isShowErrorText2
=
false
;
this
.
isShowErrorText3
=
false
;
this
.
isShowErrorText4
=
false
;
this
.
isShowErrorText5
=
false
;
}
if
(
errorData
==
1
)
{
this
.
isShowErrorText1
=
true
;
this
.
isShowErrorText2
=
false
;
this
.
isShowErrorText3
=
false
;
this
.
isShowErrorText4
=
false
;
this
.
isShowErrorText5
=
false
;
}
if
(
errorData
==
2
)
{
this
.
isShowErrorText1
=
false
;
this
.
isShowErrorText2
=
true
;
this
.
isShowErrorText3
=
false
;
this
.
isShowErrorText4
=
false
;
this
.
isShowErrorText5
=
false
;
}
if
(
errorData
==
3
)
{
this
.
isShowErrorText1
=
false
;
this
.
isShowErrorText2
=
false
;
this
.
isShowErrorText3
=
true
;
this
.
isShowErrorText4
=
false
;
this
.
isShowErrorText5
=
false
;
}
if
(
errorData
==
4
)
{
this
.
isShowErrorText1
=
false
;
this
.
isShowErrorText2
=
false
;
this
.
isShowErrorText3
=
false
;
this
.
isShowErrorText4
=
true
;
this
.
isShowErrorText5
=
false
;
}
if
(
errorData
==
5
)
{
this
.
isShowErrorText1
=
false
;
this
.
isShowErrorText2
=
false
;
this
.
isShowErrorText3
=
false
;
this
.
isShowErrorText4
=
false
;
this
.
isShowErrorText5
=
true
;
}
},
postFormItem
(
data
)
{
if
(
data
)
{
let
urlArr
=
[];
if
(
data
.
length
>
0
)
{
urlArr
=
data
.
map
((
item
,
index
,
arr
)
=>
{
return
item
.
url
;
})
}
this
.
friendLinkData
.
partnerLogo
=
urlArr
;
}
else
this
.
friendLinkData
.
partnerLogo
=
""
;
},
postFormData
(
data
)
{
let
urlArr
=
[];
if
(
data
.
length
>
0
)
{
urlArr
=
data
.
map
((
item
,
index
,
arr
)
=>
{
return
item
.
url
;
})
}
if
(
urlArr
.
length
>
1
)
this
.
friendLinkData
.
partnerLogo
=
urlArr
;
else
this
.
friendLinkData
.
partnerLogo
=
urlArr
[
0
];
// if(this.limit>1){
// var arr = [];
// arr.push(data);
// console.log(arr)
// }else{
// this.ruleForm.companyLogoUrl = data;
// }
},
//上移
moveUp
(
index
,
row
)
{
var
that
=
this
;
if
(
index
>
0
)
{
let
upDate
=
that
.
tableData
[
index
-
1
];
that
.
tableData
.
splice
(
index
-
1
,
1
);
that
.
tableData
.
splice
(
index
,
0
,
upDate
);
that
.
getmoveSortlist
();
}
else
{
alert
(
'已经是第一条,不可上移'
);
}
},
//下移
moveDown
(
index
,
row
)
{
var
that
=
this
;
if
((
index
+
1
)
===
that
.
tableData
.
length
)
{
alert
(
'已经是最后一条,不可下移'
);
}
else
{
let
downDate
=
that
.
tableData
[
index
+
1
];
that
.
tableData
.
splice
(
index
+
1
,
1
);
that
.
tableData
.
splice
(
index
,
0
,
downDate
);
that
.
getmoveSortlist
();
}
},
//排序
getmoveSortlist
()
{
let
num
=
0
;
for
(
let
i
in
this
.
tableData
)
{
this
.
tableData
[
i
].
sort
=
++
num
;
}
;
api
.
changeSort
(
this
.
tableData
).
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
}
else
{
this
.
$message
.
error
(
response
.
msgCode
);
}
this
.
activityLinkList
();
})
.
catch
(
error
=>
{
console
.
log
(
"提交出错"
);
return
false
;
});
},
//图片
backimg
(
url
)
{
this
.
friendLinkData
.
partnerLogo
=
url
;
this
.
$refs
.
guestimg
.
clearValidate
();
},
guestimg
(
url
)
{
this
.
friendLinkData
.
partnerLogo
=
url
;
this
.
$refs
.
guestimg
.
clearValidate
();
},
//添加弹框关闭
closeSensor
()
{
this
.
friendLinkVisible
=
false
;
this
.
$refs
[
'friendLinkData'
].
resetFields
();
this
.
friendLinkData
=
{};
this
.
isShowErrorText1
=
this
.
isShowErrorText2
=
this
.
isShowErrorText3
=
this
.
isShowErrorText4
=
this
.
isShowErrorText5
=
false
;
},
handleEdit
(
row
)
{
api
.
getActivityLink
(
row
.
id
).
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
this
.
friendLinkVisible
=
true
;
this
.
friendLinkData
=
response
.
result
;
}
else
{
this
.
$message
.
error
(
response
.
msg
);
}
})
.
catch
(
error
=>
{
console
.
log
(
"提交出错"
);
return
false
;
});
},
handleRemove
(
row
)
{
this
.
$confirm
(
'是否确认删除'
,
{
cancelButtonText
:
'取消'
,
confirmButtonText
:
'确认'
,
type
:
''
,
customClass
:
'deleteConfirm'
}).
then
(()
=>
{
api
.
removeLink
(
row
.
id
).
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
this
.
$message
.
success
(
'删除成功'
);
this
.
activityLinkList
();
}
else
{
this
.
$message
.
error
(
response
.
msg
);
}
})
.
catch
(
error
=>
{
console
.
log
(
"提交出错"
);
return
false
;
});
}).
catch
(()
=>
{
});
},
activityLinkList
()
{
api
.
getActivityLinkList
().
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
this
.
tableData
=
response
.
result
;
}
else
{
this
.
$message
.
error
(
response
.
msg
);
}
})
.
catch
(
error
=>
{
console
.
log
(
"提交出错"
);
return
false
;
});
},
},
mounted
()
{
this
.
activityLinkList
();
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.errorTitle
{
span
.errorText
{
position
:
absolute
;
color
:
#ff4949
;
font-size
:
12px
;
line-height
:
1
;
padding-top
:
6px
;
}
}
</
style
>
\ No newline at end of file
src/views/index/api/api.js
View file @
1118f7dc
import
api
from
'../../../api/api'
;
import
Qs
from
'qs'
;
const
baseUrl
=
"/business"
;
export
default
{
//获取banner数据
getCountAxios
(
params
){
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexCount"
);
getCountAxios
(
params
)
{
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexCount"
);
},
//获取首页推荐文章信息
getIndexTopNArticle
(
params
){
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexTopNArticle?count="
+
params
);
getIndexTopNArticle
(
params
)
{
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexTopNArticle?count="
+
params
);
},
//获取首页推荐行业报告
getIndexBaseReport
(
params
){
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexBaseReport?count="
+
params
);
getIndexBaseReport
(
params
)
{
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexBaseReport?count="
+
params
);
},
//获取首页推荐话题
getIndexBaseTopic
(
params
){
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexBaseTopic?count="
+
params
);
getIndexBaseTopic
(
params
)
{
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexBaseTopic?count="
+
params
);
},
//获取域名
selectBasicParams
(
)
{
return
api
.
fetchLogin
(
'/base/tools/selectBasicParams'
);
selectBasicParams
()
{
return
api
.
fetchLogin
(
'/base/tools/selectBasicParams'
);
},
//行业报告下载链接
getDownloadUrl
(
params
)
{
return
api
.
fetchLoadingGet
(
'/business/report/getDownloadUrl?reportId='
+
params
);
getDownloadUrl
(
params
)
{
return
api
.
fetchLoadingGet
(
'/business/report/getDownloadUrl?reportId='
+
params
);
},
//获取首页推荐活动
getIndexBaseActivity
(
params
,
notInIds
)
{
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexBaseActivity?count="
+
params
+
"¬InIds="
+
notInIds
);
getIndexBaseActivity
(
params
,
notInIds
)
{
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexBaseActivity?count="
+
params
+
"¬InIds="
+
notInIds
);
},
//获取首页话题
selectIndexPcHotTopicList
(
params
)
{
return
api
.
fetchLogin
(
'/business/topic/selectIndexPcHotTopicList'
,
params
);
selectIndexPcHotTopicList
(
params
)
{
return
api
.
fetchLogin
(
'/business/topic/selectIndexPcHotTopicList'
,
params
);
},
//获取首页话题竞猜讨论
selectIndexPcHotDiscussList
(
params
)
{
return
api
.
fetchLogin
(
'/business/topic/selectIndexPcHotDiscussList'
,
params
);
selectIndexPcHotDiscussList
(
params
)
{
return
api
.
fetchLogin
(
'/business/topic/selectIndexPcHotDiscussList'
,
params
);
},
//获取首页推荐公司展示信息
getCompanyInfoAxios
(
params
){
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexTopNBusiness?count="
+
params
);
getCompanyInfoAxios
(
params
)
{
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexTopNBusiness?count="
+
params
);
},
//获取首页最新动态信息
getActiveInfoAxios
(
params
){
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexTopNMessage"
);
getActiveInfoAxios
(
params
)
{
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexTopNMessage"
);
},
//获取首页推荐项目展示信息
getProjectInfoAxios
(
params
){
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexTopNProject?count="
+
params
);
getProjectInfoAxios
(
params
)
{
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexTopNProject?count="
+
params
);
},
//获取首页合作案例展示信息
getCooperationCaseAxios
(
params
){
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexTopNPurpose"
);
getCooperationCaseAxios
(
params
)
{
return
api
.
fetchGet
(
baseUrl
+
"/index/getIndexTopNPurpose"
);
},
//左侧菜单导航栏
getLeftNavAxios
(
params
){
getLeftNavAxios
(
params
)
{
return
api
.
fetchGet
(
"/base/function/getPermissionFunctions"
);
},
//获取左侧菜单统计
getLeftBannerAxios
(){
return
api
.
fetchGet
(
baseUrl
+
"/search/getBusinessAndProjectCount"
)
getLeftBannerAxios
()
{
return
api
.
fetchGet
(
baseUrl
+
"/search/getBusinessAndProjectCount"
)
},
//退出登录
logoutAxios
(
params
){
logoutAxios
(
params
)
{
return
api
.
fetchPost
(
"/base/login/out"
);
},
//混合搜索
mixSearchAxios
(
params
){
return
api
.
fetchLoadingPost
(
"/business/search/search?"
+
Qs
.
stringify
(
params
));
mixSearchAxios
(
params
)
{
return
api
.
fetchLoadingPost
(
"/business/search/search?"
+
Qs
.
stringify
(
params
));
},
//微信登录
wechatLoginAxios
(
params
){
return
api
.
fetchLogin
(
"/base/login/wxWebLogin"
,
Qs
.
stringify
(
params
));
wechatLoginAxios
(
params
)
{
return
api
.
fetchLogin
(
"/base/login/wxWebLogin"
,
Qs
.
stringify
(
params
));
},
//pc微信登录
pcLoginAxios
(
params
){
return
api
.
fetchLogin
(
"/base/login/wxOpenLogin"
,
Qs
.
stringify
(
params
));
pcLoginAxios
(
params
)
{
return
api
.
fetchLogin
(
"/base/login/wxOpenLogin"
,
Qs
.
stringify
(
params
));
},
//获取PC首页热门内容
getIndexHotContent
()
{
getIndexHotContent
()
{
return
api
.
fetchLoadingGet
(
'/business/index/getIndexHotContent'
);
},
//获取PC首页热门内容
selectHomeGuessList
(
params
)
{
return
api
.
fetchLogin
(
'/base/guess/selectHomeGuessList'
,
params
);
selectHomeGuessList
(
params
)
{
return
api
.
fetchLogin
(
'/base/guess/selectHomeGuessList'
,
params
);
},
//竞猜排行
selectGuessLeaderboardList
(
params
)
{
return
api
.
fetchLogin
(
'/base/guess/selectGuessLeaderboardList'
,
Qs
.
stringify
(
params
));
selectGuessLeaderboardList
(
params
)
{
return
api
.
fetchLogin
(
'/base/guess/selectGuessLeaderboardList'
,
Qs
.
stringify
(
params
));
},
//获取活动介绍
getFirstStageFunc
(
params
){
return
api
.
fetchLoadingLogin
(
"/business/subject/activity?"
+
Qs
.
stringify
(
params
))
getFirstStageFunc
(
params
)
{
return
api
.
fetchLoadingLogin
(
"/business/subject/activity?"
+
Qs
.
stringify
(
params
))
},
//获取专题数量
getSubjectNumAxios
(){
return
api
.
fetchLogin
(
"/business/subject/selectSubjectActivityIndex"
)
getSubjectNumAxios
()
{
return
api
.
fetchLogin
(
"/business/subject/selectSubjectActivityIndex"
)
},
//埋点
maiDianAxios
(
params
){
return
api
.
fetchLogin
(
"/business/log/activityLog"
,
params
);
maiDianAxios
(
params
)
{
return
api
.
fetchLogin
(
"/business/log/activityLog"
,
params
);
},
//获取当前访问前缀
getDocumentAxios
(){
getDocumentAxios
()
{
return
api
.
fetchLogin
(
'/base/tools/selectBasicParams'
);
},
//获取开机报
getNoticeImgAxios
(
params
){
return
api
.
fetchLogin
(
"/base/tools/selectOpenShow?showType="
+
params
)
getNoticeImgAxios
(
params
)
{
return
api
.
fetchLogin
(
"/base/tools/selectOpenShow?showType="
+
params
)
},
//获取轮播图
getSwiperImgAxios
(
params
){
return
api
.
fetchLogin
(
"/base/tools/selectSliderShow?showType="
+
params
)
getSwiperImgAxios
(
params
)
{
return
api
.
fetchLogin
(
"/base/tools/selectSliderShow?showType="
+
params
)
},
getArticleListAxios
(
params
){
return
api
.
fetchGet
(
"/business/index/getIndexTopNArticle?"
+
Qs
.
stringify
(
params
))
getArticleListAxios
(
params
)
{
return
api
.
fetchGet
(
"/business/index/getIndexTopNArticle?"
+
Qs
.
stringify
(
params
))
},
//获取中文首页数据混排
getZhCNIndexData
(){
getZhCNIndexData
()
{
return
api
.
fetchGet
(
"/business/index/getIndexMixContent"
)
},
//获取英文下的活动
getEnActivityData
(
params
){
return
api
.
fetchGet
(
"/business/index/getIndexBaseActivity?"
+
Qs
.
stringify
(
params
))
getEnActivityData
(
params
)
{
return
api
.
fetchGet
(
"/business/index/getIndexBaseActivity?"
+
Qs
.
stringify
(
params
))
},
//获取英文下的报告
getEnIndustryData
(
params
){
return
api
.
fetchGet
(
"/business/index/getIndexBaseReport?"
+
Qs
.
stringify
(
params
))
getEnIndustryData
(
params
)
{
return
api
.
fetchGet
(
"/business/index/getIndexBaseReport?"
+
Qs
.
stringify
(
params
))
},
//行业报告前端列表
getActivityDetails
(
params
)
{
return
api
.
fetchLoadingGet
(
'/business/activityEnter/getActivityDetails?channelId='
+
params
);
getActivityDetails
(
params
)
{
return
api
.
fetchLoadingGet
(
'/business/activityEnter/getActivityDetails?channelId='
+
params
);
},
//报名获取基本信息
getBasicInfoAxios
(
params
){
return
api
.
fetchGet
(
"/business/activityEnter/selectTemplateField?activityId="
+
params
);
getBasicInfoAxios
(
params
)
{
return
api
.
fetchGet
(
"/business/activityEnter/selectTemplateField?activityId="
+
params
);
},
//报名第一步
applyForFirstStep
(
params
){
return
api
.
fetchLogin
(
"/business/activityEnter/addRegisterInformation"
,
params
);
applyForFirstStep
(
params
)
{
return
api
.
fetchLogin
(
"/business/activityEnter/addRegisterInformation"
,
params
);
},
getActivityLinkList
()
{
return
api
.
fetchGet
(
"/base/website/getWebsitePartnerList"
);
},
}
src/views/index/pages/index.vue
View file @
1118f7dc
...
...
@@ -450,7 +450,7 @@
<!--
</div>
-->
</div>
</div>
<div
class=
"en_margin"
v-if=
"$i18n.locale=='zh-CN'"
>
<div
class=
"en_margin"
v-if=
"$i18n.locale=='zh-CN'
&&friendlyLink.length>0
"
>
<div
class=
"content_top friendLinkWrapper"
>
<div
class=
"topUpdateTitle"
>
<h4>
{{
$t
(
"bottomNav.friendlyLink"
)
}}
</h4>
...
...
@@ -459,7 +459,7 @@
<div
class=
"cooperationUl"
>
<ul>
<li
v-for=
"item in friendlyLink"
:key=
"item.id"
@
click=
"handleToLink(item,index)"
>
<img
:src=
"item.
imageUrl
"
alt=
""
>
<img
:src=
"item.
partnerLogo
"
alt=
""
>
</li>
</ul>
</div>
...
...
@@ -832,7 +832,7 @@
</div>
</div>
<!-- 友情链接-->
<div
class=
"content_top friendLinkWrapper"
>
<div
class=
"content_top friendLinkWrapper"
v-if=
"friendlyLink.length>0"
>
<div
class=
"topUpdateTitle"
>
<h4>
{{$t("bottomNav.friendlyLink")}}
</h4>
<div
class=
"borderBottom40px"
></div>
...
...
@@ -840,7 +840,7 @@
<div
class=
"cooperationUl"
>
<ul>
<li
v-for=
"item in friendlyLink"
:key=
"item.id"
@
click=
"handleToLink(item,index)"
>
<img
:src=
"item.
imageUrl
"
alt=
""
>
<img
:src=
"item.
partnerLogo
"
alt=
""
>
</li>
</ul>
</div>
...
...
@@ -987,51 +987,52 @@
matchedCount
:
0
},
//友情链接
friendlyLink
:
[
{
id
:
4
,
imageUrl
:
require
(
"../../../assets/img/index/webcar.jpg"
),
href
:
"http://www.chinanev.net/"
},{
id
:
5
,
imageUrl
:
require
(
"../../../assets/img/index/webggld.jpg"
),
href
:
"https://www.gg-lb.com/"
},{
id
:
1
,
imageUrl
:
require
(
"../../../assets/img/index/webgushu.png"
),
href
:
"https://www.kapbook.com?site_from=taiku"
},{
id
:
3
,
imageUrl
:
require
(
"../../../assets/img/index/webzhongfa.png"
),
href
:
"http://www.zfa.cn/"
},{
id
:
0
,
imageUrl
:
require
(
"../../../assets/img/index/investsh.png"
),
href
:
"http://www.investsh.org.cn"
},
{
id
:
2
,
imageUrl
:
require
(
"../../../assets/img/index/webhuaweiyun.png"
),
href
:
"https://www.huaweicloud.com/"
},
{
id
:
6
,
imageUrl
:
require
(
"../../../assets/img/index/websaiwen.jpg"
),
href
:
"http://www.7its.com/"
},
{
id
:
7
,
imageUrl
:
require
(
"../../../assets/img/index/webyiou.jpg"
),
href
:
"https://www.iyiou.com/"
},
{
id
:
8
,
imageUrl
:
require
(
"../../../assets/img/maikeji.png"
),
href
:
"https://www.maikeji.cn/"
},],
// friendlyLink: [
// {
// id: 4,
// partnerLogo: require("../../../assets/img/index/webcar.jpg"),
// partnerUrl: "http://www.chinanev.net/"
//
// },{
// id: 5,
// partnerLogo: require("../../../assets/img/index/webggld.jpg"),
// partnerUrl: "https://www.gg-lb.com/"
//
// },{
// id: 1,
// partnerLogo: require("../../../assets/img/index/webgushu.png"),
// partnerUrl: "https://www.kapbook.com?site_from=taiku"
// },{
// id: 3,
// partnerLogo: require("../../../assets/img/index/webzhongfa.png"),
// partnerUrl: "http://www.zfa.cn/"
//
// },{
// id: 0,
// partnerLogo: require("../../../assets/img/index/investsh.png"),
// partnerUrl: "http://www.investsh.org.cn"
// }, {
// id: 2,
// partnerLogo: require("../../../assets/img/index/webhuaweiyun.png"),
// partnerUrl: "https://www.huaweicloud.com/"
//
// }, {
// id: 6,
// partnerLogo: require("../../../assets/img/index/websaiwen.jpg"),
// partnerUrl: "http://www.7its.com/"
//
// }, {
// id: 7,
// partnerLogo: require("../../../assets/img/index/webyiou.jpg"),
// partnerUrl: "https://www.iyiou.com/"
//
// }, {
// id: 8,
// partnerLogo: require("../../../assets/img/maikeji.png"),
// partnerUrl: "https://www.maikeji.cn/"
//
// }],
friendlyLink
:[],
userInfo
:
this
.
publicFun
.
getUserInfoCookieType
()
?
JSON
.
parse
(
this
.
Base64
.
decode
(
this
.
publicFun
.
getUserInfoCookieType
()))
:
null
,
articleList
:
[],
//资讯
datelist
:[{
value
:
'实时榜'
,
type
:
1
},{
value
:
'近7日榜'
,
type
:
2
},{
value
:
'近30日榜'
,
type
:
3
}],
...
...
@@ -1142,7 +1143,7 @@
},
//友情链接
handleToLink
(
item
)
{
window
.
open
(
item
.
href
);
window
.
open
(
item
.
partnerUrl
);
},
//文章列表
classifyclk
(
row
)
{
...
...
@@ -1612,6 +1613,23 @@
this
.
positions
=
false
;
}
},
//友情链接
getWebsitePartnerList
(){
api
.
getActivityLinkList
().
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
if
(
response
.
result
)
{
this
.
friendlyLink
=
response
.
result
;
}
}
else
{
this
.
$message
.
error
(
response
.
msgCode
);
}
})
.
catch
(
error
=>
{
console
.
log
(
"提交出错"
);
return
false
;
});
}
},
beforeDestroy
()
{
// 在组件生命周期结束的时候销毁。
window
.
removeEventListener
(
'scroll'
,
this
.
menu
);
...
...
@@ -1638,6 +1656,7 @@
this
.
getselectBasicParams
();
//配置信息
this
.
getBusinessInfoData
();
//需求信息
this
.
getProjectInfoData
();
//项目信息
this
.
getWebsitePartnerList
();
//友情链接
if
(
this
.
$i18n
.
locale
==
'zh-CN'
){
this
.
getIndexHotContentaxios
();
//热门信息
this
.
getIndexTopNArticle
();
//推荐文章
...
...
@@ -2178,7 +2197,7 @@
}
.friendLinkWrapper
{
height
:
20
0px
;
min-height
:
15
0px
;
/*background: #ECECF2;*/
.topUpdateTitle
{
padding-bottom
:
0
;
...
...
@@ -2190,11 +2209,11 @@
display
:
-
moz-box
;
/*老版本语法:Firefox(buggy)*/
display
:
-
ms-flexbox
;
/*混合版本语法:IE 10*/
display
:
flex
;
/*新版本语法:opera 12.1,Firefox 22+*/
justify-content
:
space-around
;
/*justify-content: space-around;*/
&
li
{
cursor
:
pointer
;
padding-bottom
:
10px
;
flex
:
1
;
width
:
calc
(
100%
/
9
)
;
margin
:
0
;
}
&
li
:first-of-type
{
margin-left
:
0
;
...
...
@@ -2203,8 +2222,12 @@
margin-right
:
0
;
}
&
img
{
width
:
auto
;
width
:
88px
;
height
:
45px
;
object-fit
:
contain
;
/*border: 1px solid #E8E8E8;*/
padding
:
2px
5px
;
margin
:
10px
0
;
}
&
>
ul
{
width
:
100%
;
...
...
@@ -2213,7 +2236,9 @@
display
:
-
moz-box
;
/*老版本语法:Firefox(buggy)*/
display
:
-
ms-flexbox
;
/*混合版本语法:IE 10*/
display
:
flex
;
/*新版本语法:opera 12.1,Firefox 22+*/
justify-content
:
space-around
;
/*justify-content: space-around;*/
flex-wrap
:
wrap
;
}
}
}
...
...
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