update
This commit is contained in:
parent
507925efde
commit
812648ab61
@ -5,7 +5,7 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
image: icrypto-web:1.0.9
|
image: icrypto-web:1.0.10
|
||||||
container_name: icrypto-web
|
container_name: icrypto-web
|
||||||
ports:
|
ports:
|
||||||
- '6000:80'
|
- '6000:80'
|
||||||
|
|||||||
@ -22,8 +22,6 @@ interface AgentResponse {
|
|||||||
// 获取用户状态
|
// 获取用户状态
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const isAuthenticated = computed(() => userStore.isAuthenticated)
|
const isAuthenticated = computed(() => userStore.isAuthenticated)
|
||||||
const userInfo = computed(() => userStore.userInfo)
|
|
||||||
const isVIP = computed(() => userInfo.value && userInfo.value.level >= 1)
|
|
||||||
|
|
||||||
// 显示访问限制提示
|
// 显示访问限制提示
|
||||||
const showAccessDeniedAlert = ref(false)
|
const showAccessDeniedAlert = ref(false)
|
||||||
@ -106,13 +104,8 @@ const messagesContainer = ref<HTMLElement | null>(null)
|
|||||||
|
|
||||||
// 当用户不是VIP时,显示提示
|
// 当用户不是VIP时,显示提示
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (isAuthenticated.value && !isVIP.value) {
|
if (isAuthenticated.value) {
|
||||||
showAccessDeniedAlert.value = true
|
fetchAgents()
|
||||||
|
|
||||||
// 5秒后自动隐藏提示
|
|
||||||
setTimeout(() => {
|
|
||||||
showAccessDeniedAlert.value = false
|
|
||||||
}, 5000)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -148,13 +141,7 @@ watch(selectedAgent, (newAgent) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const sendMessage = async () => {
|
const sendMessage = async () => {
|
||||||
if (
|
if (!userInput.value.trim() || isLoading.value || !isAuthenticated.value || !selectedAgent.value)
|
||||||
!userInput.value.trim() ||
|
|
||||||
isLoading.value ||
|
|
||||||
!isAuthenticated.value ||
|
|
||||||
!isVIP.value ||
|
|
||||||
!selectedAgent.value
|
|
||||||
)
|
|
||||||
return
|
return
|
||||||
|
|
||||||
// 添加用户消息到历史记录
|
// 添加用户消息到历史记录
|
||||||
@ -303,26 +290,7 @@ const sendMessage = async () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 已登录但不是VIP用户 -->
|
<!-- 已登录用户显示聊天界面 -->
|
||||||
<div v-else-if="!isVIP" class="vip-prompt">
|
|
||||||
<div class="vip-prompt-content">
|
|
||||||
<h2>VIP专属功能</h2>
|
|
||||||
<p>AI Agent功能仅对VIP及超级VIP用户开放</p>
|
|
||||||
<div class="vip-level-info">
|
|
||||||
<div class="vip-level">
|
|
||||||
<div class="level-badge user-level-vip">VIP</div>
|
|
||||||
<div class="level-description">解锁AI Agent功能</div>
|
|
||||||
</div>
|
|
||||||
<div class="vip-level">
|
|
||||||
<div class="level-badge user-level-super-vip">超级VIP</div>
|
|
||||||
<div class="level-description">解锁AI Agent高级功能</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<p class="upgrade-hint">请联系客服升级您的账户</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 已登录且是VIP用户显示聊天界面 -->
|
|
||||||
<div v-else class="main-container">
|
<div v-else class="main-container">
|
||||||
<!-- 左侧Agent选择列表 -->
|
<!-- 左侧Agent选择列表 -->
|
||||||
<div class="agent-sidebar">
|
<div class="agent-sidebar">
|
||||||
@ -557,67 +525,6 @@ const sendMessage = async () => {
|
|||||||
background-color: #2244ee;
|
background-color: #2244ee;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* VIP提示样式 */
|
|
||||||
.vip-prompt {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
padding: 3rem 1rem;
|
|
||||||
width: 100%;
|
|
||||||
height: calc(80vh - 150px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.vip-prompt-content {
|
|
||||||
background-color: var(--color-bg-card);
|
|
||||||
border-radius: var(--border-radius);
|
|
||||||
padding: 2rem;
|
|
||||||
text-align: center;
|
|
||||||
max-width: 500px;
|
|
||||||
width: 100%;
|
|
||||||
border: 1px solid var(--color-border);
|
|
||||||
}
|
|
||||||
|
|
||||||
.vip-prompt-content h2 {
|
|
||||||
font-size: 1.8rem;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vip-prompt-content p {
|
|
||||||
color: var(--color-text-secondary);
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vip-level-info {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 2rem;
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.vip-level {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.level-badge {
|
|
||||||
padding: 0.3rem 1rem;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-weight: 500;
|
|
||||||
}
|
|
||||||
|
|
||||||
.level-description {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
color: var(--color-text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.upgrade-hint {
|
|
||||||
font-style: italic;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
color: var(--color-text-tertiary);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 聊天界面样式 */
|
/* 聊天界面样式 */
|
||||||
.main-container {
|
.main-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user