From ea320f4e54d7c5318ea144f4871217d2237631a7 Mon Sep 17 00:00:00 2001 From: haomingming Date: Wed, 15 Oct 2025 13:48:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 132 +++++++++++++++++++++++++------------------------- manifest.json | 21 -------- 2 files changed, 66 insertions(+), 87 deletions(-) diff --git a/App.vue b/App.vue index 461a212..a3c425d 100644 --- a/App.vue +++ b/App.vue @@ -73,80 +73,80 @@ export default { // #endif // uni-app客户端获取push客户端标记,代码可以实现在App.vue中 - uni.getPushClientId({ - success: (res) => { - let push_clientid = res.cid - uni.setStorageSync("push_clientid", push_clientid) - console.log('客户端推送标识cid:',push_clientid) + // uni.getPushClientId({ + // success: (res) => { + // let push_clientid = res.cid + // uni.setStorageSync("push_clientid", push_clientid) + // console.log('客户端推送标识cid:',push_clientid) - const systemInfo = uni.getSystemInfoSync(); - console.log("systemInfo:", systemInfo) + // const systemInfo = uni.getSystemInfoSync(); + // console.log("systemInfo:", systemInfo) - let userInfo= uni.getStorageSync('userInfo') - console.log("userinfo:", userInfo) - if(!userInfo){ - return - } - if(userInfo.uuid){ - let client_type = "" - if (systemInfo.platform === 'android') { - client_type = "A" - } else if (systemInfo.platform === 'ios') { - client_type = "I" - } - console.log("client_type:", client_type) - if(client_type){ - my_api.addUniappCid({ - user_uuid: userInfo.uuid, - client_type:client_type, - cid: push_clientid - }) - } - } - }, - fail(err) { - console.error("unipush: ", err) - } - }) + // let userInfo= uni.getStorageSync('userInfo') + // console.log("userinfo:", userInfo) + // if(!userInfo){ + // return + // } + // if(userInfo.uuid){ + // let client_type = "" + // if (systemInfo.platform === 'android') { + // client_type = "A" + // } else if (systemInfo.platform === 'ios') { + // client_type = "I" + // } + // console.log("client_type:", client_type) + // if(client_type){ + // my_api.addUniappCid({ + // user_uuid: userInfo.uuid, + // client_type:client_type, + // cid: push_clientid + // }) + // } + // } + // }, + // fail(err) { + // console.error("unipush: ", err) + // } + // }) - uni.onPushMessage((res)=>{ - console.log("收到推送消息:", res) + // uni.onPushMessage((res)=>{ + // console.log("收到推送消息:", res) - let app_isback = uni.getStorageSync("app_isback") - console.log("app_isback:", app_isback) - uni.showModal({ - title: res.data.title, - content: res.type, - showCancel: false - }); + // let app_isback = uni.getStorageSync("app_isback") + // console.log("app_isback:", app_isback) + // uni.showModal({ + // title: res.data.title, + // content: res.type, + // showCancel: false + // }); - if(res.type === 'click' ){ + // if(res.type === 'click' ){ - }else{ - if(app_isback){ - uni.createPushMessage({ - title: res.data.title, - content: res.data.content, - payload: res.data.payload, - delay: 1, - success: (res) => { - console.log("创建推送消息成功", res) - } - }) - }else{ - console.log('[App] emit global-dialog:show', res) - uni.$emit('global-dialog:show', { - title: res.data.title || '消息通知', - content: res.data.content || '', - confirmText: '我知道了', - position: 'top', - offsetTop: '160rpx' - }) - } - } - }) + // }else{ + // if(app_isback){ + // uni.createPushMessage({ + // title: res.data.title, + // content: res.data.content, + // payload: res.data.payload, + // delay: 1, + // success: (res) => { + // console.log("创建推送消息成功", res) + // } + // }) + // }else{ + // console.log('[App] emit global-dialog:show', res) + // uni.$emit('global-dialog:show', { + // title: res.data.title || '消息通知', + // content: res.data.content || '', + // confirmText: '我知道了', + // position: 'top', + // offsetTop: '160rpx' + // }) + // } + // } + // }) /** 设置语言 (此处为了方便demo切换语言,将其存到本地,实际需根据业务情况设置)*/ setLanguage( diff --git a/manifest.json b/manifest.json index 5a45fc3..906d93b 100644 --- a/manifest.json +++ b/manifest.json @@ -21,13 +21,8 @@ "Payment" : {}, "Share" : {}, "Webview-x5" : {}, -<<<<<<< HEAD - "UIWebview" : {} -======= "UIWebview" : {}, - "Push" : {}, "VideoPlayer" : {} ->>>>>>> 2532aa055c0df42bb4696ce75410718e31df24d1 }, /* 模块配置 */ "distribute" : { @@ -82,23 +77,7 @@ } }, "speech" : {}, -<<<<<<< HEAD "push" : {} -======= - "push" : { - "unipush" : { - "version" : "2", - "offline" : false, - "honor" : {}, - "meizu" : {}, - "mi" : {}, - "vivo" : {}, - "oppo" : {}, - "hms" : {}, - "fcm" : {} - } - } ->>>>>>> 2532aa055c0df42bb4696ce75410718e31df24d1 }, "splashscreen" : { "androidStyle" : "common",