Commit c604d83e authored by Hsinli's avatar Hsinli

addd

parent 46481cb3
Pipeline #6316 passed with stage
in 4 seconds
...@@ -67,8 +67,9 @@ class MineService extends Service { ...@@ -67,8 +67,9 @@ class MineService extends Service {
if (ret.avatar && ret.avatar.indexOf('http') === -1) { if (ret.avatar && ret.avatar.indexOf('http') === -1) {
ret.avatar = this.config.CDN_BASE_URL + ret.avatar; ret.avatar = this.config.CDN_BASE_URL + ret.avatar;
} }
ctx.logger.info(ret); if (ret.avatar && ret.avatar !== null) {
ret.avatar = ret.avatar.replace(/^(?=^.{3,255}$)(http(s)?:\/\/)?(www\.)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:\d+)*(\/\w+\.\w+)*/i, 'https://r.51gjj.com'); ret.avatar = ret.avatar.replace(/^(?=^.{3,255}$)(http(s)?:\/\/)?(www\.)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:\d+)*(\/\w+\.\w+)*/i, 'https://r.51gjj.com');
}
return ret; return ret;
} }
......
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 to comment