Commit 9a35b824 authored by 潘永坪's avatar 潘永坪

图片放大处理

parent c7dfb735
...@@ -169,14 +169,14 @@ ...@@ -169,14 +169,14 @@
咨询电话 咨询电话
</view> </view>
</view> </view>
<!-- <view class="middle3-list" @click="goSuggest()"> <view class="middle3-list" @click="goSuggest()">
<view> <view>
<image src="@/static/img/my/center/suggest.png"></image> <image src="@/static/img/my/center/suggest.png"></image>
</view> </view>
<view> <view>
建议投诉 建议投诉
</view> </view>
</view> --> </view>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
{{item.text}} {{item.text}}
</view> </view>
<view class="right-img"> <view class="right-img">
<image v-for="(item2,a) in item.imgList" :key="a" :src="item2.imgUrl"></image> <image v-for="(item2,a) in item.imgList" :key="a" :src="item2.imgUrl" @click="previewImg(item2.imgUrl)"></image>
</view> </view>
</view> </view>
</view> </view>
...@@ -85,6 +85,10 @@ ...@@ -85,6 +85,10 @@
<text class="full-btn" @click="commit()">提交</text> <text class="full-btn" @click="commit()">提交</text>
</view> </view>
</u-popup> </u-popup>
<!-- 图片预览弹窗 -->
<view class="img-pop" v-if="showImgPop" @click="showImgPop=false">
<image :src='chooseImgUrl' mode="center"></image>
</view>
</view> </view>
</template> </template>
...@@ -94,6 +98,7 @@ export default{ ...@@ -94,6 +98,7 @@ export default{
data(){ data(){
return { return {
showPop:false,//控制再次投诉弹窗 showPop:false,//控制再次投诉弹窗
showImgPop:false,//控制预览图片显示隐藏
merchantId:'',//商户Id merchantId:'',//商户Id
openid:uni.getStorageSync('openid')||'',//openid openid:uni.getStorageSync('openid')||'',//openid
batchId:'',//批次id batchId:'',//批次id
...@@ -110,6 +115,11 @@ export default{ ...@@ -110,6 +115,11 @@ export default{
this.initDetail() this.initDetail()
}, },
methods:{ methods:{
//---预览图片
previewImg(imgUrl){
this.showImgPop=true
this.chooseImgUrl=imgUrl
},
//---详情加载 //---详情加载
initDetail(){ initDetail(){
let data={ let data={
...@@ -136,7 +146,7 @@ export default{ ...@@ -136,7 +146,7 @@ export default{
}) })
this.detailList.push({ this.detailList.push({
title:'您发起投诉', title:'您发起投诉',
text:item.commentText, text:item.commentText||'',
time:item.createTime, time:item.createTime,
imgList:imgList1 imgList:imgList1
}) })
...@@ -400,6 +410,22 @@ export default{ ...@@ -400,6 +410,22 @@ export default{
padding: 20rpx 40rpx 0 40rpx; padding: 20rpx 40rpx 0 40rpx;
border-top: 1px solid #EDEDED; border-top: 1px solid #EDEDED;
} }
.img-pop{
position:fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #000000;
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
image{
width: 100%;
height: 60%;
}
}
/*修改上传组件样式*/ /*修改上传组件样式*/
.pop-top /deep/ .uicon-camera-fill{ .pop-top /deep/ .uicon-camera-fill{
font-size: 36px !important; font-size: 36px !important;
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</template> </template>
</view> </view>
<view class="bottom"> <view class="bottom" v-if="merchantId">
<text class="full-btn" v-if="active==0" @click="goSuggestCommit()">我要建议</text> <text class="full-btn" v-if="active==0" @click="goSuggestCommit()">我要建议</text>
<text class="full-btn" v-else @click="goComplaintCommit()">我要投诉</text> <text class="full-btn" v-else @click="goComplaintCommit()">我要投诉</text>
</view> </view>
......
...@@ -32,12 +32,17 @@ ...@@ -32,12 +32,17 @@
{{item.text}} {{item.text}}
</view> </view>
<view class="right-img"> <view class="right-img">
<image v-for="(item2,a) in item.imgList" :key="a" :src="item2.imgUrl"></image> <image v-for="(item2,a) in item.imgList" :key="a" :src="item2.imgUrl" @click="previewImg(item2.imgUrl)"></image>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 图片预览弹窗 -->
<view class="img-pop" v-if="showPop" @click="showPop=false">
<image :src='chooseImgUrl' mode="center"></image>
</view>
</view> </view>
</template> </template>
...@@ -46,9 +51,11 @@ ...@@ -46,9 +51,11 @@
export default{ export default{
data(){ data(){
return { return {
showPop:false,//控制预览图片显示隐藏
batchId:'',//批次id batchId:'',//批次id
detailList:[],//详情数据 detailList:[],//详情数据
firstData:'',//第一条数据 firstData:'',//第一条数据
chooseImgUrl:'',//预览图片地址
} }
}, },
onLoad(option){ onLoad(option){
...@@ -56,6 +63,11 @@ export default{ ...@@ -56,6 +63,11 @@ export default{
this.initDetail() this.initDetail()
}, },
methods:{ methods:{
//---预览图片
previewImg(imgUrl){
this.showPop=true
this.chooseImgUrl=imgUrl
},
//---详情加载 //---详情加载
initDetail(){ initDetail(){
let data={ let data={
...@@ -82,7 +94,7 @@ export default{ ...@@ -82,7 +94,7 @@ export default{
}) })
this.detailList.push({ this.detailList.push({
title:'您发起建议', title:'您发起建议',
text:item.commentText, text:item.commentText||'',
time:item.createTime, time:item.createTime,
imgList:imgList1 imgList:imgList1
}) })
...@@ -198,9 +210,25 @@ export default{ ...@@ -198,9 +210,25 @@ export default{
.right-img{ .right-img{
margin-top: 20rpx; margin-top: 20rpx;
image{ image{
width: 92rpx; width: 120rpx;
height: 92rpx; height: 120rpx;
margin-right: 20rpx; margin-right: 20rpx;
} }
} }
.img-pop{
position:fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #000000;
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
image{
width: 100%;
height: 60%;
}
}
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment