1、发布信息页面的同意协议可以取消同意

3、修改发布信息的页面:同意协议可以取消同意;上传图片的组件的新上传图片和删除的方法调整
4、s-uploader组件的上传图片的组件的新上传图片和删除的方法跟随修改发布信息相关逻辑进行调整
5、收藏页面的可查看列表的详情
6、隐藏商城的收藏和客服
This commit is contained in:
wangzimeng 2025-08-09 16:54:03 +08:00
parent fea492042f
commit b88707b245
6 changed files with 806 additions and 727 deletions

View File

@ -1,7 +1,7 @@
<template>
<s-layout title="修改发布信息" :bgStyle="{ color: '#f7f7f7' }">
<view class="container">
<view class="backImg flex flex-column align-items">
<scroll-view scroll-y="true" class="backImg flex flex-column align-items">
<view class="scroll-container box flex flex-column align-items">
<view class="first flex flex-column align-items justify-start" style="padding: 30rpx;">
<view class="row flex align-items" style="padding: 0 30rpx;">
@ -78,8 +78,10 @@
placeholder="请输入你的招标详细信息"></textarea>
</view>
<!-- 图片 -->
<s-uploader v-model:url="state.formData.images" fileMediatype="image" limit="9" mode="grid"
<!-- 图片 :value="state.formData.images" @success="handleUploadSuccess" @del-file="handleDelFile"
v-model:url="state.formData.images"-->
<s-uploader ref="uploaderRef" :url="state.formData.images" @success="handleUploadSuccess"
@delete="handleDelFile" fileMediatype="image" limit="9" mode="grid"
:imageStyles="{ width: '168rpx', height: '168rpx'}"></s-uploader>
</view>
<span class="line-row" style="margin: 30rpx 0;"></span>
@ -112,7 +114,7 @@
</view>
<view class="checkedLabel" style="margin-top: 26rpx;" v-if="selectTagslist.length != 0">
<view class="tagLab" v-for="(item, index) in selectTagslist" :key="index" style="">
<view>
<view style="font-size: 24rpx;line-height: 22rpx;color: #F76100;">
{{ item.name }}
</view>
<view style="height: 30rpx;width: 1rpx;background-color: #f76100;margin: 0 20rpx;">
@ -129,18 +131,20 @@
</view>
</view>
<view style="height: 370rpx;width: 100%;color: #f7f7f7;"></view>
</view>
</view>
</scroll-view>
<view style="height: 200rpx;width: 100%;color: #f7f7f7;"></view>
<view class="bottomBtn">
<view style="margin:30rpx 0 0 0;display: flex;align-items: center;justify-content: center;">
<view v-if="agreeAdd == false" style="width: 31rpx;height: 32rpx;
border: 2rpx solid #999999;border-radius: 50%;" @click="show = true"></view>
<image v-if="agreeAdd == true" style="width: 32rpx;height: 32rpx;"
src="https://jiangxiaoxian.0rui.cn/fbxySelected.png"></image>
src="https://jiangxiaoxian.0rui.cn/fbxySelected.png" @click="agreeAdd = false"></image>
<view style="font-size: 22rpx;line-height: 31rpx;color: #9C9C9C;display: flex;
justify-content: center;align-items: center;margin-left: 20rpx;" @click="show = true">我已阅读并同意
<view style="margin-left: 20rpx;color: #FCC74E;">发布须知</view>
@ -321,19 +325,31 @@
const status = ref(0)
const rentEditId = ref(0)
const tagList = ref([])
const showPopbq = ref(false)
const tagShowList = ref([])
const selectTagslist = ref([]); //
const tagSelectedNum = ref(0)
const typeList = ref([])
const typeShowList = ref([])
const showType = ref(false)
const typeIndex = ref(0); //
//
const uploaderRef = ref(null); // ref
onLoad((options) => {
getFbKnow();
getTagList();
getTypeList();
// getTypeList();
if (options.id) {
rentEditId.value = options.id
console.log('编辑接参ID', rentEditId.value);
getDetail()
// getDetail()
}
})
onShow(() => {
// getFbKnow();
// getTagList();
// getTypeList();
@ -386,6 +402,7 @@
const res = await sheep.$api.rent.tagsList({});
if (res.code == 1) {
tagList.value = res.data.list
console.log('getTagList', tagList.value);
tagShowList.value = tagList.value.map(({
name,
id
@ -393,15 +410,16 @@
name,
id
}));
console.log('getTagList222', tagList.value);
tagShowList.value.forEach(item => {
item.isSelect = false;
})
console.log('tagList', tagList.value, tagShowList.value);
getTypeList();
}
}
const typeList = ref([])
const typeShowList = ref([])
async function getTypeList() {
const res = await sheep.$api.rent.listType({});
if (res.code == 1) {
@ -410,13 +428,14 @@
typeShowList.value = Object.values(typeList.value)
console.log('typeList', typeList.value, typeShowList.value);
if (rentEditId.value) {
getDetail()
}
}
}
//
const showType = ref(false)
const typeIndex = ref(0); //
function closeType() {
console.log('取消type', typeIndex.value);
showType.value = false
@ -436,12 +455,6 @@
//
const showPopbq = ref(false)
const tagList = ref([])
const tagShowList = ref([])
const selectTagslist = ref([]); //
const tagSelectedNum = ref(0)
function openPopbq() {
showPopbq.value = true;
}
@ -497,7 +510,7 @@
selectTagslist.value.splice(i, 1);
tagSelectedNum.value -= 1;
console.log('删除标签', tagSelectedNum.value);
}
function change() {
@ -512,40 +525,61 @@
//
function getDetail() {
console.log('详情1',tagList.value);
if(tagList.value.length == 0){
tagList.value = uni.getStorageInfoSync('tagList');
console.log('详情1', tagList.value, uni.getStorageSync('tagList'));
if (tagList.value.length == 0) {
console.log('详情-tagList.value.length == 0', tagList.value, uni.getStorageSync('tagList'));
tagList.value = uni.getStorageSync('tagList');
tagShowList.value = tagList.value
}
console.log('详情',tagList.value,tagShowList.value);
if(typeList.value.length == 0) {
typeList.value = uni.getStorageInfoSync('typeList');
console.log('详情', tagList.value, tagShowList.value);
if (typeList.value.length == 0) {
typeList.value = uni.getStorageSync('typeList');
}
sheep.$api.rent.rentInfo(rentEditId.value).then((res) => {
if (res.code == 1) {
form.value = res.data.detail,
selectTagslist.value = tagList.value.reduce((acc, obj) => {
if (form.value.cate_ids.includes(obj.id)) {
acc.push(obj);
}
return acc;
}, []);
selectTagslist.value = tagList.value.reduce((acc, obj) => {
if (form.value.cate_ids.includes(obj.id)) {
acc.push(obj);
}
return acc;
}, []);
tagSelectedNum.value = selectTagslist.value.length
form.value.area = form.value.address_city_text
form.value.typeName = form.value.type_text
typeIndex.value = typeShowList.value.findIndex(item => item == form.value.type_text)
state.formData.images = form.value.images
console.log('form.value.images', form.value.images);
const arr2Names = selectTagslist.value.map(item => item.name);
tagShowList.value.forEach(item => {
if (arr2Names.includes(item.name)) {
item.isSelect = true; //
}
if (arr2Names.includes(item.name)) {
item.isSelect = true; //
}
});
console.log('详情22',tagShowList.value);
console.log('详情22', tagShowList.value);
}
})
}
//
const handleUploadSuccess = (res) => {
console.log('handleUploadSuccess', res.tempFilePaths);
// res.tempFilePaths
// const newImages = res.tempFilePaths.map(url => ({ url })); //
//
state.formData.images.push(...res.tempFilePaths);
};
// rentEdit.vue
const handleDelFile = (newList) => {
console.log('newList', newList);
var newListA = state.formData.images;
// // //
newListA.splice(newList.delIndex, 1);
state.formData.images =newListA;
//console.log('newList', state.formData.images);
};
async function apply() {
if (agreeAdd.value == false) {
uni.showToast({
@ -558,6 +592,7 @@
console.log('cate_ids', form.value.cate_ids, state.formData.images);
form.value.images = state.formData.images.join(',');
// form.value.images = state.formData.images.map(item => item.url).join(',');
console.log('images', form.value.images);
if (form.value.title == '') {
@ -638,6 +673,7 @@
console.log('修改成功');
agreeAdd.value = false;
selectTagslist.value = []
tagSelectedNum.value = 0;
form.value = {
title: '',
area: '',
@ -654,15 +690,29 @@
cateName: '',
imageList: [],
}
state.formData.images = []
state.formData.images = [];
state.imageFiles = []
console.log('state.formData.images', state.formData.images, uploaderRef.value);
// 2.
if (uploaderRef.value) { //
uploaderRef.value.clearFiles(); //
}
state.currentCityIndex = [0, 0]
console.log('currentCityIndex', state.currentCityIndex);
uni.showToast({
title: res.msg,
icon: 'success',
})
setTimeout(() => {
uni.navigateBack()
},2000)
}, 2000)
} else {
uni.showToast({
title: res.msg,
icon: 'error'
})
}
}
@ -675,7 +725,7 @@
background-color: #fff;
display: grid;
border-radius: 18rpx;
.contactedBox {
width: 660rpx;
height: 325rpx;
@ -685,7 +735,7 @@
justify-content: center;
align-items: center;
}
.contactBtn {
width: 660rpx;
height: 92rpx;
@ -693,7 +743,7 @@
display: flex;
border-radius: 0 0 18rpx 18rpx;
// margin-top: 40rpx;
.tactBtnBox {
width: 330rpx;
height: 92rpx;
@ -702,7 +752,7 @@
align-items: center;
justify-content: center;
}
.tactBtnBox2 {
width: 330rpx;
height: 92rpx;
@ -712,9 +762,9 @@
justify-content: center;
}
}
}
.checkedLabel {
width: 690rpx;
display: flex;
@ -726,10 +776,10 @@
align-items: center;
.tagLab {
width: 197rpx;
width: 182rpx;
height: 30rpx;
margin-right: 20rpx;
margin-bottom: 20rpx;
margin-right: 8rpx;
margin-top: 20rpx;
// display: grid;
// box-sizing: border-box;
// column-gap: 20rpx;
@ -747,7 +797,7 @@
.container {
.backImg {
height: 90vh;
height: 78vh;
// background: linear-gradient(to bottom, #F1F2F8 0%, #F1F2F8 50%, #FFFFFF 100%);
width: 100%;
background-color: #f7f7f7;

View File

@ -2,7 +2,7 @@
<su-fixed bottom placeholder bg="bg-white">
<view class="ui-tabbar-box">
<view class="ui-tabbar ss-flex ss-col-center ss-row-between">
<view
<!-- <view
v-if="collectIcon"
class="detail-tabbar-item ss-flex ss-flex-col ss-row-center ss-col-center"
@tap="onFavorite"
@ -23,7 +23,7 @@
></image>
<view class="item-title">收藏</view>
</block>
</view>
</view>
<view
v-if="serviceIcon"
class="detail-tabbar-item ss-flex ss-flex-col ss-row-center ss-col-center"
@ -35,7 +35,7 @@
mode="aspectFit"
></image>
<view class="item-title">客服</view>
</view>
</view>-->
<view
v-if="shareIcon"
class="detail-tabbar-item ss-flex ss-flex-col ss-row-center ss-col-center"

View File

@ -134,7 +134,7 @@
</view>
<!-- <view class="width:100%;height:200rpx"></view> -->
<view style="height: 370rpx;width: 100%;color: #f7f7f7;"></view>
<view style="height: 200rpx;width: 100%;color: #f7f7f7;"></view>
</view>
@ -147,7 +147,7 @@
<view v-if="agreeAdd == false" style="width: 31rpx;height: 32rpx;
border: 2rpx solid #999999;border-radius: 50%;" @click="show = true"></view>
<image v-if="agreeAdd == true" style="width: 32rpx;height: 32rpx;"
src="https://jiangxiaoxian.0rui.cn/fbxySelected.png"></image>
src="https://jiangxiaoxian.0rui.cn/fbxySelected.png" @click="agreeAdd = false"></image>
<view style="font-size: 22rpx;line-height: 31rpx;color: #9C9C9C;display: flex;
justify-content: center;align-items: center;margin-left: 20rpx;" @click="show = true">我已阅读并同意
<view style="margin-left: 6rpx;color: #FCC74E;font-size: 22rpx;line-height: 31rpx;">发布须知
@ -694,6 +694,7 @@
console.log('发布成功');
agreeAdd.value = false;
selectTagslist.value = []
tagSelectedNum.value = 0;
form.value = {
title: '',
area: '',
@ -724,8 +725,13 @@
uni.switchTab({
url: '/pages/index/user'
})
}else {
uni.showToast({
title: res.msg,
icon: 'error'
})
}
}
</script>

View File

@ -13,7 +13,7 @@
<!-- 食堂招租 -->
<view class="recommend-box" v-if="currentTab == 0">
<view class="rrecommList" v-for="(item,index) in collectRentList" :key="index">
<view class="rrecommList" v-for="(item,index) in collectRentList" :key="index" @click="toDetail(item)">
<view class="reListItem">
<!-- 左侧图片 -->
<view class="listItem-images">
@ -65,7 +65,7 @@
<!-- 平台课程 -->
<view class="exChangeBox" v-if="currentTab == 1">
<view class="couponsList">
<view class="list-item" v-for="(item,index) in collectSchoolList" :key="index">
<view class="list-item" v-for="(item,index) in collectSchoolList" :key="index" @click="toDetail(item)">
<image style="width: 330rpx;height: 200rpx;border-radius: 18rpx 18rpx 0 0;"
:src="item.image">
</image>
@ -341,6 +341,22 @@
})
}
}
function toDetail(e) {
console.log('跳转详情', e,currentTab.value);
if(currentTab.value == 0) {
console.log('收藏-招租');
uni.navigateTo({
url: '/pages/canteenRent/rentDetail?id=' + e.id
})
}else {
console.log('收藏-课程');
uni.navigateTo({
url:'/pages/school/classesDetail?id=' + e.id
})
}
}
onReachBottom(() => {});
onLoad(() => {

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
<template>
<view class="uni-file-picker__container">
<!-- <view class="file-picker__box" v-for="(url, index) in list" :key="index" :style="boxStyle" width: 196rpx;height: 196rpx;> -->
<view class="file-picker__box" v-for="(url, index) in list" :key="index" :style="boxStyle" >
<view class="file-picker__box" v-for="(url, index) in list" :key="index" :style="boxStyle">
<!-- <view class="file-picker__box-content" :style="borderStyle"> -->
<view class="file-picker__box-content" :style="borderStyle">
<image class="file-image" :src="getImageUrl(url)" mode="aspectFill"
@ -153,6 +153,13 @@
},
methods: {
getImageUrl(url) {
console.log('getImageUrl', url);
// URLhttp/https
if (url.startsWith('http://') || url.startsWith('https://')) {
return url;
}else {
return sheep.$url.cdn(url);
}
if ('blob:http:' === url.substr(0, 10)) {
return url;
} else {
@ -166,6 +173,7 @@
this.$emit('choose');
},
delFile(index) {
console.log('uploader-image——delFile');
this.$emit('delFile', index);
},
previewImage(img, index) {