Commit 26211be1 authored by 李尚科's avatar 李尚科
parents 33f09706 5ea97ecf
Pipeline #6294 passed with stage
in 12 seconds
......@@ -65,8 +65,9 @@ class MineService extends Service {
const result = await ctx.helper.send_request(this.config.USER_CENTER_API_URI + '/v1/appusers/' + appUserId, {}, { method: 'GET', dataType: 'json' });
const ret = result.status === 200 ? result.data : {};
if (ret.avatar && ret.avatar.indexOf('http') === -1) {
ret.avatar = this.config.AVATAR_URL + ret.avatar;
ret.avatar = this.config.CDN_BASE_URL + ret.avatar;
}
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;
}
......
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