Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c3e54136
authored
Sep 01, 2022
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
文件https
parent
aec8707d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
app/Http/Transformers/SupplierTransformer.php
app/Http/Transformers/SupplierTransformer.php
View file @
c3e54136
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment