This commit is contained in:
cjl520cy 2026-04-09 17:50:26 +08:00
commit fcf1a4ed5e
8 changed files with 1158 additions and 1097 deletions

View File

@ -2,12 +2,13 @@
"version" : "1.0", "version" : "1.0",
"configurations" : [ "configurations" : [
{ {
"customPlaygroundType" : "local",
"playground" : "custom", "playground" : "custom",
"type" : "uni-app:app-ios" "type" : "uni-app:app-ios"
}, },
{ {
"customPlaygroundType" : "device", "customPlaygroundType" : "local",
"playground" : "standard", "playground" : "custom",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
} }
] ]

View File

@ -2,7 +2,7 @@
"name" : "美融融商家", "name" : "美融融商家",
"appid" : "__UNI__BBE6285", "appid" : "__UNI__BBE6285",
"description" : "同城便捷到家美业“技术外卖”服务、同城预约到店服务平台美融融为同城爱美人群提供更优质的更全面的服务。", "description" : "同城便捷到家美业“技术外卖”服务、同城预约到店服务平台美融融为同城爱美人群提供更优质的更全面的服务。",
"versionName" : "1.0.05", "versionName" : "1.0.06",
"versionCode" : 1005, "versionCode" : 1005,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
@ -197,6 +197,7 @@
"quickapp" : {}, "quickapp" : {},
/* */ /* */
"mp-weixin" : { "mp-weixin" : {
"appid" : "wx17eef65c270b4869",
"appid" : "wx17eef65c270b4869", "appid" : "wx17eef65c270b4869",
"privacy" : { "privacy" : {
"requiredPrivateInfos" : [ "getBackgroundFetchData" ] "requiredPrivateInfos" : [ "getBackgroundFetchData" ]

View File

@ -391,9 +391,9 @@
} }
// //
const notShow = uni.getStorageSync('addServiceReminderNotShow'); const notShow = uni.getStorageSync('addServiceReminderNotShow');
if (!notShow) { // if (!notShow) {
this.showReminderPopup = true; // this.showReminderPopup = true;
} // }
this.getUserInfo(); this.getUserInfo();
}, },
computed: { computed: {
@ -868,6 +868,16 @@
} else { } else {
url = "/user/serverupdate"; url = "/user/serverupdate";
} }
console.log(this.formData, '-0-0-0-0-0-');
delete this.formData.shop_business_time
delete this.formData.shop_head_photo
delete this.formData.shop_address
delete this.formData.shop_dependency
delete this.formData.shop_class
delete this.formData.team_buy
request.post(url, this.formData).then((res) => { request.post(url, this.formData).then((res) => {
if (res.state == 1) { if (res.state == 1) {
const pages = getCurrentPages(); const pages = getCurrentPages();

File diff suppressed because it is too large Load Diff

View File

@ -232,11 +232,32 @@
async submitPhoto() { async submitPhoto() {
// 1. return // 1. return
if (this.isSubmitting) return; if (this.isSubmitting) return;
console.log(this.formData,'this.formData');
// 2. // 2.
if (!this.formData.url) { 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({ uni.showToast({
title: '请先上传店铺主图', title: '请先上传片/视频',
icon: 'none', icon: 'none',
duration: 2000 duration: 2000
}); });
@ -369,6 +390,7 @@
uni.showLoading({ uni.showLoading({
title: '上传中' title: '上传中'
}) })
console.log(this.formData,'=============================');
if (this.formData.type == 1) { if (this.formData.type == 1) {
res = await uploadImage.handleUpload(this.userInfo.id, 3); res = await uploadImage.handleUpload(this.userInfo.id, 3);
} else { } else {

View File

@ -1,6 +1,6 @@
<template> <template>
<view class="container"> <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> titleColor="#000" borderBottom="none"></custom-navbar>
<view class="container-titles flex-row-center-between"> <view class="container-titles flex-row-center-between">
<view class="titles-left"> <view class="titles-left">
@ -9,13 +9,14 @@
</view> </view>
<view class="titles-right"> <view class="titles-right">
<text class="titles-text">展示位置及拍摄技巧</text> <text class="titles-text">展示位置及拍摄技巧</text>
<image src="https://mrrplus.oss-cn-beijing.aliyuncs.com/photo/system/b153e8d5-37b1-4205-a4a1-9f6603f30c2a.png" mode="widthFix" style="width: 24rpx;margin-top: 2rpx;margin-left: 6rpx;"></image>
</view> </view>
</view> </view>
<view class="container-card" v-for="(item,index) in cardList[type]" :key="index"> <view class="container-card" v-for="(item,index) in cardList[type]" :key="index">
<view class="card-header flex-row-center-between"> <view class="card-header flex-row-center-between">
<text class="card-title">{{ item.title }}</text> <text class="card-title">{{ item.title }}</text>
<view class="card-header-right" @click="goList(item.id)"> <view class="card-header-right" @click="goList(item.id)">
<text class="card-header-right-text">查看详情</text> <text class="card-header-right-text">查看全部</text>
<image class="card-header-right-img" src="/static/images/icons/right_gray14.png"></image> <image class="card-header-right-img" src="/static/images/icons/right_gray14.png"></image>
</view> </view>
</view> </view>
@ -142,6 +143,7 @@
return obj return obj
}, },
goList(id) { goList(id) {
console.log(id,'ididididididi');
uni.navigateTo({ uni.navigateTo({
url: `/pages/shop/photoAlbum/videoList?id=${id}&type=${this.type}` url: `/pages/shop/photoAlbum/videoList?id=${id}&type=${this.type}`
}); });
@ -156,7 +158,7 @@
}, },
goAdd(id, item) { goAdd(id, item) {
if (this.type == 1) { if (this.type == 1) {
if ( this.imgVideoList[id] && this.imgVideoList[id].length >= 20) { if ( this.imgVideoList[id] && this.imgVideoList[id].length >= 21) {
uni.showToast({ uni.showToast({
title: '最多上传20张图片', title: '最多上传20张图片',
icon: 'none', icon: 'none',
@ -255,6 +257,7 @@
} }
.titles-right { .titles-right {
display: flex;
.titles-text { .titles-text {
font-family: PingFangSC, PingFang SC; font-family: PingFangSC, PingFang SC;
font-weight: 400; font-weight: 400;

View File

@ -1,486 +1,506 @@
<template> <template>
<view class="container"> <view class="container">
<custom-navbar title="店铺图片" :leftImg="'/static/images/back.png'" :showUser="true" backgroundColor="#fff" <custom-navbar :title="pagestitle" :leftImg="'/static/images/back.png'" :showUser="true" backgroundColor="#fff"
titleColor="#000" borderBottom="none"> titleColor="#000" borderBottom="none">
<template #right> <template #right>
<text class="custom-right" @click="toggleManage">{{ isManage ? '取消' : '管理' }}</text> <text class="custom-right" @click="toggleManage">{{ isManage ? '取消' : '管理' }}</text>
</template> </template>
</custom-navbar> </custom-navbar>
<view class="review"> <view class="review">
<view class="review-title"> <view class="review-title">
<text class="review-title-text">添加环境图片吸引更多顾客到店消费</text> <text class="review-title-text">添加{{pagestitle}}吸引更多顾客到店消费</text>
</view> </view>
</view> </view>
<view class="container-card"> <view class="container-card">
<view class="card-content flex-row-center" v-if="type==1"> <view class="card-content flex-row-center" v-if="type==1">
<view class="card-content-page">{{ 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)" <view class="content-default" @click="goAdd(class_type)"
v-if="!(class_type == 1 && imgVideoList && imgVideoList.length)"> v-if="!(class_type == 1 && imgVideoList && imgVideoList.length)">
<image class="content-default-img" src="/static/images/icons/addPhoto.png"></image> <image class="content-default-img" src="/static/images/icons/addPhoto.png"></image>
<text class="content-default-text">添加照片</text> <text class="content-default-text">添加照片</text>
</view> </view>
<view class="content-photo" v-for="(item2,index2) in imgVideoList" :key="index2" v-if="imgVideoList" <view class="content-photo" v-for="(item2,index2) in imgVideoList" :key="index2" v-if="imgVideoList"
@click="isManage ? toggleSelect(index2) : goAdd(class_type,item2)"> @click="isManage ? toggleSelect(index2) : goAdd(class_type,item2)">
<!-- 选择框 --> <!-- 选择框 -->
<image class="content-photo-select" v-if="isManage" <image class="content-photo-select" v-if="isManage"
:src="selectedItems.includes(index2) ? '/static/images/icons/yes_icon.png' : '/static/images/icons/no_icon2.png'"> :src="selectedItems.includes(index2) ? '/static/images/icons/yes_icon.png' : '/static/images/icons/no_icon2.png'">
</image> </image>
<image class="content-photo-img" mode="aspectFill" :src="getItem(item2).url"></image> <image class="content-photo-img" mode="aspectFill" :src="getItem(item2).url"></image>
<view class="content-photo-title"> <view class="content-photo-title">
{{ getItem(item2).name }} {{ getItem(item2).name }}
</view> </view>
<view class="content-photo-mask" v-if="item2.apply_state==1"> <view class="content-photo-mask" v-if="item2.apply_state==1">
<image class="photo-mask-img" mode="aspectFill" src="/static/images/icons/time.png"></image> <image class="photo-mask-img" mode="aspectFill" src="/static/images/icons/time.png"></image>
<text class="photo-mask-text">审核中</text> <text class="photo-mask-text">审核中</text>
</view> </view>
</view> </view>
</view> </view>
<view class="card-content flex-row-center" v-else> <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)" <view class="content-default content-default2" @click="goAdd(class_type)"
v-if="!(class_type == 1 && imgVideoList && imgVideoList.length)"> v-if="!(class_type == 1 && imgVideoList && imgVideoList.length)">
<image class="content-default-img" src="/static/images/icons/addPhoto.png"></image> <image class="content-default-img" src="/static/images/icons/addPhoto.png"></image>
<text class="content-default-text">添加视频</text> <text class="content-default-text">添加视频</text>
</view> </view>
<view class="content-photo content-video" v-for="(item2,index2) in imgVideoList" :key="index2" <view class="content-photo content-video" v-for="(item2,index2) in imgVideoList" :key="index2"
v-if="imgVideoList" @click="isManage ? toggleSelect(index2) : goAdd(class_type,item2)"> v-if="imgVideoList" @click="isManage ? toggleSelect(index2) : goAdd(class_type,item2)">
<!-- 选择框 --> <!-- 选择框 -->
<image class="content-photo-select" v-if="isManage" <image class="content-photo-select" v-if="isManage"
:src="selectedItems.includes(index2) ? '/static/images/icons/yes_icon.png' : '/static/images/icons/no_icon2.png'"> :src="selectedItems.includes(index2) ? '/static/images/icons/yes_icon.png' : '/static/images/icons/no_icon2.png'">
</image> </image>
<image class="content-photo-video" mode="aspectFill" :src="getItem(item2).url"></image> <image class="content-photo-video" mode="aspectFill" :src="getItem(item2).url"></image>
<view class="content-photo-title"> <view class="content-photo-title">
{{ getItem(item2).name }} {{ getItem(item2).name }}
</view> </view>
<view class="content-photo-play"> <view class="content-photo-play">
<image class="content-photo-play-img" mode="aspectFill" src="/static/images/icons/play.png"> <image class="content-photo-play-img" mode="aspectFill" src="/static/images/icons/play.png">
</image> </image>
</view> </view>
<view class="content-photo-mask" v-if="item2.apply_state==1"> <view class="content-photo-mask" v-if="item2.apply_state==1">
<image class="photo-mask-img" mode="aspectFill" src="/static/images/icons/time.png"></image> <image class="photo-mask-img" mode="aspectFill" src="/static/images/icons/time.png"></image>
<view class="photo-mask-text">审核中</view> <view class="photo-mask-text">审核中</view>
</view> </view>
<view class="content-photo-mask" v-if="item2.apply_state==3"> <view class="content-photo-mask" v-if="item2.apply_state==3">
<image class="photo-mask-img" mode="aspectFill" src="/static/images/icons/close2.png"></image> <image class="photo-mask-img" mode="aspectFill" src="/static/images/icons/close2.png"></image>
<view class="photo-mask-text">已驳回</view> <view class="photo-mask-text">已驳回</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="container-buttons flex-row-center-center" v-if="isManage"> <view class="container-buttons flex-row-center-center" v-if="isManage">
<view class="container-buttons-sure2 flex-row-center-center" @click="handleDelete">删除</view> <view class="container-buttons-sure2 flex-row-center-center" @click="handleDelete">删除</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import request from "@/utils/request"; import request from "@/utils/request";
export default { export default {
data() { data() {
return { return {
imgVideoList: [], imgVideoList: [],
type: 2, //1 2 type: 2, //1 2
class_type: 4, //1(/) 2(/) 3(/) 4(/) class_type: 4, //1(/) 2(/) 3(/) 4(/)
isManage: false, // isManage: false, //
selectedItems: [] // selectedItems: [], //
} pagestitle: "店铺图片"
}, }
async onShow() { },
await this.getList() async onShow() {
}, await this.getList()
async onLoad(options) { },
if (options.type) { async onLoad(options) {
this.type = options.type console.log(options, '查看option');
} if (options.type) {
if (options.id) { this.type = options.type
this.class_type = options.id }
} if (options.id) {
}, this.class_type = options.id
methods: {
// / }
toggleManage() { if (this.type == 2) {
this.isManage = !this.isManage; if (this.class_type == 1) {
if (!this.isManage) { this.pagestitle = "店铺主视频"
this.selectedItems = []; // 退 } else if (this.class_type == 4) {
} this.pagestitle = "其它视频"
}, }
// console.log('123123123');
toggleSelect(index) { } else if (this.type == 1) {
console.log(1111, index) if (this.class_type == 2) {
if (this.selectedItems.includes(index)) { this.pagestitle = "环境图片"
// } else if (this.class_type == 3) {
this.selectedItems = this.selectedItems.filter(i => i !== index); this.pagestitle = "作品图片"
} else { } else if (this.class_type == 4) {
// this.pagestitle = "其它图片"
this.selectedItems.push(index); } else {
} this.pagestitle = "店铺图片"
}, }
// }
async handleDelete() { },
// ID methods: {
let deleteIds = this.selectedItems.map(index => this.imgVideoList[index].id); // /
let auth_ids = this.selectedItems.map(index => this.imgVideoList[index].auth_id).filter(item => toggleManage() {
item !== 0); this.isManage = !this.isManage;
console.log(1111, deleteIds, auth_ids, [1, 6]) if (!this.isManage) {
try { this.selectedItems = []; // 退
const res = await request.post("/sj/imgVideo/del", { }
ids: deleteIds, },
auth_ids: auth_ids //
}); toggleSelect(index) {
if (res.code == 200) { console.log(1111, index)
// if (this.selectedItems.includes(index)) {
await this.getList(); //
// 退 this.selectedItems = this.selectedItems.filter(i => i !== index);
this.isManage = false; } else {
this.selectedItems = []; //
} else { this.selectedItems.push(index);
uni.showToast({ }
title: '删除失败', },
icon: 'none' //
}); async handleDelete() {
} // ID
} catch (err) { let deleteIds = this.selectedItems.map(index => this.imgVideoList[index].id);
uni.showToast({ let auth_ids = this.selectedItems.map(index => this.imgVideoList[index].auth_id).filter(item =>
title: '删除失败', item !== 0);
icon: 'none' console.log(1111, deleteIds, auth_ids, [1, 6])
}); try {
} const res = await request.post("/sj/imgVideo/del", {
}, ids: deleteIds,
goAdd(id, item) { auth_ids: auth_ids
if (this.isManage) return; // });
if (this.type == 1) { if (res.code == 200) {
if (this.imgVideoList.length >= 20) { //
uni.showToast({ await this.getList();
title: '最多上传20张图片', // 退
icon: 'none', this.isManage = false;
duration: 2000 this.selectedItems = [];
}); } else {
return uni.showToast({
} title: '删除失败',
} else if (this.type == 2) { icon: 'none'
if (this.imgVideoList.length >= 10) { });
uni.showToast({ }
title: '最多上传10张视频', } catch (err) {
icon: 'none', uni.showToast({
duration: 2000 title: '删除失败',
}); icon: 'none'
return });
} }
} },
if (!id) { goAdd(id, item) {
uni.showToast({ if (this.isManage) return; //
title: '参数异常,无法上传', if (this.type == 1) {
icon: 'none', if (this.imgVideoList.length >= 20) {
duration: 2000 uni.showToast({
}); title: '最多上传20张图片',
return; icon: 'none',
} duration: 2000
let url = `/pages/shop/photoAlbum/addPhoto?id=${id}&type=${this.type}`; });
if (item) { return
url += `&item=${encodeURIComponent(JSON.stringify(item))}`; }
} } else if (this.type == 2) {
uni.navigateTo({ if (this.imgVideoList.length >= 10) {
url: url uni.showToast({
}); title: '最多上传10张视频',
}, icon: 'none',
getItem(item) { duration: 2000
let obj = { });
name: "", return
url: "" }
} }
if (item.apply_state == 1) { if (!id) {
obj.url = item.auth_url uni.showToast({
obj.name = item.auth_name title: '参数异常,无法上传',
} else { icon: 'none',
obj.url = item.url || item.auth_url duration: 2000
obj.name = item.name || item.auth_name });
} return;
if (item.type == 2) { }
obj.url = obj.url + `?x-oss-process=video/snapshot,t_1000,m_fast,f_jpg,w_600,ar_auto` let url = `/pages/shop/photoAlbum/addPhoto?id=${id}&type=${this.type}`;
} if (item) {
return obj url += `&item=${encodeURIComponent(JSON.stringify(item))}`;
}, }
async getList() { uni.navigateTo({
try { url: url
const res = await request.post("/sj/imgVideo/list", { });
type: this.type, },
class_type: this.class_type getItem(item) {
}); let obj = {
// + 访 name: "",
this.imgVideoList = res.code === 200 ? url: ""
res.data?.list?.[this.type]?.[this.class_type] || [] : }
[]; if (item.apply_state == 1) {
} catch (err) { obj.url = item.auth_url
// obj.name = item.auth_name
console.error("获取媒体列表失败:", err); } else {
this.imgVideoList = []; obj.url = item.url || item.auth_url
} obj.name = item.name || item.auth_name
} }
} if (item.type == 2) {
} obj.url = obj.url + `?x-oss-process=video/snapshot,t_1000,m_fast,f_jpg,w_600,ar_auto`
</script> }
return obj
<style lang="less"> },
.container { async getList() {
.custom-right { try {
font-weight: 500; const res = await request.post("/sj/imgVideo/list", {
font-size: 26rpx; type: this.type,
color: #333333; class_type: this.class_type
line-height: 37rpx; });
text-align: left; // + 访
font-style: normal; this.imgVideoList = res.code === 200 ?
white-space: nowrap; res.data?.list?.[this.type]?.[this.class_type] || [] : [];
} } catch (err) {
//
.review { console.error("获取媒体列表失败:", err);
background: rgba(255, 250, 218, 1); this.imgVideoList = [];
border-radius: 20rpx 20rpx 0rpx 0rpx; }
margin: 20rpx; }
padding: 20rpx 20rpx 20rpx 20rpx; }
}
.review-title { </script>
margin-bottom: 6rpx;
<style lang="less">
.review-title-text { .container {
font-weight: 400; .custom-right {
font-size: 24rpx; font-weight: 500;
color: #835225; font-size: 26rpx;
line-height: 33rpx; color: #333333;
text-align: left; line-height: 37rpx;
font-style: normal; text-align: left;
} font-style: normal;
} white-space: nowrap;
}
}
.review {
.container-card { background: rgba(255, 250, 218, 1);
border-radius: 20rpx; border-radius: 20rpx 20rpx 0rpx 0rpx;
margin: 20rpx; margin: 20rpx;
padding: 20rpx 20rpx 30rpx 20rpx; padding: 20rpx 20rpx 20rpx 20rpx;
background: #fff;
transform: translateY(-30rpx); .review-title {
margin-bottom: 6rpx;
.card-header {
margin-bottom: 20rpx; .review-title-text {
font-weight: 400;
.card-title { font-size: 24rpx;
font-weight: 500; color: #835225;
font-size: 28rpx; line-height: 33rpx;
color: #1D2129; text-align: left;
line-height: 48rpx; font-style: normal;
text-align: left; }
font-style: normal; }
}
}
.card-header-right {
.card-header-right-text { .container-card {
font-weight: 400; border-radius: 20rpx;
font-size: 22rpx; margin: 20rpx;
color: #999999; padding: 20rpx 20rpx 30rpx 20rpx;
line-height: 30rpx; background: #fff;
text-align: left; transform: translateY(-30rpx);
font-style: normal;
} .card-header {
margin-bottom: 20rpx;
.card-header-right-img {
width: 8rpx; .card-title {
height: 16rpx; font-weight: 500;
margin-left: 7rpx; font-size: 28rpx;
} color: #1D2129;
} line-height: 48rpx;
} text-align: left;
font-style: normal;
.card-content { }
gap: 14rpx;
flex-wrap: wrap; .card-header-right {
.card-header-right-text {
.card-content-page { font-weight: 400;
font-weight: 400; font-size: 22rpx;
font-size: 24rpx; color: #999999;
color: #999999; line-height: 30rpx;
line-height: 33rpx; text-align: left;
text-align: left; font-style: normal;
font-style: normal; }
width: 100%;
} .card-header-right-img {
width: 8rpx;
.content-default { height: 16rpx;
width: 214rpx; margin-left: 7rpx;
height: 214rpx; }
background: #F5F5F5; }
border-radius: 20rpx; }
display: flex;
flex-direction: column; .card-content {
align-items: center; gap: 14rpx;
justify-content: center; flex-wrap: wrap;
.card-content-page {
.content-default-img { font-weight: 400;
width: 42rpx; font-size: 24rpx;
height: 35rpx; color: #999999;
margin-bottom: 8rpx; line-height: 33rpx;
} text-align: left;
font-style: normal;
.content-default-text { width: 100%;
font-weight: 400; }
font-size: 22rpx;
color: #666666; .content-default {
line-height: 30rpx; width: 214rpx;
text-align: left; height: 214rpx;
font-style: normal; background: #F5F5F5;
display: block; border-radius: 20rpx;
} display: flex;
} flex-direction: column;
align-items: center;
.content-default2 { justify-content: center;
width: 328rpx;
height: 186rpx;
background: #F5F5F5; .content-default-img {
border-radius: 17rpx; width: 42rpx;
} height: 35rpx;
margin-bottom: 8rpx;
.content-photo { }
box-sizing: border-box;
width: 214rpx; .content-default-text {
height: 214rpx; font-weight: 400;
border-radius: 20rpx; font-size: 22rpx;
position: relative; color: #666666;
overflow: hidden; line-height: 30rpx;
text-align: left;
// font-style: normal;
.content-photo-select { display: block;
position: absolute; }
top: 12rpx; }
right: 14rpx;
width: 36rpx; .content-default2 {
height: 36rpx; width: 328rpx;
z-index: 999; height: 186rpx;
} background: #F5F5F5;
border-radius: 17rpx;
.content-photo-img { }
width: 214rpx;
height: 214rpx; .content-photo {
border-radius: 20rpx; box-sizing: border-box;
} width: 214rpx;
height: 214rpx;
.content-photo-video { border-radius: 20rpx;
width: 328rpx; position: relative;
height: 186rpx; overflow: hidden;
border-radius: 20rpx;
} //
.content-photo-select {
.content-photo-title { position: absolute;
background: rgba(51, 51, 51, 0.6); top: 12rpx;
padding: 6rpx 0 4rpx 0; right: 14rpx;
position: absolute; width: 36rpx;
left: 0; height: 36rpx;
right: 0; z-index: 999;
bottom: 0; }
font-weight: 400;
font-size: 15rpx; .content-photo-img {
color: #CACACA; width: 214rpx;
line-height: 21rpx; height: 214rpx;
text-align: center; border-radius: 20rpx;
font-style: normal; }
}
.content-photo-video {
.content-photo-play { width: 328rpx;
width: 25rpx; height: 186rpx;
height: 25rpx; border-radius: 20rpx;
position: absolute; }
right: 10rpx;
top: 6rpx; .content-photo-title {
background: rgba(51, 51, 51, 0.6);
.content-photo-play-img { padding: 6rpx 0 4rpx 0;
width: 25rpx; position: absolute;
height: 25rpx; left: 0;
} right: 0;
} bottom: 0;
font-weight: 400;
.content-photo-mask { font-size: 15rpx;
position: absolute; color: #CACACA;
left: 0; line-height: 21rpx;
right: 0; text-align: center;
top: 0; font-style: normal;
bottom: 0; }
background: rgba(0, 0, 0, 0.3);
display: flex; .content-photo-play {
align-items: center; width: 25rpx;
justify-content: center; height: 25rpx;
flex-direction: column; position: absolute;
border-radius: 20rpx; right: 10rpx;
top: 6rpx;
.photo-mask-img {
width: 36rpx; .content-photo-play-img {
height: 36rpx; width: 25rpx;
margin-bottom: 8rpx; height: 25rpx;
} }
}
.photo-mask-text {
font-weight: 400; .content-photo-mask {
font-size: 24rpx; position: absolute;
color: #FFFFFF; left: 0;
line-height: 33rpx; right: 0;
text-align: left; top: 0;
font-style: normal; bottom: 0;
} background: rgba(0, 0, 0, 0.3);
} display: flex;
} align-items: center;
justify-content: center;
.content-video { flex-direction: column;
width: 328rpx; border-radius: 20rpx;
height: 186rpx;
} .photo-mask-img {
} width: 36rpx;
} height: 36rpx;
} margin-bottom: 8rpx;
}
.container-buttons { .photo-mask-text {
position: fixed; font-weight: 400;
left: 0; font-size: 24rpx;
right: 0; color: #FFFFFF;
bottom: 0; line-height: 33rpx;
padding: 30rpx 0; text-align: left;
background: #FFFFFF; font-style: normal;
gap: 60rpx; }
}
.container-buttons-cancel { }
width: 278rpx;
height: 98rpx; .content-video {
border-radius: 49rpx; width: 328rpx;
border: 1rpx solid #E8101E; height: 186rpx;
font-weight: 400; }
font-size: 32rpx; }
color: #E8101E; }
text-align: center; }
font-style: normal;
}
.container-buttons {
.container-buttons-sure { position: fixed;
width: 278rpx; left: 0;
height: 98rpx; right: 0;
background: #E8101E; bottom: 0;
border-radius: 49rpx; padding: 30rpx 0;
font-weight: 400; background: #FFFFFF;
font-size: 32rpx; gap: 60rpx;
color: #FFFFFF;
text-align: center; .container-buttons-cancel {
font-style: normal; width: 278rpx;
} height: 98rpx;
border-radius: 49rpx;
.container-buttons-sure2 { border: 1rpx solid #E8101E;
width: 710rpx; font-weight: 400;
height: 98rpx; font-size: 32rpx;
background: #E8101E; color: #E8101E;
border-radius: 49rpx; text-align: center;
font-weight: 400; font-style: normal;
font-size: 38rpx; }
color: #FFFFFF;
text-align: left; .container-buttons-sure {
font-style: normal; width: 278rpx;
} height: 98rpx;
} background: #E8101E;
border-radius: 49rpx;
font-weight: 400;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
font-style: normal;
}
.container-buttons-sure2 {
width: 710rpx;
height: 98rpx;
background: #E8101E;
border-radius: 49rpx;
font-weight: 400;
font-size: 38rpx;
color: #FFFFFF;
text-align: left;
font-style: normal;
}
}
</style> </style>

View File

@ -173,10 +173,10 @@ const uploadFile = async (file, userId, type, uploadType) => {
let imageType; let imageType;
if (uploadType == 'image') { if (uploadType == 'image') {
//imageType = file.path.split('.') //imageType = file.path.split('.')
imageType = file.name.split('.') imageType = file.path.split('.')
} else if (uploadType == 'video') { } else if (uploadType == 'video') {
// #ifdef H5 // #ifdef H5
imageType = file.name.split('.') imageType = file.url.split('.')
// #endif // #endif
// #ifdef APP-PLUS || MP-WEIXIN // #ifdef APP-PLUS || MP-WEIXIN
imageType = file.tempFilePath.split('.') imageType = file.tempFilePath.split('.')
@ -252,7 +252,9 @@ const uploadToOss = (file, ossConfig, name, uploadType) => {
if (uploadType == 'image') { if (uploadType == 'image') {
path = file.path path = file.path
// 获取文件扩展名并设置 Content-Type // 获取文件扩展名并设置 Content-Type
console.log('111111');
const ext = file.path.split('.').pop().toLowerCase() const ext = file.path.split('.').pop().toLowerCase()
console.log('33333333');
const mimeTypes = { const mimeTypes = {
jpg: 'image/jpeg', jpg: 'image/jpeg',
jpeg: 'image/jpeg', jpeg: 'image/jpeg',