mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
Compare commits
2 Commits
master
...
v2025.07.0
Author | SHA1 | Date | |
---|---|---|---|
|
111252f8bd | ||
|
2e5ec6ace8 |
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@ -9,6 +9,7 @@ on:
|
|||||||
env:
|
env:
|
||||||
# Necessary for most environments as build failure can occur due to OOM issues
|
# Necessary for most environments as build failure can occur due to OOM issues
|
||||||
NODE_OPTIONS: "--max-old-space-size=4096"
|
NODE_OPTIONS: "--max-old-space-size=4096"
|
||||||
|
OFFICIAL_STATEMENT: ${{ vars.OFFICIAL_STATEMENT }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -38,7 +39,7 @@ jobs:
|
|||||||
echo "::set-output name=commit_message::$commit_message"
|
echo "::set-output name=commit_message::$commit_message"
|
||||||
|
|
||||||
- name: Build wails x go-stock
|
- name: Build wails x go-stock
|
||||||
uses: ArvinLovegood/wails-build-action@v3.4
|
uses: ArvinLovegood/wails-build-action@v3.5
|
||||||
id: build
|
id: build
|
||||||
with:
|
with:
|
||||||
build-name: ${{ matrix.build.name }}
|
build-name: ${{ matrix.build.name }}
|
||||||
@ -47,4 +48,5 @@ jobs:
|
|||||||
go-version: '1.24'
|
go-version: '1.24'
|
||||||
build-tags: ${{ github.ref_name }}
|
build-tags: ${{ github.ref_name }}
|
||||||
build-commit-message: ${{ steps.get_commit_message.outputs.commit_message }}
|
build-commit-message: ${{ steps.get_commit_message.outputs.commit_message }}
|
||||||
|
build-statement: ${{ env.OFFICIAL_STATEMENT }}
|
||||||
node-version: '20.x'
|
node-version: '20.x'
|
||||||
|
11
app.go
11
app.go
@ -764,11 +764,12 @@ func (a *App) GetAIResponseResult(stock string) *models.AIResponseResult {
|
|||||||
|
|
||||||
func (a *App) GetVersionInfo() *models.VersionInfo {
|
func (a *App) GetVersionInfo() *models.VersionInfo {
|
||||||
return &models.VersionInfo{
|
return &models.VersionInfo{
|
||||||
Version: Version,
|
Version: Version,
|
||||||
Icon: GetImageBase(icon),
|
Icon: GetImageBase(icon),
|
||||||
Alipay: GetImageBase(alipay),
|
Alipay: GetImageBase(alipay),
|
||||||
Wxpay: GetImageBase(wxpay),
|
Wxpay: GetImageBase(wxpay),
|
||||||
Content: VersionCommit,
|
Content: VersionCommit,
|
||||||
|
OfficialStatement: OFFICIAL_STATEMENT,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,13 +150,14 @@ func (receiver AIResponseResult) TableName() string {
|
|||||||
|
|
||||||
type VersionInfo struct {
|
type VersionInfo struct {
|
||||||
gorm.Model
|
gorm.Model
|
||||||
Version string `json:"version"`
|
Version string `json:"version"`
|
||||||
Content string `json:"content"`
|
Content string `json:"content"`
|
||||||
Icon string `json:"icon"`
|
Icon string `json:"icon"`
|
||||||
Alipay string `json:"alipay"`
|
Alipay string `json:"alipay"`
|
||||||
Wxpay string `json:"wxpay"`
|
Wxpay string `json:"wxpay"`
|
||||||
BuildTimeStamp int64 `json:"buildTimeStamp"`
|
BuildTimeStamp int64 `json:"buildTimeStamp"`
|
||||||
IsDel soft_delete.DeletedAt `gorm:"softDelete:flag"`
|
OfficialStatement string `json:"officialStatement"`
|
||||||
|
IsDel soft_delete.DeletedAt `gorm:"softDelete:flag"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (receiver VersionInfo) TableName() string {
|
func (receiver VersionInfo) TableName() string {
|
||||||
|
@ -27,7 +27,7 @@ import {
|
|||||||
StarOutline,
|
StarOutline,
|
||||||
Wallet, WarningOutline,
|
Wallet, WarningOutline,
|
||||||
} from '@vicons/ionicons5'
|
} from '@vicons/ionicons5'
|
||||||
import {AnalyzeSentiment, GetConfig, GetGroupList} from "../wailsjs/go/main/App";
|
import {AnalyzeSentiment, GetConfig, GetGroupList,GetVersionInfo} from "../wailsjs/go/main/App";
|
||||||
import {Dragon, Fire, Gripfire} from "@vicons/fa";
|
import {Dragon, Fire, Gripfire} from "@vicons/fa";
|
||||||
import {ReportSearch} from "@vicons/tabler";
|
import {ReportSearch} from "@vicons/tabler";
|
||||||
import {LocalFireDepartmentRound} from "@vicons/material";
|
import {LocalFireDepartmentRound} from "@vicons/material";
|
||||||
@ -518,6 +518,12 @@ window.onerror = function (msg, source, lineno, colno, error) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onBeforeMount(() => {
|
onBeforeMount(() => {
|
||||||
|
GetVersionInfo().then(result => {
|
||||||
|
if(result.officialStatement){
|
||||||
|
content.value = result.officialStatement
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
GetGroupList().then(result => {
|
GetGroupList().then(result => {
|
||||||
groupList.value = result
|
groupList.value = result
|
||||||
menuOptions.value.map((item) => {
|
menuOptions.value.map((item) => {
|
||||||
|
@ -3,16 +3,22 @@ import {h, onBeforeMount, onMounted, onUnmounted, ref} from 'vue'
|
|||||||
import {SearchStock} from "../../wailsjs/go/main/App";
|
import {SearchStock} from "../../wailsjs/go/main/App";
|
||||||
import {useMessage, NText, NTag} from 'naive-ui'
|
import {useMessage, NText, NTag} from 'naive-ui'
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
const search = ref('科技股;换手率连续3日大于2')
|
const search = ref('')
|
||||||
const columns = ref([])
|
const columns = ref([])
|
||||||
const dataList = ref([])
|
const dataList = ref([])
|
||||||
|
const traceInfo = ref('')
|
||||||
function Search() {
|
function Search() {
|
||||||
|
if(!search.value){
|
||||||
|
message.warning('请输入选股指标或者要求')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
const loading = message.loading("正在获取选股数据...", {duration: 0});
|
const loading = message.loading("正在获取选股数据...", {duration: 0});
|
||||||
SearchStock(search.value).then(res => {
|
SearchStock(search.value).then(res => {
|
||||||
loading.destroy()
|
loading.destroy()
|
||||||
//console.log(res)
|
console.log(res)
|
||||||
if(res.code==100){
|
if(res.code==100){
|
||||||
|
traceInfo.value=res.data.traceInfo.showText
|
||||||
message.success(res.msg)
|
message.success(res.msg)
|
||||||
columns.value=res.data.result.columns.filter(item=>!item.hiddenNeed&&(item.title!="市场码"&&item.title!="市场简称")).map(item=>{
|
columns.value=res.data.result.columns.filter(item=>!item.hiddenNeed&&(item.title!="市场码"&&item.title!="市场简称")).map(item=>{
|
||||||
|
|
||||||
@ -70,24 +76,16 @@ onBeforeMount(() => {
|
|||||||
<template>
|
<template>
|
||||||
<n-flex>
|
<n-flex>
|
||||||
<n-input-group>
|
<n-input-group>
|
||||||
<n-input v-model:value="search" placeholder="请输入选股指标或者要求" />
|
<n-input clearable v-model:value="search" placeholder="请输入选股指标或者要求" />
|
||||||
<n-button type="success" @click="Search">搜索A股</n-button>
|
<n-button type="primary" @click="Search">搜索A股</n-button>
|
||||||
</n-input-group>
|
</n-input-group>
|
||||||
</n-flex>
|
</n-flex>
|
||||||
<!-- <n-table striped size="small">-->
|
<n-flex justify="start" v-if="traceInfo">
|
||||||
<!-- <n-thead>-->
|
<n-tag type="info" :bordered="false">当前选股条件:<n-tag type="warning" :bordered="true">{{traceInfo}}</n-tag></n-tag>
|
||||||
<!-- <n-tr>-->
|
<!-- <n-button type="primary" size="small">保存策略</n-button>-->
|
||||||
<!-- <n-th v-for="item in columns">{{item.title}}</n-th>-->
|
</n-flex>
|
||||||
<!-- </n-tr>-->
|
|
||||||
<!-- </n-thead>-->
|
|
||||||
<!-- <n-tbody>-->
|
|
||||||
<!-- <n-tr v-for="(item,index) in dataList">-->
|
|
||||||
<!-- <n-td v-for="d in columns">{{item[d.key]}}</n-td>-->
|
|
||||||
<!-- </n-tr>-->
|
|
||||||
<!-- </n-tbody>-->
|
|
||||||
<!-- </n-table>-->
|
|
||||||
<n-data-table
|
<n-data-table
|
||||||
:max-height="'calc(100vh - 285px)'"
|
:max-height="'calc(100vh - 312px)'"
|
||||||
size="small"
|
size="small"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:data="dataList"
|
:data="dataList"
|
||||||
|
@ -701,6 +701,7 @@ export namespace models {
|
|||||||
alipay: string;
|
alipay: string;
|
||||||
wxpay: string;
|
wxpay: string;
|
||||||
buildTimeStamp: number;
|
buildTimeStamp: number;
|
||||||
|
officialStatement: string;
|
||||||
IsDel: number;
|
IsDel: number;
|
||||||
|
|
||||||
static createFrom(source: any = {}) {
|
static createFrom(source: any = {}) {
|
||||||
@ -719,6 +720,7 @@ export namespace models {
|
|||||||
this.alipay = source["alipay"];
|
this.alipay = source["alipay"];
|
||||||
this.wxpay = source["wxpay"];
|
this.wxpay = source["wxpay"];
|
||||||
this.buildTimeStamp = source["buildTimeStamp"];
|
this.buildTimeStamp = source["buildTimeStamp"];
|
||||||
|
this.officialStatement = source["officialStatement"];
|
||||||
this.IsDel = source["IsDel"];
|
this.IsDel = source["IsDel"];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user