收藏
回答

一次性订阅消息后台推送一直是43101?

{"errcode":43101,"errmsg":"user refuse to accept the msg rid: 66f62633-37906e90-07b0cac6"}

2024-09-27 11:27:47.661  WARN 5732 --- [io-22919-exec-6] 


wx.getSetting({

withSubscriptions: true,

success(res) {

console.log(res.subscriptionsSetting)

if (res.subscriptionsSetting.mainSwitch) {

let itemSettings = res.subscriptionsSetting.itemSettings;

console.log('itemSettings', itemSettings)

if (itemSettings) {

if (itemSettings['PhwVDy9PilecpFbpZKYm9YrqC6NtgUoFXF5D3dbVofo'] != 'accept') {

wx.showModal({

title: '提示',

content: '检测到您未开启订阅消息,是否前往设置?',

success(res) {

if (res.confirm) {

wx.openSetting({

withSubscriptions: true,

success: (openSetRes)=> {

wxSubmsgFail(openSetRes)


},

fail: function(err) {


}

});

}

}

})

}

uni.requestSubscribeMessage({

tmplIds: ['PhwVDy9PilecpFbpZKYm9YrqC6NtgUoFXF5D3dbVofo'],

success(res) {

if (res.errMsg == 'requestSubscribeMessage:ok') {

if (res['PhwVDy9PilecpFbpZKYm9YrqC6NtgUoFXF5D3dbVofo'] == 'accept') {

_saveOrUpdate(true)

uni.showToast({

title: '订阅消息成功~'

});

console.log('requestSubscribeMessage',true)

}

if (res['PhwVDy9PilecpFbpZKYm9YrqC6NtgUoFXF5D3dbVofo'] == 'reject') {

_saveOrUpdate(false)

uni.showToast({

title: '订阅消息失败~'

});

console.log('requestSubscribeMessage',false)

}

}

}

})

} else {

uni.requestSubscribeMessage({

tmplIds: ['PhwVDy9PilecpFbpZKYm9YrqC6NtgUoFXF5D3dbVofo'],

success(res) {

if (res.errMsg == 'requestSubscribeMessage:ok') {

if (res['PhwVDy9PilecpFbpZKYm9YrqC6NtgUoFXF5D3dbVofo'] == 'accept') {

_saveOrUpdate(true)

uni.showToast({

title: '订阅消息成功~'

});

console.log('requestSubscribeMessage',true)

}

if (res['PhwVDy9PilecpFbpZKYm9YrqC6NtgUoFXF5D3dbVofo'] == 'reject') {

_saveOrUpdate(false)

uni.showToast({

title: '订阅消息失败~'

});

console.log('requestSubscribeMessage',false)

}

}

}

})

}

} else {

if (res.subscriptionsSetting.itemSettings) {

wx.showModal({

title: '提示',

content: '检测到您未开启订阅消息,是否前往设置?',

success(res) {

if (res.confirm) {

wx.openSetting({

withSubscriptions: true,

success: (openSetRes)=> {

wxSubmsgFail(openSetRes)

},

fail: function(err) {


}

});

}

}

})

}


uni.requestSubscribeMessage({

tmplIds: ['PhwVDy9PilecpFbpZKYm9YrqC6NtgUoFXF5D3dbVofo'],

success(res) {

if (res.errMsg == 'requestSubscribeMessage:ok') {

if (res['PhwVDy9PilecpFbpZKYm9YrqC6NtgUoFXF5D3dbVofo'] == 'accept') {

_saveOrUpdate(true)

uni.showToast({

title: '订阅消息成功~'

});

console.log('requestSubscribeMessage',true)

}

if (res['PhwVDy9PilecpFbpZKYm9YrqC6NtgUoFXF5D3dbVofo'] == 'reject') {

_saveOrUpdate(false)

uni.showToast({

title: '订阅消息失败~'

});

console.log('requestSubscribeMessage',false)

}

}

}

})

}

}

})

回答关注问题邀请回答
收藏

2 个回答

  • 跨商通
    跨商通
    09-27

    正常情况。属于订阅次数用完了。用户需要再点击订阅,

    09-27
    有用
    回复
  • จุ๊บ
    จุ๊บ
    09-27

    订阅一次发送一次。还有你是在哪个版本(开发、体验、正式)订阅的?推送消息打开的默认是正式版

    09-27
    有用
    回复
登录 后发表内容