This commit is contained in:
15
utils/notify.js
Normal file
15
utils/notify.js
Normal 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
|
||||
})
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user