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
a9cbf937
authored
Feb 28, 2023
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复bug
parent
ff15a419
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
app/Http/Transformers/SupplierContactTransformer.php
app/Http/Transformers/SupplierContactTransformer.php
View file @
a9cbf937
...
...
@@ -19,25 +19,27 @@ class SupplierContactTransformer
$emailTemp
=
explode
(
'@'
,
$item
[
'supplier_email'
])[
0
];
$replace
=
str_pad
(
'*'
,
strlen
(
$emailTemp
),
'*'
);
$emailTemp
=
str_replace
(
$emailTemp
,
$replace
,
$emailTemp
);
$item
[
'supplier_email'
]
=
$emailTemp
.
'@'
.
explode
(
'@'
,
$item
[
'supplier_email'
])[
1
];
$item
[
'supplier_email'
]
=
$emailTemp
.
'@'
.
isset
(
explode
(
'@'
,
$item
[
'supplier_email'
])[
1
])
?
explode
(
'@'
,
$item
[
'supplier_email'
])[
1
]
:
'***'
;
}
if
(
!
empty
(
$item
[
'supplier_mobile'
]))
{
$temp
=
substr
(
$item
[
'supplier_mobile'
],
3
,
4
);
$item
[
'supplier_mobile'
]
=
str_replace
(
$temp
,
'****'
,
$item
[
'supplier_mobile'
]);
$item
[
'supplier_mobile'
]
=
str_replace
(
$temp
,
'****'
,
$item
[
'supplier_mobile'
]);
}
if
(
!
empty
(
$item
[
'supplier_qq'
]))
{
$temp
=
substr
(
$item
[
'supplier_qq'
],
2
,
strlen
(
$item
[
'supplier_qq'
]));
$replace
=
str_pad
(
'*'
,
strlen
(
$temp
),
'*'
);
$item
[
'supplier_qq'
]
=
str_replace
(
$temp
,
$replace
,
$item
[
'supplier_qq'
]);
$item
[
'supplier_qq'
]
=
str_replace
(
$temp
,
$replace
,
$item
[
'supplier_qq'
]);
}
if
(
!
empty
(
$item
[
'supplier_telephone'
]))
{
if
(
count
(
explode
(
'-'
,
$item
[
'supplier_telephone'
]))
>
1
)
{
if
(
count
(
explode
(
'-'
,
$item
[
'supplier_telephone'
]))
>
1
)
{
$temp
=
explode
(
'-'
,
$item
[
'supplier_telephone'
])[
1
];
$replace
=
str_pad
(
'*'
,
strlen
(
$temp
),
'*'
);
$item
[
'supplier_telephone'
]
=
str_replace
(
$temp
,
$replace
,
$item
[
'supplier_telephone'
]);
}
else
{
$item
[
'supplier_telephone'
]
=
str_replace
(
$temp
,
$replace
,
$item
[
'supplier_telephone'
]);
}
else
{
$replace
=
str_pad
(
'*'
,
strlen
(
$item
[
'supplier_telephone'
]),
'*'
);
$item
[
'supplier_telephone'
]
=
str_replace
(
$item
[
'supplier_telephone'
],
$replace
,
$item
[
'supplier_telephone'
]);
$item
[
'supplier_telephone'
]
=
str_replace
(
$item
[
'supplier_telephone'
],
$replace
,
$item
[
'supplier_telephone'
]);
}
}
...
...
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