初版完成
This commit is contained in:
@@ -515,6 +515,11 @@ export default {
|
||||
try {
|
||||
const apiParam = toApiProvinceParam(provinceName)
|
||||
url = `/api/cattle-data/provinces?province=${encodeURIComponent(apiParam)}`
|
||||
const dailyUrl = `/api/cattle-data/province-daily-prices?province=${encodeURIComponent(apiParam)}`
|
||||
const dailyReq = fetch(dailyUrl, { signal: provinceClickController.signal }).then(r => {
|
||||
if (!r.ok) throw new Error(`HTTP ${r.status}`)
|
||||
return r.json()
|
||||
}).catch(e => e)
|
||||
const res = await fetch(url, { signal: provinceClickController.signal })
|
||||
clearTimeout(timeoutId)
|
||||
if (!res.ok) throw new Error(`HTTP ${res.status}`)
|
||||
|
||||
Reference in New Issue
Block a user