Browse Source

fix: 推送

master
zhang_li 8 months ago
parent
commit
e66d124348
  1. 23
      src/App.vue
  2. 17
      src/manifest.json

23
src/App.vue

@ -51,6 +51,29 @@
}) })
} }
// #endif // #endif
uni.getPushClientId({
success: (res) => {
console.log(res);
console.log(res.cid);
},
fail(err) {
console.log(err)
}
})
uni.onPushMessage((res)=>{
console.log(res)
// uni.createPushMessage({
// title: '',
// content: res.data,
// payload: {},
// success: () => {
// console.log("")
// },
// fail: () => {
// console.log("")
// }
// })
})
if (getAccessToken()) { if (getAccessToken()) {
await store.GetPermissionInfo().then(res => { await store.GetPermissionInfo().then(res => {
}).catch(() => { }) }).catch(() => { })

17
src/manifest.json

@ -1,6 +1,7 @@
{ {
"name" : "鸿翔", "name" : "富维汽车镜",
"appid" : "__UNI__DA78BC9", "appid" : "__UNI__BD5EF27",
"package" : "com.eam.uniapp",
"description" : "", "description" : "",
"versionName" : "1.0.0", "versionName" : "1.0.0",
"versionCode" : "100", "versionCode" : "100",
@ -17,7 +18,9 @@
"delay" : 0 "delay" : 0
}, },
/* */ /* */
"modules" : {}, "modules" : {
"Push" : {}
},
/* */ /* */
"distribute" : { "distribute" : {
/* android */ /* android */
@ -46,7 +49,13 @@
}, },
/* SDK */ /* SDK */
"sdkConfigs" : { "sdkConfigs" : {
"ad" : {} "ad" : {},
"push" : {
"unipush" : {
"version" : "2",
"offline" : true
}
}
} }
} }
}, },

Loading…
Cancel
Save