Commit 07c68452 by LJM

小程序--收货登记、异常收货登记--照片数量限制

parent b9f45f95
......@@ -166,6 +166,7 @@
.upload-list {
padding-bottom: 48rpx;
border-bottom: 1px solid #e6edf0;
flex-wrap: wrap;
.default {
width: 144rpx;
height: 144rpx;
......@@ -178,8 +179,8 @@
}
.pic-box {
position: relative;
flex: 0 0 25%;
margin-right: 10rpx;
margin-right: 24rpx;
margin-bottom: 20rpx;
&:nth-of-type(4n) {
margin-right: 0;
}
......
......@@ -65,7 +65,7 @@
<view class="upload-box">
<view class="title row bothSide verCenter">
<text class="tt-l">收货图片上传(选填)</text>
<text class="tt-r">{{ form.check_in_pic.length }}/4</text>
<text class="tt-r">{{ form.check_in_pic.length }}/10</text>
</view>
<view class="upload-list row verCenter">
<template v-if="form.check_in_pic.length > 0">
......@@ -74,7 +74,7 @@
<view class="delete row rowCenter verCenter" @click="deletePic(index)"><text class="iconfont icon-shanchu"></text></view>
</view>
</template>
<view class="default row rowCenter verCenter" @click="chooseImageChange()" v-if="form.check_in_pic.length < 4"><text class="iconfont icon-xingzhuangjiehe"></text></view>
<view class="default row rowCenter verCenter" @click="chooseImageChange()" v-if="form.check_in_pic.length < 10"><text class="iconfont icon-xingzhuangjiehe"></text></view>
</view>
<view class="textarea-box">
<textarea @input="inputChange()" maxlength="200" placeholder="请输入收货备注" placeholder-style="color:#6E767A;" v-model="form.check_in_remark"></textarea>
......@@ -218,7 +218,7 @@
// #ifdef MP-WEIXIN
uni.chooseMedia({
count: 4,
count: 10,
mediaType: ['image'],
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
......@@ -228,10 +228,10 @@
});
const tempFilePaths = chooseImageRes.tempFiles;
let maxNum = tempFilePaths.length * 1 + self.form.check_in_pic.length * 1;
if (maxNum > 4) {
if (maxNum > 10) {
uni.hideLoading();
uni.showToast({
title: '图片不超过4张'
title: '图片不超过10张'
});
return false;
}
......@@ -268,7 +268,7 @@
// #ifdef APP-PLUS
uni.chooseImage({
count: 4,
count: 10,
sizeType: ['original', 'compressed'],
sourceType: ['album', 'camera'],
success: chooseImageRes => {
......@@ -277,10 +277,10 @@
});
const tempFilePaths = chooseImageRes.tempFilePaths;
let maxNum = tempFilePaths.length * 1 + self.form.check_in_pic.length * 1;
if (maxNum > 4) {
if (maxNum > 10) {
uni.hideLoading();
uni.showToast({
title: '图片不超过4张'
title: '图片不超过10张'
});
return false;
}
......
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 sign in to comment