This commit is contained in:
cjl520cy 2026-04-03 15:49:27 +08:00
parent 8066f80b0c
commit 32dd0a94d2
7 changed files with 1432 additions and 1396 deletions

View File

@ -39,6 +39,7 @@
<view class="service-price">
<text v-if="dataItem.team_buy_id">{{`团购价: `}}</text>¥<text
style="font-size: 34rpx;">{{ dataItem.order_money }}</text>
<text class="service-price-line">{{ dataItem.line_money }}</text>
</view>
</view>
@ -258,6 +259,15 @@
line-height: 34rpx;
text-align: left;
font-style: normal;
.service-price-line {
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 34rpx;
margin-left: 10rpx;
text-decoration: line-through;
}
}
.service-type {

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,7 @@
<view class="service-price" >
<text v-if="dataItem.team_buy_id">{{`团购价: `}}</text>¥<text
style="font-size: 34rpx;">{{ dataItem.order_money }}</text>
<text class="service-price-line">{{ dataItem.line_money }}</text>
</view>
</view>
@ -285,6 +286,14 @@
line-height: 34rpx;
text-align: left;
font-style: normal;
.service-price-line {
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 34rpx;
margin-left: 10rpx;
text-decoration: line-through;
}
}
.service-type {

View File

@ -39,6 +39,7 @@
<view class="service-price">
<text v-if="dataItem.team_buy_id">{{`团购价: `}}</text>¥<text
style="font-size: 34rpx;">{{ dataItem.order_money }}</text>
<text class="service-price-line">{{ dataItem.line_money }}</text>
</view>
</view>
@ -258,6 +259,14 @@
line-height: 34rpx;
text-align: left;
font-style: normal;
.service-price-line {
font-weight: 400;
font-size: 24rpx;
color: #999999;
line-height: 34rpx;
margin-left: 10rpx;
text-decoration: line-through;
}
}
.service-type {

View File

@ -105,7 +105,9 @@
<view class="per-cont">便于您使用该功能上传您的照片/图片/视频以及用于更换头像发布商品等场景中所需内容</view>
</view>
<video v-show="videoPlay" :src="videoUrl" controls id="myvideo" style="height: 0;width: 0;" @fullscreenchange="screenChange"></video>
<video v-show="videoPlay" :src="videoUrl" controls id="myvideo" style="height: 0; width: 0; position: absolute; top: -999rpx; left: -999rpx;"
@fullscreenchange="screenChange"></video>
<uv-divider></uv-divider>
</view>
</template>
@ -120,6 +122,7 @@
},
data() {
return {
videoContext:null,
videoPlay: false,
videoUrl: "",
disabled: false,
@ -201,10 +204,13 @@
},
methods: {
screenChange(e) {
let fullScreen = e.detail.fullScreen; // truefalse退
console.log(e, "全屏");
if (!fullScreen) {
//退
this.videoContext.pause()
plus.screen.lockOrientation('portrait-primary');
this.videoPlay = false; //
}
},
@ -220,8 +226,8 @@
direction: 90
});
this.videoContext.play();
},
async submitPhoto() {
// 1. return
@ -366,7 +372,8 @@
if (this.formData.type == 1) {
res = await uploadImage.handleUpload(this.userInfo.id, 3);
} else {
res = await uploadImage.handleUpload(this.userInfo.id, 3, ['album', 'camera'], 'video');
res = await uploadImage.handleUpload(this.userInfo.id, 3, ['album', 'camera'],
'video');
}
console.log('上传单张图片', res)
this.formData.url = res;
@ -420,7 +427,8 @@
// 1.
// const { granted } = await permissionUtils.checkPermission('photo_library', '');
this.nowQer = 'xc';
const xc = await permissionUtils.checkPermission('photo_library', '需要相册权限用于上传照片');
const xc = await permissionUtils.checkPermission('photo_library',
'需要相册权限用于上传照片');
this.nowQer = 'xj';
const xj = await permissionUtils.checkPermission('camera', '需要相机权限用于拍摄照片');
this.isShowPer = false;
@ -439,8 +447,10 @@
if (!confirm) return;
// 3.
const result1 = await permissionUtils.requestPermission('photo_library', '我们需要访问您的相册以上传图片/视频');
const result2 = await permissionUtils.requestPermission('camera', '我们需要访问您的相机以上传图片/视频');
const result1 = await permissionUtils.requestPermission('photo_library',
'我们需要访问您的相册以上传图片/视频');
const result2 = await permissionUtils.requestPermission('camera',
'我们需要访问您的相机以上传图片/视频');
if (result1 && result2) {
this.openCamera();
} else {

View File

@ -35,6 +35,10 @@
<image class="photo-mask-img" mode="aspectFill" src="/static/images/icons/time.png"></image>
<text class="photo-mask-text">审核中</text>
</view>
<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>
<view class="photo-mask-text">已驳回</view>
</view>
</view>
</view>
<view class="card-content flex-row-center" v-else>
@ -57,11 +61,11 @@
<!-- <video class="content-photo-video" loop="true" :controls="false" :autoplay="true" :muted="true"
:src="item2.url || item2.auth_url">
</video> -->
<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>
<view class="photo-mask-text">审核中</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>
<view class="photo-mask-text">已驳回</view>
</view>
@ -115,7 +119,7 @@
await this.getList()
},
async onLoad(options) {
if(options.type){
if (options.type) {
this.type = options.type
}
},
@ -151,7 +155,25 @@
// });
},
goAdd(id, item) {
console.log(11111, id)
if (this.type == 1) {
if ( this.imgVideoList[id] && this.imgVideoList[id].length >= 20) {
uni.showToast({
title: '最多上传20张图片',
icon: 'none',
duration: 2000
});
return
}
} else if (this.type == 2) {
if ( this.imgVideoList[id] && this.imgVideoList[id].length >= 10) {
uni.showToast({
title: '最多上传10张视频',
icon: 'none',
duration: 2000
});
return
}
}
// 1. id
if (!id) {
uni.showToast({
@ -186,14 +208,19 @@
});
},
async getList() {
await request.post("/sj/imgVideo/list", {
type: this.type
}).then(res => {
if (res.code == 200) {
this.imgVideoList = res.data.list[this.type]
}
})
try {
const res = await request.post("/sj/imgVideo/list", {
type: this.type
});
// imgVideoList
this.imgVideoList = res.data?.list?.[this.type] || {};
// res.data.list[this.type]id
// this.imgVideoList = res.data?.list?.[this.type] || {};
} catch (err) {
// imgVideoList
console.error("获取图片/视频列表失败:", err);
this.imgVideoList = {};
}
}
}
}

