feat 展示汇率
This commit is contained in:
parent
c0472f3464
commit
b436853001
@ -1,6 +1,10 @@
|
||||
<template>
|
||||
<div class="h-full m-4 bg-white rounded-2 shadow-lg p-8 flex flex-col justify-between space-y-4">
|
||||
<div class="flex justify-between">
|
||||
<div class="flex items-center space-x-16">
|
||||
<div>当前汇率:<span class="text-xl">{{spiderCfg.exchangeRate}}</span></div>
|
||||
<div>当前默认运费:<span class="text-xl">{{spiderCfg.freight}}</span></div>
|
||||
</div>
|
||||
<div class="flex space-x-4">
|
||||
<a-input placeholder="请输入关键词" v-model:value="query.keyword"></a-input>
|
||||
<a-button type="primary" :disabled="loading" @click="list">搜索</a-button>
|
||||
@ -105,9 +109,11 @@ import { clone } from 'radash'
|
||||
import {LoadingOutlined, SaveOutlined,SettingOutlined,CaretUpOutlined,CaretDownOutlined} from "@ant-design/icons-vue";
|
||||
import {message, Modal} from "ant-design-vue";
|
||||
import {CreateWatcher} from "@/api/watcher.js";
|
||||
import {GetSpiderCfg} from "@/api/spider.js";
|
||||
|
||||
onMounted(()=>{
|
||||
list()
|
||||
loadSpiderCfg()
|
||||
})
|
||||
const query = reactive({
|
||||
page: 1,
|
||||
@ -276,6 +282,19 @@ const PRICE_STATUS = {
|
||||
UP: 1,
|
||||
DOWN: 2
|
||||
}
|
||||
|
||||
const spiderCfg = ref({
|
||||
exchangeRate: 0,
|
||||
freight: 0
|
||||
})
|
||||
|
||||
const loadSpiderCfg = ()=>{
|
||||
GetSpiderCfg().then(res=>{
|
||||
spiderCfg.value = res
|
||||
}).catch(err=>{
|
||||
message.error("获取spider配置失败")
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user