From 4bb3da3c388064bdd0fa8d962751be1142e2b65f Mon Sep 17 00:00:00 2001
From: wujingling0908 <2.com>
Date: Tue, 22 Sep 2026 15:54:12 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=8E=86=E5=8F=B2=E8=AE=B0?=
=?UTF-8?q?=E5=BD=95=E4=BD=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/assets/style/common.css | 224 ++++++++++++++++++------------------
src/components/abstract.vue | 1 +
src/components/chat-new.vue | 71 ++++++------
src/components/welcomes.vue | 10 +-
src/views/chat.vue | 2 +-
5 files changed, 158 insertions(+), 150 deletions(-)
diff --git a/src/assets/style/common.css b/src/assets/style/common.css
index 037a1b5..e45b044 100644
--- a/src/assets/style/common.css
+++ b/src/assets/style/common.css
@@ -86,28 +86,30 @@
}
.van-overlay {
- background-color: rgba(0, 0, 0, .35)!important;
+ background-color: rgba(0, 0, 0, 0.35) !important;
}
.van-toast.van-toast--loading {
- width: 60px!important;
- height: 60px!important;
- min-height: 60px!important;
+ width: 60rem !important;
+ height: 60rem !important;
+ min-height: 60rem !important;
}
.van-dialog {
- width: 75%!important;
+ width: 75% !important;
}
#__vconsole .vc-switch {
z-index: 100000000000 !important;
}
-body .van-toast--html, body .van-toast--text {
- max-width: 200px;
+body .van-toast--html,
+body .van-toast--text {
+ max-width: 200rem;
}
-#__vconsole .vc-mask, #__vconsole .vc-panel {
+#__vconsole .vc-mask,
+#__vconsole .vc-panel {
z-index: 1000000 !important;
}
@@ -137,7 +139,7 @@ body .van-popup--bottom {
-webkit-transform: scale(.5);
-webkit-transform-origin: 0 0;
background-color: #ddd;
- height: 1px;
+ height: 1rem;
z-index: 2;
} */
@@ -151,7 +153,7 @@ body .van-image-preview__image img{
width: 70%;
} */
-/*1px线*/
+/*1rem线*/
._line-fine:not(:first-child)::before {
content: "";
@@ -159,12 +161,12 @@ body .van-image-preview__image img{
width: 200%;
left: 0;
top: 0;
- transform: scale(.5);
+ transform: scale(0.5);
transform-origin: 0 0;
- -webkit-transform: scale(.5);
+ -webkit-transform: scale(0.5);
-webkit-transform-origin: 0 0;
background-color: #b7b7b7;
- height: 1px;
+ height: 1rem;
z-index: 2;
}
@@ -182,8 +184,8 @@ body .van-image-preview__image img{
-webkit-transform-origin: 0 0;
transform: scale(0.5);
transform-origin: 0 0;
- border: 1px solid #8EC2FF;
- border-radius: 82px;
+ border: 1rem solid #8ec2ff;
+ border-radius: 82rem;
}
.before-top::before {
@@ -192,8 +194,8 @@ body .van-image-preview__image img{
left: 0;
top: 0;
width: 100%;
- height: 1px;
- border-top: 1px solid #ddd;
+ height: 1rem;
+ border-top: 1rem solid #ddd;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
-webkit-transform: scaleY(0.5);
@@ -204,10 +206,10 @@ body .van-image-preview__image img{
content: " ";
position: absolute;
left: 0;
- bottom: -1px;
+ bottom: -1rem;
width: 100%;
- height: 1px;
- border-bottom: 1px solid #e5e5e5;
+ height: 1rem;
+ border-bottom: 1rem solid #e5e5e5;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
-webkit-transform: scaleY(0.5);
@@ -215,25 +217,26 @@ body .van-image-preview__image img{
}
.this-news-box {
- padding-bottom: 18px;
+ padding-bottom: 18rem;
}
.this-news-tips {
font-family: PingFangSC-Regular;
- font-size: 11px;
- line-height: 16px;
+ font-size: 11rem;
+ line-height: 16rem;
color: #666666;
text-align: center;
position: relative;
}
-.this-news-tips:after, .this-news-tips:before {
+.this-news-tips:after,
+.this-news-tips:before {
content: "";
position: absolute;
top: 50%;
- height: 1px;
- width: 85px;
- border-top: 1px solid #ddd;
+ height: 1rem;
+ width: 85rem;
+ border-top: 1rem solid #ddd;
-webkit-transform-origin: 0 0;
transform-origin: 0 0;
-webkit-transform: scaleY(0.5);
@@ -241,39 +244,40 @@ body .van-image-preview__image img{
}
.this-news-tips:after {
- left: 34px;
+ left: 34rem;
}
.this-news-tips:before {
- right: 34px;
+ right: 34rem;
}
.elder-content .this-news-tips {
display: flex;
align-items: center;
justify-content: center;
- width: 150px;
- height: 27px;
- background: rgba(85, 92, 128, 0.10);
- border-radius: 13px;
+ width: 150rem;
+ height: 27rem;
+ background: rgba(85, 92, 128, 0.1);
+ border-radius: 13rem;
font-family: PingFangSC-Regular;
- font-size: 18px;
- color: #7E849F;
+ font-size: 18rem;
+ color: #7e849f;
text-align: center;
- line-height: 18px;
- margin-left: 98px;
+ line-height: 18rem;
+ margin-left: 98rem;
}
-.elder-content .this-news-tips:after, .this-news-tips:before {
- width: 96px;
+.elder-content .this-news-tips:after,
+.this-news-tips:before {
+ width: 96rem;
}
.elder-content .this-news-tips:after {
- left: 150px;
+ left: 150rem;
}
.elder-content .this-news-tips:before {
- right: 150px;
+ right: 150rem;
}
.opacity {
@@ -301,188 +305,182 @@ body .van-image-preview__image img{
.an-move-left {
margin-left: 0;
- animation: moveLeft .5s ease;
- -webkit-animation: moveLeft .5s ease;
+ animation: moveLeft 0.5s ease;
+ -webkit-animation: moveLeft 0.5s ease;
}
.an-move-right {
margin-left: 0;
- animation: moveRight .5s ease;
- -webkit-animation: moveRight .5s ease;
+ animation: moveRight 0.5s ease;
+ -webkit-animation: moveRight 0.5s ease;
}
.an-move-up {
margin-top: 0;
- animation: moveUp .5s ease;
- -webkit-animation: moveUp .5s ease;
+ animation: moveUp 0.5s ease;
+ -webkit-animation: moveUp 0.5s ease;
}
@keyframes moveRight {
0% {
- margin-left: -20px;
- opacity: 0
+ margin-left: -20rem;
+ opacity: 0;
}
- ;
100% {
margin-left: 0;
- opacity: 1
+ opacity: 1;
}
}
@-webkit-keyframes moveRight {
0% {
- margin-left: -20px;
- opacity: 0
+ margin-left: -20rem;
+ opacity: 0;
}
- ;
100% {
- margin-left: 0px;
- opacity: 1
+ margin-left: 0rem;
+ opacity: 1;
}
}
@keyframes moveLeft {
0% {
- margin-left: 20px;
- opacity: 0
+ margin-left: 20rem;
+ opacity: 0;
}
- ;
100% {
- margin-left: 0px;
- opacity: 1
+ margin-left: 0rem;
+ opacity: 1;
}
}
@-webkit-keyframes moveLeft {
0% {
- margin-left: 20px;
- opacity: 0
+ margin-left: 20rem;
+ opacity: 0;
}
- ;
100% {
- margin-left: 0px;
- opacity: 1
+ margin-left: 0rem;
+ opacity: 1;
}
}
@keyframes moveUp {
0% {
- margin-top: 30px;
- opacity: 0
+ margin-top: 30rem;
+ opacity: 0;
}
- ;
100% {
- margin-top: 0px;
- opacity: 1
+ margin-top: 0rem;
+ opacity: 1;
}
}
@-webkit-keyframes moveUp {
0% {
- margin-top: 30px;
- opacity: 0
+ margin-top: 30rem;
+ opacity: 0;
}
- ;
100% {
- margin-top: 0px;
- opacity: 1
+ margin-top: 0rem;
+ opacity: 1;
}
}
@-webkit-keyframes msgLeft {
0% {
- -webkit-transform: translateX(-20px);
- transform: translateX(-20px);
- opacity: 0
+ -webkit-transform: translateX(-20rem);
+ transform: translateX(-20rem);
+ opacity: 0;
}
50% {
- -webkit-transform: translateX(-20px);
- transform: translateX(-20px);
- opacity: 0
+ -webkit-transform: translateX(-20rem);
+ transform: translateX(-20rem);
+ opacity: 0;
}
to {
-webkit-transform: translateX(0);
transform: translateX(0);
- opacity: 1
+ opacity: 1;
}
}
@keyframes msgLeft {
0% {
- -webkit-transform: translateX(-20px);
- transform: translateX(-20px);
- opacity: 0
+ -webkit-transform: translateX(-20rem);
+ transform: translateX(-20rem);
+ opacity: 0;
}
50% {
- -webkit-transform: translateX(-20px);
- transform: translateX(-20px);
- opacity: 0
+ -webkit-transform: translateX(-20rem);
+ transform: translateX(-20rem);
+ opacity: 0;
}
to {
-webkit-transform: translateX(0);
transform: translateX(0);
- opacity: 1
+ opacity: 1;
}
}
@-webkit-keyframes msgRight {
0% {
- -webkit-transform: translateX(20px);
- transform: translateX(20px);
- opacity: 0
+ -webkit-transform: translateX(20rem);
+ transform: translateX(20rem);
+ opacity: 0;
}
20% {
- -webkit-transform: translateX(20px);
- transform: translateX(20px);
- opacity: 0
+ -webkit-transform: translateX(20rem);
+ transform: translateX(20rem);
+ opacity: 0;
}
to {
-webkit-transform: translateX(0);
transform: translateX(0);
- opacity: 1
+ opacity: 1;
}
}
@keyframes msgRight {
0% {
- -webkit-transform: translateX(20px);
- transform: translateX(20px);
- opacity: 0
+ -webkit-transform: translateX(20rem);
+ transform: translateX(20rem);
+ opacity: 0;
}
20% {
- -webkit-transform: translateX(20px);
- transform: translateX(20px);
- opacity: 0
+ -webkit-transform: translateX(20rem);
+ transform: translateX(20rem);
+ opacity: 0;
}
to {
-webkit-transform: translateX(0);
transform: translateX(0);
- opacity: 1
+ opacity: 1;
}
}
@-webkit-keyframes slideInRight {
0% {
- -webkit-transform: translateX(100px);
- transform: translateX(100px);
- opacity: 0
+ -webkit-transform: translateX(100rem);
+ transform: translateX(100rem);
+ opacity: 0;
}
to {
-webkit-transform: translateX(0);
transform: translateX(0);
- opacity: 1
+ opacity: 1;
}
}
@keyframes slideInRight {
0% {
- -webkit-transform: translateX(100px);
- transform: translateX(100px);
- opacity: 0
+ -webkit-transform: translateX(100rem);
+ transform: translateX(100rem);
+ opacity: 0;
}
to {
-webkit-transform: translateX(0);
transform: translateX(0);
- opacity: 1
+ opacity: 1;
}
-}
\ No newline at end of file
+}
diff --git a/src/components/abstract.vue b/src/components/abstract.vue
index 6092e93..c45225f 100644
--- a/src/components/abstract.vue
+++ b/src/components/abstract.vue
@@ -78,6 +78,7 @@ const getOrderCount = () => {
Post('policy/queryCount', {
dentityCardno: identityCardno,
+ userId: store.userId
})
} catch (error) {
console.log(error)
diff --git a/src/components/chat-new.vue b/src/components/chat-new.vue
index 135495b..9488ae6 100644
--- a/src/components/chat-new.vue
+++ b/src/components/chat-new.vue
@@ -18,7 +18,20 @@ import { SJHLCmdList } from '@/utils/constant'
defineOptions({
name: 'chat-new',
})
-
+const { isWX, tokenExist, lostChatInfoNum } = defineProps({
+ isWX: {
+ type: Boolean,
+ default: false,
+ },
+ tokenExist: {
+ type: Boolean,
+ default: false,
+ },
+ lostChatInfoNum: {
+ type: Number,
+ default: 0,
+ },
+})
const store = inject('appStore', null)
const chatArr = inject('chatArr', ref([]))
const isChatLoading = inject('isChatLoading', ref(false))
@@ -28,9 +41,9 @@ const isLostMessage = inject('isLostMessage', ref(null))
const mainContainerRef = ref(null)
// 参考 liics/chat-main 的 tokenExist:token 获取成功后才渲染聊天主内容
-const tokenExist = computed(() => Boolean(store?.token))
const historylist = ref([])
+const historyLoading = ref(false)
const pageNum = ref(1)
const pageSize = ref(10)
const nolist = ref(false)
@@ -208,9 +221,11 @@ const getChatHistory = async () => {
sessionId: sessionId.value || store?.sessionId,
userId: userId.value || store?.userId,
}
+ historyLoading.value = true
Post('history/chatInfo', params)
.then((response) => {
+ historyLoading.value = false
if (response.code && response.code != 0) {
showToast(response.msg)
return
@@ -248,8 +263,8 @@ const getChatHistory = async () => {
const normalizedList = store.normalizeHistoryMessages
? store.normalizeHistoryMessages(dataList)
: dataList
- store.chatArr = normalizedList.concat(store.chatArr)
- _.map(store.chatArr, (item) => {
+ historylist.value = normalizedList.concat(historylist.value)
+ _.map(historylist.value, (item) => {
// 历史记录不展示数据互联
if (SJHLCmdList.includes(item.cmd) && !_.isEmpty(item.VIEW_ID)) {
item.msgText = ''
@@ -286,6 +301,7 @@ const getChatHistory = async () => {
}
})
.catch(() => {
+ historyLoading.value = false
pageNum.value--
nolist.value = true
})
@@ -309,44 +325,28 @@ watch(
-
+