Skip to content

Commit 942ad39

Browse files
committed
fix: could not replace localhost:1337 if coverUrl is null
1 parent a8024e1 commit 942ad39

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

front-end/h5/src/components/common/work/card-cover.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
22
* @Author: ly525
33
* @Date: 2019-12-01 18:11:49
4-
* @LastEditors: ly525
5-
* @LastEditTime: 2020-01-01 19:29:14
4+
* @LastEditors : ly525
5+
* @LastEditTime : 2020-01-04 13:51:26
66
* @FilePath: /luban-h5/front-end/h5/src/components/common/work/card-cover.js
77
* @Github: https://github.com/ly525/luban-h5
88
* @Description: Do not edit
@@ -54,11 +54,11 @@ export default {
5454
},
5555
render (h) {
5656
let covers = [this.getCover(placeholderImg, true/** isPlaceholder */)]
57-
const coverImg = this.coverImageUrl.replace('http://localhost:1337', '')
5857

5958
if (this.qrcodeUrl) {
6059
covers = this.getCoverBg(this.qrcodeUrl, true)
61-
} else if (coverImg) {
60+
} else if (this.coverImageUrl) {
61+
const coverImg = this.coverImageUrl.replace('http://localhost:1337', '')
6262
covers = [this.getCover(coverImg), this.getCoverBg(coverImg)]
6363
}
6464

0 commit comments

Comments
 (0)