update
1.添加弹窗提示音
This commit is contained in:
+28
-1
@@ -7,17 +7,19 @@
|
||||
import zhCN from 'ant-design-vue/es/locale/zh_CN';
|
||||
import dayjs from 'dayjs';
|
||||
import 'dayjs/locale/zh-cn';
|
||||
import { onMounted } from 'vue';
|
||||
import { h, nextTick, onMounted, ref, watch } from 'vue';
|
||||
import { getEmergencyCenterApi } from '/@/api/user.ts';
|
||||
import { useUserStore } from '/@/store/modules/user.ts';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { getBaseLogin } from '/@/enum/pageEnum.ts';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
|
||||
dayjs.locale('zh-cn');
|
||||
const locle = zhCN;
|
||||
|
||||
const userStore = useUserStore();
|
||||
const router = useRouter();
|
||||
const appRouteView = ref();
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
@@ -31,7 +33,32 @@
|
||||
userStore.setCenterInfo(result);
|
||||
}
|
||||
} catch (e) {}
|
||||
if (userStore.getUserInfo) {
|
||||
}
|
||||
document.body.addEventListener('click', initAudio);
|
||||
});
|
||||
|
||||
watch(
|
||||
() => userStore.getCount,
|
||||
() => {
|
||||
audioPlay();
|
||||
}
|
||||
);
|
||||
|
||||
const audio = new Audio('13203.wav');
|
||||
function initAudio() {
|
||||
audioPlay(true);
|
||||
document.body.addEventListener('remove', initAudio);
|
||||
}
|
||||
function audioPlay(flag: boolean = false) {
|
||||
audio.muted = flag;
|
||||
audio.play();
|
||||
}
|
||||
</script>
|
||||
<style lang="less" src="./assets/less/index.less"></style>
|
||||
<style src="./assets/theme/theme.css"></style>
|
||||
<style lang="less">
|
||||
.modal-confirm-d {
|
||||
top: 28% !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user