新增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> <script setup>
import { computed } from 'vue'; import { onMounted, ref, computed, nextTick } from 'vue'
location.reload(true);
const handleReload = () => {
location.reload(true);
}
onMounted(() => {
if (typeof plus !== 'undefined') {
} else {
document.addEventListener('plusready', () => {
})
}
})
</script> </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"> <style scoped lang="scss">
.loader { .chat-app-error-page {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
height: 100vh; height: 100vh;
} background-image: url('@/static/image/clockIn/z3280@3x.png');
background-size: cover;
background-position: bottom center;
.heading { .error-container {
color: black; display: flex;
letter-spacing: 0.2em; flex-direction: column;
margin-bottom: 1em; 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 { .error-icon {
display: flex; font-size: 48px;
width: 5em; color: #ff6b6b;
align-items: center; margin-bottom: 16px;
justify-content: center; }
}
.load { .error-message {
width: 23px; font-size: 16px;
height: 3px; color: #333333;
background-color: limegreen; margin-bottom: 24px;
animation: 1s move_5011 infinite; text-align: center;
border-radius: 5px; }
margin: 0.1em;
}
.load:nth-child(1) { .reload-button {
animation-delay: 0.2s; 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) { &:hover {
animation-delay: 0.4s; opacity: 0.9;
} transform: translateY(-1px);
}
.load:nth-child(3) { &:active {
animation-delay: 0.6s; transform: translateY(0);
} }
}
@keyframes move_5011 {
0% {
width: 0.2em;
}
25% {
width: 0.7em;
}
50% {
width: 1.5em;
}
100% {
width: 0.2em;
} }
} }
</style> </style>

View File

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

View File

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

View File

@ -140,6 +140,20 @@
></settingFormItem> ></settingFormItem>
</div> </div>
</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 class="clear-chat-record-btn chat-settings-card">
<div <div
@click="showConfirmPrompt(1)" @click="showConfirmPrompt(1)"
@ -242,6 +256,7 @@ const state = reactive({
recordSearchTypeList: [], // recordSearchTypeList: [], //
chatSettings: [], // chatSettings: [], //
chatManagement: [], // chatManagement: [], //
chatReport: [], //
groupId: '', //id groupId: '', //id
sessionId: '', //id sessionId: '', //id
}) })
@ -332,6 +347,12 @@ onMounted(() => {
customInfo: 'switch', 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": "拨打", "do.phone.call": "拨打",
"popup.title.phone": "电话", "popup.title.phone": "电话",
"pageTitle.view.deps": "查看部门", "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 { resolve } from 'node:path'
import UnoCSS from 'unocss/vite' import UnoCSS from 'unocss/vite'
// 获取当前时间戳
const timestamp = new Date().getTime()
export default defineConfig({ export default defineConfig({
envDir: './env', // 自定义env目录 envDir: './env', // 自定义env目录
resolve: { resolve: {
@ -50,7 +53,22 @@ export default defineConfig({
resolvers: [NaiveUiResolver()] resolvers: [NaiveUiResolver()]
}) })
], ],
build: {
rollupOptions: {
output: {
// 输出重构 打包编译后的js文件名称,添加时间戳
entryFileNames: `js/[name].${timestamp}.js`,
chunkFileNames: `js/[name].${timestamp}.js`,
assetFileNames: `assets/[name].${timestamp}.[ext]`
}
}
},
css: { css: {
extract: {
// css重构 打包编译后的css文件名称,添加时间戳
filename: `css/[name].${timestamp}.css`,
chunkFilename: `css/[name].${timestamp}.css`
},
preprocessorOptions: { preprocessorOptions: {
scss: { scss: {
additionalData: `@import "@/static/css/color.scss";`, additionalData: `@import "@/static/css/color.scss";`,