This commit is contained in:
glj 2023-05-23 09:30:32 +08:00
commit 5d40254b00
2 changed files with 5 additions and 6 deletions

View File

@ -3,7 +3,7 @@ import { ElMessage, ElMessageBox } from 'element-plus';
import qs from 'qs'; import qs from 'qs';
import { Session } from '/@/utils/storage'; import { Session } from '/@/utils/storage';
export const moduleName = 'biz-vordm'; export const moduleName = 'yyhouc-biz-vordm';
export const crawlModule = 'vordm-crawl'; export const crawlModule = 'vordm-crawl';
export const twitterModule = "vordm-twitter"; export const twitterModule = "vordm-twitter";
const service = axios.create({ const service = axios.create({

View File

@ -160,7 +160,7 @@
<script setup > <script setup >
import { ElMessage, ElMessageBox } from 'element-plus'; import { ElMessage, ElMessageBox } from 'element-plus';
import { reactive, defineExpose } from 'vue'; 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'; import { useUserInfo } from '/@/stores/userInfo';
const userInfo = useUserInfo(); const userInfo = useUserInfo();
const state = reactive({ const state = reactive({
@ -178,7 +178,7 @@ const state = reactive({
disaster_id: undefined disaster_id: undefined
}, },
twitter:{ twitter:{
keywords: "", date:undefined,
page: 10, page: 10,
disaster_id: undefined disaster_id: undefined
}, },
@ -308,13 +308,12 @@ const start = (text) => {
ElMessage.error("error") ElMessage.error("error")
} else { } else {
if(text =='baidu' || text == 'bing'){ 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!") ElMessage.success("Data is being acquired!")
getData(); getData();
}) })
}else if(text == 'twitter'){ }else if(text == 'twitter'){
console.log(state.twitter.date) twitter(ret[0].disasterId,keywords,state.twitter.date[0],state.twitter.date[1]).then(res=>{
twitter(disasterId,keywords,state.twitter.date[0],state.twitter.date[1]).then(res=>{
ElMessage.success("Data is being acquired!") ElMessage.success("Data is being acquired!")
getData(); getData();
}) })