Browse Source

Merge branch 'milestone-20251031-简版功能开发' of http://39.101.133.168:8807/qimaohong/deepChartVueApp into hongxilin/feature-20251023103318-行情数据及页面

lihuilin/feature-20251024095243-我的
hongxilin 3 weeks ago
parent
commit
32179e19aa
  1. 2
      .hbuilderx/launch.json
  2. 194
      api/home/mySelections.js
  3. 4
      api/tcpConnection.js
  4. 50
      components/deepExploration_header.vue
  5. 22
      manifest.json
  6. 776
      pages/customStockList/customStockList.vue
  7. 1
      pages/customerServicePlatform/csPlatformIndex.vue
  8. 198
      pages/deepExploration/MainForceActions.vue
  9. 107
      pages/deepMate/deepMate.vue
  10. 40
      pages/home/home.vue
  11. 23
      pages/home/member.vue
  12. 6
      pages/setting/about.vue
  13. 70
      pages/setting/email.vue
  14. 11
      pages/setting/introduce.vue
  15. 17
      pages/setting/market.vue
  16. 25
      pages/setting/nextPwd.vue
  17. 12
      pages/setting/phone.vue
  18. 4
      pages/start/Registration/Registration.vue
  19. 2
      pages/start/login/login.vue
  20. 4
      pages/start/recoverPassword/recoverPassword.vue

2
.hbuilderx/launch.json

@ -4,7 +4,7 @@
{ {
"customPlaygroundType" : "local", "customPlaygroundType" : "local",
"packageName" : "io.dcloud.HBuilder", "packageName" : "io.dcloud.HBuilder",
"playground" : "custom",
"playground" : "standard",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
} }
] ]

194
api/home/mySelections.js

@ -170,6 +170,192 @@ class MySelectionsAPI {
throw error 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类 // 导出API类
@ -181,5 +367,11 @@ export const {
getUserStockGroupList, getUserStockGroupList,
getUserStockList, getUserStockList,
getUserOrDefault, getUserOrDefault,
getDefaultStocks
getDefaultStocks,
addUserStockGroup,
updateUserStockGroupName,
deleteUserStockGroup,
deleteUserStock,
addUserStock,
updateUserStockGroup
} = MySelectionsAPI } = MySelectionsAPI

4
api/tcpConnection.js

@ -11,8 +11,8 @@ const TCPSocket = uni.requireNativePlugin('Aimer-TCPPlugin');
// TCP连接配置 // TCP连接配置
const TCP_CONFIG = { const TCP_CONFIG = {
ip: "192.168.1.9",
port: "8080",
ip: "39.102.136.61",
port: "8088",
channel: "1", // 可选 1~20 channel: "1", // 可选 1~20
charsetname: "UTF-8", // 默认UTF-8,可选GBK charsetname: "UTF-8", // 默认UTF-8,可选GBK
}; };

50
components/deepExploration_header.vue

@ -66,8 +66,11 @@
> >
<view class="history-left"> <view class="history-left">
<view class="flag-circle" <view class="flag-circle"
><text class="flag-emoji">🇺🇸</text></view
>
><image
class="icon-stock"
:src="stockImage(item.stockMarket)"
mode="scaleToFill"
/></view>
</view> </view>
<view class="history-main" @click="itemClick(item)"> <view class="history-main" @click="itemClick(item)">
<text class="history-query">{{ item.stockName }}</text> <text class="history-query">{{ item.stockName }}</text>
@ -159,6 +162,29 @@ const onDrawerBackClick = () => {
}, 180); }, 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) { async function itemClick(item) {
const res = await RecordInfoApi({ const res = await RecordInfoApi({
@ -167,19 +193,17 @@ async function itemClick(item) {
model: 5, model: 5,
}); });
if (res.code == 200) { if (res.code == 200) {
const message = res.data; const message = res.data;
const deepExplorationStore = useDeepExplorationStore(); const deepExplorationStore = useDeepExplorationStore();
deepExplorationStore.setDeepExplorationInfo(message); deepExplorationStore.setDeepExplorationInfo(message);
console.log('点击了历史数据',deepExplorationStore.deepExplorationInfo);
console.log("点击了历史数据", deepExplorationStore.deepExplorationInfo);
onDrawerBackClick(); onDrawerBackClick();
setTimeout(() => {
uni.navigateTo({
url: '/pages/deepExploration/MainForceActions'
});
}, 200);
setTimeout(() => {
uni.navigateTo({
url: "/pages/deepExploration/MainForceActions",
});
}, 200);
} }
} }
const historyList = ref([]); const historyList = ref([]);
@ -464,6 +488,12 @@ onMounted(() => {});
height: 50rpx; height: 50rpx;
} }
.icon-stock {
width: 36rpx;
height: 36rpx;
}
.flag-circle { .flag-circle {
width: 50rpx; width: 50rpx;
height: 50rpx; height: 50rpx;

22
manifest.json

@ -1,6 +1,6 @@
{ {
"name" : "DeepChartApp", "name" : "DeepChartApp",
"appid" : "__UNI__9C9AB28",
"appid" : "__UNI__410B53B",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
@ -54,26 +54,26 @@
"google" : { "google" : {
"clientid" : "135" "clientid" : "135"
} }
},
"share" : {
"weixin" : {
"appid" : "wx6143d111fc5c9ba3",
"UniversalLinks" : ""
}
} }
} }
}, },
// "share" : {
// "weixin" : {
// "appid" : "wx6143d111fc5c9ba3",
// "UniversalLinks" : ""
// }
// }
"nativePlugins" : { "nativePlugins" : {
"Aimer-TCPPlugin" : { "Aimer-TCPPlugin" : {
"__plugin_info__" : { "__plugin_info__" : {
"name" : "TCP-Socket原生插件(支持Android和IOS) - [试用版,仅用于自定义调试基座]",
"name" : "TCP-Socket原生插件(支持Android和IOS) ",
"description" : "Uniapp实现基于TCP的数据通信,支持单片机、智能家居等硬件交互,联系QQ: 462108858", "description" : "Uniapp实现基于TCP的数据通信,支持单片机、智能家居等硬件交互,联系QQ: 462108858",
"platforms" : "Android,iOS", "platforms" : "Android,iOS",
"url" : "https://ext.dcloud.net.cn/plugin?id=2029", "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, "isCloud" : true,
"bought" : 0,
"bought" : 1,
"pid" : "2029", "pid" : "2029",
"parameters" : {} "parameters" : {}
} }

776
pages/customStockList/customStockList.vue

@ -7,7 +7,7 @@
<view class="navbar-content"> <view class="navbar-content">
<view class="navbar-left"> <view class="navbar-left">
<view class="back-btn" @click="goBack"> <view class="back-btn" @click="goBack">
<text class="back-icon"></text>
<image class="back-icon" src="https://d31zlh4on95l9h.cloudfront.net/images/e5c501fd23303533622fadce8dedd6a0.png" mode="aspectFit"></image>
</view> </view>
</view> </view>
<view class="navbar-center"> <view class="navbar-center">
@ -32,34 +32,469 @@
<!-- 页面内容 --> <!-- 页面内容 -->
<view class="page-content"> <view class="page-content">
<!-- 分组标签 -->
<view class="group-tabs" v-if="stockGroups.length > 0">
<scroll-view class="tabs-scroll" scroll-x="true" show-scrollbar="false">
<view class="tabs-container">
<view
v-for="group in stockGroups"
:key="group.id"
:class="['tab-item', { 'active': currentGroupId === group.id }]"
@click="switchGroup(group.id)"
>
<text class="tab-text">{{ group.name }}</text>
</view>
</view>
</scroll-view>
</view>
<!-- 股票列表 -->
<view class="stock-list">
<view v-if="loading" class="loading-container">
<text class="loading-text">加载中...</text>
</view>
<view v-else-if="stockList.length === 0" class="empty-container">
<image
class="empty-image"
src="https://d31zlh4on95l9h.cloudfront.net/images/f5a9bd32c81bc7cca47252b51357c12f.png"
mode="aspectFit"
></image>
<text class="empty-text">暂无数据~</text>
</view>
<view v-else>
<view
v-for="stock in stockList"
:key="stock.id"
class="stock-item"
@click="handleStockClick(stock)"
>
<!-- 多选模式下显示复选框 -->
<view v-if="isMultiSelectMode" class="checkbox-container">
<view
:class="['checkbox', selectedStockIds.includes(stock.id) ? 'checked' : '']"
@click.stop="toggleStockSelection(stock.id)"
>
<text v-if="selectedStockIds.includes(stock.id)" class="checkbox-icon"></text>
</view>
</view>
<view class="stock-info">
<text class="stock-name">{{ stock.name || stock.code }}</text>
<text class="stock-code">{{ stock.code }}</text>
</view>
<view class="stock-price">
<text class="price">{{ stock.price || '--' }}</text>
<text :class="['change', stock.change >= 0 ? 'up' : 'down']">
{{ stock.change >= 0 ? '+' : '-' }}{{ stock.change || '--' }}
</text>
</view>
</view>
</view>
</view>
</view>
<!-- 多选模式下的底部操作栏 -->
<view v-if="isMultiSelectMode" class="bottom-toolbar">
<view class="toolbar-left">
<text class="selected-count">已选择 {{ selectedStockIds.length }} 只股票</text>
<text class="select-all-btn" @click="toggleSelectAll">
{{ isAllSelected ? '取消全选' : '全选' }}
</text>
</view>
<view class="toolbar-right">
<button
class="add-to-group-btn"
:disabled="selectedStockIds.length === 0"
@click="showGroupSelectModal = true"
>
添加至分组
</button>
</view>
</view>
<!-- 分组选择弹窗 -->
<view v-if="showGroupSelectModal" class="modal-overlay" @click="closeGroupSelectModal">
<view class="group-select-modal" @click.stop>
<view class="modal-header">
<text class="modal-title">编辑分组</text>
<text class="modal-close" @click="closeGroupSelectModal"></text>
</view>
<view class="modal-content">
<view class="group-grid">
<view
v-for="group in stockGroups"
:key="group.id"
:class="['group-item', group.id === currentGroupId ? 'current-group' : '']"
@click="selectTargetGroup(group)"
>
<text class="group-name">{{ group.name }}</text>
</view>
<view class="group-item new-group" @click="createNewGroupInModal">
<text class="new-group-text">+ 新建分组</text>
</view>
</view>
</view>
<view class="modal-footer">
<button class="confirm-btn" @click="confirmMoveToGroup">确认</button>
</view>
</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { getUserStockGroupList, addUserStockGroup, getUserStockList, updateUserStockGroup } from '@/api/home/mySelections.js'
export default { export default {
data() { data() {
return { return {
//
stockGroups: [],
// ID
currentGroupId: null,
//
stockList: [],
//
loading: false,
//
isMultiSelectMode: false,
// ID
selectedStockIds: [],
//
showGroupSelectModal: false,
//
selectedTargetGroup: null
}
},
computed: {
//
isAllSelected() {
return this.stockList.length > 0 && this.selectedStockIds.length === this.stockList.length
} }
}, },
onLoad() {
this.loadStockGroups()
},
methods: { methods: {
//
async loadStockGroups() {
this.loading = true
try {
getUserStockGroupList(
(response) => {
console.log('获取分组成功:', response)
if (response.code === 200 && response.data) {
// IDID
this.stockGroups = response.data.sort((a, b) => a.id - b.id)
//
if (this.stockGroups.length > 0) {
this.currentGroupId = this.stockGroups[0].id
this.loadStocksByGroup(this.currentGroupId)
} else {
//
this.createDefaultGroup()
}
}
},
(error) => {
console.error('获取分组失败:', error)
//
this.createDefaultGroup()
}
)
} catch (error) {
console.error('加载分组异常:', error)
} finally {
this.loading = false
}
},
//
createDefaultGroup() {
addUserStockGroup(
(response) => {
console.log('创建默认分组成功:', response)
//
this.loadStockGroups()
},
(error) => {
console.error('创建默认分组失败:', error)
},
{ name: '默认分组' }
)
},
// ID
loadStocksByGroup(groupId) {
if (!groupId) return
getUserStockList(
(response) => {
console.log('获取股票列表成功:', response)
if (response.code === 200 && response.data && response.data.records) {
// data.recordsgroupId
this.stockList = response.data.records.filter(stock => stock.groupId === groupId)
} else {
this.stockList = []
}
},
(error) => {
console.error('获取股票列表失败:', error)
this.stockList = []
},
{ groupId: groupId }
)
},
//
switchGroup(groupId) {
if (this.currentGroupId === groupId) return
this.currentGroupId = groupId
this.loadStocksByGroup(groupId)
},
//
async createNewGroup(groupName) {
if (!groupName) {
uni.showToast({
title: '分组名称不能为空',
icon: 'none'
})
return
}
uni.showLoading({
title: '创建中...'
})
console.log('开始请求创建分组接口')
try {
const response = await addUserStockGroup(null, null, {
name: groupName
})
console.log('创建分组接口返回:', response)
if (response.code === 200) {
uni.showToast({
title: '创建成功',
icon: 'success'
})
//
await this.loadStockGroups()
//
if (response.data && response.data.id) {
this.switchGroup(response.data.id)
}
} else {
uni.showToast({
title: response.message || '创建失败',
icon: 'none'
})
}
} catch (error) {
console.error('创建分组失败:', error)
uni.showToast({
title: '创建失败,请重试',
icon: 'none'
})
} finally {
//
uni.hideLoading()
}
},
// //
goBack() { goBack() {
uni.navigateBack() uni.navigateBack()
}, },
//
// -
onFirstButtonClick() { onFirstButtonClick() {
console.log('第一个按钮被点击')
//
uni.showModal({
title: '创建分组',
content: '请输入分组名称',
editable: true,
placeholderText: '请输入分组名称',
success: (res) => {
if (res.confirm && res.content) {
this.createNewGroup(res.content.trim())
}
}
})
}, },
//
// -
onSecondButtonClick() { onSecondButtonClick() {
console.log('第二个按钮被点击')
//
this.isMultiSelectMode = !this.isMultiSelectMode
// 退
if (!this.isMultiSelectMode) {
this.selectedStockIds = []
}
console.log('多选模式:', this.isMultiSelectMode)
},
//
handleStockClick(stock) {
if (this.isMultiSelectMode) {
//
this.toggleStockSelection(stock.id)
} else {
//
console.log('点击股票:', stock)
}
},
//
toggleStockSelection(stockId) {
const index = this.selectedStockIds.indexOf(stockId)
if (index > -1) {
//
this.selectedStockIds.splice(index, 1)
} else {
//
this.selectedStockIds.push(stockId)
}
},
// /
toggleSelectAll() {
if (this.isAllSelected) {
//
this.selectedStockIds = []
} else {
//
this.selectedStockIds = this.stockList.map(stock => stock.id)
}
},
//
closeGroupSelectModal() {
this.showGroupSelectModal = false
this.selectedTargetGroup = null
},
//
selectTargetGroup(group) {
this.selectedTargetGroup = group
},
//
createNewGroupInModal() {
uni.showModal({
title: '创建分组',
content: '请输入分组名称',
editable: true,
placeholderText: '请输入分组名称',
success: (res) => {
if (res.confirm && res.content) {
this.createNewGroupAndSelect(res.content.trim())
}
}
})
},
//
async createNewGroupAndSelect(groupName) {
try {
uni.showLoading({
title: '创建中...'
})
const response = await addUserStockGroup(null, null, {
name: groupName
})
if (response.code === 200) {
uni.showToast({
title: '创建成功',
icon: 'success'
})
//
await this.loadStockGroups()
//
if (response.data && response.data.id) {
this.selectedTargetGroup = this.stockGroups.find(g => g.id === response.data.id)
}
} else {
uni.showToast({
title: response.message || '创建失败',
icon: 'none'
})
}
} catch (error) {
console.error('创建分组失败:', error)
uni.showToast({
title: '创建失败,请重试',
icon: 'none'
})
} finally {
uni.hideLoading()
}
},
//
confirmMoveToGroup() {
if (!this.selectedTargetGroup) {
uni.showToast({
title: '请选择目标分组',
icon: 'none'
})
return
}
if (this.selectedStockIds.length === 0) {
uni.showToast({
title: '请选择要移动的股票',
icon: 'none'
})
return
}
// API
this.moveStocksToGroup(this.selectedTargetGroup.id)
},
//
async moveStocksToGroup(targetGroupId) {
try {
uni.showLoading({
title: '移动中...'
})
// APIID
const promises = this.selectedStockIds.map(stockId => {
return updateUserStockGroup(null, null, {
stockId: stockId,
groupId: targetGroupId
})
})
await Promise.all(promises)
uni.showToast({
title: '移动成功',
icon: 'success'
})
//
this.closeGroupSelectModal()
// 退
this.isMultiSelectMode = false
this.selectedStockIds = []
//
this.loadStockList()
} catch (error) {
console.error('移动股票失败:', error)
uni.showToast({
title: '移动失败,请重试',
icon: 'none'
})
} finally {
uni.hideLoading()
}
} }
} }
} }
@ -109,9 +544,8 @@
} }
.back-icon { .back-icon {
font-size: 24px;
color: #333333;
font-weight: bold;
width: 24px;
height: 24px;
} }
.navbar-center { .navbar-center {
@ -141,7 +575,323 @@
/* 页面内容 */ /* 页面内容 */
.page-content { .page-content {
padding-top: calc(44px + var(--status-bar-height, 20px) + 1px);
min-height: calc(100vh - 44px - var(--status-bar-height, 20px) - 1px);
padding-top: calc(44px + var(--status-bar-height, 20px) + 20px);
min-height: calc(100vh - 44px - var(--status-bar-height, 20px) - 20px);
}
/* 分组标签样式 */
.group-tabs {
background-color: #ffffff;
padding: 10px 0;
}
.tabs-scroll {
width: 100%;
}
.tabs-container {
display: flex;
padding: 0 15px;
white-space: nowrap;
}
.tab-item {
flex-shrink: 0;
padding: 8px 16px;
margin-right: 10px;
border-radius: 4px;
background-color: #ff3b30;
transition: all 0.3s ease;
}
.tab-item.active {
background-color: #ff3b30;
opacity: 1;
}
.tab-text {
font-size: 14px;
color: #ffffff;
white-space: nowrap;
font-weight: 500;
}
.tab-item.active .tab-text {
color: #ffffff;
font-weight: 500;
}
/* 股票列表样式 */
.stock-list {
flex: 1;
padding: 15px;
}
.loading-container,
.empty-container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 60px 20px;
}
.loading-text {
font-size: 16px;
color: #666666;
}
.empty-image {
width: 120px;
height: 120px;
margin-bottom: 20px;
}
.empty-text {
font-size: 16px;
color: #999999;
}
.stock-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 15px 0;
border-bottom: 1px solid #f0f0f0;
background-color: #ffffff;
margin-bottom: 8px;
border-radius: 8px;
padding: 15px;
}
.stock-item:last-child {
margin-bottom: 0;
}
.stock-info {
flex: 1;
display: flex;
flex-direction: column;
}
.stock-name {
font-size: 16px;
font-weight: 500;
color: #333333;
margin-bottom: 4px;
}
.stock-code {
font-size: 12px;
color: #999999;
}
.stock-price {
display: flex;
flex-direction: row;
align-items: center;
gap: 8px;
}
.price {
font-size: 16px;
font-weight: 500;
color: #333333;
}
.change {
font-size: 12px;
font-weight: 500;
}
.change.up {
color: #ff3b30;
}
.change.down {
color: #34c759;
}
/* 复选框样式 */
.checkbox-container {
margin-right: 12px;
}
.checkbox {
width: 20px;
height: 20px;
border: 2px solid #ddd;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
background-color: #fff;
}
.checkbox.checked {
background-color: #ff3b30;
border-color: #ff3b30;
}
.checkbox-icon {
color: #fff;
font-size: 12px;
font-weight: bold;
}
/* 底部操作栏样式 */
.bottom-toolbar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: #fff;
border-top: 1px solid #f0f0f0;
padding: 12px 16px;
display: flex;
align-items: center;
justify-content: space-between;
z-index: 1000;
}
.toolbar-left {
display: flex;
align-items: center;
gap: 16px;
}
.selected-count {
font-size: 14px;
color: #333;
}
.select-all-btn {
font-size: 14px;
color: #ff3b30;
padding: 4px 8px;
}
.toolbar-right {
display: flex;
align-items: center;
}
.add-to-group-btn {
background-color: #ff3b30;
color: #fff;
border: none;
border-radius: 6px;
padding: 8px 16px;
font-size: 14px;
}
.add-to-group-btn:disabled {
background-color: #ccc;
color: #999;
}
/* 弹窗样式 */
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: flex-end;
z-index: 1000;
}
.group-select-modal {
background-color: white;
border-radius: 20rpx 20rpx 0 0;
width: 100%;
max-height: 80vh;
overflow: hidden;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 30rpx 40rpx;
border-bottom: 1px solid #f0f0f0;
}
.modal-title {
font-size: 36rpx;
font-weight: bold;
color: #333333;
}
.modal-close {
font-size: 40rpx;
color: #999999;
padding: 10rpx;
}
.modal-content {
padding: 40rpx;
max-height: 60vh;
overflow-y: auto;
}
.group-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 20rpx;
}
.group-item {
background-color: #f8f8f8;
border-radius: 16rpx;
padding: 30rpx 20rpx;
text-align: center;
border: 2rpx solid transparent;
transition: all 0.3s ease;
}
.group-item.current-group {
background-color: #fff2f0;
border-color: #ff4d4f;
}
.group-item:active {
background-color: #e6f7ff;
border-color: #1890ff;
}
.group-name {
font-size: 28rpx;
color: #333333;
font-weight: 500;
}
.group-item.new-group {
background-color: #fff;
border: 2rpx dashed #d9d9d9;
}
.new-group-text {
font-size: 28rpx;
color: #ff4d4f;
font-weight: 500;
}
.modal-footer {
padding: 30rpx 40rpx;
border-top: 1px solid #f0f0f0;
}
.confirm-btn {
width: 100%;
height: 88rpx;
background-color: #ff4d4f;
color: white;
border: none;
border-radius: 44rpx;
font-size: 32rpx;
font-weight: 500;
} }
</style> </style>

