# Push - 推送
# 简介
Push
为方便客户端使用UniPush
,初始化并监听了消息接收事件、点击事件。更多使用详见UniPush使用指南 (opens new window)
App.vue
中使用
<script>
import { Push } from '@anyup/uniui'
export default {
onLaunch: function () {
/* #ifdef APP-PLUS */
new Push().register(payload => {
setTimeout(() => {
try {
uni.navigateTo({ url: '/pages/message/message' })
} catch (error) {
}
}, 500);
})
/* #endif */
}
}
</script>
# 获取clientid
import { Plus } from '@anyup/uniui'
new Plus().clientid()
← Pager - 分页 Plus - 真机类 →