onShareAppMessage 转发后不调用 success方法
onShareAppMessage 转发后不调用 success方法
/** * 用户点击右上角分享 */ onShareAppMessage: function () { var that = this return { title: '懂银行 汇营销' , path: '/pages/login/login' , imageUrl: 'https://www.yinqihui.net.cn/group1/M00/00/02/oYYBAFtF60GAbVNVAAKNzvi6SzE449.jpg' , success: function (res) { // 转发成功之后的回调 if (res.errMsg == 'shareAppMessage:ok' ) { wx.request({ url: configBase.service.baseUrl + 'market/addcoindetail' , method: "POST" , data: { "detailName" : "分享" , "detailType" : "DT00" , //"detailAmt": that.data.detailAmt, "detailAmt" : 100 , "cifNo" : wx.getStorageSync( 'userinfo' ).cifNo, "remark" : "分享" , "sourceType" : "ST06" }, success: function (res) { console.log(res.data) if (res.data.errCode == '000000' ) { that.todayqd(); } } }); api.showToast( '转发成功' ); } }, fail: function (res) { // 转发失败之后的回调 if (res.errMsg == 'shareAppMessage:fail cancel' ) { // 用户取消转发 api.showToast( '用户取消转发' ); } else if (res.errMsg == 'shareAppMessage:fail' ) { // 转发失败,其中 detail message 为详细失败信息 api.showToast( "转发失败:" + JSON.stringify(res)); } }, } }, |