Commit c3e54136 by 杨树贤

文件https

parent aec8707d
Showing with 9 additions and 1 deletions
......@@ -341,7 +341,15 @@ class SupplierTransformer
$supplier['contact'] = $supplier['contact'] ? (new SupplierContactTransformer())->transformList($supplier['contact']) : [];
$supplier['receipt'] = $supplier['receipt'] ? (new ReceiptTransformer())->transformList($supplier['receipt']) : [];
$supplier['attachment'] = $supplier['attachment'] ? (new SupplierAttachmentTransformer())->transformList($supplier['attachment']) : [];
//还要把附件都转成https,小程序那边只能https
$supplier['receipt'] = array_map(function ($receipt) {
$receipt['certificate'] = str_replace('http://', 'https://', $receipt['certificate']);
return $receipt;
}, $supplier['receipt']);
$supplier['attachment'] = array_map(function ($attachment) {
$attachment['file_url'] = str_replace('http://', 'https://', $attachment['file_url']);
return $attachment;
}, $supplier['attachment']);
return $supplier;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment