Feat(订单):评价支持上传视频
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
<template name="sunui-upimg">
|
||||
<view class="sunui-uploader-bd">
|
||||
<view class="sunui-uploader-files">
|
||||
<view
|
||||
v-if="showBlankPlaceholder"
|
||||
:style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'"
|
||||
class="sunui-uploader-file"
|
||||
/>
|
||||
<block v-for="(item, index) in upload_before_list" :key="index">
|
||||
<view class="sunui-uploader-file" :class="[item.upload_percent < 100 ? 'sunui-uploader-file-status' : '']" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'">
|
||||
<image class="sunui-uploader-img" :style="'width:' + upload_img_wh + 'rpx; height:' + upload_img_wh + 'rpx;'" :src="item.path" mode="aspectFill" @tap="preview(index)" v-if="type === 'image'" />
|
||||
@@ -51,6 +56,11 @@ export default {
|
||||
},
|
||||
name: 'sunui-upimg',
|
||||
props: {
|
||||
// 是否显示空白占位图,用于同时上传视频和图片,两个上传空间并列
|
||||
showBlankPlaceholder: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
upload_video_max: {
|
||||
type: Number,
|
||||
default: 30 // 最大上传容量(M)
|
||||
@@ -421,7 +431,6 @@ export default {
|
||||
color: #fff;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.sunui-uploader-bd {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
|
||||
@@ -45,26 +45,31 @@
|
||||
</text>
|
||||
</view>
|
||||
<view class="upload-wrapper">
|
||||
<tm-upload
|
||||
:dataList="videoArr"
|
||||
:upload_img_wh="uploadImgWH"
|
||||
:upload_max="1"
|
||||
:upload_count="1"
|
||||
:url="uploadUrl"
|
||||
:header="uploadHeader"
|
||||
type='video'
|
||||
@change="uploadedVideoChange"
|
||||
/>
|
||||
<tm-upload
|
||||
:dataList="picArr"
|
||||
:upload_img_wh="uploadImgWH"
|
||||
:upload_max="9 - videoArr.length"
|
||||
:upload_count="9 - videoArr.length"
|
||||
:url="uploadUrl"
|
||||
:header="uploadHeader"
|
||||
type='image'
|
||||
@change="uploadedPicChange"
|
||||
/>
|
||||
<view class="video-upload">
|
||||
<tm-upload
|
||||
:dataList="videoArr"
|
||||
:upload_img_wh="uploadImgWH"
|
||||
:upload_max="1"
|
||||
:upload_count="1"
|
||||
:url="uploadUrl"
|
||||
:header="uploadHeader"
|
||||
type='video'
|
||||
@change="uploadedVideoChange"
|
||||
/>
|
||||
</view>
|
||||
<view class="pic-upload">
|
||||
<tm-upload
|
||||
:dataList="picArr"
|
||||
:upload_img_wh="uploadImgWH"
|
||||
:upload_max="9 - videoArr.length"
|
||||
:upload_count="9 - videoArr.length"
|
||||
:url="uploadUrl"
|
||||
:header="uploadHeader"
|
||||
:showBlankPlaceholder="true"
|
||||
type='image'
|
||||
@change="uploadedPicChange"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="evaluateBnt bg-color-red" @click="submit">立即评价</view>
|
||||
@@ -194,9 +199,18 @@ export default {
|
||||
}
|
||||
}
|
||||
.upload-wrapper {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
position: relative;
|
||||
padding: 0 0 0 16rpx;
|
||||
.video-upload {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 16rpx;
|
||||
z-index: 5;
|
||||
}
|
||||
.pic-upload {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
.evaluate-con .score .textarea .list .pictrue.uploadBnt {
|
||||
border: 1px solid #ddd;
|
||||
|
||||
Reference in New Issue
Block a user