1
pages/customerServicePlatform/csPlatformIndex.vue

@ -1,4 +1,5 @@
<template> <template>
<LoginPrompt ref="loginPrompt"></LoginPrompt>
<view class="main"> <view class="main">
<view class="top" :style="{height:iSMT+'px'}"></view> <view class="top" :style="{height:iSMT+'px'}"></view>

198
pages/deepExploration/MainForceActions.vue

@ -93,11 +93,19 @@
import { import {
getUserInfo getUserInfo
} from "@/api/member" } from "@/api/member"
import {
useUserStore
} from '@/stores/modules/userInfo.js'
const deepExplorationStore = useDeepExplorationStore() const deepExplorationStore = useDeepExplorationStore()
const userInfo = getUserInfo()
//
const historyData = ref({}) const historyData = ref({})
//ref
const loginPrompt = ref(null)
// //
const type = ref('deepExploration') const type = ref('deepExploration')
const iSMT = ref(0) const iSMT = ref(0)
@ -182,6 +190,13 @@
// //
const handleModels = async () => { const handleModels = async () => {
try { try {
if (userInfo.isVisitor) {
console.log('是游客');
loginPrompt.value.show()
return
}
console.log('搜了吗');
// markdownContent.value = '\n## 📊 \n\n### 🕵 \n\t1. 📊 360.249 412.577 444.330\n\t2. 🔍 \n\t3. 📈 \n\n### 📊 :\n\t- 📉 : <font color=\"#13c2c2\">443.092</font> \n - 📈 : <font color=\"#ff4d4f\">466.458</font>\n\t- 📉 : <font color=\"#13c2c2\">447.354</font>\n\t- 📈 : <font color=\"#ff4d4f\">462.514</font>\n\t<font color=\"#722ed1\">AI线</font>\n\n### \n\t\t\t<font color=\"#fa8c16\">K线</font>\n\t\t\t<font color=\"#eb2f96\"></font>\n\n---\n<font color=\"#8c8c8c\">*AI*</font>\n ' // markdownContent.value = '\n## 📊 \n\n### 🕵 \n\t1. 📊 360.249 412.577 444.330\n\t2. 🔍 \n\t3. 📈 \n\n### 📊 :\n\t- 📉 : <font color=\"#13c2c2\">443.092</font> \n - 📈 : <font color=\"#ff4d4f\">466.458</font>\n\t- 📉 : <font color=\"#13c2c2\">447.354</font>\n\t- 📈 : <font color=\"#ff4d4f\">462.514</font>\n\t<font color=\"#722ed1\">AI线</font>\n\n### \n\t\t\t<font color=\"#fa8c16\">K线</font>\n\t\t\t<font color=\"#eb2f96\"></font>\n\n---\n<font color=\"#8c8c8c\">*AI*</font>\n '
// htmlContent.value = marked.parse(markdownContent.value); // htmlContent.value = marked.parse(markdownContent.value);
loading.value = true; loading.value = true;
@ -190,94 +205,85 @@
handleDefault() handleDefault()
} else { } else {
if (currentIndex.value == 0) { if (currentIndex.value == 0) {
console.log('搜索', searchName.value);
const result = await getModel1First({
content: searchName.value,
language: "cn",
marketList: "hk,cn,usa,my,sg,vi,in,gb",
model: currentIndex.value + 1
})
console.log('result', result);
if (result.code == 200) {
stockCode.value = result.data.code
// stockName.value = result.data.name
recordId.value = result.data.recordId
parentId.value = result.data.parentId
stockId.value = result.data.stockId
language.value = result.data.language
market.value = result.data.market
const res = await getModel1Second({
language: language.value,
recordId: recordId.value,
parentId: parentId.value,
stockId: stockId.value,
token: 'pCtw6AYK0EHAaIexoFHsbZjtsfEAIhcmwkCFm6uKko8VPfMvyDiODL9v9c0veic9fIpQbvT8zN4sH/Si6Q'
console.log('搜索', searchName.value);
const result = await getModel1First({
content: searchName.value,
language: "cn",
marketList: "hk,cn,usa,my,sg,vi,in,gb",
model: currentIndex.value + 1
}) })
if (res.code == 200) {
const rawMarkdown = res.data.markdown;
const adaptedMarkdown = rawMarkdown.replace(/^### /gm, ''); // ###
markdownContent.value = adaptedMarkdown;
// markdownContent.value = res.data.markdown
console.log('result', result);
if (result.code == 200) {
stockCode.value = result.data.code
// stockName.value = result.data.name
recordId.value = result.data.recordId
parentId.value = result.data.parentId
stockId.value = result.data.stockId
language.value = result.data.language
market.value = result.data.market
const res = await getModel1Second({
language: language.value,
recordId: recordId.value,
parentId: parentId.value,
stockId: stockId.value,
token: 'pCtw6AYK0EHAaIexoFHsbZjtsfEAIhcmwkCFm6uKko8VPfMvyDiODL9v9c0veic9fIpQbvT8zN4sH/Si6Q'
})
if (res.code == 200) {
const rawMarkdown = res.data.markdown;
const adaptedMarkdown = rawMarkdown.replace(/^### /gm, ''); // ###
markdownContent.value = adaptedMarkdown;
// markdownContent.value = res.data.markdown
htmlContent.value = marked.parse(markdownContent.value);
await getServerData()
}
console.log('res', res);
} else if (result.code == 400) {
markdownContent.value = result.message;
htmlContent.value = marked.parse(markdownContent.value); htmlContent.value = marked.parse(markdownContent.value);
} else {
return
} }
console.log('res', res);
await getServerData()
} else if (result.code == 400) {
markdownContent.value = result.message;
htmlContent.value = marked.parse(markdownContent.value);
} else {
return
}
} else if (currentIndex.value == 1) { } else if (currentIndex.value == 1) {
console.log('搜索', searchName.value);
const result = await getModel2First({
content: searchName.value,
language: "cn",
marketList: "hk,cn,usa,my,sg,vi,in,gb",
model: currentIndex.value + 1
})
console.log('result', result);
if (result.code == 200) {
stockCode.value = result.data.code
// stockName.value = result.data.name
recordId.value = result.data.recordId
parentId.value = result.data.parentId
stockId.value = result.data.stockId
language.value = result.data.language
market.value = result.data.market
const res = await getModel2Second({
language: language.value,
recordId: recordId.value,
parentId: parentId.value,
stockId: stockId.value,
token: 'pCtw6AYK0EHAaIexoFHsbZjtsfEAIhcmwkCFm6uKko8VPfMvyDiODL9v9c0veic9fIpQbvT8zN4sH/Si6Q'
console.log('搜索', searchName.value);
const result = await getModel2First({
content: searchName.value,
language: "cn",
marketList: "hk,cn,usa,my,sg,vi,in,gb",
model: currentIndex.value + 1
}) })
if (res.code == 200) {
const rawMarkdown = res.data.markdown;
const adaptedMarkdown = rawMarkdown.replace(/^### /gm, ''); // ###
markdownContent.value = adaptedMarkdown;
// markdownContent.value = res.data.markdown
console.log('result', result);
if (result.code == 200) {
stockCode.value = result.data.code
recordId.value = result.data.recordId
parentId.value = result.data.parentId
stockId.value = result.data.stockId
language.value = result.data.language
market.value = result.data.market
const res = await getModel2Second({
language: language.value,
recordId: recordId.value,
parentId: parentId.value,
stockId: stockId.value,
token: 'pCtw6AYK0EHAaIexoFHsbZjtsfEAIhcmwkCFm6uKko8VPfMvyDiODL9v9c0veic9fIpQbvT8zN4sH/Si6Q'
})
if (res.code == 200) {
const rawMarkdown = res.data.markdown;
const adaptedMarkdown = rawMarkdown.replace(/^### /gm, ''); // ###
markdownContent.value = adaptedMarkdown;
// markdownContent.value = res.data.markdown
htmlContent.value = marked.parse(markdownContent.value);
await getServerData()
}
console.log('res', res);
} else if (result.code == 400) {
markdownContent.value = result.message;
htmlContent.value = marked.parse(markdownContent.value); htmlContent.value = marked.parse(markdownContent.value);
} else {
return
} }
console.log('res', res);
await getServerData()
} else if (result.code == 400) {
markdownContent.value = result.message;
htmlContent.value = marked.parse(markdownContent.value);
} else {
return
}
}else if(currentIndex.value == 2){
} else if (currentIndex.value == 2) {
console.log('搜索', searchName.value); console.log('搜索', searchName.value);
const result = await getModel3First({ const result = await getModel3First({
content: searchName.value, content: searchName.value,
@ -294,8 +300,8 @@
stockId.value = result.data.stockId stockId.value = result.data.stockId
language.value = result.data.language language.value = result.data.language
market.value = result.data.market market.value = result.data.market
const res = await getModel3Second({ const res = await getModel3Second({
language: language.value, language: language.value,
recordId: recordId.value, recordId: recordId.value,
@ -309,19 +315,16 @@
markdownContent.value = adaptedMarkdown; markdownContent.value = adaptedMarkdown;
// markdownContent.value = res.data.markdown // markdownContent.value = res.data.markdown
htmlContent.value = marked.parse(markdownContent.value); htmlContent.value = marked.parse(markdownContent.value);
await getServerData()
} }
console.log('res', res); console.log('res', res);
await getServerData()
} else if (result.code == 400) { } else if (result.code == 400) {
markdownContent.value = result.message; markdownContent.value = result.message;
htmlContent.value = marked.parse(markdownContent.value); htmlContent.value = marked.parse(markdownContent.value);
} else { } else {
return return
} }
}else if(currentIndex.value == 3){
} else if (currentIndex.value == 3) {
console.log('搜索', searchName.value); console.log('搜索', searchName.value);
const result = await getModel4First({ const result = await getModel4First({
content: searchName.value, content: searchName.value,
@ -338,8 +341,6 @@
stockId.value = result.data.stockId stockId.value = result.data.stockId
language.value = result.data.language language.value = result.data.language
market.value = result.data.market market.value = result.data.market
const res = await getModel4Second({ const res = await getModel4Second({
language: language.value, language: language.value,
recordId: recordId.value, recordId: recordId.value,
@ -353,27 +354,19 @@
markdownContent.value = adaptedMarkdown; markdownContent.value = adaptedMarkdown;
// markdownContent.value = res.data.markdown // markdownContent.value = res.data.markdown
htmlContent.value = marked.parse(markdownContent.value); htmlContent.value = marked.parse(markdownContent.value);
await getServerData()
} }
console.log('res', res); console.log('res', res);
await getServerData()
} else if (result.code == 400) { } else if (result.code == 400) {
markdownContent.value = result.message; markdownContent.value = result.message;
htmlContent.value = marked.parse(markdownContent.value); htmlContent.value = marked.parse(markdownContent.value);
} else { } else {
return return
} }
}else{
} else {
return return
} }
} }
} catch (e) { } catch (e) {
error.value = e.message || '加载失败,请重试'; error.value = e.message || '加载失败,请重试';
} finally { } finally {
@ -406,7 +399,7 @@
const getServerData = async () => { const getServerData = async () => {
const result = await getData({ const result = await getData({
market: market.value || '', market: market.value || '',
code: searchName.value || '',
code: stockCode.value || '',
language: "cn", language: "cn",
brainPrivilegeState: 1, brainPrivilegeState: 1,
marketList: "usa.sg.my.hk.cn.can.vi.th.in.gb" marketList: "usa.sg.my.hk.cn.can.vi.th.in.gb"
@ -732,13 +725,14 @@
} }
.right { .right {
margin-left: 60rpx;
margin-left: 50rpx;
color: #6a6a6a; color: #6a6a6a;
font-family: "PingFang SC"; font-family: "PingFang SC";
font-size: 13px; font-size: 13px;
font-style: normal; font-style: normal;
font-weight: 400; font-weight: 400;
line-height: 15px; line-height: 15px;
white-space: nowrap;
} }
} }

107
pages/deepMate/deepMate.vue

@ -129,13 +129,24 @@
" "
> >
<!-- 会话图标 --> <!-- 会话图标 -->
<text
<!-- <text
:class=" :class="
message.isUser message.isUser
? 'fa-solid fa-user message-icon' ? 'fa-solid fa-user message-icon'
: 'fa-solid fa-robot message-icon' : 'fa-solid fa-robot message-icon'
" "
></text>
></text> -->
<image
v-if="message.isUser"
class="message-icon"
:src="userAvatar"
mode="scaleToFill"
/><image
v-else
class="message-icon"
src="/static/icons/robot.svg"
mode="scaleToFill"
/>
<!-- 会话内容 --> <!-- 会话内容 -->
<view class="message-content"> <view class="message-content">
<!-- <text class="message-text">{{ message.content }}</text> --> <!-- <text class="message-text">{{ message.content }}</text> -->
@ -265,8 +276,11 @@
> >
<view class="history-left"> <view class="history-left">
<view class="flag-circle" <view class="flag-circle"
><text class="flag-emoji">🇺🇸</text></view
>
><image
class="icon-stock"
:src="stockImage(item.stockMarket)"
mode="scaleToFill"
/></view>
</view> </view>
<view class="history-main" @click="itemClick(item)"> <view class="history-main" @click="itemClick(item)">
<text class="history-query">{{ item.stockName }}</text> <text class="history-query">{{ item.stockName }}</text>
@ -299,6 +313,8 @@ import {
postHistoryDetail, postHistoryDetail,
} from "../../api/deepMate/deepMate"; } from "../../api/deepMate/deepMate";
import { useUserStore } from "../../stores/modules/userInfo";
const renderer = new marked.Renderer(); const renderer = new marked.Renderer();
renderer.heading = function (text, level) { renderer.heading = function (text, level) {
return `<p>${text}</p>`; return `<p>${text}</p>`;
@ -335,41 +351,18 @@ const drawerOffsetY = ref(0);
const searchHistory = ref([]); const searchHistory = ref([]);
const historyList = ref([]); const historyList = ref([]);
const hotTopics = ref([
{
id: 1,
text: "英伟达(NVDA)股票情绪温度?",
icon: "https://d31zlh4on95l9h.cloudfront.net/images/7ed58be0f4b81aeb398d9ba2534a624b.svg",
},
{
id: 2,
text: "博通(AVGO)明天还能涨吗?",
icon: "https://d31zlh4on95l9h.cloudfront.net/images/7ed58be0f4b81aeb398d9ba2534a624b.svg",
},
{
id: 3,
text: "为什么Fluence Energy(FLNC)会暴涨?",
icon: "https://d31zlh4on95l9h.cloudfront.net/images/7ed58be0f4b81aeb398d9ba2534a624b.svg",
},
{
id: 4,
text: "为什么Fluence Energy(FLNC)会暴涨?",
icon: "https://d31zlh4on95l9h.cloudfront.net/images/7ed58be0f4b81aeb398d9ba2534a624b.svg",
},
]);
// //
onLoad((options) => { onLoad((options) => {
console.log('deepMate页面接收到参数:', options);
console.log("deepMate页面接收到参数:", options);
// query // query
if (options.query) { if (options.query) {
const decodedQuery = decodeURIComponent(options.query); const decodedQuery = decodeURIComponent(options.query);
console.log('解码后的查询内容:', decodedQuery);
console.log("解码后的查询内容:", decodedQuery);
// //
inputMessage.value = decodedQuery; inputMessage.value = decodedQuery;
// //
setTimeout(() => { setTimeout(() => {
sendMessage(); sendMessage();
@ -526,6 +519,12 @@ const formatTimeForHistory = (timeString) => {
return timeString; return timeString;
}; };
const userStore = useUserStore();
//
const userAvatar = computed(() => {
return userStore.userInfo.avatar;
});
// /// // ///
const groupedHistory = computed(() => { const groupedHistory = computed(() => {
const sections = []; const sections = [];
@ -656,9 +655,8 @@ const simulateBotResponse = async (userMessage) => {
"pCtw6AYK0EHAaIexoFHsbZjtsfEAIhcmwkCFm6uKko8VPfMvyDiODL9v9c0veic9fIpQbvT8zN4sH/Si6Q", "pCtw6AYK0EHAaIexoFHsbZjtsfEAIhcmwkCFm6uKko8VPfMvyDiODL9v9c0veic9fIpQbvT8zN4sH/Si6Q",
}); });
} catch (error) { } catch (error) {
} finally {
isSending.value = false; isSending.value = false;
} finally {
} }
console.log("res" + res); console.log("res" + res);
@ -768,7 +766,9 @@ const simulateBotResponse = async (userMessage) => {
messages.value[messages.value.length - 1].isSecond = true; messages.value[messages.value.length - 1].isSecond = true;
messages.value[messages.value.length - 1].isThinking = false;
setTimeout(() => {
messages.value[messages.value.length - 1].isThinking = false;
}, 500);
// //
nextTick(() => { nextTick(() => {
@ -949,6 +949,28 @@ const onBackTopClick = () => {
scrollToTop(); scrollToTop();
}; };
//
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) { async function itemClick(item) {
const res = await postHistoryDetail({ const res = await postHistoryDetail({
@ -1269,25 +1291,25 @@ async function itemClick(item) {
.message-icon { .message-icon {
font-size: 24rpx; font-size: 24rpx;
margin: 0 10rpx; margin: 0 10rpx;
padding: 10rpx;
/* padding: 10rpx; */
border-radius: 50%; border-radius: 50%;
background-color: #ddd; background-color: #ddd;
width: 40rpx;
height: 40rpx;
width: 60rpx;
height: 60rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.user-message .message-icon { .user-message .message-icon {
background-color: #007aff;
/* background-color: #007aff; */
border-radius: 50%; border-radius: 50%;
color: #fff; color: #fff;
/* box-shadow: 0 0 12rpx rgba(0, 122, 255, 0.4); */ /* box-shadow: 0 0 12rpx rgba(0, 122, 255, 0.4); */
} }
.bot-message .message-icon { .bot-message .message-icon {
background: url("/static/images/robot (1).svg");
/* background: url("/static/images/robot (1).svg"); */
color: white; color: white;
} }
@ -1643,6 +1665,11 @@ async function itemClick(item) {
margin-right: 12rpx; margin-right: 12rpx;
} }
.icon-stock {
width: 36rpx;
height: 36rpx;
}
.flag-circle { .flag-circle {
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;

40
pages/home/home.vue

@ -6,11 +6,11 @@
<LoginPrompt ref="loginPrompt"></LoginPrompt> <LoginPrompt ref="loginPrompt"></LoginPrompt>
<!-- 头部导航 --> <!-- 头部导航 -->
<view class="header"> <view class="header">
<view class="headphone-icon">
<view class="headphone-icon" @click="goToCustomerService">
<image src="https://d31zlh4on95l9h.cloudfront.net/images/bef2edba6cc0c85671fde07cfab5270d.png" class="header-icon-image"></image> <image src="https://d31zlh4on95l9h.cloudfront.net/images/bef2edba6cc0c85671fde07cfab5270d.png" class="header-icon-image"></image>
</view> </view>
<view class="title">DeepChart</view> <view class="title">DeepChart</view>
<view class="notification-icon">
<view class="notification-icon" @click="goToNotificationCenter">
<image src="https://d31zlh4on95l9h.cloudfront.net/images/2554c84b91712d2a6cb6b00380e63bac.png" class="header-icon-image"></image> <image src="https://d31zlh4on95l9h.cloudfront.net/images/2554c84b91712d2a6cb6b00380e63bac.png" class="header-icon-image"></image>
</view> </view>
</view> </view>
@ -396,7 +396,7 @@ export default {
if (this.tcpConnected) { if (this.tcpConnected) {
console.log('页面销毁,自动关闭主TCP连接') console.log('页面销毁,自动关闭主TCP连接')
tcpConnection.disconnect({ tcpConnection.disconnect({
ip: '192.168.1.9',
ip: '39.102.136.61',
port: '8080', port: '8080',
channel: '1', channel: '1',
charsetname: 'UTF-8' charsetname: 'UTF-8'
@ -408,8 +408,8 @@ export default {
if (this.myStocksTcpConnected) { if (this.myStocksTcpConnected) {
console.log('页面销毁,自动关闭我的自选TCP连接') console.log('页面销毁,自动关闭我的自选TCP连接')
tcpConnection.disconnect({ tcpConnection.disconnect({
ip: '192.168.1.9',
port: '8080',
ip: '39.102.136.61',
port: '8088',
channel: '2', channel: '2',
charsetname: 'UTF-8' charsetname: 'UTF-8'
}) })
@ -430,6 +430,20 @@ export default {
}, },
methods: { methods: {
//
goToCustomerService() {
uni.navigateTo({
url: '/pages/customerServicePlatform/csPlatformIndex'
})
},
//
goToNotificationCenter() {
uni.navigateTo({
url: '/pages/blank/notice'
})
},
// //
goToCustomStockList() { goToCustomStockList() {
uni.navigateTo({ uni.navigateTo({
@ -779,8 +793,8 @@ export default {
// console.log('TCP...') // console.log('TCP...')
tcpConnection.connect( tcpConnection.connect(
{ {
ip: '192.168.1.9',
port: '8080',
ip: '39.102.136.61',
port: '8088',
channel: '1', // 1~20 channel: '1', // 1~20
charsetname: 'UTF-8' // UTF-8GBK charsetname: 'UTF-8' // UTF-8GBK
} }
@ -792,8 +806,8 @@ export default {
// console.log('TCP...') // console.log('TCP...')
tcpConnection.disconnect( tcpConnection.disconnect(
{ {
ip: '192.168.1.9',
port: '8080',
ip: '39.102.136.61',
port: '8088',
channel: '1', // 1~20 channel: '1', // 1~20
charsetname: 'UTF-8' // UTF-8GBK charsetname: 'UTF-8' // UTF-8GBK
} }
@ -824,8 +838,8 @@ export default {
console.log('执行我的自选TCP连接...') console.log('执行我的自选TCP连接...')
tcpConnection.connect( tcpConnection.connect(
{ {
ip: '192.168.1.9',
port: '8080',
ip: '39.102.136.61',
port: '8088',
channel: '2', // 使channel 2 channel: '2', // 使channel 2
charsetname: 'UTF-8' // UTF-8GBK charsetname: 'UTF-8' // UTF-8GBK
} }
@ -837,8 +851,8 @@ export default {
console.log('断开我的自选TCP连接...') console.log('断开我的自选TCP连接...')
tcpConnection.disconnect( tcpConnection.disconnect(
{ {
ip: '192.168.1.9',
port: '8080',
ip: '39.102.136.61',
port: '8088',
channel: '2', // 使channel 2 channel: '2', // 使channel 2
charsetname: 'UTF-8' // UTF-8GBK charsetname: 'UTF-8' // UTF-8GBK
} }

23
pages/home/member.vue

@ -16,10 +16,10 @@
</view> </view>
<view class="userId">ID:{{ dccode }}</view> <view class="userId">ID:{{ dccode }}</view>
</view> </view>
<view class="msg-right">
<!-- <view class="msg-right">
<image class="image-attendance" src="/static/my/Check-in.png"/> <image class="image-attendance" src="/static/my/Check-in.png"/>
<span style="font-size:10px;">签到</span> <span style="font-size:10px;">签到</span>
</view>
</view> -->
</view> </view>
<view class="settings-buttons"> <view class="settings-buttons">
@ -81,6 +81,8 @@ import {
} from '@element-plus/icons-vue' } from '@element-plus/icons-vue'
import footerBar from '../../components/footerBar.vue' import footerBar from '../../components/footerBar.vue'
import {getUserInfo} from "@/api/member" import {getUserInfo} from "@/api/member"
import { useUserStore } from "../../stores/modules/userInfo"
const userStore = useUserStore()
const type = ref('member') const type = ref('member')
const iSMT = ref(0) const iSMT = ref(0)
@ -90,7 +92,7 @@ const dccode = ref('')
const userInfoRes = ref()// const userInfoRes = ref()//
userInfoRes.value = getUserInfo() userInfoRes.value = getUserInfo()
userInfoRes.value.then(res => { userInfoRes.value.then(res => {
username.value = res.data.username
username.value = res.data.dcname
dccode.value = res.data.dccode dccode.value = res.data.dccode
console.log('用户信息', userInfoRes.value) console.log('用户信息', userInfoRes.value)
}) })
@ -136,6 +138,7 @@ onMounted(() => {
// //
iSMT.value = uni.getSystemInfoSync().statusBarHeight iSMT.value = uni.getSystemInfoSync().statusBarHeight
console.log('??????????????', iSMT.value) console.log('??????????????', iSMT.value)
console.log('通信来的用户身份',userStore.userInfo)
}) })
</script> </script>
@ -146,7 +149,7 @@ onMounted(() => {
} }
.top { .top {
height: 47vh;
height: 50vh;
background-color: white; background-color: white;
} }
@ -159,8 +162,8 @@ onMounted(() => {
} }
.image-bell { .image-bell {
width: 13px;
height: 16px;
width: 26rpx;
height: 32rpx;
} }
.msg { .msg {
@ -171,7 +174,7 @@ onMounted(() => {
} }
.msg-left { .msg-left {
width: 33.6vw;
width: 252rpx;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
@ -185,7 +188,7 @@ onMounted(() => {
} }
.msg-center { .msg-center {
width: 51.7vw;
width: 388rpx;
padding-left: 2.5vh; padding-left: 2.5vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -204,11 +207,10 @@ onMounted(() => {
.image-editName { .image-editName {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
margin-left: 2vw;
margin-left: 15rpx;
} }
.msg-right { .msg-right {
width: 14.7vw;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
@ -232,6 +234,7 @@ onMounted(() => {
justify-content: center; justify-content: center;
background-color: rgb(243, 243, 243); background-color: rgb(243, 243, 243);
border-radius: 8%; border-radius: 8%;
margin-bottom: 1vh;
} }
.setting-icon { .setting-icon {

6
pages/setting/about.vue

@ -4,7 +4,7 @@
<view style="height:1.5vh" /> <view style="height:1.5vh" />
<view class="top"> <view class="top">
<img src="/static/my/aboutDC.png"></img>
<image class="img" src="/static/my/aboutDC.png"></image>
</view> </view>
<view class="bottom"> <view class="bottom">
@ -83,4 +83,8 @@
.label{ .label{
flex:1; flex:1;
} }
.img{
width:360rpx;
height:300rpx;
}
</style> </style>

70
pages/setting/email.vue

@ -7,14 +7,14 @@
<view class="top"> <view class="top">
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/bindedEmail.png" />
<image class="image" src="/static/my/bindedEmail.png" />
<text class="label">已绑邮箱{{ email }}</text> <text class="label">已绑邮箱{{ email }}</text>
</view> </view>
</view> </view>
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/changeEmail.png" />
<image class="image" src="/static/my/changeEmail.png" />
<input v-model="userEmail" placeholder="请输入您的换绑邮箱" class="input" /> <input v-model="userEmail" placeholder="请输入您的换绑邮箱" class="input" />
</view> </view>
<view class="right"> <view class="right">
@ -27,8 +27,8 @@
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/verification.png" />
<input type="text" placeholder="请输入验证码" class="input" />
<image class="image" src="/static/my/verification.png" />
<input type="text" v-model="verifyCode" placeholder="请输入验证码" class="input" />
</view> </view>
</view> </view>
</view> </view>
@ -51,11 +51,16 @@
sendEmail, sendEmail,
changeBind changeBind
} from "@/api/setting/password" } from "@/api/setting/password"
import {
verifyCodeApi
} from "@/api/start/login"
const iSMT = ref(0) const iSMT = ref(0)
const email = ref('') const email = ref('')
const gettingCode = ref(false) const gettingCode = ref(false)
const time = ref(60) const time = ref(60)
const userEmail = ref('') const userEmail = ref('')
const verifyCode = ref('')
const userInfoPromise = getUserInfo() const userInfoPromise = getUserInfo()
userInfoPromise.then(res => { userInfoPromise.then(res => {
@ -71,20 +76,54 @@
}) })
const changeAccount = () => { const changeAccount = () => {
const res = changeBind({
verificateType: 0,
account: userEmail.value
})
if(res.code === 200){
if (!userEmail) {
uni.showToast({ 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({ uni.showToast({
title: '用户绑定失败',
title: '验证失败,请检查验证码',
icon: 'none', icon: 'none',
}) })
return
} }
} }
@ -182,4 +221,9 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.image {
width: 40rpx;
height: 40rpx;
}
</style> </style>

11
pages/setting/introduce.vue

@ -4,7 +4,7 @@
<view style="height:1.5vh" /> <view style="height:1.5vh" />
<view class="top"> <view class="top">
<img src="/static/my/aboutDC.png"></img>
<image class="image" src="../../static/my/aboutDC.png"></image>
</view> </view>
<view class="bottom"> <view class="bottom">
@ -21,10 +21,10 @@
<view class="main-text">人找信息AI智能体替你思考和管理</view> <view class="main-text">人找信息AI智能体替你思考和管理</view>
<view class="title">4.功能定位全景AI决策体系</view> <view class="title">4.功能定位全景AI决策体系</view>
<view class="main-text">黄其振是大笨蛋</view>
<!-- <view class="main-text">黄其振是大笨蛋</view>
<view class="main-text">李建霖是大笨蛋</view> <view class="main-text">李建霖是大笨蛋</view>
<view class="main-text">double是大笨蛋</view> <view class="main-text">double是大笨蛋</view>
<view class="main-text">张鲁平是大笨蛋</view>
<view class="main-text">张鲁平是大笨蛋</view> -->
<view style="height:1.5vh;background-color: white;" /> <view style="height:1.5vh;background-color: white;" />
</view> </view>
</view> </view>
@ -73,4 +73,9 @@
text-align: justify; text-align: justify;
text-justify: inter-character;/* 两端对齐哈哈哈哈 */ text-justify: inter-character;/* 两端对齐哈哈哈哈 */
} }
.image{
width:334rpx;
height:310rpx;
}
</style> </style>

17
pages/setting/market.vue

@ -41,7 +41,7 @@
:class="{ 'active': kStyle === 'common' }" :class="{ 'active': kStyle === 'common' }"
@click="handleKStyleChange('common')" @click="handleKStyleChange('common')"
> >
<img src="/static/my/common.png" class="kline-icon" />
<image src="../../static/my/common.png" class="kline-icon" />
<text>普通</text> <text>普通</text>
<view class="active-dot" v-if="kStyle === 'common'"></view> <view class="active-dot" v-if="kStyle === 'common'"></view>
</view> </view>
@ -50,7 +50,7 @@
:class="{ 'active': kStyle === 'Outline' }" :class="{ 'active': kStyle === 'Outline' }"
@click="handleKStyleChange('Outline')" @click="handleKStyleChange('Outline')"
> >
<img src="/static/my/outline.png" class="kline-icon" />
<image src="../../static/my/outline.png" class="kline-icon" />
<text>轮廓图</text> <text>轮廓图</text>
<view class="active-dot" v-if="kStyle === 'Outline'"></view> <view class="active-dot" v-if="kStyle === 'Outline'"></view>
</view> </view>
@ -59,7 +59,7 @@
:class="{ 'active': kStyle === 'polylines' }" :class="{ 'active': kStyle === 'polylines' }"
@click="handleKStyleChange('polylines')" @click="handleKStyleChange('polylines')"
> >
<img src="/static/my/polylines.png" class="kline-icon" />
<image src="../../static/my/polylines.png" class="kline-icon" />
<text>折线图</text> <text>折线图</text>
<view class="active-dot" v-if="kStyle === 'polylines'"></view> <view class="active-dot" v-if="kStyle === 'polylines'"></view>
</view> </view>
@ -101,7 +101,7 @@
@click="handleRfColorChange('green')" @click="handleRfColorChange('green')"
> >
<view class="color-icon"> <view class="color-icon">
<img src="/static/my/greenRise.png" class="kline-icon" />
<image src="../../static/my/greenRise.png" class="kline-icon" />
</view> </view>
<text>绿涨红跌</text> <text>绿涨红跌</text>
<view class="active-dot" v-if="rfColor === 'green'"></view> <view class="active-dot" v-if="rfColor === 'green'"></view>
@ -112,7 +112,7 @@
@click="handleRfColorChange('red')" @click="handleRfColorChange('red')"
> >
<view class="color-icon"> <view class="color-icon">
<img src="/static/my/redRise.png" class="kline-icon" />
<image src="../../static/my/redRise.png" class="kline-icon" />
</view> </view>
<text>红涨绿跌</text> <text>红涨绿跌</text>
<view class="active-dot" v-if="rfColor === 'red'"></view> <view class="active-dot" v-if="rfColor === 'red'"></view>
@ -152,8 +152,8 @@
<view class="indicator-item" v-for="(item, index) in indicatorList" :key="index"> <view class="indicator-item" v-for="(item, index) in indicatorList" :key="index">
<text class="indicator-text">{{ item }}</text> <text class="indicator-text">{{ item }}</text>
<view class="indicator-icons"> <view class="indicator-icons">
<img src="/static/my/setting.png" class="icon" />
<img src="/static/my/menu.png" class="icon" />
<image src="../../static/my/setting.png" class="icon" />
<image src="../../static/my/menu.png" class="icon" />
</view> </view>
</view> </view>
<view style="height:10vh;background-color: white;"></view> <view style="height:10vh;background-color: white;"></view>
@ -268,7 +268,6 @@
} }
.top-options { .top-options {
height: 5.5vh;
display: flex; display: flex;
padding: 0 40rpx; padding: 0 40rpx;
} }
@ -300,6 +299,8 @@
.kline-icon { .kline-icon {
margin-right: 10rpx; margin-right: 10rpx;
font-size: 32rpx; font-size: 32rpx;
width:60rpx;
height:50rpx;
} }
.color-icon { .color-icon {

25
pages/setting/nextPwd.vue

@ -13,19 +13,19 @@
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/unlock.png"/>
<image class="image-lock" src="/static/my/unlock.png"/>
<input type="password" :type="pwdType" placeholder="请输入新密码" class="input" v-model="oldPassword" <input type="password" :type="pwdType" placeholder="请输入新密码" class="input" v-model="oldPassword"
/> />
<img :src="pwdType === 1 ? '/static/my/hideEye.png' : '/static/my/openEye.png'"
<image class="image-eye" :src="pwdType === 1 ? '/static/my/hideEye.png' : '/static/my/openEye.png'"
@click="changeEye(1)"/> @click="changeEye(1)"/>
</view> </view>
</view> </view>
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/unlock.png"/>
<image class="image-lock" src="/static/my/unlock.png"/>
<input type="password" :type="pwdType2" placeholder="再次确认" class="input" v-model="newPassword"/> <input type="password" :type="pwdType2" placeholder="再次确认" class="input" v-model="newPassword"/>
<img :src="pwdType === 1 ? '/static/my/hideEye.png' : '/static/my/openEye.png'"
<image class="image-eye" :src="pwdType === 1 ? '/static/my/hideEye.png' : '/static/my/openEye.png'"
@click="changeEye(2)"/> @click="changeEye(2)"/>
</view> </view>
</view> </view>
@ -157,13 +157,6 @@ onMounted(() => {
justify-content: center; justify-content: center;
} }
.img {
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
}
.tips { .tips {
font-size: 24rpx; font-size: 24rpx;
color: #999; color: #999;
@ -172,4 +165,14 @@ onMounted(() => {
align-self: flex-start; align-self: flex-start;
/* 这是左对齐 */ /* 这是左对齐 */
} }
.image-lock{
width:40rpx;
height:40rpx;
}
.image-eye{
width:40rpx;
height:30rpx;
}
</style> </style>

12
pages/setting/phone.vue

@ -7,13 +7,13 @@
<view class="top"> <view class="top">
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/bindedPhone.png" />
<image class="image" src="/static/my/bindedPhone.png" />
<text class="label">已绑手机号{{ phone }}</text> <text class="label">已绑手机号{{ phone }}</text>
</view> </view>
</view> </view>
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/changeBindPhone.png" />
<image class="image" src="/static/my/changeBindPhone.png" />
<text class="label">+86</text> <text class="label">+86</text>
<input type="number" v-model="userPhone" placeholder="请输入您的换绑手机号" class="input" /> <input type="number" v-model="userPhone" placeholder="请输入您的换绑手机号" class="input" />
</view> </view>
@ -27,7 +27,7 @@
<view class="top-list"> <view class="top-list">
<view class="left"> <view class="left">
<img src="/static/my/verification.png" />
<image class="image" src="/static/my/verification.png" />
<input type="text" placeholder="请输入验证码" class="input" /> <input type="text" placeholder="请输入验证码" class="input" />
</view> </view>
</view> </view>
@ -137,6 +137,7 @@
flex: 1; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: left;
} }
.label { .label {
@ -182,4 +183,9 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.image{
height:40rpx;
width:40rpx;
}
</style> </style>

4
pages/start/Registration/Registration.vue

@ -253,9 +253,9 @@ function goToIndex() {
} }
function goToService() { function goToService() {
//
//
uni.navigateTo({ uni.navigateTo({
url: "/pages/start/login/login",
url: "/pages/customerServicePlatform/csPlatformIndex",
}); });
} }

2
pages/start/login/login.vue

@ -324,7 +324,7 @@ function goToIndex() {
function goToService() { function goToService() {
// //
uni.navigateTo({ uni.navigateTo({
url: "/pages/home/home",
url: "/pages/customerServicePlatform/csPlatformIndex",
}); });
} }

4
pages/start/recoverPassword/recoverPassword.vue

@ -298,7 +298,9 @@ function goToBack() {
function goToService() { function goToService() {
// //
uni.navigateBack(-1);
uni.navigateTo({
url: "/pages/customerServicePlatform/csPlatformIndex",
});
} }
function switchEmail() { function switchEmail() {

Loading…
Cancel
Save