锁定微信订阅失败响应
微信订阅消息失败结果不再向 H5 透出原生错误 微信订阅测试覆盖 requestSubscribeMessage 失败的稳定原因 native shell 总门禁反查微信订阅结果边界
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/* global wx */
|
||||
|
||||
const SUBSCRIBE_RESULT_STORAGE_KEY = 'genarrative:wechat-subscribe-result';
|
||||
const WECHAT_SUBSCRIBE_UNAVAILABLE_REASON = 'wechat subscribe unavailable';
|
||||
|
||||
function appendSubscribeResult(url, result) {
|
||||
const hashIndex = String(url || '').indexOf('#');
|
||||
@@ -98,10 +99,11 @@ function createSubscribeMessagePageController(pageContext, options = {}) {
|
||||
wx.navigateBack();
|
||||
},
|
||||
fail(error) {
|
||||
console.error('[subscribe-message] request failed', error);
|
||||
notifyPageResult(
|
||||
page,
|
||||
'skip',
|
||||
error && error.errMsg ? error.errMsg : 'failed',
|
||||
WECHAT_SUBSCRIBE_UNAVAILABLE_REASON,
|
||||
);
|
||||
wx.navigateBack();
|
||||
},
|
||||
@@ -121,6 +123,7 @@ function createSubscribeMessagePageController(pageContext, options = {}) {
|
||||
|
||||
module.exports = {
|
||||
SUBSCRIBE_RESULT_STORAGE_KEY,
|
||||
WECHAT_SUBSCRIBE_UNAVAILABLE_REASON,
|
||||
appendSubscribeResult,
|
||||
buildSubscribeResultValue,
|
||||
createSubscribeMessagePageController,
|
||||
|
||||
Reference in New Issue
Block a user