提交 e809d1fd authored 作者: quanlili's avatar quanlili

Merge branch 'qll' into dev

import request from '@/utils/request'
import { requestPath } from '@/utils/global'
export function getkeywordAPI() { //更新爬虫
return request({
url: `${requestPath.resource}/participle/keyword`,
method: 'post'
})
}
export function getUpdateTextAPI() { //更新文本与文本
return request({
url: `${requestPath.resource}/participle/create/relation`,
method: 'get'
})
}
export function getUpdateKeywordAPI() { //更新关键字
return request({
url: `${requestPath.resource}/participle/save/keyword`,
method: 'get'
})
}
\ No newline at end of file
......@@ -555,6 +555,14 @@ export const asyncRouterMap = [{
title: '更新索引',
routerIds: ['0911']
}
},{
path: 'update_reptile',
component: _import('system/update_reptile'),
name: 'update_reptile',
meta: {
title: '更新数据',
routerIds: ['0912']
}
}
]
......
<template>
<!-- <el-main> -->
<div class="updata_reptile">
<div class="block_wrap">
<div class="block" @click="getKeyword">更新爬虫数据</div>
<div class="block" @click="getUpdateKeyword">更新关键字</div>
<div class="block" @click="getUpdateText">更新文本与文本</div>
</div>
</div>
<!-- </el-main> -->
</template>
<script>
import { getkeywordAPI,getUpdateTextAPI, getUpdateKeywordAPI } from '@/api/system-management/updateReptile'
export default {
name:'update_reptile',
data() {
return {
}
},
mounted() {
},
methods: {
getKeyword() {
getkeywordAPI().then(res => {
if(res.data.code == 0) {
this.$message.success('更新爬虫数据成功')
}
})
},
getUpdateText() {
getUpdateTextAPI().then(res => {
if(res.status == 200) {
this.$message.success('更新文本关系成功')
}
})
},
getUpdateKeyword() {
getUpdateKeywordAPI().then(res => {
if(res.status == 200) {
this.$message.success('更新关键字成功')
}
})
}
}
}
</script>
<style scoped lang="scss">
.updata_reptile {
max-width: 1100px;
margin: 100px auto;
.block_wrap{
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
.block{
width: 300px;
height: 150px;
text-align: center;
line-height: 150px;
color: #fff;
background: #409EFF;
font-size: 24px;
cursor: pointer;
margin-bottom: 20px;
&:nth-child(2n+2){
background: #97AECB;
}
}
}
</style>
......@@ -43,19 +43,15 @@ export default {
<style scoped>
#update {
max-width: 1400px;
margin-top: 100px;
margin-left: 270px;
max-width: 1000px;
margin:100px auto;
}
/* .box{
width: 1400px;
height: 200px;
position: absolute;
left: 0;
top: 0;
transform: translate(-50%, -50%);
} */
.box{
display: flex;
justify-content: space-around;
flex-wrap: wrap;
}
.addSearch {
width: 300px;
height: 150px;
......@@ -65,18 +61,17 @@ export default {
background: #409EFF;
font-size: 24px;
cursor: pointer;
float: left;
margin-bottom: 20px;
}
.updateSearch {
width: 300px;
height: 150px;
margin-left: 60px;
text-align: center;
line-height: 150px;
color: #FFFFFF;
background: #97AECB;
float: left;
cursor: pointer;
font-size: 24px;
margin-bottom: 20px;
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论