From e66d124348d61f400113a9e2248451056cdafe28 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Wed, 27 Mar 2024 11:25:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 23 +++++++++++++++++++++++ src/manifest.json | 17 +++++++++++++---- 2 files changed, 36 insertions(+), 4 deletions(-) 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 + } + } } } },