Commit f910a8ef authored by 盖献康's avatar 盖献康

feat: 测试爬虫

parent d9d5dba7
......@@ -85,3 +85,11 @@ export function shareShop(data) {
data: data
})
}
export function crawler() {
return request({
url: '/crawler/start',
method: 'get'
})
}
......@@ -15,6 +15,7 @@ const commonField = {
resetPasClass: 'resetBtnText', // 文字类型的重置按钮class
queryName: '查询',
resetName: '重置',
crawler: '爬一下',
addName: '新增',
updateName: '修改',
deleteName: '删除',
......
......@@ -51,6 +51,12 @@
:size="commonField.smallSize"
@click="resetQuery"
>{{ commonField.resetName }}</el-button>
<el-button
:class="commonField.resetClass"
:icon="commonField.resetIcon"
:size="commonField.smallSize"
@click="crawlerData"
>{{ commonField.crawler }}</el-button>
</el-form-item>
<div style="float: right">
<el-form-item>
......@@ -220,7 +226,7 @@
import commonField from '@/utils/commonField'
import {
delSysContentNewsInformation,
listSysContentNewsInformation, updateStatus, shareShop
listSysContentNewsInformation, updateStatus, shareShop, crawler
} from '@/api/contentManagement/sysContentNewsInformation'
import { error } from 'autoprefixer/lib/utils'
import { parseTime } from '@/utils'
......@@ -358,6 +364,16 @@ export default {
this.getDeptList()
},
methods: {
// 测试定时爬虫
crawlerData() {
crawler().then(res => {
this.$message({
message: '爬取成功',
type: 'success'
})
this.resetQuery()
})
},
/** 修改密码确定操作*/
handleShareShopSure() {
this.$refs.ruleForm.validate(pass => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment