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
086c36c8
Commit
086c36c8
authored
Jun 12, 2024
by
刘怀志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
暂存
parent
bceef011
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
sysContentNewsInformation.js
src/api/contentManagement/sysContentNewsInformation.js
+6
-0
index.vue
src/views/contentManagement/newsInformation/index.vue
+19
-8
No files found.
src/api/contentManagement/sysContentNewsInformation.js
View file @
086c36c8
...
@@ -92,6 +92,12 @@ export function crawler() {
...
@@ -92,6 +92,12 @@ export function crawler() {
method
:
'get'
method
:
'get'
})
})
}
}
export
function
queryCrawlerStatus
(
params
)
{
return
request
({
url
:
'/cmstask/detail/'
+
params
.
id
,
method
:
'get'
})
}
// 公众号爬虫
// 公众号爬虫
export
function
getCrawlerPicture
()
{
export
function
getCrawlerPicture
()
{
...
...
src/views/contentManagement/newsInformation/index.vue
View file @
086c36c8
...
@@ -264,7 +264,13 @@
...
@@ -264,7 +264,13 @@
import
commonField
from
'@/utils/commonField'
import
commonField
from
'@/utils/commonField'
import
{
import
{
delSysContentNewsInformation
,
delSysContentNewsInformation
,
listSysContentNewsInformation
,
updateStatus
,
shareShop
,
crawler
,
getCrawlerPicture
,
scanCrawlerPicture
listSysContentNewsInformation
,
updateStatus
,
shareShop
,
crawler
,
getCrawlerPicture
,
scanCrawlerPicture
,
queryCrawlerStatus
}
from
'@/api/contentManagement/sysContentNewsInformation'
}
from
'@/api/contentManagement/sysContentNewsInformation'
import
{
error
}
from
'autoprefixer/lib/utils'
import
{
error
}
from
'autoprefixer/lib/utils'
import
{
parseTime
}
from
'@/utils'
import
{
parseTime
}
from
'@/utils'
...
@@ -424,7 +430,7 @@ export default {
...
@@ -424,7 +430,7 @@ export default {
this
.
imgLoading
=
true
this
.
imgLoading
=
true
console
.
log
(
this
.
souceList
.
join
(
','
))
console
.
log
(
this
.
souceList
.
join
(
','
))
scanCrawlerPicture
(
this
.
souceList
.
join
(
','
)).
then
(
res
=>
{
scanCrawlerPicture
(
this
.
souceList
.
join
(
','
)).
then
(
res
=>
{
this
.
checkId
=
'1'
this
.
checkId
=
res
.
data
this
.
checkStatus
()
this
.
checkStatus
()
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
this
.
$message
.
warning
(
err
.
message
)
this
.
$message
.
warning
(
err
.
message
)
...
@@ -432,24 +438,29 @@ export default {
...
@@ -432,24 +438,29 @@ export default {
})
})
},
},
checkStatus
()
{
checkStatus
()
{
this
.
webLoading
=
false
this
.
intervalId
=
setInterval
(()
=>
{
this
.
intervalId
=
setInterval
(()
=>
{
crawler
({
id
:
this
.
checkId
}).
then
(
res
=>
{
queryCrawlerStatus
({
id
:
this
.
checkId
}).
then
(
res
=>
{
if
(
res
.
status
===
'1'
)
{
if
(
res
.
data
.
status
===
'1'
)
{
this
.
$message
.
success
(
'抓取成功'
)
this
.
$message
.
success
(
'抓取成功'
)
this
.
webLoading
=
false
this
.
webLoading
=
false
this
.
imgLoading
=
false
this
.
imgLoading
=
false
this
.
loadData
()
this
.
loadData
()
clearInterval
(
this
.
intervalId
)
clearInterval
(
this
.
intervalId
)
}
else
if
(
res
.
data
.
status
===
'2'
)
{
this
.
$message
.
success
(
'失败'
)
this
.
webLoading
=
false
this
.
imgLoading
=
false
this
.
loadData
()
clearInterval
(
this
.
intervalId
)
}
}
})
})
},
1
000
)
},
5
000
)
},
},
// 测试定时爬虫
// 测试定时爬虫
crawlerData
()
{
crawlerData
()
{
this
.
webLoading
=
true
this
.
webLoading
=
true
crawler
().
then
(
res
=>
{
crawler
().
then
(
res
=>
{
this
.
checkId
=
'1'
this
.
checkId
=
res
.
data
this
.
checkStatus
()
this
.
checkStatus
()
}).
catch
(
err
=>
{
}).
catch
(
err
=>
{
this
.
$message
.
warning
(
err
.
message
)
this
.
$message
.
warning
(
err
.
message
)
...
@@ -498,7 +509,7 @@ export default {
...
@@ -498,7 +509,7 @@ export default {
this
.
queryParams
.
unitId
=
this
.
deptId
this
.
queryParams
.
unitId
=
this
.
deptId
}
}
},
},
// 获取所有部门信息
// 获取所有
部门信息
getDeptList
()
{
getDeptList
()
{
listAllShop
().
then
(
res
=>
{
listAllShop
().
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
if
(
res
.
code
===
200
)
{
...
...
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