Browse Source

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

maziyang/feature-20251025172218-智能客服中台
hongxilin 4 weeks ago
parent
commit
08cf2e3ba0
  1. 31
      components/DeepMate.vue
  2. 5
      pages/customerServicePlatform/csPlatformIndex.vue
  3. 9
      pages/customerServicePlatform/historyRecord.vue
  4. 5
      pages/customerServicePlatform/questionDetail.vue
  5. 21
      pages/deepMate/deepMate.vue
  6. 2
      pages/home/home.vue

31
components/DeepMate.vue

@ -34,8 +34,14 @@
</view>
</view>
<view class="deepmate-action">
<input class="stock-input" type="text" placeholder="请输入股票代码/名称,获取AI洞察" />
<view class="send-button-container">
<input
class="stock-input"
type="text"
placeholder="请输入股票代码/名称,获取AI洞察"
v-model="inputValue"
@confirm="handleSend"
/>
<view class="send-button-container" @click="handleSend">
<image class="send-button" src="https://d31zlh4on95l9h.cloudfront.net/images/3da018821a5c82b06a1d6ddc81b960ac.png" mode="aspectFit"></image>
</view>
</view>
@ -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 = ''
}
}
}

5
pages/customerServicePlatform/csPlatformIndex.vue

@ -90,7 +90,6 @@
</template>
<script>
import { useUserStore } from "../../stores/modules/userInfo.js"
import {
getQuestionApi,
addFeedbackRecordApi,
@ -118,15 +117,12 @@
showQuestions: [],
feedbackText: '',
images: [],
token:''
}
},
mounted() {
//
this.iSMT = uni.getSystemInfoSync().statusBarHeight;
this.getQuestionList()
const memberStore = useUserStore()
this.token = memberStore.userInfo?.token
},
methods: {
onSuccess() {
@ -267,7 +263,6 @@
}
const [image1 = '', image2 = '', image3 = ''] = uploadedImages;
const res = await addFeedbackRecordApi({
token: this.token,
content: this.feedbackText,
image1,
image2,

9
pages/customerServicePlatform/historyRecord.vue

@ -57,7 +57,6 @@
</template>
<script>
import { useUserStore } from "../../stores/modules/userInfo.js"
import {
getFeedbackRecordsApi,
} from "../../api/customerServicePlatform/customerServicePlatform";
@ -67,14 +66,12 @@
iSMT: 0,
statusText: '反馈成功',
historyList: [],
token:''
};
},
mounted() {
this.iSMT = uni.getSystemInfoSync().statusBarHeight;
this.loadHistoryList()
const memberStore = useUserStore()
this.token = memberStore.userInfo?.token
},
methods: {
formatTime(str) {
@ -95,9 +92,7 @@
}
},
async loadHistoryList() {
const res = await getFeedbackRecordsApi({
token: this.token
})
const res = await getFeedbackRecordsApi()
console.log(res)
if (res.code == 200) {
this.historyList = res.data.map(item => {

5
pages/customerServicePlatform/questionDetail.vue

@ -62,7 +62,6 @@
</template>
<script>
import { useUserStore } from "../../stores/modules/userInfo.js"
import {
getAnswerApi
} from "../../api/customerServicePlatform/customerServicePlatform";
@ -74,14 +73,11 @@
questionTitle: '',
answerContent: '正在思考...',
showLoginRegister:false,
token:''
};
},
mounted() {
this.iSMT = uni.getSystemInfoSync().statusBarHeight || 0;
this.getAnswerContent()
const memberStore = useUserStore()
this.token = memberStore.userInfo?.token
},
onLoad(options) {
if (options.question) {
@ -106,7 +102,6 @@
const res = await getAnswerApi({
question: this.questionTitle,
conversationId: conversationId,
token:this.token
})
console.log(res)

21
pages/deepMate/deepMate.vue

@ -291,7 +291,7 @@ const { safeAreaInsets } = uni.getSystemInfoSync();
import { ref, computed, onMounted, onUnmounted, watch, nextTick } from "vue";
import footerBar from "../../components/footerBar";
import marked from "marked"; // marked
import { onPageScroll } from "@dcloudio/uni-app";
import { onPageScroll, onLoad } from "@dcloudio/uni-app";
import {
postStock,
postIntent,
@ -358,6 +358,25 @@ const hotTopics = ref([
},
]);
//
onLoad((options) => {
console.log('deepMate页面接收到参数:', options);
// query
if (options.query) {
const decodedQuery = decodeURIComponent(options.query);
console.log('解码后的查询内容:', decodedQuery);
//
inputMessage.value = decodedQuery;
//
setTimeout(() => {
sendMessage();
}, 500);
}
});
//
onMounted(() => {
const sys = uni.getSystemInfoSync();

2
pages/home/home.vue

@ -192,7 +192,7 @@
import footerBar from '../../components/footerBar.vue'
import MarketOverview from '../../components/MarketOverview.vue'
import DeepMate from '../../components/DeepMate.vue'
// import tcpConnection from '../../api/tcpConnection.js'
import tcpConnection from '../../api/tcpConnection.js'
import th from '../../static/language/th'
import MySelectionsAPI from '../../api/home/mySelections.js'
import { useUserStore } from '../../stores/modules/userInfo'

Loading…
Cancel
Save