diff --git a/src/views/AI/components/sticky.vue b/src/views/AI/components/sticky.vue index d7b2940..fac6bfc 100644 --- a/src/views/AI/components/sticky.vue +++ b/src/views/AI/components/sticky.vue @@ -63,6 +63,10 @@ export default { type: String, default: '', }, + conversationId: { + type: String, + default: '', + }, }, watch: { productName: { @@ -77,6 +81,7 @@ export default { if (val) { this.options = val.map((item) => { return { + ...item, text: item.productName, value: item.productName, } @@ -123,6 +128,18 @@ export default { case '2': this.$emit('setProductName', '') break + case '3': + let id = this.options.find((item) => item.productName === this.productName).productId + + this.$router.push({ + path: '/comparison', + query: { + // productName: this.productName, + id: id, + conversationId: this.conversationId || null, + }, + }) + break } this.value2 = '' diff --git a/src/views/AI/index.vue b/src/views/AI/index.vue index 27a4ea1..0bc24cc 100644 --- a/src/views/AI/index.vue +++ b/src/views/AI/index.vue @@ -1,5 +1,6 @@