diff --git a/api/home/mySelections.js b/api/home/mySelections.js index a22e69e..3b7cbb7 100644 --- a/api/home/mySelections.js +++ b/api/home/mySelections.js @@ -325,6 +325,37 @@ class MySelectionsAPI { throw error } } + + /** + * 更新自选股分组(假接口) + * @param {Function} successCallback - 成功回调函数 + * @param {Function} failCallback - 失败回调函数 + * @param {Object} data - 请求参数 {stockId: number, groupId: number} + * @returns {Promise} + */ + static async updateUserStockGroup(successCallback, failCallback = null, data = {}) { + const url = '/api/homePage/userStock/updateGroup' + + try { + const response = await http({ + url: url, + method: 'POST', + data: data + }) + + console.log('更新自选股分组 - 响应:', response) + if (successCallback && typeof successCallback === 'function') { + successCallback(response) + } + return response + } catch (error) { + console.error('更新自选股分组 - 失败:', error) + if (failCallback && typeof failCallback === 'function') { + failCallback(error) + } + throw error + } + } } // 导出API类 @@ -341,5 +372,6 @@ export const { updateUserStockGroupName, deleteUserStockGroup, deleteUserStock, - addUserStock + addUserStock, + updateUserStockGroup } = MySelectionsAPI \ No newline at end of file diff --git a/components/deepExploration_header.vue b/components/deepExploration_header.vue index 7ebb3fd..94ea260 100644 --- a/components/deepExploration_header.vue +++ b/components/deepExploration_header.vue @@ -66,8 +66,11 @@ > 🇺🇸 + > {{ item.stockName }} @@ -159,6 +162,29 @@ const onDrawerBackClick = () => { }, 180); }; +// 历史记录国家图像 +function stockImage(Market) { + switch (Market) { + case "usa": + return "../../static/marketSituation-image/country-flag/us.png"; + case "can": + return "../../static/marketSituation-image/country-flag/can.png"; + case "vi": + return "../../static/marketSituation-image/country-flag/vi.png"; + case "th": + return "../../static/marketSituation-image/country-flag/th.png"; + case "my": + return "../../static/marketSituation-image/country-flag/my.png"; + case "sg": + return "../../static/marketSituation-image/country-flag/sg.png"; + case "hk": + return "../../static/marketSituation-image/country-flag/hk.png"; + case "cn": + return "../../static/marketSituation-image/country-flag/cn.png"; + } +} + + // 历史记录详情 async function itemClick(item) { const res = await RecordInfoApi({ @@ -167,19 +193,17 @@ async function itemClick(item) { model: 5, }); if (res.code == 200) { - const message = res.data; const deepExplorationStore = useDeepExplorationStore(); deepExplorationStore.setDeepExplorationInfo(message); - console.log('点击了历史数据',deepExplorationStore.deepExplorationInfo); + console.log("点击了历史数据", deepExplorationStore.deepExplorationInfo); onDrawerBackClick(); - setTimeout(() => { - uni.navigateTo({ - url: '/pages/deepExploration/MainForceActions' - }); - }, 200); + setTimeout(() => { + uni.navigateTo({ + url: "/pages/deepExploration/MainForceActions", + }); + }, 200); } - } const historyList = ref([]); @@ -464,6 +488,12 @@ onMounted(() => {}); height: 50rpx; } + +.icon-stock { + width: 36rpx; + height: 36rpx; +} + .flag-circle { width: 50rpx; height: 50rpx; diff --git a/manifest.json b/manifest.json index 83f218b..c1c08ca 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "DeepChartApp", - "appid" : "__UNI__9C9AB28", + "appid" : "__UNI__410B53B", "description" : "", "versionName" : "1.0.0", "versionCode" : "100", @@ -54,26 +54,26 @@ "google" : { "clientid" : "135" } - }, - "share" : { - "weixin" : { - "appid" : "wx6143d111fc5c9ba3", - "UniversalLinks" : "" - } } } }, + // "share" : { + // "weixin" : { + // "appid" : "wx6143d111fc5c9ba3", + // "UniversalLinks" : "" + // } + // } "nativePlugins" : { "Aimer-TCPPlugin" : { "__plugin_info__" : { - "name" : "TCP-Socket原生插件(支持Android和IOS) - [试用版,仅用于自定义调试基座]", + "name" : "TCP-Socket原生插件(支持Android和IOS) ", "description" : "Uniapp实现基于TCP的数据通信,支持单片机、智能家居等硬件交互,联系QQ: 462108858", "platforms" : "Android,iOS", "url" : "https://ext.dcloud.net.cn/plugin?id=2029", - "android_package_name" : "", - "ios_bundle_id" : "", + "android_package_name" : "com.homily.deepchart", + "ios_bundle_id" : "com.homily.deepchart", "isCloud" : true, - "bought" : 0, + "bought" : 1, "pid" : "2029", "parameters" : {} } diff --git a/pages/customStockList/customStockList.vue b/pages/customStockList/customStockList.vue index 348f18e..5d02923 100644 --- a/pages/customStockList/customStockList.vue +++ b/pages/customStockList/customStockList.vue @@ -66,7 +66,18 @@ v-for="stock in stockList" :key="stock.id" class="stock-item" + @click="handleStockClick(stock)" > + + + + + + + {{ stock.name || stock.code }} {{ stock.code }} @@ -74,18 +85,65 @@ {{ stock.price || '--' }} - {{ stock.change >= 0 ? '+' : '' }}{{ stock.change || '--' }} + {{ stock.change >= 0 ? '+' : '-' }}{{ stock.change || '--' }} + + + + + 已选择 {{ selectedStockIds.length }} 只股票 + + {{ isAllSelected ? '取消全选' : '全选' }} + + + + + + + + + + + + 编辑分组 + + + + + + {{ group.name }} + + + + 新建分组 + + + + + + + +