|
@@ -1,5 +1,6 @@
|
|
|
<script setup>
|
|
|
import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'
|
|
|
+import { bindUser } from '@/api/common'
|
|
|
import { usePageAuth } from '@/hooks/usePageAuth'
|
|
|
import { t } from '@/locale'
|
|
|
import { useUserStore } from '@/store'
|
|
@@ -40,6 +41,10 @@ onLaunch(() => {
|
|
|
const connectEnable = result.connectEnable
|
|
|
uni.$emit('connectStatusChange', connectEnable)
|
|
|
})
|
|
|
+ mtpushModule.getRegistrationID((result) => {
|
|
|
+ uni.setStorageSync('registerID', result.registerID)
|
|
|
+ bindUser({ jpushDeviceId: result.registerID })
|
|
|
+ })
|
|
|
|
|
|
// mtpushModule.addNotificationListener((result) => {
|
|
|
// const notificationEventType = result.notificationEventType
|