Commit 37ffff50 by cen

fix: 去掉取消上传提示上传失败

1 parent 7a33816b
const target = ['ip', 'dev', 'uat', 'prod', 'beta'] const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 2 const index = 4
/** /**
* *
0本地 0本地
......
...@@ -8,37 +8,16 @@ ...@@ -8,37 +8,16 @@
<view class="tips">完成交付图片上传,拍摄需包含车辆图片(铭牌、45%角)、提车人照片,及提车人身份证照片。</view> <view class="tips">完成交付图片上传,拍摄需包含车辆图片(铭牌、45%角)、提车人照片,及提车人身份证照片。</view>
<view class="img-list flex"> <view class="img-list flex">
<template v-if="imgList.length < 10"> <template v-if="imgList.length < 10">
<view <view class="img-item upload flex" @click="chooseImage">
class="img-item upload flex" <uni-icons type="plusempty" :size="22" color="#347BFF" class="icon"></uni-icons>
@click="chooseImage"
>
<uni-icons
type="plusempty"
:size="22"
color="#347BFF"
class="icon"
></uni-icons>
{{ imgList.length }}/10 {{ imgList.length }}/10
</view> </view>
</template> </template>
<template v-for="(i, index) in imgList"> <template v-for="(i, index) in imgList">
<view <view class="img-item" :key="index">
class="img-item" <image :src="i" class="img" mode="aspectFill" @click="previewMedia(i, 1)" />
:key="index"
>
<image
:src="i"
class="img"
mode="aspectFill"
@click="previewMedia(i, 1)"
/>
<view class="del flex"> <view class="del flex">
<uni-icons <uni-icons type="closeempty" :size="10" color="#fff" @click="delImage(index)"></uni-icons>
type="closeempty"
:size="10"
color="#fff"
@click="delImage(index)"
></uni-icons>
</view> </view>
</view> </view>
</template> </template>
...@@ -48,14 +27,7 @@ ...@@ -48,14 +27,7 @@
<view class="remark-box box"> <view class="remark-box box">
<view class="title">交付备注</view> <view class="title">交付备注</view>
<view class="remark"> <view class="remark">
<textarea <textarea placeholder="请描述交付过程备注信息" placeholder-class="placeholder" :value="remark" @input="remark = $event.detail.value" :maxlength="200" class="textarea"></textarea>
placeholder="请描述交付过程备注信息"
placeholder-class="placeholder"
:value="remark"
@input="remark = $event.detail.value"
:maxlength="200"
class="textarea"
></textarea>
<view class="limit">{{ remark.length }}/200</view> <view class="limit">{{ remark.length }}/200</view>
</view> </view>
</view> </view>
...@@ -65,10 +37,7 @@ ...@@ -65,10 +37,7 @@
客户提车确认 客户提车确认
<view class="des">请让客户在拍卖小程序完成交割单签署,签署完成后才可点击确认提车。</view> <view class="des">请让客户在拍卖小程序完成交割单签署,签署完成后才可点击确认提车。</view>
</view> </view>
<view <view :class="['btn flex', { disabled: !imgList.length }]" @click="comfirm">确认提车</view>
:class="['btn flex', { disabled: !imgList.length }]"
@click="comfirm"
>确认提车</view>
</view> </view>
<view class="block"></view> <view class="block"></view>
</view> </view>
...@@ -90,19 +59,19 @@ export default { ...@@ -90,19 +59,19 @@ export default {
} }
} }
}, },
data () { data() {
return { return {
imgList: [], imgList: [],
remark: '' remark: ''
} }
}, },
mounted () { mounted() {
}, },
methods: { methods: {
delImage (index) { delImage(index) {
this.imgList.splice(index, 1) this.imgList.splice(index, 1)
}, },
async chooseImage () { async chooseImage() {
const { imgList } = this, const { imgList } = this,
_this = this _this = this
try { try {
...@@ -116,7 +85,7 @@ export default { ...@@ -116,7 +85,7 @@ export default {
// #endif // #endif
uni.chooseImage({ uni.chooseImage({
count: MAX_IMG_COUNT - imgList.length, count: MAX_IMG_COUNT - imgList.length,
async success (res) { async success(res) {
for (const file of res.tempFiles) { for (const file of res.tempFiles) {
if (file.size > MAX_IMAGE_SIZE) { if (file.size > MAX_IMAGE_SIZE) {
return uni.showToast({ return uni.showToast({
...@@ -132,13 +101,17 @@ export default { ...@@ -132,13 +101,17 @@ export default {
} }
if (_this.imgList.length >= res.tempFilePaths.length) uni.hideLoading() if (_this.imgList.length >= res.tempFilePaths.length) uni.hideLoading()
}, },
fail (err) { fail(err) {
console.log(err) console.log(err)
uni.hideLoading() uni.hideLoading()
if (err.errMsg.indexOf('cancel') === -1) {
return uni.showToast({ return uni.showToast({
title: '图片上传失败', title: '图片上传失败',
icon: 'none' icon: 'none'
}) })
}
}, },
}) })
} catch (error) { } catch (error) {
...@@ -151,7 +124,7 @@ export default { ...@@ -151,7 +124,7 @@ export default {
} }
}, },
async comfirm () { async comfirm() {
try { try {
let { imgList, step, remark, detail } = this, let { imgList, step, remark, detail } = this,
{ deliveryOrderId } = detail, { deliveryOrderId } = detail,
...@@ -179,7 +152,7 @@ export default { ...@@ -179,7 +152,7 @@ export default {
if (error) this.$emit('openError', error) if (error) this.$emit('openError', error)
} }
}, },
previewMedia (media, type) { previewMedia(media, type) {
const url = `/pages/boutique/preview?tabName=预览&sourceType=${type}&detailUrl=${media}` const url = `/pages/boutique/preview?tabName=预览&sourceType=${type}&detailUrl=${media}`
uni.navigateTo({ uni.navigateTo({
url: `${url}` url: `${url}`
...@@ -194,11 +167,13 @@ export default { ...@@ -194,11 +167,13 @@ export default {
position: relative; position: relative;
z-index: 2; z-index: 2;
margin: 0 toRpx(48); margin: 0 toRpx(48);
.box { .box {
border-radius: toRpx(16); border-radius: toRpx(16);
background: #ffffff; background: #ffffff;
margin-bottom: toRpx(24); margin-bottom: toRpx(24);
padding: 0 toRpx(32); padding: 0 toRpx(32);
.title { .title {
color: #333333; color: #333333;
font-size: toRpx(28); font-size: toRpx(28);
...@@ -206,6 +181,7 @@ export default { ...@@ -206,6 +181,7 @@ export default {
display: flex; display: flex;
line-height: toRpx(40); line-height: toRpx(40);
padding-top: toRpx(28); padding-top: toRpx(28);
.required { .required {
color: #f24724; color: #f24724;
font-size: toRpx(28); font-size: toRpx(28);
...@@ -213,6 +189,7 @@ export default { ...@@ -213,6 +189,7 @@ export default {
} }
} }
} }
.upload-box { .upload-box {
.tips { .tips {
margin: toRpx(4) 0 toRpx(28); margin: toRpx(4) 0 toRpx(28);
...@@ -220,30 +197,36 @@ export default { ...@@ -220,30 +197,36 @@ export default {
font-size: toRpx(26); font-size: toRpx(26);
line-height: toRpx(36); line-height: toRpx(36);
} }
.img-list { .img-list {
flex-wrap: wrap; flex-wrap: wrap;
gap: toRpx(24); gap: toRpx(24);
.upload { .upload {
background: #f5f8ff; background: #f5f8ff;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
color: #999999; color: #999999;
font-size: toRpx(26); font-size: toRpx(26);
.icon { .icon {
font-weight: 700; font-weight: 700;
margin-bottom: toRpx(22); margin-bottom: toRpx(22);
} }
} }
.img-item { .img-item {
width: toRpx(224); width: toRpx(224);
height: toRpx(224); height: toRpx(224);
border-radius: toRpx(12); border-radius: toRpx(12);
position: relative; position: relative;
overflow: hidden; overflow: hidden;
.img { .img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.del { .del {
position: absolute; position: absolute;
width: toRpx(32); width: toRpx(32);
...@@ -256,6 +239,7 @@ export default { ...@@ -256,6 +239,7 @@ export default {
} }
} }
} }
.img-tips { .img-tips {
color: #999999; color: #999999;
font-size: toRpx(24); font-size: toRpx(24);
...@@ -263,11 +247,14 @@ export default { ...@@ -263,11 +247,14 @@ export default {
line-height: toRpx(36); line-height: toRpx(36);
} }
} }
.remark-box { .remark-box {
padding-bottom: toRpx(28); padding-bottom: toRpx(28);
.title { .title {
padding-bottom: toRpx(24); padding-bottom: toRpx(24);
} }
.remark { .remark {
height: toRpx(200); height: toRpx(200);
border-radius: toRpx(16); border-radius: toRpx(16);
...@@ -275,12 +262,14 @@ export default { ...@@ -275,12 +262,14 @@ export default {
box-sizing: border-box; box-sizing: border-box;
padding: toRpx(24) 0 toRpx(24) toRpx(24); padding: toRpx(24) 0 toRpx(24) toRpx(24);
position: relative; position: relative;
.textarea { .textarea {
height: toRpx(132); height: toRpx(132);
width: 100%; width: 100%;
color: #333333; color: #333333;
font-size: toRpx(28); font-size: toRpx(28);
} }
.limit { .limit {
position: absolute; position: absolute;
bottom: toRpx(8); bottom: toRpx(8);
...@@ -290,20 +279,24 @@ export default { ...@@ -290,20 +279,24 @@ export default {
line-height: toRpx(44); line-height: toRpx(44);
} }
} }
.placeholder { .placeholder {
color: #999999; color: #999999;
font-size: toRpx(28); font-size: toRpx(28);
} }
} }
.btn-box { .btn-box {
box-sizing: border-box; box-sizing: border-box;
height: toRpx(144); height: toRpx(144);
.info { .info {
margin-left: toRpx(24); margin-left: toRpx(24);
color: #333333; color: #333333;
font-size: toRpx(28); font-size: toRpx(28);
font-weight: 500; font-weight: 500;
line-height: toRpx(40); line-height: toRpx(40);
.des { .des {
color: #666666; color: #666666;
font-size: toRpx(26); font-size: toRpx(26);
...@@ -312,6 +305,7 @@ export default { ...@@ -312,6 +305,7 @@ export default {
margin-top: toRpx(4); margin-top: toRpx(4);
} }
} }
.btn { .btn {
margin-left: auto; margin-left: auto;
width: toRpx(192); width: toRpx(192);
...@@ -323,10 +317,12 @@ export default { ...@@ -323,10 +317,12 @@ export default {
font-weight: 500; font-weight: 500;
justify-content: center; justify-content: center;
} }
.disabled { .disabled {
opacity: 0.5; opacity: 0.5;
} }
} }
.block { .block {
width: 100%; width: 100%;
height: toRpx(24); height: toRpx(24);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!