Commit 942ad392c546b6036c396988735784c6a9b69f4e

Authored by ly525
1 parent a8024e1d

fix: could not replace localhost:1337 if coverUrl is null

front-end/h5/src/components/common/work/card-cover.js
1 /* 1 /*
2 * @Author: ly525 2 * @Author: ly525
3 * @Date: 2019-12-01 18:11:49 3 * @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
6 * @FilePath: /luban-h5/front-end/h5/src/components/common/work/card-cover.js 6 * @FilePath: /luban-h5/front-end/h5/src/components/common/work/card-cover.js
7 * @Github: https://github.com/ly525/luban-h5 7 * @Github: https://github.com/ly525/luban-h5
8 * @Description: Do not edit 8 * @Description: Do not edit
@@ -54,11 +54,11 @@ export default { @@ -54,11 +54,11 @@ export default {
54 }, 54 },
55 render (h) { 55 render (h) {
56 let covers = [this.getCover(placeholderImg, true/** isPlaceholder */)] 56 let covers = [this.getCover(placeholderImg, true/** isPlaceholder */)]
57 - const coverImg = this.coverImageUrl.replace('http://localhost:1337', '')  
58 57
59 if (this.qrcodeUrl) { 58 if (this.qrcodeUrl) {
60 covers = this.getCoverBg(this.qrcodeUrl, true) 59 covers = this.getCoverBg(this.qrcodeUrl, true)
61 - } else if (coverImg) { 60 + } else if (this.coverImageUrl) {
  61 + const coverImg = this.coverImageUrl.replace('http://localhost:1337', '')
62 covers = [this.getCover(coverImg), this.getCoverBg(coverImg)] 62 covers = [this.getCover(coverImg), this.getCoverBg(coverImg)]
63 } 63 }
64 64