perf: 全栈性能排查与优化落地 (消灭运行时DDL/消除全表扫描/内存泄漏治理/高频静态缓存)
这个提交包含在:
@@ -69,7 +69,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { ref, onMounted, onUnmounted } from 'vue';
|
||||
import { ICONS } from '@/common/icons.js';
|
||||
import { getCurrentThemeKey } from '@/common/theme.js';
|
||||
|
||||
@@ -77,6 +77,10 @@ const visible = ref(false);
|
||||
const currentThemeKey = ref(getCurrentThemeKey());
|
||||
let privacyResolve = null;
|
||||
|
||||
const onThemeChanged = (theme) => {
|
||||
currentThemeKey.value = theme;
|
||||
};
|
||||
|
||||
const STORAGE_KEY_PRIVACY_AGREED = 'PW_USER_PRIVACY_AGREED_V1';
|
||||
|
||||
const checkPrivacyAgreed = () => {
|
||||
@@ -95,9 +99,7 @@ const setPrivacyAgreed = (val) => {
|
||||
|
||||
onMounted(() => {
|
||||
currentThemeKey.value = getCurrentThemeKey();
|
||||
uni.$on('theme-change', (theme) => {
|
||||
currentThemeKey.value = theme;
|
||||
});
|
||||
uni.$on('theme-change', onThemeChanged);
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
if (typeof wx !== 'undefined' && wx.onNeedPrivacyAuthorization) {
|
||||
@@ -114,6 +116,10 @@ onMounted(() => {
|
||||
}
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
uni.$off('theme-change', onThemeChanged);
|
||||
});
|
||||
|
||||
const openPrivacyDoc = () => {
|
||||
// #ifdef MP-WEIXIN
|
||||
if (typeof wx !== 'undefined' && wx.openPrivacyContract) {
|
||||
|
||||
在新工单中引用
屏蔽一个用户