From b859bd75d789ed6fc3fd3254a736530eaa08e807 Mon Sep 17 00:00:00 2001 From: lihuilin Date: Thu, 30 Oct 2025 09:24:55 +0800 Subject: [PATCH 01/20] bug --- .hbuilderx/launch.json | 2 +- pages/home/member.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 7ef9f55..db38e9c 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -4,7 +4,7 @@ { "customPlaygroundType" : "device", "packageName" : "io.dcloud.HBuilder", - "playground" : "custom", + "playground" : "standard", "type" : "uni-app:app-android" } ] diff --git a/pages/home/member.vue b/pages/home/member.vue index 5ea9e75..bd175de 100644 --- a/pages/home/member.vue +++ b/pages/home/member.vue @@ -90,7 +90,7 @@ const dccode = ref('') const userInfoRes = ref()// 用户身份信息 userInfoRes.value = getUserInfo() userInfoRes.value.then(res => { - username.value = res.data.username + username.value = res.data.dcname dccode.value = res.data.dccode console.log('用户信息', userInfoRes.value) }) From f6d01fee0ee2f22db6dbbdc375d5b97bd3715350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Thu, 30 Oct 2025 09:33:29 +0800 Subject: [PATCH 02/20] =?UTF-8?q?=E6=9B=B4=E6=8D=A2=E6=88=91=E7=9A=84?= =?UTF-8?q?=E8=87=AA=E9=80=89=E9=A1=B5=E9=9D=A2=E7=9A=84=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E6=8C=89=E9=92=AE=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/customStockList/customStockList.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pages/customStockList/customStockList.vue b/pages/customStockList/customStockList.vue index 33cb034..1e57e1c 100644 --- a/pages/customStockList/customStockList.vue +++ b/pages/customStockList/customStockList.vue @@ -7,7 +7,7 @@ - + @@ -109,9 +109,8 @@ } .back-icon { - font-size: 24px; - color: #333333; - font-weight: bold; + width: 24px; + height: 24px; } .navbar-center { From e36074d553cd28f8c1b41237da6ece2f47251d22 Mon Sep 17 00:00:00 2001 From: lihuilin Date: Thu, 30 Oct 2025 09:50:14 +0800 Subject: [PATCH 03/20] =?UTF-8?q?=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/setting/about.vue | 2 +- pages/setting/email.vue | 11 ++++++++--- pages/setting/introduce.vue | 7 ++++++- pages/setting/market.vue | 17 +++++++++-------- pages/setting/nextPwd.vue | 25 ++++++++++++++----------- pages/setting/phone.vue | 12 +++++++++--- 6 files changed, 47 insertions(+), 27 deletions(-) diff --git a/pages/setting/about.vue b/pages/setting/about.vue index d8146b1..2a0d56a 100644 --- a/pages/setting/about.vue +++ b/pages/setting/about.vue @@ -4,7 +4,7 @@ - + diff --git a/pages/setting/email.vue b/pages/setting/email.vue index cc39b5b..5f4f1c8 100644 --- a/pages/setting/email.vue +++ b/pages/setting/email.vue @@ -7,14 +7,14 @@ - + 已绑邮箱:{{ email }} - + @@ -27,7 +27,7 @@ - + @@ -182,4 +182,9 @@ align-items: center; justify-content: center; } + + .image{ + width:40rpx; + height:40rpx; + } \ No newline at end of file diff --git a/pages/setting/introduce.vue b/pages/setting/introduce.vue index 6a5d07a..bb291d2 100644 --- a/pages/setting/introduce.vue +++ b/pages/setting/introduce.vue @@ -4,7 +4,7 @@ - + @@ -73,4 +73,9 @@ text-align: justify; text-justify: inter-character;/* 两端对齐哈哈哈哈 */ } + + .image{ + width:334rpx; + height:310rpx; + } \ No newline at end of file diff --git a/pages/setting/market.vue b/pages/setting/market.vue index 0524fd2..19bebfd 100644 --- a/pages/setting/market.vue +++ b/pages/setting/market.vue @@ -41,7 +41,7 @@ :class="{ 'active': kStyle === 'common' }" @click="handleKStyleChange('common')" > - + 普通 @@ -50,7 +50,7 @@ :class="{ 'active': kStyle === 'Outline' }" @click="handleKStyleChange('Outline')" > - + 轮廓图 @@ -59,7 +59,7 @@ :class="{ 'active': kStyle === 'polylines' }" @click="handleKStyleChange('polylines')" > - + 折线图 @@ -101,7 +101,7 @@ @click="handleRfColorChange('green')" > - + 绿涨红跌 @@ -112,7 +112,7 @@ @click="handleRfColorChange('red')" > - + 红涨绿跌 @@ -152,8 +152,8 @@ {{ item }} - - + + @@ -268,7 +268,6 @@ } .top-options { - height: 5.5vh; display: flex; padding: 0 40rpx; } @@ -300,6 +299,8 @@ .kline-icon { margin-right: 10rpx; font-size: 32rpx; + width:60rpx; + height:50rpx; } .color-icon { diff --git a/pages/setting/nextPwd.vue b/pages/setting/nextPwd.vue index 7d410d5..19562b4 100644 --- a/pages/setting/nextPwd.vue +++ b/pages/setting/nextPwd.vue @@ -13,19 +13,19 @@ - + - - + - @@ -157,13 +157,6 @@ onMounted(() => { justify-content: center; } -.img { - position: absolute; - right: 0; - top: 50%; - transform: translateY(-50%); -} - .tips { font-size: 24rpx; color: #999; @@ -172,4 +165,14 @@ onMounted(() => { align-self: flex-start; /* 这是左对齐 */ } + +.image-lock{ + width:40rpx; + height:40rpx; +} + +.image-eye{ + width:40rpx; + height:30rpx; +} \ No newline at end of file diff --git a/pages/setting/phone.vue b/pages/setting/phone.vue index a74c916..1d6405e 100644 --- a/pages/setting/phone.vue +++ b/pages/setting/phone.vue @@ -7,13 +7,13 @@ - + 已绑手机号:{{ phone }} - + +86 @@ -27,7 +27,7 @@ - + @@ -137,6 +137,7 @@ flex: 1; display: flex; align-items: center; + justify-content: left; } .label { @@ -182,4 +183,9 @@ align-items: center; justify-content: center; } + + .image{ + height:40rpx; + width:40rpx; + } \ No newline at end of file From 1b6322aa8df73c36efede99eab169254a11b5811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Thu, 30 Oct 2025 09:59:04 +0800 Subject: [PATCH 04/20] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=96=B0=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/home/mySelections.js | 162 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 161 insertions(+), 1 deletion(-) diff --git a/api/home/mySelections.js b/api/home/mySelections.js index 6801ebc..a22e69e 100644 --- a/api/home/mySelections.js +++ b/api/home/mySelections.js @@ -170,6 +170,161 @@ class MySelectionsAPI { throw error } } + + /** + * 创建分组 + * @param {Function} successCallback - 成功回调函数 + * @param {Function} failCallback - 失败回调函数 + * @param {Object} data - 请求参数,包含分组名字 + * @returns {Promise} + */ + static async addUserStockGroup(successCallback, failCallback = null, data = {}) { + const url = '/api/homePage/userStockGroup/add' + + 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 + } + } + + /** + * 修改分组名称 + * @param {Function} successCallback - 成功回调函数 + * @param {Function} failCallback - 失败回调函数 + * @param {Object} data - 请求参数,包含修改后的名字 + * @returns {Promise} + */ + static async updateUserStockGroupName(successCallback, failCallback = null, data = {}) { + const url = '/api/homePage/userStockGroup/updateName' + + 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 + } + } + + /** + * 删除分组 + * @param {Function} successCallback - 成功回调函数 + * @param {Function} failCallback - 失败回调函数 + * @param {Object} data - 请求参数,包含groupId + * @returns {Promise} + */ + static async deleteUserStockGroup(successCallback, failCallback = null, data = {}) { + const url = '/api/homePage/userStockGroup/delete' + + 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 + } + } + + /** + * 删除某一个自选股 + * @param {Function} successCallback - 成功回调函数 + * @param {Function} failCallback - 失败回调函数 + * @param {Object} data - 请求参数,包含groupId和id + * @returns {Promise} + */ + static async deleteUserStock(successCallback, failCallback = null, data = {}) { + const url = '/api/homePage/userStock/delete' + + 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 + } + } + + /** + * 在某个分组下添加自选股 + * @param {Function} successCallback - 成功回调函数 + * @param {Function} failCallback - 失败回调函数 + * @param {Object} data - 请求参数,包含股票代码code,股票市场market和分组groupId + * @returns {Promise} + */ + static async addUserStock(successCallback, failCallback = null, data = {}) { + const url = '/api/homePage/userStock/add' + + 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类 @@ -181,5 +336,10 @@ export const { getUserStockGroupList, getUserStockList, getUserOrDefault, - getDefaultStocks + getDefaultStocks, + addUserStockGroup, + updateUserStockGroupName, + deleteUserStockGroup, + deleteUserStock, + addUserStock } = MySelectionsAPI \ No newline at end of file From 49ec48fefc63edd1c59ed16593f4da14f429cc08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Thu, 30 Oct 2025 11:11:25 +0800 Subject: [PATCH 05/20] =?UTF-8?q?=E8=87=AA=E9=80=89=E8=82=A1=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=9B=E9=A1=B5=E9=9D=A2=E9=80=BB=E8=BE=91=E5=AE=8C=E6=88=90?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .hbuilderx/launch.json | 2 +- pages/customStockList/customStockList.vue | 340 +++++++++++++++++++++++++++++- 2 files changed, 335 insertions(+), 7 deletions(-) diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 7ef9f55..728c4a6 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -2,7 +2,7 @@ "version" : "1.0", "configurations" : [ { - "customPlaygroundType" : "device", + "customPlaygroundType" : "local", "packageName" : "io.dcloud.HBuilder", "playground" : "custom", "type" : "uni-app:app-android" diff --git a/pages/customStockList/customStockList.vue b/pages/customStockList/customStockList.vue index 1e57e1c..348f18e 100644 --- a/pages/customStockList/customStockList.vue +++ b/pages/customStockList/customStockList.vue @@ -32,28 +32,223 @@ + + + + + + {{ group.name }} + + + + + + + + 加载中... + + + + 暂无数据~ + + + + + {{ stock.name || stock.code }} + {{ stock.code }} + + + {{ stock.price || '--' }} + + {{ stock.change >= 0 ? '+' : '' }}{{ stock.change || '--' }} + + + + + @@ -146,7 +149,7 @@ onMounted(() => { } .top { - height: 47vh; + height: 50vh; background-color: white; } @@ -159,8 +162,8 @@ onMounted(() => { } .image-bell { - width: 13px; - height: 16px; + width: 26rpx; + height: 32rpx; } .msg { @@ -171,7 +174,7 @@ onMounted(() => { } .msg-left { - width: 33.6vw; + width: 252rpx; display: flex; justify-content: center; align-items: center; @@ -185,7 +188,7 @@ onMounted(() => { } .msg-center { - width: 51.7vw; + width: 388rpx; padding-left: 2.5vh; display: flex; flex-direction: column; @@ -204,11 +207,10 @@ onMounted(() => { .image-editName { width: 40rpx; height: 40rpx; - margin-left: 2vw; + margin-left: 15rpx; } .msg-right { - width: 14.7vw; display: flex; flex-direction: column; justify-content: center; @@ -232,6 +234,7 @@ onMounted(() => { justify-content: center; background-color: rgb(243, 243, 243); border-radius: 8%; + margin-bottom: 1vh; } .setting-icon { diff --git a/pages/setting/email.vue b/pages/setting/email.vue index 5f4f1c8..6f0c8d9 100644 --- a/pages/setting/email.vue +++ b/pages/setting/email.vue @@ -28,7 +28,7 @@ - + @@ -51,11 +51,16 @@ sendEmail, changeBind } from "@/api/setting/password" + import { + verifyCodeApi + } from "@/api/start/login" + const iSMT = ref(0) const email = ref('') const gettingCode = ref(false) const time = ref(60) const userEmail = ref('') + const verifyCode = ref('') const userInfoPromise = getUserInfo() userInfoPromise.then(res => { @@ -71,20 +76,54 @@ }) const changeAccount = () => { - const res = changeBind({ - verificateType: 0, - account: userEmail.value - }) - if(res.code === 200){ + if (!userEmail) { uni.showToast({ - title: '绑定成功', - icon: 'none', + title: '请输入邮箱', + icon: 'none' }) - }else { + return + } + + if (!verifyCode) { uni.showToast({ - title: '用户绑定失败', + title: '请输入验证码', + icon: 'none' + }) + return + } + + const res1 = verifyCodeApi({ + loginType: 'EMAIL', + account: userEmail.value, + verifyCode: verifyCode.value + }) + + if (res1.code === 200) { + const res2 = changeBind({ + verificateType: 0, + account: userEmail.value + }) + if (res2.code === 200) { + uni.showToast({ + title: '绑定成功', + icon: 'none', + }) + uni.navigateTo({ + url: '/pages/home/member' + }) + } else { + uni.showToast({ + title: '用户绑定失败', + icon: 'none', + }) + } + } else { + uni.showToast({ + title: '验证失败,请检查验证码', icon: 'none', }) + + return } } @@ -182,9 +221,9 @@ align-items: center; justify-content: center; } - - .image{ - width:40rpx; - height:40rpx; + + .image { + width: 40rpx; + height: 40rpx; } \ No newline at end of file From a942eef02e0b83ce427ca0f7c2776d6939c4e5ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Thu, 30 Oct 2025 11:47:01 +0800 Subject: [PATCH 11/20] =?UTF-8?q?=E8=82=A1=E7=A5=A8=E4=BB=B7=E6=A0=BC?= =?UTF-8?q?=E5=92=8C=E6=B6=A8=E8=B7=8C=E5=B9=85=E6=B0=B4=E5=B9=B3=E5=88=86?= =?UTF-8?q?=E5=B8=83=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/customStockList/customStockList.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/customStockList/customStockList.vue b/pages/customStockList/customStockList.vue index 348f18e..ad96b5f 100644 --- a/pages/customStockList/customStockList.vue +++ b/pages/customStockList/customStockList.vue @@ -74,7 +74,7 @@ {{ stock.price || '--' }} - {{ stock.change >= 0 ? '+' : '' }}{{ stock.change || '--' }} + {{ stock.change >= 0 ? '+' : '-' }}{{ stock.change || '--' }} @@ -448,15 +448,15 @@ .stock-price { display: flex; - flex-direction: column; - align-items: flex-end; + flex-direction: row; + align-items: center; + gap: 8px; } .price { font-size: 16px; font-weight: 500; color: #333333; - margin-bottom: 4px; } .change { From d8f3f8e2f006737c7d57e4912d0a31101d1ef938 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Thu, 30 Oct 2025 13:07:06 +0800 Subject: [PATCH 12/20] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=81=87=E7=9A=84?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=E8=82=A1=E7=A5=A8=E7=9A=84=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=9B=E5=A2=9E=E5=8A=A0=E9=80=89=E4=B8=AD=E8=82=A1=E7=A5=A8?= =?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91=EF=BC=9B=E6=96=B0=E5=A2=9E=E5=BA=95?= =?UTF-8?q?=E9=83=A8=E6=93=8D=E4=BD=9C=E6=A1=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/home/mySelections.js | 34 ++- pages/customStockList/customStockList.vue | 433 +++++++++++++++++++++++++++++- 2 files changed, 461 insertions(+), 6 deletions(-) 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 }} + + + + 新建分组 + + + + + + + +