wangdong 7 months ago
parent a6ae7f39b1
commit f67aeb7a7e
  1. 15
      pages/index/index.vue
  2. 41
      pages/squareDynamic/index.vue

@ -624,11 +624,12 @@
timeData: {},
tabbar: [],
curTabIndex: 0,
wxAppSetting: {}
wxAppSetting: {},
storagePageIndex: '',
}
},
computed: {
styleIndex() {
storagePageIndex() {
const index = uni.getStorageSync('styleIndex') || '';
return index;
},
@ -639,8 +640,13 @@
return this.styleIndex ? (styleColor.indexNavBgColor[this.styleIndex - 1] || '') : ''
}
},
mounted() {
console.log(styleColor);
watch: {
storagePageIndex: {
immediate: true,
handler() {
this.styleIndex = this.storagePageIndex;
},
},
},
methods: {
/**
@ -684,6 +690,7 @@
if (status == 200) {
console.log(data, data.style.style);
uni.setStorageSync('styleIndex', data.style.style || '');
this.styleIndex = data.style.style;
}
},
onChangeSeckillCutDownTime(e) {

@ -45,6 +45,10 @@
<image src="/static/trash.png" mode="aspectFill"></image>
<view>删除文案</view>
</view>
<!-- <view class="btn" @click="previewFile(item)">
<image src="/static/trash.png" mode="aspectFill"></image>
<view>下载附件</view>
</view> -->
<view class="btn" v-if="item.imgs && item.imgs.length > 0" @click="downloadMultipleImages(item.imgs)">
<image src="/static/download.png" mode="aspectFill"></image>
<view>下载图片</view>
@ -160,11 +164,13 @@
this.userInfo = {}
}
},
onReachBottom() {
this.getDynamicList();
},
methods: {
//
onRefreshPage() {
this.isLogin = checkLogin()
console.log(this.isLogin, '是否登录')
//
this.getUserInfo();
},
@ -203,7 +209,6 @@
pageSize: this.limit,
})
.then(result => {
console.log(result);
const data = result.data.data;
this.dynamicList = this.dynamicList.concat(data);
this.$nextTick(() => {
@ -221,14 +226,11 @@
.finally(() => this.loading = false)
},
getHeight(item, index) {
console.log(item, index);
this.$nextTick(() => {
const query = uni.createSelectorQuery().in(this);
query.select(`.cont${index}`).boundingClientRect(data => {
console.log(data);
if (data) {
// data.height
console.log('元素高度:', data.height);
item.contH = data.height;
}
}).exec();
@ -237,7 +239,6 @@
toggleFullCont(index) {
if (this.showFullCont.includes(index)) {
const idx = this.showFullCont.findIndex(v => v == index);
console.log(idx);
this.showFullCont.splice(idx, 1);
} else {
this.showFullCont.push(index);
@ -249,7 +250,6 @@
});
},
downloadSingleImage(url) {
console.log(url);
  return new Promise((resolve, reject) => {
    uni.downloadFile({
      url: url,
@ -282,6 +282,30 @@
}));
  })
  return Promise.all(tasks)
},
previewFile() {
uni.downloadFile({
      url: 'https://www.royaum.com.cn/static/test/test.xls',
      success: (res) => {
        if (res.statusCode === 200) {
this.isPreview = true;
uni.openDocument({
filePath: res.tempFilePath,
});
        } else {
        uni.showToast({
icon: 'error',
title: '下载失败!'
})
        }
      },
      fail: (err) => {
        uni.showToast({
icon: 'error',
title: '下载失败!'
})
      }
    })
},
togggleLike(item, index) {
Api.dynamicLike({
@ -370,7 +394,6 @@
},
previewImages(idx, images) {
console.log(idx, images);
const arr = [];
images.forEach(v => {
arr.push(v.external_url);
@ -406,7 +429,6 @@
squareId: item.square_id
})
.then(result => {
console.log(result);
uni.showToast({
icon: 'success',
title: '删除成功',
@ -425,7 +447,6 @@
<style lang="scss" scoped>
.container {
background: #F7F8FA;
padding-bottom: 55rpx;
padding-top: 292rpx;
.head {
height: 450rpx;

Loading…
Cancel
Save