为了账号安全,请及时绑定邮箱和手机立即绑定

调用的时候提示callback.call is not a function,新手求解

调用的时候提示callback.call is not a function,新手求解

人到中年有点甜 2019-02-20 22:19:46
findFolders (data, callback) {    let postData = ''    if (data.hasOwnProperty('id')) {      postData ? postData = postData + '&id=' + data.id : postData = postData + 'id=' + data.id    }    if (data.hasOwnProperty('cache')) {      postData ? postData = postData + '&cache=' + data.cache : postData = postData + 'cache=' + data.cache    }    if (data.hasOwnProperty('global')) {      postData ? postData = postData + '&global=' + 'true' : postData = postData + 'cache=' + data.cache    }    ajax.get({      url: '/folder/findFolders?' + postData,      success (d) {        callback && callback.call(this, d)      }    })  }
查看完整描述

2 回答

?
红颜莎娜

TA贡献1842条经验 获得超12个赞

请确定你传入的callback是function类型


查看完整回答
反对 回复 2019-02-26
  • 2 回答
  • 0 关注
  • 6808 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号