fix: page
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed } from "vue";
|
||||
import { ref, computed, onMounted, onUnmounted } from "vue";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
import { getPlatformProvider, isSinglePageMode } from "@/utils/system";
|
||||
import { uploadImage } from "@/utils/common";
|
||||
@@ -112,6 +112,19 @@ const props = defineProps({
|
||||
|
||||
const emit = defineEmits(["logind"]);
|
||||
|
||||
// 监听全局事件
|
||||
const handleGlobalShow = () => {
|
||||
open();
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
uni.$on("show-login-popup", handleGlobalShow);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
uni.$off("show-login-popup", handleGlobalShow);
|
||||
});
|
||||
|
||||
// 是否处于单页模式(朋友圈打开)
|
||||
const isSinglePage = computed(() => isSinglePageMode());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user