mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
feat(config):添加基金功能启用配置
- 在配置文件中增加 enableFund 字段,用于控制是否启用基金功能 - 根据配置决定是否启动基金监控和数据获取任务 - 更新前端界面,在设置页面添加基金功能启用开关 - 优化代码结构,提高可维护性和可读性
This commit is contained in:
parent
09d3a16841
commit
1a3c8b4fae
@ -21,6 +21,7 @@ import {GetConfig} from "../wailsjs/go/main/App";
|
||||
const enableNews= ref(false)
|
||||
const contentStyle = ref("")
|
||||
const enableFund = ref(false)
|
||||
const enableDarkTheme = ref(null)
|
||||
const content = ref('数据来源于网络,仅供参考;投资有风险,入市需谨慎')
|
||||
const isFullscreen = ref(false)
|
||||
const activeKey = ref('')
|
||||
@ -200,6 +201,18 @@ onBeforeMount(()=>{
|
||||
GetConfig().then((res)=>{
|
||||
console.log(res)
|
||||
enableFund.value=res.enableFund
|
||||
|
||||
menuOptions.value.filter((item)=>{
|
||||
if(item.key==='fund'){
|
||||
item.show=res.enableFund
|
||||
}
|
||||
})
|
||||
|
||||
if(res.darkTheme){
|
||||
enableDarkTheme.value=darkTheme
|
||||
}else{
|
||||
enableDarkTheme.value=null
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@ -209,6 +222,7 @@ onMounted(()=>{
|
||||
if(res.enableNews){
|
||||
enableNews.value=true
|
||||
}
|
||||
enableFund.value=res.enableFund
|
||||
})
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user