|
@@ -9,7 +9,7 @@ const AIRobotHoverVisible = ref(false)
|
|
|
const clicked = ref(false)
|
|
const clicked = ref(false)
|
|
|
const isShowDefault = ref(false)
|
|
const isShowDefault = ref(false)
|
|
|
const isShowAIRobotTop = ref(false)
|
|
const isShowAIRobotTop = ref(false)
|
|
|
-const AIIconVisible = ref(true)
|
|
|
|
|
|
|
+const AIIconVisible = ref(false)
|
|
|
const DeQuestions = ref([])
|
|
const DeQuestions = ref([])
|
|
|
const itemGroups = ref([])
|
|
const itemGroups = ref([])
|
|
|
|
|
|
|
@@ -81,13 +81,13 @@ const prepareGroups = () => {
|
|
|
itemGroups.value = groups
|
|
itemGroups.value = groups
|
|
|
}
|
|
}
|
|
|
const isShowLogin = () => {
|
|
const isShowLogin = () => {
|
|
|
- const LoginDays = 0
|
|
|
|
|
|
|
+ const loginCount = JSON.parse(localStorage.getItem('userInfo')).loginCount
|
|
|
let settimeouttime = 0
|
|
let settimeouttime = 0
|
|
|
AIIconVisible.value = true
|
|
AIIconVisible.value = true
|
|
|
isShowDefault.value = true
|
|
isShowDefault.value = true
|
|
|
- if (LoginDays == 0) {
|
|
|
|
|
|
|
+ if (loginCount <= 0) {
|
|
|
settimeouttime = 45000
|
|
settimeouttime = 45000
|
|
|
- } else if (LoginDays == 2) {
|
|
|
|
|
|
|
+ } else if (loginCount <= 2) {
|
|
|
settimeouttime = 15000
|
|
settimeouttime = 15000
|
|
|
} else {
|
|
} else {
|
|
|
settimeouttime = 10000
|
|
settimeouttime = 10000
|
|
@@ -121,6 +121,9 @@ const handelClick = (item: any) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
|
|
+ if(localStorage.getItem('userInfo') != null) {
|
|
|
|
|
+ AIIconVisible.value = true
|
|
|
|
|
+ }
|
|
|
AIRobotInit()
|
|
AIRobotInit()
|
|
|
emitter.on('login-success', isShowLogin)
|
|
emitter.on('login-success', isShowLogin)
|
|
|
emitter.on('login-out', Logout)
|
|
emitter.on('login-out', Logout)
|
|
@@ -151,7 +154,7 @@ defineExpose({
|
|
|
<div class="dialogue_title">Hi! I'm your Freight Assistant, always on call</div>
|
|
<div class="dialogue_title">Hi! I'm your Freight Assistant, always on call</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="flex_end">
|
|
<div class="flex_end">
|
|
|
- <div class="dialogue_content">
|
|
|
|
|
|
|
+ <div class="dialogue_content" style="box-shadow: -10px 10px 24px rgba(58, 0, 78, 0.15);">
|
|
|
<div class="dialogue_content_title">
|
|
<div class="dialogue_content_title">
|
|
|
<div class="dialogue_title_left">
|
|
<div class="dialogue_title_left">
|
|
|
<img src="../image/icon_faq_b@2x.png" width="24px" />
|
|
<img src="../image/icon_faq_b@2x.png" width="24px" />
|
|
@@ -288,6 +291,7 @@ defineExpose({
|
|
|
}
|
|
}
|
|
|
.dialogue_title {
|
|
.dialogue_title {
|
|
|
background: var(--color-dialogue-text-bg);
|
|
background: var(--color-dialogue-text-bg);
|
|
|
|
|
+ box-shadow: -10px 10px 24px rgba(58, 0, 78, 0.15);
|
|
|
padding: 8px;
|
|
padding: 8px;
|
|
|
border-radius: 12px;
|
|
border-radius: 12px;
|
|
|
margin: 10px 0;
|
|
margin: 10px 0;
|