From f512266448dafc41ae17b4b1afc0915f119e839e Mon Sep 17 00:00:00 2001 From: wangdong <1551135706@qq.com> Date: Fri, 10 May 2024 10:16:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=BF=E5=9C=BA=E5=8A=A8=E6=80=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/feedback/list.vue | 21 ++++++++++++--------- pages/squareDynamic/index.vue | 13 +++++++++---- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/pages/feedback/list.vue b/pages/feedback/list.vue index f7f3ca3..79ced36 100644 --- a/pages/feedback/list.vue +++ b/pages/feedback/list.vue @@ -109,16 +109,19 @@ .finally(() => this.loading = false) }, calcContentWidth(cont) { - let len = 0; - let spliti = 0; - for (var i = 0; i < cont.length; i++) { - if (cont.charCodeAt(i) > 255 || cont.charCodeAt(i<0)) { - len += 17; - } else { - len += 10; - } + if (cont) { + let len = 0; + let spliti = 0; + for (var i = 0; i < cont.length; i++) { + if (cont.charCodeAt(i) > 255 || cont.charCodeAt(i<0)) { + len += 17; + } else { + len += 10; + } + } + return len > 816; } - return len > 816; + return false; }, }, }; diff --git a/pages/squareDynamic/index.vue b/pages/squareDynamic/index.vue index f7034e2..8f24a63 100644 --- a/pages/squareDynamic/index.vue +++ b/pages/squareDynamic/index.vue @@ -29,7 +29,7 @@ 复制文案 - + 下载图片 @@ -95,6 +95,7 @@ this.loading = false; this.finished = false; this.page = 1; + this.dynamicList = []; this.getDynamicList(); }, }, @@ -172,7 +173,11 @@ downloadMultipleImages(urls) {   let tasks = []   urls.forEach((url) => { -     tasks.push(this.downloadSingleImage(url).then(e => console.log(e))) +     tasks.push(this.downloadSingleImage(url.external_url).then(e => { + uni.saveImageToPhotosAlbum({ + filePath: e, + }); + }));   })   return Promise.all(tasks) }, @@ -346,13 +351,13 @@ display: block; width: 414rpx; height: 305rpx; - margin: 0 auto; + margin: 0 auto 20rpx; pointer-events: none; } .publish { position: fixed; right: 24rpx; - bottom: 200rpx; + bottom: 140rpx; width: 100rpx; height: 100rpx; background: #F34A40;