From 0b7f8d6f9e2a658ca494c96b69fd4f39fb4ea27e Mon Sep 17 00:00:00 2001 From: wangzimeng <3297159934@qq.com> Date: Thu, 31 Jul 2025 14:38:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B8=83=E7=9A=84=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E9=A1=BB=E7=9F=A5=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/fabu.vue | 125 ++++++++++++++++++------------------------- sheep/api/rent.js | 3 +- 2 files changed, 54 insertions(+), 74 deletions(-) diff --git a/pages/index/fabu.vue b/pages/index/fabu.vue index b7375f2..52d5c42 100644 --- a/pages/index/fabu.vue +++ b/pages/index/fabu.vue @@ -82,17 +82,6 @@ - @@ -104,17 +93,11 @@ :range="typeShowList"> - {{form.type||'请选择项目类型'}} + {{form.typeName||'请选择项目类型'}} - @@ -150,8 +133,6 @@ - - @@ -177,28 +158,27 @@ - - - 《责任承诺确认书》 - - - - - - - + + + + 《责任承诺确认书》 + + + + + + + + 取消 我同意 我同意 - + + @@ -214,36 +194,12 @@ - - + - - + + { + getFbKnow(); getTagList(); getTypeList(); }) + //身份认证 function getAuthentied() { sheep.$api.rent.isAuthentied().then((res) => { if(res.code == 1) { @@ -395,6 +354,16 @@ } }) } + //发布须知 + function getFbKnow() { + sheep.$api.rent.fabuAgree().then((res) => { + if(res.code == 1) { + console.log('发布须知',res.data); + Negotiate.value = res.data.notice_publication_agreement + console.log('发布须知——Negotiate:',Negotiate.value); + } + }) + } const toPage = () => { if (isLogin.value == true) { uni.navigateTo({ @@ -434,10 +403,15 @@ console.log('tagList', tagList.value, tagShowList.value); } } + + const typeList = ref({}) + const typeShowList = ref([]) async function getTypeList() { const res = await sheep.$api.rent.listType({}); if (res.code == 1) { typeList.value = res.data + // typeShowList.value = res.data + typeShowList.value = Object.values(typeList.value) console.log('typeList', typeList.value, typeShowList.value); } @@ -446,9 +420,6 @@ //项目类型 const showType = ref(false) - const typeList = ref([]) - const typeShowList = ref([]) - const typeName = ref('') const typeIndex = ref(0); //已选择项目类型 function closeType() { console.log('取消type', typeIndex.value); @@ -458,7 +429,12 @@ function selectType(e) { console.log('选择项目类型', e); typeIndex.value = e.detail.value; - form.value.type = typeShowList.value[typeIndex.value]; + console.log('选择项目类型--typeIndex', typeIndex.value); + form.value.typeName = typeShowList.value[typeIndex.value] + form.value.type = Object.keys(typeList.value).find( + key => typeList.value[key] === form.value.typeName + ); + console.log('type',form.value.type); showType.value = false; } @@ -626,6 +602,7 @@ if(res.code == 1){ console.log('发布成功'); agreeAdd.value = false; + selectTagslist.value = [] form.value = { title: '', area: '', @@ -642,6 +619,10 @@ cateName: '', imageList: [], } + state.formData.images = [] + uni.switchTab({ + url:'/pages/index/user' + }) } } @@ -1450,14 +1431,14 @@ } .btn_2 { - width: 50%; + width: 45%; height: 80rpx; - background: #323232; + background: #fcc74e; border-radius: 198rpx 198rpx 198rpx 198rpx; font-family: YouSheBiaoTiHei, YouSheBiaoTiHei; font-weight: 400; font-size: 32rpx; - color: #BBFC5B; + color: #333333; line-height: 80rpx; text-align: center; margin-top: 40rpx; @@ -1465,7 +1446,7 @@ } .btn_3 { - width: 50%; + width: 45%; height: 80rpx; background: #E2E2E2; border-radius: 198rpx 198rpx 198rpx 198rpx; diff --git a/sheep/api/rent.js b/sheep/api/rent.js index 8a968c4..d140de0 100644 --- a/sheep/api/rent.js +++ b/sheep/api/rent.js @@ -59,11 +59,10 @@ export default { method: 'GET', }), //发布须知 - fabuAgree: (params) => + fabuAgree: () => request({ url: 'meal.information/agreement', method: 'GET', - params, }), //发布身份认证查询 isAuthentied: () =>