fix: CDN image url (#8000)

* fix: CDN image url

* test: fix snapshot
This commit is contained in:
neverland 2021-01-26 11:08:44 +08:00 committed by GitHub
parent ac0ae91933
commit b8d466d910
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 11 additions and 12 deletions

View File

@ -9,7 +9,7 @@ import Button from '../button';
import Coupon from '../coupon';
const [createComponent, bem, t] = createNamespace('coupon-list');
const EMPTY_IMAGE = 'https://img.yzcdn.cn/vant/coupon-empty.png';
const EMPTY_IMAGE = 'https://img01.yzcdn.cn/vant/coupon-empty.png';
export default createComponent({
model: {

View File

@ -54,7 +54,6 @@ exports[`render coupon cell with coupon 1`] = `
</div>
`;
exports[`render coupon cell with zero discount 1`] = `
<div role="button" tabindex="0" class="van-cell van-cell--clickable van-coupon-cell">
<div class="van-cell__title"><span>优惠券</span></div>
@ -235,14 +234,14 @@ exports[`render empty coupon list 1`] = `
<div class="van-tabs__content">
<div role="tabpanel" class="van-tab__pane" style="display: none;">
<div class="van-coupon-list__list van-coupon-list__list--with-bottom" style="height: 628px;">
<div class="van-coupon-list__empty"><img src="https://img.yzcdn.cn/vant/coupon-empty.png">
<div class="van-coupon-list__empty"><img src="https://img01.yzcdn.cn/vant/coupon-empty.png">
<p>暂无优惠券</p>
</div>
</div>
</div>
<div role="tabpanel" class="van-tab__pane" style="">
<div class="van-coupon-list__list van-coupon-list__list--with-bottom" style="height: 628px;">
<div class="van-coupon-list__empty"><img src="https://img.yzcdn.cn/vant/coupon-empty.png">
<div class="van-coupon-list__empty"><img src="https://img01.yzcdn.cn/vant/coupon-empty.png">
<p>暂无优惠券</p>
</div>
</div>

View File

@ -30,7 +30,7 @@ export default createComponent({
let { image } = this;
if (PRESETS.indexOf(image) !== -1) {
image = `https://img.yzcdn.cn/vant/empty-image-${image}.png`;
image = `https://img01.yzcdn.cn/vant/empty-image-${image}.png`;
}
return <img src={image} />;

View File

@ -4,7 +4,7 @@ exports[`renders demo correctly 1`] = `
<div>
<div>
<div class="van-empty">
<div class="van-empty__image"><img src="https://img.yzcdn.cn/vant/empty-image-default.png"></div>
<div class="van-empty__image"><img src="https://img01.yzcdn.cn/vant/empty-image-default.png"></div>
<p class="van-empty__description">描述文字</p>
</div>
</div>
@ -21,7 +21,7 @@ exports[`renders demo correctly 1`] = `
<div class="van-tabs__content">
<div role="tabpanel" class="van-tab__pane" style="">
<div class="van-empty">
<div class="van-empty__image"><img src="https://img.yzcdn.cn/vant/empty-image-error.png"></div>
<div class="van-empty__image"><img src="https://img01.yzcdn.cn/vant/empty-image-error.png"></div>
<p class="van-empty__description">描述文字</p>
</div>
</div>
@ -42,7 +42,7 @@ exports[`renders demo correctly 1`] = `
</div>
<div>
<div class="van-empty">
<div class="van-empty__image"><img src="https://img.yzcdn.cn/vant/empty-image-default.png"></div>
<div class="van-empty__image"><img src="https://img01.yzcdn.cn/vant/empty-image-default.png"></div>
<p class="van-empty__description">描述文字</p>
<div class="van-empty__bottom"><button class="bottom-button van-button van-button--danger van-button--normal van-button--round">
<div class="van-button__content"><span class="van-button__text">

View File

@ -2,14 +2,14 @@
exports[`bottom slot 1`] = `
<div class="van-empty">
<div class="van-empty__image"><img src="https://img.yzcdn.cn/vant/empty-image-default.png"></div>
<div class="van-empty__image"><img src="https://img01.yzcdn.cn/vant/empty-image-default.png"></div>
<div class="van-empty__bottom">Custom bottom</div>
</div>
`;
exports[`description slot 1`] = `
<div class="van-empty">
<div class="van-empty__image"><img src="https://img.yzcdn.cn/vant/empty-image-default.png"></div>
<div class="van-empty__image"><img src="https://img01.yzcdn.cn/vant/empty-image-default.png"></div>
<p class="van-empty__description">Custom description</p>
</div>
`;

View File

@ -65,7 +65,7 @@ export default createComponent({
getIconURL(icon) {
if (PRESET_ICONS.indexOf(icon) !== -1) {
return `https://img.yzcdn.cn/vant/share-sheet-${icon}.png`;
return `https://img01.yzcdn.cn/vant/share-sheet-${icon}.png`;
}
return icon;

View File

@ -29,7 +29,7 @@ export default createComponent({
const url = this.skuValue.imgUrl || this.skuValue.img_url;
return this.largeImageMode
? url ||
'https://img.yzcdn.cn/upload_files/2020/06/24/FmKWDg0bN9rMcTp9ne8MXiQWGtLn.png'
'https://img01.yzcdn.cn/upload_files/2020/06/24/FmKWDg0bN9rMcTp9ne8MXiQWGtLn.png'
: url;
},