ReferenceError: _ is not defined
来源:4-5 第四天 荡平永久素材接口-上传
AssassinX
2016-08-30
Wechat.prototype.uploadMaterial = function(type, material, permanent) { var that = this var form = {} var uploadUrl = api.temporary.upload if (permanent) { uploadUrl = api.permanent.upload _.extend(form, permanent) //这里的_.extend是什么意思? } if ('pic' === type) { uploadUrl = api.permanent.uploadNewsPic } if ('news' === type) { uploadUrl = api.permanent.uploadNews form = material } else { form.media = fs.createReadStream(material) }
上面的_.extend(form, permanent)是什么意思?代码运行到这里显示_未定义
写回答
2回答
-
AssassinX
提问者
2016-08-30
原来视频后面有解决方式,是要引用一个库lodash。
00 -
AssassinX
提问者
2016-08-30
删除或注释掉 _.extend(form, permanent) 这一句就OK了
00
相似问题