广场动态问题修复

version/0412
wangdong 9 months ago
parent 9f8396ff9e
commit f512266448
  1. 21
      pages/feedback/list.vue
  2. 13
      pages/squareDynamic/index.vue

@ -109,16 +109,19 @@
.finally(() => this.loading = false) .finally(() => this.loading = false)
}, },
calcContentWidth(cont) { calcContentWidth(cont) {
let len = 0; if (cont) {
let spliti = 0; let len = 0;
for (var i = 0; i < cont.length; i++) { let spliti = 0;
if (cont.charCodeAt(i) > 255 || cont.charCodeAt(i<0)) { for (var i = 0; i < cont.length; i++) {
len += 17; if (cont.charCodeAt(i) > 255 || cont.charCodeAt(i<0)) {
} else { len += 17;
len += 10; } else {
} len += 10;
}
}
return len > 816;
} }
return len > 816; return false;
}, },
}, },
}; };

@ -29,7 +29,7 @@
<image src="/static/copy.png" mode="aspectFill"></image> <image src="/static/copy.png" mode="aspectFill"></image>
<view>复制文案</view> <view>复制文案</view>
</view> </view>
<view class="btn" v-if="item.imgs && item.imgs.length > 0" @click="downloadMultipleImages(item.pic)"> <view class="btn" v-if="item.imgs && item.imgs.length > 0" @click="downloadMultipleImages(item.imgs)">
<image src="/static/download.png" mode="aspectFill"></image> <image src="/static/download.png" mode="aspectFill"></image>
<view>下载图片</view> <view>下载图片</view>
</view> </view>
@ -95,6 +95,7 @@
this.loading = false; this.loading = false;
this.finished = false; this.finished = false;
this.page = 1; this.page = 1;
this.dynamicList = [];
this.getDynamicList(); this.getDynamicList();
}, },
}, },
@ -172,7 +173,11 @@
downloadMultipleImages(urls) { downloadMultipleImages(urls) {
  let tasks = []   let tasks = []
  urls.forEach((url) => {   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)   return Promise.all(tasks)
}, },
@ -346,13 +351,13 @@
display: block; display: block;
width: 414rpx; width: 414rpx;
height: 305rpx; height: 305rpx;
margin: 0 auto; margin: 0 auto 20rpx;
pointer-events: none; pointer-events: none;
} }
.publish { .publish {
position: fixed; position: fixed;
right: 24rpx; right: 24rpx;
bottom: 200rpx; bottom: 140rpx;
width: 100rpx; width: 100rpx;
height: 100rpx; height: 100rpx;
background: #F34A40; background: #F34A40;

Loading…
Cancel
Save