You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
671 B
22 lines
671 B
'use strict';
|
|
const uniPush = uniCloud.getPushManager({
|
|
appId: "__UNI__9005101"
|
|
}) //注意这里需要传入你的应用appId
|
|
exports.main = async (event, context) => {
|
|
//event为客户端上传的参数
|
|
console.log('event : ', event)
|
|
|
|
//返回数据给客户端
|
|
return await uniPush.sendMessage({
|
|
"push_clientid": [
|
|
"9ec2345674b0f4fc05b42104ec300238",
|
|
"9cebd59e2219c5ba69426fa5df3f318f",
|
|
"60ffeb24c2cc2a6844aa59abbbc059d8"
|
|
], //填写上一步在uni-app客户端获取到的客户端推送标识push_clientid
|
|
"title": "通知栏显示的标题",
|
|
"content": "通知栏显示的内容",
|
|
"payload": {
|
|
"text": "体验一下uni-push2.0"
|
|
}
|
|
})
|
|
};
|