Authored by 毕凯

店铺介绍支持 https

... ... @@ -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;
});
};
... ...