上传提示词修改、提示框修改

This commit is contained in:
丁杰 2026-04-09 17:23:40 +08:00
parent 35dca559d3
commit 0dc0992858
4 changed files with 37 additions and 6 deletions

View File

@ -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
});

View File

@ -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">

View File

@ -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) {

View File

@ -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('.')