修复爬虫调用422错误
This commit is contained in:
parent
b89eca1fe6
commit
76d3f26717
|
@ -3,7 +3,7 @@ import { ElMessage, ElMessageBox } from 'element-plus';
|
|||
import qs from 'qs';
|
||||
import { Session } from '/@/utils/storage';
|
||||
|
||||
export const moduleName = 'biz-vordm';
|
||||
export const moduleName = 'yyhouc-biz-vordm';
|
||||
export const crawlModule = 'vordm-crawl';
|
||||
export const twitterModule = "vordm-twitter";
|
||||
const service = axios.create({
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
<script setup >
|
||||
import { ElMessage, ElMessageBox } from 'element-plus';
|
||||
import { reactive, defineExpose } from 'vue';
|
||||
import { news, submit, getList } from '/@/api/crawl/index';
|
||||
import { news, submit, getList ,twitter} from '/@/api/crawl/index';
|
||||
import { useUserInfo } from '/@/stores/userInfo';
|
||||
const userInfo = useUserInfo();
|
||||
const state = reactive({
|
||||
|
@ -178,7 +178,7 @@ const state = reactive({
|
|||
disaster_id: undefined
|
||||
},
|
||||
twitter:{
|
||||
keywords: "",
|
||||
date:undefined,
|
||||
page: 10,
|
||||
disaster_id: undefined
|
||||
},
|
||||
|
@ -308,13 +308,12 @@ const start = (text) => {
|
|||
ElMessage.error("error")
|
||||
} else {
|
||||
if(text =='baidu' || text == 'bing'){
|
||||
news(ret.disasterId, keywords, page, (text == "baidu"), ret.id).then(res => {
|
||||
news(ret[0].disasterId, keywords, page, (text == "baidu"), ret[0].id).then(res => {
|
||||
ElMessage.success("Data is being acquired!")
|
||||
getData();
|
||||
})
|
||||
}else if(text == 'twitter'){
|
||||
console.log(state.twitter.date)
|
||||
twitter(disasterId,keywords,state.twitter.date[0],state.twitter.date[1]).then(res=>{
|
||||
twitter(ret[0].disasterId,keywords,state.twitter.date[0],state.twitter.date[1]).then(res=>{
|
||||
ElMessage.success("Data is being acquired!")
|
||||
getData();
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue