Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
intel_promotion_manage
Project
Project
Details
Activity
Releases
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
张伯涛
intel_promotion_manage
Commits
bceef011
Commit
bceef011
authored
Jun 12, 2024
by
刘怀志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
banner暂存-6
parent
841345c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
27 deletions
+49
-27
index.vue
src/views/contentManagement/newsInformation/index.vue
+49
-27
No files found.
src/views/contentManagement/newsInformation/index.vue
View file @
bceef011
...
@@ -231,36 +231,31 @@
...
@@ -231,36 +231,31 @@
width=
"30%"
width=
"30%"
title=
"小程序"
title=
"小程序"
:visible
.
sync=
"innerVisible"
:visible
.
sync=
"innerVisible"
append-to-body
>
append-to-body
<img
id=
"crawlerImage"
v-show=
"src"
:src=
"src"
alt=
"Crawler Image"
>
>
<img
v-show=
"src"
id=
"crawlerImage"
:src=
"src"
alt=
"Crawler Image"
>
<el-checkbox-group
v-model=
"souceList"
>
<el-checkbox
label=
"慧保天下"
/>
<el-checkbox
label=
"中国银行保险报"
/>
<el-checkbox
label=
"今日保条"
/>
<el-checkbox
label=
"陈果 George"
/>
</el-checkbox-group>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"innerVisible = false"
>
取 消
</el-button>
<el-button
@
click=
"innerVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"startImage"
>
抓取
</el-button>
<el-button
type=
"primary"
:loading=
"imgLoading"
@
click=
"startImage"
>
抓取
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<el-row>
<el-row>
<el-col
:span=
"12"
style=
"margin-bottom: 15px"
>
<el-col
:span=
"12"
style=
"margin-bottom: 15px"
>
<el-button
@
click=
"innerVisible = true,loadImage2()"
>
小程序
</el-button>
<el-button
:loading=
"webLoading"
@
click=
"crawlerData"
>
中国保险行业协会 行业要闻
</el-button>
</el-col>
</el-col>
</el-row>
<el-divider
/>
<el-row>
<el-col
:span=
"12"
style=
"margin-bottom: 15px"
>
<el-col
:span=
"12"
style=
"margin-bottom: 15px"
>
<el-button
@
click=
"
crawlerData"
>
中国保险行业协会 行业要闻
</el-button>
<el-button
@
click=
"
innerVisible = true,loadImage2()"
>
小程序
</el-button>
</el-col>
</el-col>
</el-row>
</el-row>
<el-divider></el-divider>
<el-row>
<el-col
:span=
"12"
style=
"margin-bottom: 15px"
>
<el-button>
慧保天下
</el-button>
</el-col>
<el-col
:span=
"12"
style=
"margin-bottom: 15px"
>
<el-button>
中国银行保险报
</el-button>
</el-col>
<el-col
:span=
"12"
style=
"margin-bottom: 15px"
>
<el-button>
今日保条
</el-button>
</el-col>
<el-col
:span=
"12"
style=
"margin-bottom: 15px"
>
<el-button>
陈果 George
</el-button>
</el-col>
</el-row>
</el-dialog>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -282,6 +277,10 @@ export default {
...
@@ -282,6 +277,10 @@ export default {
// },
// },
data
()
{
data
()
{
return
{
return
{
imgLoading
:
false
,
webLoading
:
false
,
intervalId
:
null
,
souceList
:
[],
innerVisible
:
false
,
innerVisible
:
false
,
src
:
''
,
src
:
''
,
rules
:
{
rules
:
{
...
@@ -422,16 +421,39 @@ export default {
...
@@ -422,16 +421,39 @@ export default {
})
})
},
},
startImage
()
{
startImage
()
{
scanCrawlerPicture
(
'CodeSheep'
)
this
.
imgLoading
=
true
console
.
log
(
this
.
souceList
.
join
(
','
))
scanCrawlerPicture
(
this
.
souceList
.
join
(
','
)).
then
(
res
=>
{
this
.
checkId
=
'1'
this
.
checkStatus
()
}).
catch
(
err
=>
{
this
.
$message
.
warning
(
err
.
message
)
this
.
imgLoading
=
false
})
},
checkStatus
()
{
this
.
webLoading
=
false
this
.
intervalId
=
setInterval
(()
=>
{
crawler
({
id
:
this
.
checkId
}).
then
(
res
=>
{
if
(
res
.
status
===
'1'
)
{
this
.
$message
.
success
(
'抓取成功'
)
this
.
webLoading
=
false
this
.
imgLoading
=
false
this
.
loadData
()
clearInterval
(
this
.
intervalId
)
}
})
},
1000
)
},
},
// 测试定时爬虫
// 测试定时爬虫
crawlerData
()
{
crawlerData
()
{
this
.
webLoading
=
true
crawler
().
then
(
res
=>
{
crawler
().
then
(
res
=>
{
this
.
$message
({
this
.
checkId
=
'1'
message
:
'爬取成功'
,
this
.
checkStatus
()
type
:
'success'
}).
catch
(
err
=>
{
}
)
this
.
$message
.
warning
(
err
.
message
)
this
.
resetQuery
()
this
.
webLoading
=
false
})
})
},
},
/** 修改密码确定操作*/
/** 修改密码确定操作*/
...
...
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