Browse Source

bug修改

twt 3 years ago
parent
commit
69aff7a817

+ 18 - 1
operatingCompany/pages/entryReport/entryredItem.vue

@@ -25,7 +25,7 @@
 				</view>
 				<view class="imgBox" v-if="item.keyType==3">
 					<view class="imgLine" v-for="(img,imgindex) in item.imgArr">
-						<image :class="{img4:(imgindex+1)%4==0}" :src="img" mode="" class="itemImg"></image>
+						<image @click="previewImage(img)" :class="{img4:(imgindex+1)%4==0}" :src="img" mode="" class="itemImg"></image>
 					    <image src="../../static/img/icon_delpic@2x.png" mode=""  class="delImg" @click="delimg(item,imgindex)"></image>
 					</view>
 					<view class="imgLine" @click="uploadImg(item)">
@@ -125,6 +125,23 @@
 		    console.log(this.categoryList);
 		},
 		methods: {
+			previewImage(img){
+				var arr=[];
+				arr.push(img)
+				// 预览图片
+				uni.previewImage({
+					urls: arr,
+					longPressActions: {
+						itemList: ['发送给朋友', '保存图片', '收藏'],
+						success: function(data) {
+							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
+						},
+						fail: function(err) {
+							console.log(err.errMsg);
+						}
+					}
+				});
+			},
 			bindPickerChange(e){
 				console.log(e)
 				this.pickerItem.itemValue=this.pickerItem.array[e.detail.value] ;

+ 1 - 1
operatingCompany/pages/shop/shopIndex/editWorkDetail.vue

@@ -200,7 +200,7 @@
 		margin-top: 24rpx;
 	}
 	.imgBox{
-		padding-top: 20rpx;
+		padding-top: 0rpx;
 		display: flex;
 		flex-wrap: wrap;
 		padding-bottom: 20rpx;