Commit 9b6a0135 authored by Mac's avatar Mac

1

parent ed57670c
...@@ -6,11 +6,16 @@ ...@@ -6,11 +6,16 @@
<text style="color:#999;font-weight: 400;">(上传3-5张照片,第一张为封面图)</text> <text style="color:#999;font-weight: 400;">(上传3-5张照片,第一张为封面图)</text>
</view> </view>
<view> <view>
<u-upload :action="action" :max-count="5" :max-size="2*1024*1024" :file-list="fileList" @on-remove="onRemove1" :custom-btn="true" @on-success="uploadSuccessHandler"> <u-upload v-if="isdisabled==false" :action="action" :max-count="5" :max-size="2*1024*1024" :file-list="fileList" @on-remove="onRemove1" :custom-btn="true" @on-success="uploadSuccessHandler">
<view slot="addBtn" class="slot-btn" v-if="isdisabled==false"> <view slot="addBtn" class="slot-btn" >
<image class="image" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616498310000_18.png" mode="widthFix"></image> <image class="image" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616498310000_18.png" mode="widthFix"></image>
</view> </view>
</u-upload> </u-upload>
<view class="imglist" v-else >
<view class="imglist-item" v-for='(x,i) in model.ImageList' @click="previewImage(model.ImageList,i)">
<image :src="x" style="width: 100%;height: 100%;border-radius: 4px;"></image>
</view>
</view>
</view> </view>
<view class="label-text" style="margin-top:20px;margin-bottom: 30rpx;"> <view class="label-text" style="margin-top:20px;margin-bottom: 30rpx;">
<text>店铺视频</text> <text>店铺视频</text>
...@@ -219,7 +224,15 @@ ...@@ -219,7 +224,15 @@
res => { res => {
if(res.resultCode==1){ if(res.resultCode==1){
this.model = res.data; this.model = res.data;
this.fileList = res.data.ImageList this.fileList = []
if(this.model.ImageList.length>0){
this.model.ImageList.forEach(x=>{
let obj ={
url:x
}
this.fileList.push(obj)
})
}
this.GetAuthenticationTypeEnumList()//类型 this.GetAuthenticationTypeEnumList()//类型
this.GetBrandTypeEnumList()//品牌归属地枚举 this.GetBrandTypeEnumList()//品牌归属地枚举
this.GetBusinessTypeEnumList()//申请认证行业枚举 this.GetBusinessTypeEnumList()//申请认证行业枚举
...@@ -397,7 +410,6 @@ ...@@ -397,7 +410,6 @@
}, },
enlarge(file) { enlarge(file) {
// 全屏 // 全屏
innerAudioContext.stop();
this.videoContext = uni.createVideoContext('myVideo'); this.videoContext = uni.createVideoContext('myVideo');
this.videoContext.requestFullScreen({ this.videoContext.requestFullScreen({
direction:0 direction:0
...@@ -462,12 +474,26 @@ ...@@ -462,12 +474,26 @@
} }
}); });
}, },
previewImage(imgs,i) {
uni.previewImage({
urls: imgs,
current: i,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
success: function(data) {},
fail: function(err) {
console.log(err.errMsg);
},
},
});
},
} }
} }
</script> </script>
<style> <style>
.first-shop{background: #f6f6f6;padding: 35rpx;min-height: 100vh;font-family: pingfang;} .first-shop{background: #f6f6f6;padding: 30rpx;min-height: 100vh;font-family: pingfang;}
.first-shop .label-text{ .first-shop .label-text{
font-size: 28rpx; font-size: 28rpx;
color: #1F1F1F; color: #1F1F1F;
...@@ -493,4 +519,16 @@ ...@@ -493,4 +519,16 @@
#myVideo{ #myVideo{
width: 150px; height: 200px; width: 150px; height: 200px;
} }
.imglist{
width: 100%;
display: flex;
flex-wrap: wrap;
}
.imglist-item{
width: 180rpx;
height: 180rpx;
border-radius: 4px;
margin-left: 15px;
margin-bottom: 10px;
}
</style> </style>
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