diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 728c4a6..1c75694 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -4,7 +4,7 @@ { "customPlaygroundType" : "local", "packageName" : "io.dcloud.HBuilder", - "playground" : "custom", + "playground" : "standard", "type" : "uni-app:app-android" } ] diff --git a/api/home/mySelections.js b/api/home/mySelections.js index 6801ebc..3b7cbb7 100644 --- a/api/home/mySelections.js +++ b/api/home/mySelections.js @@ -170,6 +170,192 @@ 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 + } + } + + /** + * 更新自选股分组(假接口) + * @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类 @@ -181,5 +367,11 @@ export const { getUserStockGroupList, getUserStockList, getUserOrDefault, - getDefaultStocks + getDefaultStocks, + addUserStockGroup, + updateUserStockGroupName, + deleteUserStockGroup, + deleteUserStock, + addUserStock, + updateUserStockGroup } = MySelectionsAPI \ No newline at end of file diff --git a/api/tcpConnection.js b/api/tcpConnection.js index f01f915..10f6700 100644 --- a/api/tcpConnection.js +++ b/api/tcpConnection.js @@ -11,8 +11,8 @@ const TCPSocket = uni.requireNativePlugin('Aimer-TCPPlugin'); // TCP连接配置 const TCP_CONFIG = { - ip: "192.168.1.9", - port: "8080", + ip: "39.102.136.61", + port: "8088", channel: "1", // 可选 1~20 charsetname: "UTF-8", // 默认UTF-8,可选GBK }; 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 33cb034..5d02923 100644 --- a/pages/customStockList/customStockList.vue +++ b/pages/customStockList/customStockList.vue @@ -7,7 +7,7 @@ - + @@ -32,34 +32,469 @@ + + + + + + {{ group.name }} + + + + + + + + 加载中... + + + + 暂无数据~ + + + + + + + + + + + + {{ stock.name || stock.code }} + {{ stock.code }} + + + {{ stock.price || '--' }} + + {{ stock.change >= 0 ? '+' : '-' }}{{ stock.change || '--' }} + + + + + + + + + + + 已选择 {{ selectedStockIds.length }} 只股票 + + {{ isAllSelected ? '取消全选' : '全选' }} + + + + + + + + + + + + 编辑分组 + + + + + + {{ group.name }} + + + + 新建分组 + + + + + + + @@ -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/about.vue b/pages/setting/about.vue index d8146b1..059f971 100644 --- a/pages/setting/about.vue +++ b/pages/setting/about.vue @@ -4,7 +4,7 @@ - + @@ -83,4 +83,8 @@ .label{ flex:1; } + .img{ + width:360rpx; + height:300rpx; + } \ No newline at end of file diff --git a/pages/setting/email.vue b/pages/setting/email.vue index cc39b5b..6f0c8d9 100644 --- a/pages/setting/email.vue +++ b/pages/setting/email.vue @@ -7,14 +7,14 @@ - + 已绑邮箱:{{ email }} - + @@ -27,8 +27,8 @@ - - + + @@ -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' + }) + return + } + + if (!verifyCode) { + uni.showToast({ + 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 }) - }else { + 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: '用户绑定失败', + title: '验证失败,请检查验证码', icon: 'none', }) + + return } } @@ -182,4 +221,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..584d88c 100644 --- a/pages/setting/introduce.vue +++ b/pages/setting/introduce.vue @@ -4,7 +4,7 @@ - + @@ -21,10 +21,10 @@ 从“人找信息”到“AI智能体替你思考和管理”。 4.功能定位——全景AI决策体系 - 黄其振是大笨蛋 + @@ -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 diff --git a/pages/start/Registration/Registration.vue b/pages/start/Registration/Registration.vue index 19285a8..b4d205a 100644 --- a/pages/start/Registration/Registration.vue +++ b/pages/start/Registration/Registration.vue @@ -253,9 +253,9 @@ function goToIndex() { } function goToService() { - // 返回上一页 + // 返回上一页 uni.navigateTo({ - url: "/pages/start/login/login", + url: "/pages/customerServicePlatform/csPlatformIndex", }); } diff --git a/pages/start/login/login.vue b/pages/start/login/login.vue index a395741..5cd0fc6 100644 --- a/pages/start/login/login.vue +++ b/pages/start/login/login.vue @@ -324,7 +324,7 @@ function goToIndex() { function goToService() { // 返回上一页 uni.navigateTo({ - url: "/pages/home/home", + url: "/pages/customerServicePlatform/csPlatformIndex", }); } diff --git a/pages/start/recoverPassword/recoverPassword.vue b/pages/start/recoverPassword/recoverPassword.vue index c585376..9644a18 100644 --- a/pages/start/recoverPassword/recoverPassword.vue +++ b/pages/start/recoverPassword/recoverPassword.vue @@ -298,7 +298,9 @@ function goToBack() { function goToService() { // 返回上一页 - uni.navigateBack(-1); + uni.navigateTo({ + url: "/pages/customerServicePlatform/csPlatformIndex", + }); } function switchEmail() {