Commit 55414155 authored by tyyin lan's avatar tyyin lan

chore(首页): 模型积分扣除展示

parent 92e7d5fc
...@@ -127,6 +127,7 @@ common_module: ...@@ -127,6 +127,7 @@ common_module:
buy_now: 'Buy now' buy_now: 'Buy now'
payment_success: 'Payment success' payment_success: 'Payment success'
back: 'Back' back: 'Back'
time: 'Time(s)'
dialogue_module: dialogue_module:
continue_question_message: 'You can keep asking questions' continue_question_message: 'You can keep asking questions'
......
...@@ -126,6 +126,7 @@ common_module: ...@@ -126,6 +126,7 @@ common_module:
buy_now: '立即购买' buy_now: '立即购买'
payment_success: '支付成功' payment_success: '支付成功'
back: '返回' back: '返回'
time: '次'
dialogue_module: dialogue_module:
continue_question_message: '你可以继续提问' continue_question_message: '你可以继续提问'
......
...@@ -126,6 +126,7 @@ common_module: ...@@ -126,6 +126,7 @@ common_module:
buy_now: '立即購買' buy_now: '立即購買'
payment_success: '支付成功' payment_success: '支付成功'
back: '返回' back: '返回'
time: '次'
dialogue_module: dialogue_module:
continue_question_message: '你可以繼續提問' continue_question_message: '你可以繼續提問'
......
...@@ -6,6 +6,7 @@ import { nanoid } from 'nanoid' ...@@ -6,6 +6,7 @@ import { nanoid } from 'nanoid'
import fetchEventStreamSource from '../utils/fetch-event-stream-source' import fetchEventStreamSource from '../utils/fetch-event-stream-source'
import { throttle } from 'lodash-es' import { throttle } from 'lodash-es'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { useUserStore } from '@/store/modules/user'
interface Props { interface Props {
currentSessionId: string currentSessionId: string
...@@ -32,6 +33,7 @@ const currentFetchEventSourceController = defineModel<AbortController | null>('c ...@@ -32,6 +33,7 @@ const currentFetchEventSourceController = defineModel<AbortController | null>('c
const { t } = useI18n() const { t } = useI18n()
const inputFileRef = useTemplateRef<HTMLInputElement | null>('inputFileRef') const inputFileRef = useTemplateRef<HTMLInputElement | null>('inputFileRef')
const userStore = useUserStore()
let fileUploadController = shallowRef<AbortController | null>(null) let fileUploadController = shallowRef<AbortController | null>(null)
...@@ -189,6 +191,8 @@ function questionSubmit() { ...@@ -189,6 +191,8 @@ function questionSubmit() {
nextTick(() => { nextTick(() => {
emit('historyRecordListUpdate') emit('historyRecordListUpdate')
userStore.fetchUpdateEquityInfo()
}) })
}, },
onerror: (err) => { onerror: (err) => {
...@@ -339,7 +343,7 @@ defineExpose({ ...@@ -339,7 +343,7 @@ defineExpose({
<Transition name="application-select-menu"> <Transition name="application-select-menu">
<ul <ul
v-show="isShowApplicationSelectMenu" v-show="isShowApplicationSelectMenu"
class="absolute -top-[10px] left-1/2 w-[200px] -translate-x-1/2 -translate-y-full rounded-[6px] bg-[#fff] p-[10px] pb-[4px] pr-0 shadow-md" class="absolute -top-[10px] left-0 w-[240px] -translate-y-full rounded-[6px] bg-[#fff] p-[10px] pb-[4px] pr-0 shadow-md"
> >
<n-virtual-list <n-virtual-list
style="max-height: 200px" style="max-height: 200px"
...@@ -350,7 +354,7 @@ defineExpose({ ...@@ -350,7 +354,7 @@ defineExpose({
> >
<template #default="{ item }"> <template #default="{ item }">
<li <li
class="relative mb-[6px] flex cursor-pointer items-center overflow-hidden rounded-[4px] bg-[#f3f3f5] px-[10px] py-[4px] transition hover:bg-[#E7E7E7]" class="relative mb-[6px] flex cursor-pointer items-center overflow-hidden rounded-[4px] bg-[#f3f3f5] py-[4px] pl-[10px] pr-[16px] transition hover:bg-[#E7E7E7]"
@click="handleApplicationChange(item)" @click="handleApplicationChange(item)"
> >
<div <div
...@@ -363,6 +367,12 @@ defineExpose({ ...@@ -363,6 +367,12 @@ defineExpose({
{{ item.agentTitle }} {{ item.agentTitle }}
</n-ellipsis> </n-ellipsis>
</div> </div>
<div class="pl-[8px] text-[12px] text-[#0B7DFF]">
<template v-if="item.points && item.points !== 0">
{{ item.points }}{{ t('equity_module.points2') }}/{{ t('common_module.time') }}
</template>
<template v-else-if="item.points && item.points === 0">{{ t('common_module.free') }}</template>
</div>
<i <i
v-if="item.agentId === currentAgentApplication.agentId" v-if="item.agentId === currentAgentApplication.agentId"
......
...@@ -5,6 +5,7 @@ export interface AgentApplicationRecordItem { ...@@ -5,6 +5,7 @@ export interface AgentApplicationRecordItem {
agentDesc: string agentDesc: string
creator: string creator: string
publishedTime: string publishedTime: string
points: number
} }
export interface MessageItemInterface { export interface MessageItemInterface {
......
...@@ -126,6 +126,7 @@ declare namespace I18n { ...@@ -126,6 +126,7 @@ declare namespace I18n {
buy_now: string buy_now: string
payment_success: string payment_success: string
back: string back: string
time: string
dialogue_module: { dialogue_module: {
continue_question_message: string continue_question_message: string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment