新增OA墨册刷新缓存时,同时刷新聊天;新增打包文件名时间戳,保证每次打包后上传会自动刷新;修改聊天webview的loading和error界面,更明显并于OA的作区分
Some checks are pending
Check / lint (push) Waiting to run
Check / typecheck (push) Waiting to run
Check / build (build, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build, 18.x, windows-latest) (push) Waiting to run
Check / build (build:app, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:app, 18.x, windows-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, ubuntu-latest) (push) Waiting to run
Check / build (build:mp-weixin, 18.x, windows-latest) (push) Waiting to run

This commit is contained in:
wangyifeng 2025-04-09 19:06:07 +08:00
parent 041692afe8
commit ec17da2e2c
7 changed files with 142 additions and 62 deletions

View File

@ -1,79 +1,89 @@
<template>
<div class="chat-app-error-page">
<div class="error-container">
<div class="error-icon">
<i class="iconfont icon-wifi"></i>
</div>
<div class="error-message">
<span>您的网络好像波动了一下~</span>
</div>
<div class="reload-button" @click="handleReload">
<span>重新加载</span>
</div>
</div>
</div>
</template>
<script setup>
import { computed } from 'vue';
location.reload(true);
import { onMounted, ref, computed, nextTick } from 'vue'
const handleReload = () => {
location.reload(true);
}
onMounted(() => {
if (typeof plus !== 'undefined') {
} else {
document.addEventListener('plusready', () => {
})
}
})
</script>
<template>
<div class="loader">
<p class="heading">加载中</p>
<div class="loading">
<div class="load"></div>
<div class="load"></div>
<div class="load"></div>
<div class="load"></div>
</div>
</div>
</template>
<!-- 重启页面 -->
<style scoped lang="scss">
.loader {
.chat-app-error-page {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}
background-image: url('@/static/image/clockIn/z3280@3x.png');
background-size: cover;
background-position: bottom center;
.heading {
color: black;
letter-spacing: 0.2em;
margin-bottom: 1em;
}
.error-container {
display: flex;
flex-direction: column;
align-items: center;
padding: 32px;
background: #ffffff;
border-radius: 16px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
max-width: 80%;
width: 320px;
.loading {
display: flex;
width: 5em;
align-items: center;
justify-content: center;
}
.error-icon {
font-size: 48px;
color: #ff6b6b;
margin-bottom: 16px;
}
.load {
width: 23px;
height: 3px;
background-color: limegreen;
animation: 1s move_5011 infinite;
border-radius: 5px;
margin: 0.1em;
}
.error-message {
font-size: 16px;
color: #333333;
margin-bottom: 24px;
text-align: center;
}
.load:nth-child(1) {
animation-delay: 0.2s;
}
.reload-button {
padding: 12px 32px;
background: $theme-primary;
color: #ffffff;
border-radius: 24px;
font-size: 16px;
cursor: pointer;
transition: all 0.3s ease;
.load:nth-child(2) {
animation-delay: 0.4s;
}
&:hover {
opacity: 0.9;
transform: translateY(-1px);
}
.load:nth-child(3) {
animation-delay: 0.6s;
}
@keyframes move_5011 {
0% {
width: 0.2em;
}
25% {
width: 0.7em;
}
50% {
width: 1.5em;
}
100% {
width: 0.2em;
&:active {
transform: translateY(0);
}
}
}
}
</style>

View File

@ -22,6 +22,9 @@ import { computed } from 'vue';
align-items: center;
justify-content: center;
height: 100vh;
background-image: url('@/static/image/clockIn/z3280@3x.png');
background-size: cover;
background-position: bottom center;
}
.heading {

View File

@ -90,6 +90,11 @@ export function createApp() {
useUserStore().loadSetting()
}
//处理OA、墨册强制刷新时聊天同步强制刷新
window.doLocationRefresh = () => {
location.reload(true)
}
window.message = ['success', 'error', 'warning'].reduce((acc, type) => {
acc[type] = (message) => {
if (typeof message === 'string') {

View File

@ -140,6 +140,20 @@
></settingFormItem>
</div>
</div>
<div
class="chat-group-infos chat-settings-card"
>
<div
class="chat-group-infos-each"
v-for="(item, index) in state.chatReport"
:key="index"
>
<settingFormItem
:item="item"
@toManagePage="toManagePage"
></settingFormItem>
</div>
</div>
<div class="clear-chat-record-btn chat-settings-card">
<div
@click="showConfirmPrompt(1)"
@ -242,6 +256,7 @@ const state = reactive({
recordSearchTypeList: [], //
chatSettings: [], //
chatManagement: [], //
chatReport: [], //
groupId: '', //id
sessionId: '', //id
})
@ -332,6 +347,12 @@ onMounted(() => {
customInfo: 'switch',
},
]
state.chatReport = [
// {
// label: t('chat.settings.report'),
// hasPointer: true,
// },
]
})
//

View File

@ -0,0 +1,22 @@
<template>
<div class="outer-layer user-detail-page">
<div class="root">
<ZPaging ref="zPaging" :show-scrollbar="false">
<template #top>
<customNavbar class="tmNavBar"></customNavbar>
</template>
</ZPaging>
</div>
</div>
</template>
<script setup>
</script>
<style scoped lang="scss">
.outer-layer {
flex: 1;
background-image: url('@/static/image/mine/1111.png');
background-size: cover;
background-repeat: no-repeat;
}
</style>

View File

@ -155,5 +155,6 @@
"do.phone.call": "拨打",
"popup.title.phone": "电话",
"pageTitle.view.deps": "查看部门",
"group.dismiss.confirm": "确定解散本群"
"group.dismiss.confirm": "确定解散本群",
"chat.settings.report": "投诉"
}

View File

@ -7,6 +7,9 @@ import UniKuRoot from '@uni-ku/root'
import { resolve } from 'node:path'
import UnoCSS from 'unocss/vite'
// 获取当前时间戳
const timestamp = new Date().getTime()
export default defineConfig({
envDir: './env', // 自定义env目录
resolve: {
@ -50,7 +53,22 @@ export default defineConfig({
resolvers: [NaiveUiResolver()]
})
],
build: {
rollupOptions: {
output: {
// 输出重构 打包编译后的js文件名称,添加时间戳
entryFileNames: `js/[name].${timestamp}.js`,
chunkFileNames: `js/[name].${timestamp}.js`,
assetFileNames: `assets/[name].${timestamp}.[ext]`
}
}
},
css: {
extract: {
// css重构 打包编译后的css文件名称,添加时间戳
filename: `css/[name].${timestamp}.css`,
chunkFilename: `css/[name].${timestamp}.css`
},
preprocessorOptions: {
scss: {
additionalData: `@import "@/static/css/color.scss";`,