Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuywap-node
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
zhangxiaoru
8 years ago
Commit
bc8141ae6ea0585eabb5a647de97e6122d23fbc7
2 parents
72b64d56
54b02c9a
merge
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
apps/service/models/im.js
apps/service/models/im.js
View file @
bc8141a
...
...
@@ -15,10 +15,12 @@ exports.handleOrderList = (data, w, h) => {
}
function
replaceWH
(
img
)
{
return
img
.
replace
(
/
(\{
width
\}
|
\{
height
\})
/g
,
function
(
$0
)
{
return
img
.
replace
(
/
(
^https
?
:|
\{
width
\}
|
\{
height
\})
/g
,
function
(
$0
)
{
const
dict
=
{
'{width}'
:
w
,
'{height}'
:
h
'{height}'
:
h
,
'http:'
:
''
,
'https:'
:
''
};
return
dict
[
$0
];
...
...
Please
register
or
login
to post a comment