消息推送
Some checks failed
Uniapp 自动化打包 CI/CD / 打包 Uniapp 项目 (push) Has been cancelled

This commit is contained in:
2025-09-14 17:43:16 +08:00
parent 57fe929080
commit a6245b29cd
7 changed files with 260 additions and 42 deletions

15
utils/notify.js Normal file
View File

@@ -0,0 +1,15 @@
export function showNotification(title, content, extraData = {}) {
// App-Plus 平台
if (typeof plus !== 'undefined' && plus.push) {
plus.push.createMessage(content, extraData, function(result){
});
} else {
// H5 或其他平台,可以用 alert / toast 代替
uni.showToast({
title: content,
icon: 'none',
duration: 3000
})
}
}