From 942ad392c546b6036c396988735784c6a9b69f4e Mon Sep 17 00:00:00 2001 From: ly525 Date: Sat, 4 Jan 2020 13:54:27 +0800 Subject: [PATCH] fix: could not replace localhost:1337 if coverUrl is null --- front-end/h5/src/components/common/work/card-cover.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/front-end/h5/src/components/common/work/card-cover.js b/front-end/h5/src/components/common/work/card-cover.js index 7e5212a7..5907b79c 100644 --- a/front-end/h5/src/components/common/work/card-cover.js +++ b/front-end/h5/src/components/common/work/card-cover.js @@ -1,8 +1,8 @@ /* * @Author: ly525 * @Date: 2019-12-01 18:11:49 - * @LastEditors: ly525 - * @LastEditTime: 2020-01-01 19:29:14 + * @LastEditors : ly525 + * @LastEditTime : 2020-01-04 13:51:26 * @FilePath: /luban-h5/front-end/h5/src/components/common/work/card-cover.js * @Github: https://github.com/ly525/luban-h5 * @Description: Do not edit @@ -54,11 +54,11 @@ export default { }, render (h) { let covers = [this.getCover(placeholderImg, true/** isPlaceholder */)] - const coverImg = this.coverImageUrl.replace('http://localhost:1337', '') if (this.qrcodeUrl) { covers = this.getCoverBg(this.qrcodeUrl, true) - } else if (coverImg) { + } else if (this.coverImageUrl) { + const coverImg = this.coverImageUrl.replace('http://localhost:1337', '') covers = [this.getCover(coverImg), this.getCoverBg(coverImg)] }