Browse Source

Merge branch 'milestone-20251031-简版功能开发' of http://39.101.133.168:8807/qimaohong/deepChartVueApp into wangyi/feature-20251026183100-deepmate王毅

lihuilin/feature-20251024095243-我的
wangyi 3 weeks ago
parent
commit
2e27c4cab4
  1. 4
      .hbuilderx/launch.json
  2. 194
      api/home/mySelections.js
  3. 4
      api/tcpConnection.js
  4. 22
      manifest.json
  5. 776
      pages/customStockList/customStockList.vue
  6. 40
      pages/home/home.vue
  7. 23
      pages/home/member.vue
  8. 6
      pages/setting/about.vue
  9. 70
      pages/setting/email.vue
  10. 11
      pages/setting/introduce.vue
  11. 17
      pages/setting/market.vue
  12. 25
      pages/setting/nextPwd.vue
  13. 12
      pages/setting/phone.vue

4
.hbuilderx/launch.json

@ -2,9 +2,9 @@
"version" : "1.0",
"configurations" : [
{
"customPlaygroundType" : "device",
"customPlaygroundType" : "local",
"packageName" : "io.dcloud.HBuilder",
"playground" : "custom",
"playground" : "standard",
"type" : "uni-app:app-android"
}
]

194
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

4
api/tcpConnection.js

@ -11,8 +11,8 @@
// 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
};

22
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" : {}
}

776
pages/customStockList/customStockList.vue

@ -7,7 +7,7 @@
<view class="navbar-content">
<view class="navbar-left">
<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 class="navbar-center">
@ -32,34 +32,469 @@
<!-- 页面内容 -->
<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>
</template>
<script>
import { getUserStockGroupList, addUserStockGroup, getUserStockList, updateUserStockGroup } from '@/api/home/mySelections.js'
export default {
data() {
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: {
//
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() {
uni.navigateBack()
},
//
// -
onFirstButtonClick() {
console.log('第一个按钮被点击')
//
uni.showModal({
title: '创建分组',
content: '请输入分组名称',
editable: true,
placeholderText: '请输入分组名称',
success: (res) => {
if (res.confirm && res.content) {
this.createNewGroup(res.content.trim())
}
}
})
},
//
// -
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 {
font-size: 24px;
color: #333333;
font-weight: bold;
width: 24px;
height: 24px;
}
.navbar-center {
@ -141,7 +575,323 @@
/* 页面内容 */
.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>

40
pages/home/home.vue

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

23
pages/home/member.vue

@ -16,10 +16,10 @@
</view>
<view class="userId">ID:{{ dccode }}</view>
</view>
<view class="msg-right">
<!-- <view class="msg-right">
<image class="image-attendance" src="/static/my/Check-in.png"/>
<span style="font-size:10px;">签到</span>
</view>
</view> -->
</view>
<view class="settings-buttons">
@ -81,6 +81,8 @@ import {
} from '@element-plus/icons-vue'
import footerBar from '../../components/footerBar.vue'
import {getUserInfo} from "@/api/member"
import { useUserStore } from "../../stores/modules/userInfo"
const userStore = useUserStore()
const type = ref('member')
const iSMT = ref(0)
@ -90,7 +92,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)
})
@ -136,6 +138,7 @@ onMounted(() => {
//
iSMT.value = uni.getSystemInfoSync().statusBarHeight
console.log('??????????????', iSMT.value)
console.log('通信来的用户身份',userStore.userInfo)
})
</script>
@ -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 {

6
pages/setting/about.vue

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

70
pages/setting/email.vue

@ -7,14 +7,14 @@
<view class="top">
<view class="top-list">
<view class="left">
<img src="/static/my/bindedEmail.png" />
<image class="image" src="/static/my/bindedEmail.png" />
<text class="label">已绑邮箱{{ email }}</text>
</view>
</view>
<view class="top-list">
<view class="left">
<img src="/static/my/changeEmail.png" />
<image class="image" src="/static/my/changeEmail.png" />
<input v-model="userEmail" placeholder="请输入您的换绑邮箱" class="input" />
</view>
<view class="right">
@ -27,8 +27,8 @@
<view class="top-list">
<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>
@ -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;
}
</style>

11
pages/setting/introduce.vue

@ -4,7 +4,7 @@
<view style="height:1.5vh" />
<view class="top">
<img src="/static/my/aboutDC.png"></img>
<image class="image" src="../../static/my/aboutDC.png"></image>
</view>
<view class="bottom">
@ -21,10 +21,10 @@
<view class="main-text">人找信息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">double是大笨蛋</view>
<view class="main-text">张鲁平是大笨蛋</view>
<view class="main-text">张鲁平是大笨蛋</view> -->
<view style="height:1.5vh;background-color: white;" />
</view>
</view>
@ -73,4 +73,9 @@
text-align: justify;
text-justify: inter-character;/* 两端对齐哈哈哈哈 */
}
.image{
width:334rpx;
height:310rpx;
}
</style>

