diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json index 2a3f43d..f1dfc07 100644 --- a/.hbuilderx/launch.json +++ b/.hbuilderx/launch.json @@ -3,10 +3,11 @@ "configurations" : [ { "customPlaygroundType" : "local", - "playground" : "custom", + "playground" : "standard", "type" : "uni-app:app-android" - // "playground" : "standard", - // "type" : "uni-app:app-ios" } ] } +// "playground" : "standard", +// "type" : "uni-app:app-ios" + diff --git a/api/customerServicePlatform/customerServicePlatform.js b/api/customerServicePlatform/customerServicePlatform.js new file mode 100644 index 0000000..0f20be0 --- /dev/null +++ b/api/customerServicePlatform/customerServicePlatform.js @@ -0,0 +1,46 @@ +import { http } from '@/utils/http.js' + +const baseURL = "http://39.101.133.168:8828" +//图片上传 +export const uploadImageApi = (data) => { + return http({ + method: 'POST', + url: baseURL +'/hljw/api/aws/upload', + data + }) +} + +//问题回答 +export const getAnswerApi = (data) => { + return http({ + method: 'POST', + url: 'http://pbb6edde.natappfree.cc' +'/api/customer/askQuestion', + data + }) +} + +//获取随机5条猜你想问问题 +export const getQuestionApi = (data) => { + return http({ + method: 'GET', + url: 'http://pbb6edde.natappfree.cc' +'/api/customer/getQuestion', + }) +} + + +//反馈添加 +export const addFeedbackRecordApi = (data) => { + return http({ + method: 'POST', + url: baseURL +'/link/third/dcFeedBack/feedback/add', + data + }) +} +//反馈历史记录 +export const getFeedbackRecordsApi = (data) => { + return http({ + method: 'POST', + url: baseURL+'/link/third/dcFeedBack/feedback/select', + data + }) +} \ No newline at end of file diff --git a/api/setting/general.js b/api/setting/general.js index d5e45d1..63b4892 100644 --- a/api/setting/general.js +++ b/api/setting/general.js @@ -9,3 +9,11 @@ export const getSetting = (data) => { data: data, }) } + +export const updateSetting = (data) => { + return http({ + method: 'POST', + url: '/api/my/updateSetting', + data: data, + }) +} diff --git a/api/setting/market.js b/api/setting/market.js new file mode 100644 index 0000000..6601f4f --- /dev/null +++ b/api/setting/market.js @@ -0,0 +1,19 @@ +import { http } from '../../utils/http' + + + +export const getMarketSetting = (data) => { + return http({ + method: 'POST', + url: '/api/my/getQuotationSetting', + data: data, + }) +} + +export const updateMarketSetting = (data) => { + return http({ + method: 'POST', + url: '/api/my/updateQuotationSetting', + data: data, + }) +} diff --git a/api/tcpConnection.js b/api/tcpConnection.js index c31188e..819051f 100644 --- a/api/tcpConnection.js +++ b/api/tcpConnection.js @@ -6,7 +6,7 @@ */ // 引用TCP插件 -const TCPSocket = uni.requireNativePlugin('Aimer-TCPPlugin'); +//const TCPSocket = uni.requireNativePlugin('Aimer-TCPPlugin'); // const TCPSocket = uni.requireNativePlugin("Aimer-TCPPlugin"); // TCP连接配置 @@ -67,52 +67,52 @@ class TCPConnection { } console.log('开始建立TCP连接:', connectionConfig); - TCPSocket.connect( - connectionConfig, - result => { - /** - * status : 0 连接成功 - * status : 1 断开连接 - * receivedMsg : 服务器返回字符串(普通的字符串交互) - * receivedHexMsg : 服务器返回字节数组(单片机、智能家居等硬件数据交互) - */ - if (result.status == '0') { - // TCP连接成功 - this.channelConnections.set(connectionConfig.channel, true); - console.log(`TCP连接成功 - Channel ${connectionConfig.channel}`); - this._notifyConnectionCallbacks('connected', result, connectionConfig.channel); - } else if (result.status == '1') { - // TCP断开连接 - this.channelConnections.set(connectionConfig.channel, false); - console.log(`TCP断开连接 - Channel ${connectionConfig.channel}`); - this._notifyConnectionCallbacks('disconnected', result, connectionConfig.channel); - } + // TCPSocket.connect( + // connectionConfig, + // result => { + // /** + // * status : 0 连接成功 + // * status : 1 断开连接 + // * receivedMsg : 服务器返回字符串(普通的字符串交互) + // * receivedHexMsg : 服务器返回字节数组(单片机、智能家居等硬件数据交互) + // */ + // if (result.status == '0') { + // // TCP连接成功 + // this.channelConnections.set(connectionConfig.channel, true); + // console.log(`TCP连接成功 - Channel ${connectionConfig.channel}`); + // this._notifyConnectionCallbacks('connected', result, connectionConfig.channel); + // } else if (result.status == '1') { + // // TCP断开连接 + // this.channelConnections.set(connectionConfig.channel, false); + // console.log(`TCP断开连接 - Channel ${connectionConfig.channel}`); + // this._notifyConnectionCallbacks('disconnected', result, connectionConfig.channel); + // } - if (result.receivedMsg) { - // 服务器返回字符串 - console.log('收到字符串消息:', result.receivedMsg); - this._notifyMessageCallbacks('string', result.receivedMsg, null, connectionConfig.channel); - } + // if (result.receivedMsg) { + // // 服务器返回字符串 + // console.log('收到字符串消息:', result.receivedMsg); + // this._notifyMessageCallbacks('string', result.receivedMsg, null, connectionConfig.channel); + // } - // if (result.receivedHexMsg) { - // // 硬件服务器返回16进制数据 - // console.log('收到16进制消息:', result.receivedHexMsg); - // let msg = result.receivedHexMsg; - // let sum = msg.length / 2; - // let arr = []; - // for (let k = 0; k < sum; k++) { - // let i = msg.substring(k * 2, k * 2 + 2); - // arr.push(i); - // } - // console.log('解析后的16进制数组:', arr); - // this._notifyMessageCallbacks('hex', result.receivedHexMsg, arr); - // } + // // if (result.receivedHexMsg) { + // // // 硬件服务器返回16进制数据 + // // console.log('收到16进制消息:', result.receivedHexMsg); + // // let msg = result.receivedHexMsg; + // // let sum = msg.length / 2; + // // let arr = []; + // // for (let k = 0; k < sum; k++) { + // // let i = msg.substring(k * 2, k * 2 + 2); + // // arr.push(i); + // // } + // // console.log('解析后的16进制数组:', arr); + // // this._notifyMessageCallbacks('hex', result.receivedHexMsg, arr); + // // } - // 执行回调函数 - if (callback && typeof callback === "function") { - callback(result); - } - }); + // // 执行回调函数 + // if (callback && typeof callback === "function") { + // callback(result); + // } + // }); } /** @@ -144,7 +144,7 @@ class TCPConnection { sendConfig.charsetname = config.charsetname; } - TCPSocket.send(sendConfig); + //TCPSocket.send(sendConfig); console.log("js成功发送TCP消息:", messageStr); return true; } @@ -159,7 +159,7 @@ class TCPConnection { channel: channel }; - TCPSocket.disconnect(disconnectConfig); + //TCPSocket.disconnect(disconnectConfig); this.channelConnections.set(channel, false); console.log(`TCP连接已断开 - Channel ${channel}`, disconnectConfig); } diff --git a/components/DeepMate.vue b/components/DeepMate.vue index 5132a5d..d7a0f67 100644 --- a/components/DeepMate.vue +++ b/components/DeepMate.vue @@ -34,8 +34,14 @@ - - + + @@ -49,7 +55,28 @@ name: 'DeepMate', data() { return { + inputValue: '' + } + }, + methods: { + handleSend() { + // 检查输入是否为空 + if (!this.inputValue.trim()) { + uni.showToast({ + title: '请输入股票代码或名称', + icon: 'none', + duration: 2000 + }) + return + } + + // 跳转到deepMate页面,并传递输入的内容 + uni.navigateTo({ + url: `/pages/deepMate/deepMate?query=${encodeURIComponent(this.inputValue.trim())}` + }) + // 清空输入框 + this.inputValue = '' } } } diff --git a/components/FeedbackModal.vue b/components/FeedbackModal.vue new file mode 100644 index 0000000..a4bc5e4 --- /dev/null +++ b/components/FeedbackModal.vue @@ -0,0 +1,196 @@ + + + + + \ No newline at end of file diff --git a/pages.json b/pages.json index 299278f..8549911 100644 --- a/pages.json +++ b/pages.json @@ -246,14 +246,12 @@ "path": "pages/setting/phone", "style": { "navigationBarTitleText": "绑定账号" - // 其实是绑定手机号 } }, { "path": "pages/setting/email", "style": { "navigationBarTitleText": "绑定账号" - // 其实是绑定邮箱 } }, { @@ -306,7 +304,35 @@ { "navigationBarTitleText" : "创建密码" } + }, + { + "path": "pages/customerServicePlatform/csPlatformIndex", + "style": { + "navigationStyle": "custom", + "disableSwipeBack": true, + "titleNView": false, + "bounce": false + } + }, + { + "path": "pages/customerServicePlatform/historyRecord", + "style": { + "navigationStyle": "custom", + "disableSwipeBack": true, + "titleNView": false, + "bounce": false + } + }, + { + "path": "pages/customerServicePlatform/questionDetail", + "style": { + "navigationStyle": "custom", + "disableSwipeBack": true, + "titleNView": false, + "bounce": false + } } + ], "globalStyle": { "navigationBarTextStyle": "black", diff --git a/pages/customerServicePlatform/csPlatformIndex.vue b/pages/customerServicePlatform/csPlatformIndex.vue new file mode 100644 index 0000000..d0cfd00 --- /dev/null +++ b/pages/customerServicePlatform/csPlatformIndex.vue @@ -0,0 +1,682 @@ +