对接消息推送

This commit is contained in:
zhouyanli
2026-06-01 11:38:03 +08:00
parent fbe07e21a6
commit 3fa853cb4c
6 changed files with 41 additions and 30 deletions

View File

@@ -186,10 +186,12 @@ const handleLogin = () => {
return;
}
uni.showLoading({ title: '登录中...', mask: true });
const push_cid = uni.getStorageSync('push_cid')
let params = {
phone:phoneNumber.value,
smsCode:verifyCode.value,
scene:'login',
cid:push_cid
}
getLoginBySms(params).then(res =>{
if(res.code === 200){
@@ -204,6 +206,7 @@ const handleLogin = () => {
uni.setStorageSync('currentVillageId', currentVillageId);
uni.hideLoading();
uni.showToast({ title: '登录成功', icon: 'success' });
setTimeout(() =>{
uni.switchTab({ url: '/pages/index/index' });
},1500)
@@ -231,6 +234,14 @@ const handleLogin = () => {
// title:"登录成功",
// icon:'success'
// })
// 登录成功后上报推送 CID
// #ifdef APP-PLUS
const cid = uni.getStorageSync('push_cid')
if (cid) {
reportPushCID(cid)
}
// #endif
// setTimeout(() =>{
// uni.switchTab({ url: '/pages/index/index' });
// },1500)