|
@@ -57,8 +57,9 @@
|
|
<view class="content">
|
|
<view class="content">
|
|
{{item.content}}
|
|
{{item.content}}
|
|
</view>
|
|
</view>
|
|
- <view class="photo_list" @click="previewOpen(item.images)">
|
|
|
|
- <view class="img" v-for="(item2,index2) in toArr(item.images)" :key="index2" v-if="item2 != ''">
|
|
|
|
|
|
+ <view class="photo_list">
|
|
|
|
+ <view class="img" v-for="(item2,index2) in toArr(item.images)" :key="index2"
|
|
|
|
+ @click="previewOpen(item.images,index2)" v-if="item2 != ''">
|
|
<image class="icon" :src="item2" mode="aspectFill"></image>
|
|
<image class="icon" :src="item2" mode="aspectFill"></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -72,16 +73,20 @@
|
|
<image class="icon" src="../../static/icon/like.png" mode="widthFix"></image>
|
|
<image class="icon" src="../../static/icon/like.png" mode="widthFix"></image>
|
|
{{item.num_like}}
|
|
{{item.num_like}}
|
|
</view>
|
|
</view>
|
|
- <view class="img" v-if="false">
|
|
|
|
|
|
+ <!-- <view class="img" >
|
|
<image class="icon" src="../../static/icon/reply.png" mode="widthFix"></image>
|
|
<image class="icon" src="../../static/icon/reply.png" mode="widthFix"></image>
|
|
{{item.num_comment}}
|
|
{{item.num_comment}}
|
|
|
|
+ </view> -->
|
|
|
|
+ <view class="img" @click="delArticle(item)">
|
|
|
|
+ <image class="icon" src="../../static/icon/del.png" mode="widthFix"></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</block>
|
|
|
|
|
|
<view class="blankHeight"></view>
|
|
<view class="blankHeight"></view>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+ <DialogBoxW3 ref="DialogBoxW3"></DialogBoxW3>
|
|
|
|
+ <ToastW3 ref="ToastW3"></ToastW3>
|
|
<previewImage ref="previewImage" :opacity="0.8" :circular="true" :imgs="imgs" :descs="descs"
|
|
<previewImage ref="previewImage" :opacity="0.8" :circular="true" :imgs="imgs" :descs="descs"
|
|
@longPress="longPress"></previewImage>
|
|
@longPress="longPress"></previewImage>
|
|
</view>
|
|
</view>
|
|
@@ -148,6 +153,50 @@
|
|
btn.innerText = text;
|
|
btn.innerText = text;
|
|
// #endif
|
|
// #endif
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ // 删除动态
|
|
|
|
+
|
|
|
|
+ delArticle(article) {
|
|
|
|
+ console.log(article);
|
|
|
|
+ this.$refs['DialogBoxW3'].confirm({
|
|
|
|
+ title: '删除动态',
|
|
|
|
+ content: '请确认是否删除此条动态?',
|
|
|
|
+ DialogType: 'inquiry',
|
|
|
|
+ btn1: '取消',
|
|
|
|
+ btn2: '删除',
|
|
|
|
+ animation: 0
|
|
|
|
+ }).then((res) => {
|
|
|
|
+
|
|
|
|
+ uni.request({
|
|
|
|
+ url: this.$apiHost + '/Article/doAct',
|
|
|
|
+ data: {
|
|
|
|
+ uuid: getApp().globalData.uuid,
|
|
|
|
+ act: 'del',
|
|
|
|
+ id: article.id
|
|
|
|
+ },
|
|
|
|
+ header: {
|
|
|
|
+ "content-type": "application/json",
|
|
|
|
+ 'sign': getApp().globalData.headerSign
|
|
|
|
+ },
|
|
|
|
+ success: (res) => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: res.data.str,
|
|
|
|
+ icon: 'none'
|
|
|
|
+ });
|
|
|
|
+ if (res.data.success == 'yes') {
|
|
|
|
+ this.loadData();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ complete: (com) => {
|
|
|
|
+ // uni.hideLoading();
|
|
|
|
+ },
|
|
|
|
+ fail: (e) => {
|
|
|
|
+ console.log("----e:", e);
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ },
|
|
onClickButton1() {
|
|
onClickButton1() {
|
|
console.log('点击了按钮1')
|
|
console.log('点击了按钮1')
|
|
},
|
|
},
|
|
@@ -163,7 +212,7 @@
|
|
let arr = imgs.split("|");
|
|
let arr = imgs.split("|");
|
|
return arr;
|
|
return arr;
|
|
},
|
|
},
|
|
- previewOpen(imgs1) {
|
|
|
|
|
|
+ previewOpen(imgs1, index) {
|
|
this.imgs = imgs1.split("|");
|
|
this.imgs = imgs1.split("|");
|
|
// this.descs = [];
|
|
// this.descs = [];
|
|
// for (var i = 0; i < this.imgs.length; i++) {
|
|
// for (var i = 0; i < this.imgs.length; i++) {
|
|
@@ -172,9 +221,7 @@
|
|
// var param = e.currentTarget.dataset.src;
|
|
// var param = e.currentTarget.dataset.src;
|
|
// console.log(param);
|
|
// console.log(param);
|
|
// this.imgs = ['../../static/home/avator.png', '../../static/me/sex_2.png', '../../static/home/avator.png'];
|
|
// this.imgs = ['../../static/home/avator.png', '../../static/me/sex_2.png', '../../static/home/avator.png'];
|
|
- this.$nextTick(()=>{
|
|
|
|
- this.$refs.previewImage.open(index)
|
|
|
|
- })// 传入当前选中的图片地址或序号
|
|
|
|
|
|
+ setTimeout(() => this.$refs.previewImage.open(index), 0) // 传入当前选中的图片地址或序号
|
|
return; //如需测试和uni原生预览差别可注释这两行
|
|
return; //如需测试和uni原生预览差别可注释这两行
|
|
},
|
|
},
|
|
//长按事件
|
|
//长按事件
|