Authored by 沈志敏

去掉https

... ... @@ -33,7 +33,7 @@ const getImgUrl = function(src, width = 300, height = 300, mode = 2) {
};
return dict[$0];
}).replace('http:', '') + '/interlace/1' : '';
}).replace(/https?:/, '') + '/interlace/1' : '';
};
// 退换货 申请 成功, 打开 modal
... ... @@ -89,4 +89,4 @@ module.exports = {
getImgUrl,
applySuccuss,
visibilitychange
};
\ No newline at end of file
};
... ...
/*
* @Author: Targaryen
* @Date: 2016-08-02 17:29:52
* @Last Modified by: Targaryen
* @Last Modified time: 2016-08-02 17:42:26
*/
* @Author: Targaryen
* @Date: 2016-08-02 17:29:52
* @Last Modified by: Targaryen
* @Last Modified time: 2016-08-02 17:42:26
*/
module.exports = (Vue) => {
Vue.directive('lazy-html', function(html) {
// TODO 首屏幕不使用
html = html.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, '<img v-bind:src="\'$1\'">');
html = html.replace(/<img [^>]*src=['"]([^'"]+)[^>]*>/gi, '<img v-bind:src="\'$1\'">').replace(/https?:/gi, '');
this.el.innerHTML = html;
this.vm.$compile(this.el);
});
... ...
... ... @@ -125,7 +125,7 @@
<ul v-for="item in intro.productMaterialList">
<div>
<div class="image-box">
<img :src="item.imageUrl" width="86" height="35"/>
<img :src="item.imageUrl | resize 86 35" width="86" height="35"/>
</div>
<div class="text-box">
<div>{{item.caption}}</div>
... ... @@ -449,8 +449,6 @@
tip(result.message);
});
},
//state
isApp: yoho.isApp,
isSoldOut: false,
isReady: false
... ... @@ -553,12 +551,15 @@
// 读取商品详情
$.get(`/product/product/intro_${pid}.json`, {skn: data.productSkn}).then(intro => {
this.intro = intro;
if (this.intro.sizeImage) {
this.intro.sizeImage = this.intro.sizeImage.replace(/https?:/, '');
}
});
if (data.brandInfo && data.brandInfo.brandId) {
$.get(`/product/product/brand_${data.brandInfo.brandId}.json`).then(brand => {
this.brand = brand.data && brand.data.length ? brand.data[0] : {};
});
});
}
}
})
... ...