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

feat: 测试爬虫

parent d9d5dba7
...@@ -85,3 +85,11 @@ export function shareShop(data) { ...@@ -85,3 +85,11 @@ export function shareShop(data) {
data: data data: data
}) })
} }
export function crawler() {
return request({
url: '/crawler/start',
method: 'get'
})
}
...@@ -15,6 +15,7 @@ const commonField = { ...@@ -15,6 +15,7 @@ const commonField = {
resetPasClass: 'resetBtnText', // 文字类型的重置按钮class resetPasClass: 'resetBtnText', // 文字类型的重置按钮class
queryName: '查询', queryName: '查询',
resetName: '重置', resetName: '重置',
crawler: '爬一下',
addName: '新增', addName: '新增',
updateName: '修改', updateName: '修改',
deleteName: '删除', deleteName: '删除',
......
...@@ -51,6 +51,12 @@ ...@@ -51,6 +51,12 @@
:size="commonField.smallSize" :size="commonField.smallSize"
@click="resetQuery" @click="resetQuery"
>{{ commonField.resetName }}</el-button> >{{ commonField.resetName }}</el-button>
<el-button
:class="commonField.resetClass"
:icon="commonField.resetIcon"
:size="commonField.smallSize"
@click="crawlerData"
>{{ commonField.crawler }}</el-button>
</el-form-item> </el-form-item>
<div style="float: right"> <div style="float: right">
<el-form-item> <el-form-item>
...@@ -220,7 +226,7 @@ ...@@ -220,7 +226,7 @@
import commonField from '@/utils/commonField' import commonField from '@/utils/commonField'
import { import {
delSysContentNewsInformation, delSysContentNewsInformation,
listSysContentNewsInformation, updateStatus, shareShop listSysContentNewsInformation, updateStatus, shareShop, crawler
} 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'
...@@ -358,6 +364,16 @@ export default { ...@@ -358,6 +364,16 @@ export default {
this.getDeptList() this.getDeptList()
}, },
methods: { methods: {
// 测试定时爬虫
crawlerData() {
crawler().then(res => {
this.$message({
message: '爬取成功',
type: 'success'
})
this.resetQuery()
})
},
/** 修改密码确定操作*/ /** 修改密码确定操作*/
handleShareShopSure() { handleShareShopSure() {
this.$refs.ruleForm.validate(pass => { 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