上传提示词修改、提示框修改
This commit is contained in:
parent
35dca559d3
commit
0dc0992858
|
|
@ -232,11 +232,32 @@
|
|||
async submitPhoto() {
|
||||
// 1. 防连点核心逻辑:如果正在提交中,直接return阻止后续执行
|
||||
if (this.isSubmitting) return;
|
||||
|
||||
console.log(this.formData,'this.formData');
|
||||
// 2. 表单必填项校验:校验图片和名称是否填写
|
||||
if (!this.formData.url) {
|
||||
if(this.formData.type==1){
|
||||
if(this.formData.class_type==1){
|
||||
uni.showToast({
|
||||
title: '请先上传店铺主图',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}else if(this.formData.class_type==2){
|
||||
uni.showToast({
|
||||
title: '请先上传环境图片',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}else if(this.formData.class_type==3){
|
||||
uni.showToast({
|
||||
title: '请先上传作品图片',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
uni.showToast({
|
||||
title: '请先上传店铺主图',
|
||||
title: '请先上传图片/视频',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<view class="container">
|
||||
<custom-navbar title="店铺图片" :leftImg="'/static/images/back.png'" :showUser="true" backgroundColor="#fff"
|
||||
<custom-navbar title="店铺视频" :leftImg="'/static/images/back.png'" :showUser="true" backgroundColor="#fff"
|
||||
titleColor="#000" borderBottom="none"></custom-navbar>
|
||||
<view class="container-titles flex-row-center-between">
|
||||
<view class="titles-left">
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<view class="container-card">
|
||||
|
||||
<view class="card-content flex-row-center" v-if="type==1">
|
||||
<view class="card-content-page" v-if="class_type!=1">{{ imgVideoList.length }}/20张</view>
|
||||
<view class="card-content-page" v-if="class_type!=1 ">{{ imgVideoList.length }}/20张</view>
|
||||
<view class="content-default" @click="goAdd(class_type)"
|
||||
v-if="!(class_type == 1 && imgVideoList && imgVideoList.length)">
|
||||
<image class="content-default-img" src="/static/images/icons/addPhoto.png"></image>
|
||||
|
|
@ -37,7 +37,7 @@
|
|||
</view>
|
||||
</view>
|
||||
<view class="card-content flex-row-center" v-else>
|
||||
<view class="card-content-page">{{ imgVideoList.length }}/10张</view>
|
||||
<view class="card-content-page" v-if="class_type!=1">{{ imgVideoList.length }}/10张</view>
|
||||
<view class="content-default content-default2" @click="goAdd(class_type)"
|
||||
v-if="!(class_type == 1 && imgVideoList && imgVideoList.length)">
|
||||
<image class="content-default-img" src="/static/images/icons/addPhoto.png"></image>
|
||||
|
|
@ -98,6 +98,16 @@
|
|||
}
|
||||
if (options.id) {
|
||||
this.class_type = options.id
|
||||
|
||||
}
|
||||
if (this.type == 2) {
|
||||
if (this.class_type == 1) {
|
||||
this.pagestitle = "店铺主视频"
|
||||
} else if (this.class_type == 4) {
|
||||
this.pagestitle = "其它视频"
|
||||
}
|
||||
console.log('123123123');
|
||||
} else if (this.type == 1) {
|
||||
if (this.class_type == 2) {
|
||||
this.pagestitle = "环境图片"
|
||||
} else if (this.class_type == 3) {
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ const uploadFile = async (file, userId, type, uploadType) => {
|
|||
imageType = file.path.split('.')
|
||||
} else if (uploadType == 'video') {
|
||||
// #ifdef H5
|
||||
imageType = file.name.split('.')
|
||||
imageType = file.url.split('.')
|
||||
// #endif
|
||||
// #ifdef APP-PLUS || MP-WEIXIN
|
||||
imageType = file.tempFilePath.split('.')
|
||||
|
|
|
|||
Loading…
Reference in New Issue