1.登录页面修改
Some checks failed
Uniapp 自动化打包 CI/CD / 打包 Uniapp 项目 (push) Has been cancelled

This commit is contained in:
2025-09-15 16:02:46 +08:00
parent 2476011b07
commit 86cfe5a464
5 changed files with 101 additions and 88 deletions

36
App.vue
View File

@@ -24,26 +24,26 @@
// 监听登录成功
uni.$on("loginSuccess", () => {
// NotifyPermission.ensurePermission(() => {
// // 权限已开,执行你的逻辑
// this.initWebSocket()
// })
this.initWebSocket()
NotifyPermission.ensurePermission(() => {
})
// // 仅在 Android 13+ 才需要
if (plus.os.name === "Android" && parseInt(plus.os.version) >= 13) {
var permission = "android.permission.POST_NOTIFICATIONS";
// 请求权限
plus.android.requestPermissions(
[permission],
(resultObj) => {
this.initWebSocket()
},
(error) => {
// if (plus.os.name === "Android" && parseInt(plus.os.version) >= 13) {
// var permission = "android.permission.POST_NOTIFICATIONS";
// // 请求权限
// plus.android.requestPermissions(
// [permission],
// (resultObj) => {
// this.initWebSocket()
// },
// (error) => {
}
);
} else {
this.initWebSocket()
}
// }
// );
// } else {
// this.initWebSocket()
// }
})
//只有在基座运行的情况下才能打印看到
const clientInfo = plus.push.getClientInfo()