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> </view>
<view class="deepmate-action"> <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> <image class="send-button" src="https://d31zlh4on95l9h.cloudfront.net/images/3da018821a5c82b06a1d6ddc81b960ac.png" mode="aspectFit"></image>
</view> </view>
</view> </view>
@ -49,7 +55,28 @@
name: 'DeepMate', name: 'DeepMate',
data() { data() {
return { 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> </template>
<script> <script>
import { useUserStore } from "../../stores/modules/userInfo.js"
import { import {
getQuestionApi, getQuestionApi,
addFeedbackRecordApi, addFeedbackRecordApi,
@ -118,15 +117,12 @@
showQuestions: [], showQuestions: [],
feedbackText: '', feedbackText: '',
images: [], images: [],
token:''
} }
}, },
mounted() { mounted() {
// //
this.iSMT = uni.getSystemInfoSync().statusBarHeight; this.iSMT = uni.getSystemInfoSync().statusBarHeight;
this.getQuestionList() this.getQuestionList()
const memberStore = useUserStore()
this.token = memberStore.userInfo?.token
}, },
methods: { methods: {
onSuccess() { onSuccess() {
@ -267,7 +263,6 @@
} }
const [image1 = '', image2 = '', image3 = ''] = uploadedImages; const [image1 = '', image2 = '', image3 = ''] = uploadedImages;
const res = await addFeedbackRecordApi({ const res = await addFeedbackRecordApi({
token: this.token,
content: this.feedbackText, content: this.feedbackText,
image1, image1,
image2, image2,

9
pages/customerServicePlatform/historyRecord.vue

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

5
pages/customerServicePlatform/questionDetail.vue

@ -62,7 +62,6 @@
</template> </template>
<script> <script>
import { useUserStore } from "../../stores/modules/userInfo.js"
import { import {
getAnswerApi getAnswerApi
} from "../../api/customerServicePlatform/customerServicePlatform"; } from "../../api/customerServicePlatform/customerServicePlatform";
@ -74,14 +73,11 @@
questionTitle: '', questionTitle: '',
answerContent: '正在思考...', answerContent: '正在思考...',
showLoginRegister:false, showLoginRegister:false,
token:''
}; };
}, },
mounted() { mounted() {
this.iSMT = uni.getSystemInfoSync().statusBarHeight || 0; this.iSMT = uni.getSystemInfoSync().statusBarHeight || 0;
this.getAnswerContent() this.getAnswerContent()
const memberStore = useUserStore()
this.token = memberStore.userInfo?.token
}, },
onLoad(options) { onLoad(options) {
if (options.question) { if (options.question) {
@ -106,7 +102,6 @@
const res = await getAnswerApi({ const res = await getAnswerApi({
question: this.questionTitle, question: this.questionTitle,
conversationId: conversationId, conversationId: conversationId,
token:this.token
}) })
console.log(res) 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 { ref, computed, onMounted, onUnmounted, watch, nextTick } from "vue";
import footerBar from "../../components/footerBar"; import footerBar from "../../components/footerBar";
import marked from "marked"; // marked import marked from "marked"; // marked
import { onPageScroll } from "@dcloudio/uni-app";
import { onPageScroll, onLoad } from "@dcloudio/uni-app";
import { import {
postStock, postStock,
postIntent, 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(() => { onMounted(() => {
const sys = uni.getSystemInfoSync(); const sys = uni.getSystemInfoSync();

2
pages/home/home.vue

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

Loading…
Cancel
Save