Browse Source

fix: 推送

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

23
src/App.vue

@ -51,6 +51,29 @@
})
}
// #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()) {
await store.GetPermissionInfo().then(res => {
}).catch(() => { })

17
src/manifest.json

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

Loading…
Cancel
Save