广场下载图片提示

version/0412
wangdong 6 months ago
parent 987be4bfa1
commit 4c1d740f72
  1. 25
      pages/index/index.vue
  2. 8
      pages/squareDynamic/index.vue

@ -349,7 +349,7 @@
</view>
</view>
</view>
<view v-show="current==1">
<view v-show="current==1 && list[current].name === '同城送'">
<view class="secondSection">
<image class="shopImage" :src="cityInfo.imageList?cityInfo.imageList[0]:''"></image>
<view class="content" v-if="cityInfo.shop_name">
@ -569,8 +569,6 @@
},
list: [{
name: '首页'
}, {
name: '同城送'
}],
current: 0,
tabList: [],
@ -676,13 +674,6 @@
type: 2
});
}
// this.list = data.same_city ? [{
// name: ''
// }, {
// name: ''
// }] : [{
// name: ''
// }]
}
},
async getWxAppStyle() {
@ -1050,14 +1041,14 @@
})
},
changeHome(val) {
this.current = val;
if (this.current < 2) {
this.getTypeList()
} else {
if (this.list[val].name === '广场') {
uni.navigateTo({
url: '/pages/squareDynamic/index'
});
} else {
this.getTypeList()
}
this.current = val;
},
getCityInfo() {
const that = this
@ -1177,11 +1168,11 @@
this.getAuthorize();
},
onShow() {
this.getWxAppStyle();
this.isLogin = uni.getStorageSync("AccessToken") ? true : false
if (this.current == 2) {
if (this.list[this.current].name === '广场') {
this.current = 0;
}
this.getWxAppStyle();
this.isLogin = uni.getStorageSync("AccessToken") ? true : false
},
onPageScroll(e) {
if (e.scrollTop <= 200) { // true

@ -247,11 +247,17 @@
},
downloadMultipleImages(urls) {
  let tasks = []
  urls.forEach((url) => {
  urls.forEach((url, k) => {
    tasks.push(this.downloadSingleImage(url.external_url).then(e => {
uni.saveImageToPhotosAlbum({
filePath: e,
});
if (k === urls.length - 1) {
uni.showToast({
icon: 'success',
title: '下载成功!'
})
}
}));
  })
  return Promise.all(tasks)

Loading…
Cancel
Save