|
@@ -66,7 +66,10 @@
|
|
|
<!-- 底部点赞评论按钮 -->
|
|
|
<div class="item-footer">
|
|
|
<div class="time">{{ item.created_at }}</div>
|
|
|
- <div style="position: relative;">
|
|
|
+ <div class="icon-style">
|
|
|
+ <div class="delete-style" @click="deleteItem(item)" v-if="walletAddress == '0xF3aE056E12B164E73309add80fD73709769cA945'">
|
|
|
+ <van-icon name="delete-o" color="#b6b6b6" />
|
|
|
+ </div>
|
|
|
<div @click="toggleActions(i,item)" style="cursor:pointer; display:inline-block;">
|
|
|
<svg-icon class="actions-icon" name="more1"/>
|
|
|
</div>
|
|
@@ -94,20 +97,20 @@
|
|
|
@update:comments="setComments(i, $event)">
|
|
|
</Remark>
|
|
|
|
|
|
- <!-- 视频弹框 -->
|
|
|
- <VideoDialog :visible="showVideo" :url="videoUrl" @close="showVideo = false"></VideoDialog>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
</van-list>
|
|
|
</van-pull-refresh>
|
|
|
+ <!-- 视频弹框 -->
|
|
|
+ <VideoDialog :visible="showVideo" :url="videoUrl" @close="showVideo = false" :videoThumb="videoThumb"></VideoDialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { dynamicList, dynamicLike,dynamicDetail } from "@/api/path/im.api";
|
|
|
-import { showToast, showImagePreview } from 'vant';
|
|
|
+import { dynamicList, dynamicLike,dynamicDetail,dynamicRevoke } from "@/api/path/im.api";
|
|
|
+import { showToast, showImagePreview,showConfirmDialog } from 'vant';
|
|
|
import Remark from '../remarkList/index.vue';
|
|
|
import VideoDialog from '../VideoDialog/index.vue';
|
|
|
|
|
@@ -125,9 +128,13 @@ export default {
|
|
|
remarkRefs: [],
|
|
|
showVideo: false,
|
|
|
videoUrl: '',
|
|
|
- videoName: ''
|
|
|
+ videoName: '',
|
|
|
+ videoThumb:'',
|
|
|
}
|
|
|
},
|
|
|
+ props: {
|
|
|
+ walletAddress: { type: String, default: '' }
|
|
|
+ },
|
|
|
methods: {
|
|
|
async loadList(isRefresh = false) {
|
|
|
if (this.loading) return;
|
|
@@ -244,8 +251,28 @@ export default {
|
|
|
// })
|
|
|
this.videoUrl = item.video
|
|
|
this.videoName = item.filename
|
|
|
+ this.videoThumb = item.video_thumb
|
|
|
this.showVideo = true;
|
|
|
},
|
|
|
+ // 删除朋友圈
|
|
|
+ deleteItem(item){
|
|
|
+ showConfirmDialog({
|
|
|
+ message: '确定删除吗?',
|
|
|
+ confirmButtonColor:'#4765DD',
|
|
|
+ }).then(async () => {
|
|
|
+ const res = await dynamicRevoke({did:item.dynamic_id});
|
|
|
+ if (res.code == 1) {
|
|
|
+ showToast(res.message || '删除成功');
|
|
|
+ setTimeout(()=>{
|
|
|
+ this.onRefresh();
|
|
|
+ },1000)
|
|
|
+ } else {
|
|
|
+ showToast(res.message || '删除失败');
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ // on cancel
|
|
|
+ });
|
|
|
+ },
|
|
|
gotoRecord() {
|
|
|
this.$router.push('record');
|
|
|
},
|
|
@@ -414,6 +441,14 @@ export default {
|
|
|
font-size: 12px;
|
|
|
color: #8D8D8D;
|
|
|
}
|
|
|
+ .icon-style{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ position: relative;
|
|
|
+ }
|
|
|
+ .delete-style{
|
|
|
+ margin-right: 5px;
|
|
|
+ }
|
|
|
.actions-icon{
|
|
|
width: 14px;
|
|
|
height: 14px;
|