0.1.2 • Published 3 years ago
qq-browser-push v0.1.2
push-to-qb
推送订阅消息到QQ浏览器
使用
请求所需参数除了需要开发者传入,还有部分参数从url上获取,所以要避免在getCurrentPages函数取不到参数的生命周期内执行该方法
import QBpush from 'qq-browser-push';
const push = new QBpush('wx_appid');
/**
* 消息模板id 联系运营生成
* template_id: string
*/
const id = await push.submitForm('1');
调试环境问题
在开发时,请保持浏览器环境和接口环境一致。 若浏览器为测试环境,则需要将接口挂代理转发到测试环境
open.browser.qq.com test.open.browser.qq.com
若浏览器为正式环境,直接使用即可。
接口域名
https://open.browser.qq.com 添加到小程序请求域中