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
Email Patches
Plain Diff
Browse Files
Authored by
毕凯
8 years ago
Commit
4d12f55d4401a9ef4c7e5d8c903651d4b88449ca
1 parent
3fb584fc
店铺介绍支持 https
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
apps/product/models/list.js
apps/product/models/list.js
View file @
4d12f55
...
...
@@ -162,6 +162,13 @@ const getShopIntro = (shopId, uid) => {
}
return
api
.
get
(
''
,
params
,
{
code
:
200
}).
then
(
result
=>
{
if
(
result
&&
result
.
data
)
{
const
imgReg
=
/<img
[^
>
]
*src=
[
'"
]([^
'"
]
+
)[^
>
]
*>/gi
;
result
.
data
.
shop_intro
=
(
result
.
data
.
shop_intro
||
''
).
replace
(
imgReg
,
function
(
match
,
url
)
{
return
match
.
replace
(
url
,
url
.
replace
(
'http:'
,
''
));
});
}
return
result
&&
result
.
data
;
});
};
...
...
Please
register
or
login
to post a comment