解決問(wèn)題: http://therapist.net.cn/ask/thread/53756
文件地址:crmeb/app/api/controller/v1/PublicController.php
原因: 二維碼url在H5中總是返回空數(shù)組,但是生成base64數(shù)據(jù)的時(shí)候,是要檢測(cè)二維碼域名的,這個(gè)判斷直接導(dǎo)致 圖片的base64數(shù)據(jù)無(wú)法生成并返回,一直提示無(wú)法獲取圖片信息
修復(fù)方法: 只有在二維碼鏈接存在時(shí)才進(jìn)入判斷
if ($domainArr && $codeUrl && (($imageUrl && !in_array($imageUrl, $domainArr)) || (!in_array($codeUrl, $domainArr)))) {
return app('json')->success(['code' => false, 'image' => false]);
}