feat: query toast
This commit is contained in:
@@ -115,7 +115,8 @@
|
||||
"mcp__plugin_claude-mem_mcp-search__smart_search",
|
||||
"Bash(echo \"exit:$?\")",
|
||||
"mcp__apifox__read_project_oas_j7j64k",
|
||||
"mcp__apifox__read_project_oas_ref_resources_j7j64k"
|
||||
"mcp__apifox__read_project_oas_ref_resources_j7j64k",
|
||||
"mcp__apifox__read_project_oas_ruugy8"
|
||||
],
|
||||
"deny": [],
|
||||
"ask": []
|
||||
|
||||
@@ -144,6 +144,19 @@ class IntImpManifestViewModel : BasePageViewModel() {
|
||||
fun searchClick() {
|
||||
val fdate = flightDate.value
|
||||
val fno = flightNo.value
|
||||
|
||||
// 校验航班号必填
|
||||
if (fno.isNullOrEmpty()) {
|
||||
showToast("请输入航班号")
|
||||
return
|
||||
}
|
||||
|
||||
// 校验始发站、目的站是否已查询到
|
||||
if (sendAddress.value.isNullOrEmpty() || fdest.value.isNullOrEmpty()) {
|
||||
showToast("请先查询航班信息,获取始发站和目的站")
|
||||
return
|
||||
}
|
||||
|
||||
if (!fdate.isNullOrEmpty() && !fno.isNullOrEmpty()) {
|
||||
val key = "$fdate-$fno"
|
||||
if (key != lastQueriedFlight || fid.isEmpty()) {
|
||||
@@ -194,10 +207,6 @@ class IntImpManifestViewModel : BasePageViewModel() {
|
||||
} else {
|
||||
refresh()
|
||||
}
|
||||
} else {
|
||||
fid = ""
|
||||
fdep = ""
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user