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

图片放大处理

parent c7dfb735
......@@ -169,14 +169,14 @@
咨询电话
</view>
</view>
<!-- <view class="middle3-list" @click="goSuggest()">
<view class="middle3-list" @click="goSuggest()">
<view>
<image src="@/static/img/my/center/suggest.png"></image>
</view>
<view>
建议投诉
</view>
</view> -->
</view>
</view>
</view>
</view>
......
......@@ -37,7 +37,7 @@
{{item.text}}
</view>
<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>
......@@ -85,6 +85,10 @@
<text class="full-btn" @click="commit()">提交</text>
</view>
</u-popup>
<!-- 图片预览弹窗 -->
<view class="img-pop" v-if="showImgPop" @click="showImgPop=false">
<image :src='chooseImgUrl' mode="center"></image>
</view>
</view>
</template>
......@@ -94,6 +98,7 @@ export default{
data(){
return {
showPop:false,//控制再次投诉弹窗
showImgPop:false,//控制预览图片显示隐藏
merchantId:'',//商户Id
openid:uni.getStorageSync('openid')||'',//openid
batchId:'',//批次id
......@@ -110,6 +115,11 @@ export default{
this.initDetail()
},
methods:{
//---预览图片
previewImg(imgUrl){
this.showImgPop=true
this.chooseImgUrl=imgUrl
},
//---详情加载
initDetail(){
let data={
......@@ -136,7 +146,7 @@ export default{
})
this.detailList.push({
title:'您发起投诉',
text:item.commentText,
text:item.commentText||'',
time:item.createTime,
imgList:imgList1
})
......@@ -400,6 +410,22 @@ export default{
padding: 20rpx 40rpx 0 40rpx;
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{
font-size: 36px !important;
......
......@@ -40,7 +40,7 @@
</template>
</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-else @click="goComplaintCommit()">我要投诉</text>
</view>
......
......@@ -32,12 +32,17 @@
{{item.text}}
</view>
<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 class="img-pop" v-if="showPop" @click="showPop=false">
<image :src='chooseImgUrl' mode="center"></image>
</view>
</view>
</template>
......@@ -46,9 +51,11 @@
export default{
data(){
return {
showPop:false,//控制预览图片显示隐藏
batchId:'',//批次id
detailList:[],//详情数据
firstData:'',//第一条数据
chooseImgUrl:'',//预览图片地址
}
},
onLoad(option){
......@@ -56,6 +63,11 @@ export default{
this.initDetail()
},
methods:{
//---预览图片
previewImg(imgUrl){
this.showPop=true
this.chooseImgUrl=imgUrl
},
//---详情加载
initDetail(){
let data={
......@@ -82,7 +94,7 @@ export default{
})
this.detailList.push({
title:'您发起建议',
text:item.commentText,
text:item.commentText||'',
time:item.createTime,
imgList:imgList1
})
......@@ -198,9 +210,25 @@ export default{
.right-img{
margin-top: 20rpx;
image{
width: 92rpx;
height: 92rpx;
width: 120rpx;
height: 120rpx;
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>
\ 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