emis-sapp/common/componentEventHandle.js

20 lines
395 B
JavaScript
Raw Normal View History

2024-07-31 16:54:49 +00:00
import { goto } from "./untool"
2024-07-31 19:36:54 +00:00
import { getCurrentInstance } from "vue"
import { sysEventNames } from "@/common/enum"
2024-07-31 16:54:49 +00:00
2024-09-24 15:01:05 +00:00
// 唤起登录
2024-07-31 16:54:49 +00:00
export const goLogin = ()=> {
2024-07-31 18:59:34 +00:00
// #ifdef MP
2024-07-31 19:36:54 +00:00
uni.$emit(sysEventNames.login, { })
2024-07-31 18:59:34 +00:00
// #endif
// #ifndef MP
goto("login/login", 2)
// #endif
2024-09-24 15:01:05 +00:00
}
// 唤起消息订阅
export const triggerSubscribeMessage = ()=> {
uni.$emit(sysEventNames.subMessage, { })
2024-07-31 16:54:49 +00:00
}