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/pages/customStockList/customStockList.vue b/pages/customStockList/customStockList.vue
index ad96b5f..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 }}
@@ -81,11 +92,58 @@
+
+
+
+
+ 已选择 {{ selectedStockIds.length }} 只股票
+
+ {{ isAllSelected ? '取消全选' : '全选' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ group.name }}
+
+
+ + 新建分组
+
+
+
+
+
+