17
pages/setting/market.vue

@ -41,7 +41,7 @@
:class="{ 'active': kStyle === 'common' }"
@click="handleKStyleChange('common')"
>
<img src="/static/my/common.png" class="kline-icon" />
<image src="../../static/my/common.png" class="kline-icon" />
<text>普通</text>
<view class="active-dot" v-if="kStyle === 'common'"></view>
</view>
@ -50,7 +50,7 @@
:class="{ 'active': kStyle === 'Outline' }"
@click="handleKStyleChange('Outline')"
>
<img src="/static/my/outline.png" class="kline-icon" />
<image src="../../static/my/outline.png" class="kline-icon" />
<text>轮廓图</text>
<view class="active-dot" v-if="kStyle === 'Outline'"></view>
</view>
@ -59,7 +59,7 @@
:class="{ 'active': kStyle === 'polylines' }"
@click="handleKStyleChange('polylines')"
>
<img src="/static/my/polylines.png" class="kline-icon" />
<image src="../../static/my/polylines.png" class="kline-icon" />
<text>折线图</text>
<view class="active-dot" v-if="kStyle === 'polylines'"></view>
</view>
@ -101,7 +101,7 @@
@click="handleRfColorChange('green')"
>
<view class="color-icon">
<img src="/static/my/greenRise.png" class="kline-icon" />
<image src="../../static/my/greenRise.png" class="kline-icon" />
</view>
<text>绿涨红跌</text>
<view class="active-dot" v-if="rfColor === 'green'"></view>
@ -112,7 +112,7 @@
@click="handleRfColorChange('red')"
>
<view class="color-icon">
<img src="/static/my/redRise.png" class="kline-icon" />
<image src="../../static/my/redRise.png" class="kline-icon" />
</view>
<text>红涨绿跌</text>
<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">
<text class="indicator-text">{{ item }}</text>
<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 style="height:10vh;background-color: white;"></view>
@ -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 {

25
pages/setting/nextPwd.vue

@ -13,19 +13,19 @@
<view class="top-list">
<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"
/>
<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)"/>
</view>
</view>
<view class="top-list">
<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"/>
<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)"/>
</view>
</view>
@ -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;
}
</style>

12
pages/setting/phone.vue

@ -7,13 +7,13 @@
<view class="top">
<view class="top-list">
<view class="left">
<img src="/static/my/bindedPhone.png" />
<image class="image" src="/static/my/bindedPhone.png" />
<text class="label">已绑手机号{{ phone }}</text>
</view>
</view>
<view class="top-list">
<view class="left">
<img src="/static/my/changeBindPhone.png" />
<image class="image" src="/static/my/changeBindPhone.png" />
<text class="label">+86</text>
<input type="number" v-model="userPhone" placeholder="请输入您的换绑手机号" class="input" />
</view>
@ -27,7 +27,7 @@
<view class="top-list">
<view class="left">
<img src="/static/my/verification.png" />
<image class="image" src="/static/my/verification.png" />
<input type="text" placeholder="请输入验证码" class="input" />
</view>
</view>
@ -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;
}
</style>
Loading…
Cancel
Save