chore: dev proxy config, sprite animator refactor, cleanups

- add vite dev proxy for `/ingress` to forward requests to backend https://onefeel.brother7.cn
- update .env.development to use relative proxy paths instead of full backend URLs
- move SpriteAnimator component to correct directory, update all imports and global type declarations in components.d.ts
- remove unused CSS styles and fix styling for ChatTopNavBar component, including switching to van-icon and hardcoding temporary site name
- uncomment and enable the ChatMainList component in home page
- clean up unused code, fix formatting, and set default client ID in src/utils/request.ts
- comment out redundant uni API calls in ChatMainList to simplify code
- update WebSocket URL handling to support relative paths in ChatMainList
This commit is contained in:
DEV_DSW
2026-05-27 10:40:21 +08:00
parent 0d46ac0e2c
commit a75bb909f1
11 changed files with 109 additions and 250 deletions

View File

@@ -1,32 +1,31 @@
<template>
<div class="border-box h-44 flex flex-items-center pl-12 pr-12">
<div class="nav-icon-button" @tap.stop="showDrawer">
<uni-icons type="bars" size="24" color="#ffffff" />
<div class="h-[44px] flex items-center pl-[12px] pr-[12px]">
<div class="w-[44px] h-[44px] flex items-center justify-center" @tap.stop="showDrawer">
<van-icon name="apps-o" size="24" color="#333" />
</div>
<!-- 隐藏 -->
<div v-if="false" class="flex-full h-full flex flex-items-center flex-justify-center">
<div v-if="false" class="flex-1 h-full flex items-center justify-center">
<!-- ChatTopWelcome不在可视区显示并添加动画在可视区隐藏 -->
<SpriteAnimator v-show="show" class="image-animated" :src="spriteStyle.ipSmallImage"
:frameWidth="spriteStyle.frameWidth" :frameHeight="spriteStyle.frameHeight"
:totalFrames="spriteStyle.totalFrames" :columns="spriteStyle.columns" :displayWidth="spriteStyle.displayWidth"
:fps="16" />
<span v-show="show" :class="[
'font-size-14 font-500 color-171717 ml-10',
'text-[14px] text-500 text-[#171717] ml-[10px]',
{ 'text-animated': show },
]">
{{ config.name }}
nianxx
</span>
</div>
<div class="w-24 h-24"></div>
<div class="w-[24px] h-[24px]"></div>
</div>
</template>
<script setup>
import { ref, defineProps, computed, defineExpose } from "vue";
import { getCurrentConfig } from "@/constants/base";
import SpriteAnimator from "@/components/Sprite/SpriteAnimator.vue";
import SpriteAnimator from "@/components/SpriteAnimator/index.vue";
const props = defineProps({
mainPageDataModel: {
@@ -42,16 +41,15 @@ const initPageImages = computed(() => {
});
const show = ref(false);
const config = getCurrentConfig();
const spriteStyle = computed(() => {
const images = initPageImages.value;
return {
ipSmallImage: images.ipSmallImage ?? config.ipSmallImage,
frameWidth: images.ipSmallImageWidth ?? config.ipSmallImageWidth,
frameHeight: images.ipSmallImageHeight ?? config.ipSmallImageHeight,
totalFrames: images.ipSmallTotalFrames ?? config.ipSmallTotalFrames,
columns: images.ipSmallColumns ?? config.ipSmallColumns,
ipSmallImage: images.ipSmallImage,
frameWidth: images.ipSmallImageWidth,
frameHeight: images.ipSmallImageHeight,
totalFrames: images.ipSmallTotalFrames,
columns: images.ipSmallColumns,
displayWidth: 32,
};
});

View File

@@ -1,11 +1,3 @@
.nav-icon-button {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
}
// 图片从0%到100%动画
.image-animated {
animation: logo-scale 0.3s ease-in-out;
@@ -36,4 +28,4 @@
opacity: 1;
transform: translateX(0);
}
}
}