diff --git a/src/App.vue b/src/App.vue index 01203cc..9375ec3 100644 --- a/src/App.vue +++ b/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(() => { }) diff --git a/src/manifest.json b/src/manifest.json index 4bdfb25..e6deb93 100644 --- a/src/manifest.json +++ b/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 + } + } } } },