|
|
|
@ -8,7 +8,7 @@ |
|
|
|
|
<view v-for="(item, index) in tabList" :key="index" class="tab-item" :class="{ 'active': activeTab === item }" @click="activeTab = item">{{ item }}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="list"> |
|
|
|
|
<view v-for="(item, index) in dynamicList" :key="index" class="dynamic-item"> |
|
|
|
|
<view v-for="(item, index) in dynamicList" :key="index" class="dynamic-item" :style="{ 'visibility': !item.contH ? 'hidden' : 'visible'}"> |
|
|
|
|
<view class="user"> |
|
|
|
|
<image v-if="item.avatar_url && item.avatar_url[0]" :src="item.avatar_url[0].external_url" mode="aspectFill"></image> |
|
|
|
|
<image v-else src="/static/touxiang.png" mode="aspectFill"></image> |
|
|
|
@ -41,6 +41,10 @@ |
|
|
|
|
<image src="/static/copy.png" mode="aspectFill"></image> |
|
|
|
|
<view>复制文案</view> |
|
|
|
|
</view> |
|
|
|
|
<view class="btn" v-if="userInfo.user_type == 40" @click="handleDelete(item)"> |
|
|
|
|
<uni-icons type="trash" size="40" color="#ccc" class="delete" @click="back"></uni-icons> |
|
|
|
|
<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> |
|
|
|
@ -146,15 +150,15 @@ |
|
|
|
|
this.page = 1; |
|
|
|
|
this.dynamicList = []; |
|
|
|
|
this.getDynamicList(); |
|
|
|
|
} else { |
|
|
|
|
this.isPreview = false; |
|
|
|
|
} |
|
|
|
|
if (uni.getStorageSync("userInfo").user_id) { |
|
|
|
|
this.isLogin = true |
|
|
|
|
this.onRefreshPage() |
|
|
|
|
} else { |
|
|
|
|
this.userInfo = {} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
this.isPreview = false; |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 刷新页面 |
|
|
|
@ -188,7 +192,7 @@ |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
async getDynamicList() { |
|
|
|
|
getDynamicList() { |
|
|
|
|
if (this.loading || this.finished) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -381,7 +385,39 @@ |
|
|
|
|
this.$navTo('pages/goods/detail', { |
|
|
|
|
goodsId: item.goods_id |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
// 删除动态 |
|
|
|
|
handleDelete(item) { |
|
|
|
|
const app = this; |
|
|
|
|
uni.showModal({ |
|
|
|
|
title: '提示', |
|
|
|
|
content: '您确定要删除该动态吗?', |
|
|
|
|
showCancel: true, |
|
|
|
|
success({ |
|
|
|
|
confirm |
|
|
|
|
}) { |
|
|
|
|
// 确认删除 |
|
|
|
|
confirm && app.deleteDynamic(item) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
deleteDynamic(item) { |
|
|
|
|
// Api.deleteDynamic({ |
|
|
|
|
// id: item.id |
|
|
|
|
// }) |
|
|
|
|
// .then(result => { |
|
|
|
|
// console.log(result); |
|
|
|
|
// uni.showToast({ |
|
|
|
|
// icon: 'success', |
|
|
|
|
// title: '删除成功', |
|
|
|
|
// }); |
|
|
|
|
// this.finished = false; |
|
|
|
|
// this.page = 1; |
|
|
|
|
// this.dynamicList = []; |
|
|
|
|
// this.getDynamicList(); |
|
|
|
|
// }) |
|
|
|
|
// .finally(() => {}) |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
@ -563,6 +599,16 @@ |
|
|
|
|
height: 40rpx; |
|
|
|
|
margin-bottom: 10rpx; |
|
|
|
|
} |
|
|
|
|
::v-deep { |
|
|
|
|
.delete { |
|
|
|
|
margin-bottom: 10rpx; |
|
|
|
|
.uni-icons { |
|
|
|
|
font-size: 40rpx!important; |
|
|
|
|
font-weight: bold; |
|
|
|
|
line-height: 40rpx; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|