View File

@ -12,7 +12,7 @@
</view>
</view>
<view class="container-card">
<view class="card-content flex-row-center" v-if="type==1">
<view class="card-content-page">{{ imgVideoList.length }}/20</view>
<view class="content-default" @click="goAdd(class_type)"
@ -69,7 +69,7 @@
</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>
</view>
@ -121,18 +121,15 @@
async handleDelete() {
// ID
let deleteIds = this.selectedItems.map(index => this.imgVideoList[index].id);
let auth_ids = this.selectedItems.map(index => this.imgVideoList[index].auth_id).filter(item => item !== 0);
console.log(1111,deleteIds,auth_ids,[1,6])
let auth_ids = this.selectedItems.map(index => this.imgVideoList[index].auth_id).filter(item =>
item !== 0);
console.log(1111, deleteIds, auth_ids, [1, 6])
try {
const res = await request.post("/sj/imgVideo/del", {
ids: deleteIds,
auth_ids:auth_ids
auth_ids: auth_ids
});
if (res.code == 200) {
uni.showToast({
title: '删除成功',
icon: 'success'
});
//
await this.getList();
// 退
@ -153,8 +150,8 @@
},
goAdd(id, item) {
if (this.isManage) return; //
if(this.type==1){
if(this.imgVideoList.length>=20){
if (this.type == 1) {
if (this.imgVideoList.length >= 20) {
uni.showToast({
title: '最多上传20张图片',
icon: 'none',
@ -162,8 +159,8 @@
});
return
}
}else if(this.type==2){
if(this.imgVideoList.length>=10){
} else if (this.type == 2) {
if (this.imgVideoList.length >= 10) {
uni.showToast({
title: '最多上传10张视频',
icon: 'none',
@ -206,14 +203,20 @@
return obj
},
async getList() {
await request.post("/sj/imgVideo/list", {
type: this.type,
class_type: this.class_type
}).then(res => {
if (res.code == 200) {
this.imgVideoList = res.data.list[this.type][this.class_type]
}
})
try {
const res = await request.post("/sj/imgVideo/list", {
type: this.type,
class_type: this.class_type
});
// + 访
this.imgVideoList = res.code === 200 ?
res.data?.list?.[this.type]?.[this.class_type] || [] :
[];
} catch (err) {
//
console.error("获取媒体列表失败:", err);
this.imgVideoList = [];
}
}
}
}
@ -230,16 +233,16 @@
font-style: normal;
white-space: nowrap;
}
.review {
background: rgba(255, 250, 218, 1);
border-radius: 20rpx 20rpx 0rpx 0rpx;
margin: 20rpx;
padding: 20rpx 20rpx 20rpx 20rpx;
.review-title {
margin-bottom: 6rpx;
.review-title-text {
font-weight: 400;
font-size: 24rpx;
@ -249,7 +252,7 @@
font-style: normal;
}
}
}
.container-card {
@ -292,8 +295,8 @@
.card-content {
gap: 14rpx;
flex-wrap: wrap;
.card-content-page{
.card-content-page {
font-weight: 400;
font-size: 24rpx;
color: #999999;