1、项目类型跟UI确定样式重画;
2、处理上传图片的方案(采用原商城的上传组件并根据UI调整样式); 3、处理选择标签的数据回显;
This commit is contained in:
parent
378a31782b
commit
4a333db9a7
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- <view> 发布 </view> tabbar="/pages/index/fabu"-->
|
||||
<s-layout title="发布信息" :bgStyle="{ color: '#fff' }">
|
||||
<s-layout title="发布信息" :bgStyle="{ color: '#f7f7f7' }">
|
||||
<view class="container">
|
||||
<view class="backImg flex flex-column align-items">
|
||||
<view class="scroll-container box flex flex-column align-items">
|
||||
@ -10,8 +10,7 @@
|
||||
标题
|
||||
</view>
|
||||
<view class="row-right" style="width: 80%;">
|
||||
<input type="text" placeholder="请输入标题信息(必填20字内)" class="input" disabled="true"
|
||||
v-model="form.title" placeholder-class="plasty"
|
||||
<input type="text" placeholder="请输入标题信息(必填20字内)" class="input" v-model="form.title"
|
||||
style="width: 80%;text-align: right;" />
|
||||
</view>
|
||||
</view>
|
||||
@ -22,7 +21,8 @@
|
||||
地区
|
||||
</view>
|
||||
<view class="row-right" style="width: 500rpx;" @click="state.showRegion = true">
|
||||
<view v-if="form.area != '' " style="font-size: 28rpx;color: #3d3d3d">河南</view>
|
||||
<view v-if="form.area != '' " style="font-size: 28rpx;color: #3d3d3d">{{form.area}}
|
||||
</view>
|
||||
<view v-else style="font-size: 28rpx;color: #9C9C9C">请选择地区</view>
|
||||
<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
|
||||
src="https://jiangxiaoxian.0rui.cn/rightMore.png"></image>
|
||||
@ -48,8 +48,7 @@
|
||||
联系人
|
||||
</view>
|
||||
<view class="row-right" style="width: 80%;">
|
||||
<input type="text" placeholder="请输入联系人" class="input" disabled="true"
|
||||
v-model="form.title" placeholder-class="plasty"
|
||||
<input type="text" placeholder="请输入联系人" class="input" v-model="form.contacts"
|
||||
style="width: 80%;text-align: right;" />
|
||||
</view>
|
||||
</view>
|
||||
@ -60,8 +59,7 @@
|
||||
联系电话
|
||||
</view>
|
||||
<view class="row-right" style="width: 80%;">
|
||||
<input type="number" placeholder="请输入联系电话" class="input" disabled="true"
|
||||
v-model="form.title" placeholder-class="plasty"
|
||||
<input type="number" placeholder="请输入联系电话" class="input" v-model="form.contact_number"
|
||||
style="width: 80%;text-align: right;" />
|
||||
</view>
|
||||
</view>
|
||||
@ -76,17 +74,15 @@
|
||||
详细信息
|
||||
</view>
|
||||
<view style="margin-top: 20rpx;height: 120rpx;">
|
||||
<textarea v-model="form.address_detail" style="height: 120rpx;width: 100%;"
|
||||
maxlength="400" placeholder-style="font-size:28rpx;color:#9c9c9c;line-height:36rpx"
|
||||
<textarea v-model="form.content" style="height: 120rpx;width: 100%;" maxlength="400"
|
||||
placeholder-style="font-size:28rpx;color:#9c9c9c;line-height:36rpx"
|
||||
placeholder="请输入你的招标详细信息"></textarea>
|
||||
</view>
|
||||
<!-- <view class="row flex align-items textarea_fb" style="margin-top: 25rpx;">
|
||||
<u--textarea :confirmType="null" v-model="form.content" :maxlength="1600"
|
||||
placeholder="请输入你的招标详细信息" :height="120" placeholder-class="bttop"
|
||||
auto-height></u--textarea>
|
||||
</view> -->
|
||||
|
||||
<!-- 图片 -->
|
||||
<view class="shenfen row flex flex-column" style="margin-top: 42rpx;">
|
||||
<s-uploader v-model:url="state.formData.images" fileMediatype="image" limit="9" mode="grid"
|
||||
:imageStyles="{ width: '168rpx', height: '168rpx' }"></s-uploader>
|
||||
<!-- <view class="shenfen row flex flex-column" style="margin-top: 42rpx;">
|
||||
<u-upload :fileList="fileList1" @afterRead="afterRead" :previewFullImage="true"
|
||||
@delete="deletePic" @oversize="oversize" name="1" multiple
|
||||
:maxSize="1 * 1024 * 1024" :maxCount="5">
|
||||
@ -96,20 +92,29 @@
|
||||
<span class="texts">添加图片</span>
|
||||
</view>
|
||||
</u-upload>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<span class="line-row" style="margin: 30rpx 0;"></span>
|
||||
|
||||
<view class="row flex align-items" style="margin-top: 25rpx;">
|
||||
<view class="row flex align-items" style="">
|
||||
<view class="label flex align-items ">
|
||||
项目类型
|
||||
</view>
|
||||
<view class="row-right" style="width: 500rpx;" @click="state.showRegion = true">
|
||||
<picker :show="showType" @change="selectType" :value="typeShowList.indexOf(form.type)"
|
||||
:range="typeShowList">
|
||||
<view class="form_right"
|
||||
style="width: 500rpx;text-align: right;;font-size: 26rpx;font-weight: 400;color: #848484;">
|
||||
{{form.type||'请选择项目类型'}}
|
||||
<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
|
||||
src="https://jiangxiaoxian.0rui.cn/rightMore.png"></image>
|
||||
</view>
|
||||
</picker>
|
||||
<!-- <view class="row-right" style="width: 500rpx;" @click="showType = true">
|
||||
<view v-if="form.area != '' " style="font-size: 28rpx;color: #3d3d3d">河南</view>
|
||||
<view v-else style="font-size: 28rpx;color: #9C9C9C">请选择项目类型</view>
|
||||
<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
|
||||
src="https://jiangxiaoxian.0rui.cn/rightMore.png"></image>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
<span class="line-row" style="margin: 30rpx 0;"></span>
|
||||
|
||||
@ -118,52 +123,67 @@
|
||||
选择标签
|
||||
</view>
|
||||
<view class="row-right" style="width: 500rpx;" @click="openPopbq">
|
||||
<view v-if="form.tags != '' " style="font-size: 28rpx;color: #3d3d3d">河南</view>
|
||||
<view v-else style="font-size: 28rpx;color: #9C9C9C">选择</view>
|
||||
<view v-if="form.tags == '' " style="font-size: 28rpx;color: #9C9C9C">选择</view>
|
||||
<view v-else style="font-size: 28rpx;color: #3d3d3d;">河南</view>
|
||||
<image style="width: 28rpx;height: 28rpx;margin-left: 10rpx;"
|
||||
src="https://jiangxiaoxian.0rui.cn/rightMore.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="checkedLabel">
|
||||
<view class="flex align-items allmybqs">
|
||||
<!-- <view class="flex align-items bqpiece" v-for="(item_bq, index) in list" :key="index"
|
||||
@click="removebq(index)">
|
||||
<span>
|
||||
{{ item_bq.name }}
|
||||
</span>
|
||||
<u-icon name="close" color="#babdc7"></u-icon>
|
||||
<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>
|
||||
{{ item.name }}
|
||||
</view>
|
||||
<view style="height: 30rpx;width: 1rpx;background-color: #f76100;margin: 0 20rpx;">
|
||||
</view>
|
||||
<image @click="removebq(index)" style="width: 20rpx;height: 20rpx;"
|
||||
src="https://jiangxiaoxian.0rui.cn/tagDelete.png" />
|
||||
<!-- <view style="display: flex;justify-content: center;align-items: center;
|
||||
width: 197rpx;height: 30rpx;
|
||||
padding: 10rpx 20rpx;background-color: rgba(247, 97, 0, 0.2);border-radius: 163rpx;">
|
||||
|
||||
</view> -->
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- v-if="status == -1 || status == 2" -->
|
||||
|
||||
</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>
|
||||
<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>
|
||||
</view>
|
||||
<!-- <view style="height: 500rpx;"></view> -->
|
||||
<view class="bottom " v-if="status == -1 || status == 2">
|
||||
<view style="margin:30rpx 0 0 0;">
|
||||
<cc-protocolBox :agree="agree" :name="protocolArr" @click="protocolClick"
|
||||
@clickOne="protocolClick"></cc-protocolBox>
|
||||
</view>
|
||||
<view class="btns">
|
||||
<view class="submitPublish" @click="apply()" v-if="agreeAdd == true">确认发布</view>
|
||||
<view class="submitPublish" v-if="agreeAdd == false"
|
||||
style="background: #EEEEEE;color: #9C9C9C;">
|
||||
确认发布</view>
|
||||
<!-- <span class="flex align-items justify-center" @click="apply()" v-if="agreeAdd == true">确认发布</span>
|
||||
<span class="flex align-items justify-center" v-if="agreeAdd == false"
|
||||
style="background: #EEEEEE;color: #9C9C9C;">确认发布</span> -->
|
||||
<view class="submitPublish" @click="apply()">确认发布</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!-- 声明 -->
|
||||
<su-popup @touchmove.native.stop.prevent :closeable="false" :show="show" :round="10" mode="center"
|
||||
@close="close" @open="open" :custom-style="popupStyle" :safeAreaInsetBottom="false"
|
||||
:closeOnClickOverlay="false">
|
||||
<span style="font-size: 40rpx;font-weight: 800;height: 120rpx;">《责任承诺确认书》</span>
|
||||
<scroll-view ref="scrollView" :scroll-top="scrollTop" :show-scrollbar='true'
|
||||
@scrolltolower="handleScroll" scroll-y="true" style="height: 800rpx;">
|
||||
<scroll-view ref="scrollView" :scroll-top="scrollTop" :show-scrollbar='true' @scrolltolower="handleScroll"
|
||||
scroll-y="true" style="height: 800rpx;">
|
||||
<view class="popup flex align-items flex-column">
|
||||
<rich-text style="text-align: justify;" :nodes="Negotiate"></rich-text>
|
||||
</view>
|
||||
@ -172,8 +192,7 @@
|
||||
<span class="zhixiao" v-if="agreeShow == false">我同意</span>
|
||||
<span class="zhixiao shows_zhidao" v-if="agreeShow == true" @click="change">我同意</span>
|
||||
</view> -->
|
||||
<view
|
||||
style="gap: 20rpx;width: 100%;display: flex;justify-content: space-between;align-items: center;">
|
||||
<view style="gap: 20rpx;width: 100%;display: flex;justify-content: space-between;align-items: center;">
|
||||
<view class="btn_4" @click="show = false">取消</view>
|
||||
<view class="btn_3" v-if="agreeShow == false">我同意</view>
|
||||
<view class="btn_2" v-if="agreeShow == true" @click="change()">我同意</view>
|
||||
@ -207,37 +226,35 @@
|
||||
</su-popup>-->
|
||||
|
||||
<!-- 省市区弹窗 -->
|
||||
<su-regionCity-picker :show="state.showRegion" @cancel="state.showRegion = false"
|
||||
@confirm="onRegionConfirm">
|
||||
<su-regionCity-picker :show="state.showRegion" @cancel="state.showRegion = false" @confirm="onRegionConfirm">
|
||||
</su-regionCity-picker>
|
||||
|
||||
<!-- 活动分类 -->
|
||||
|
||||
<!-- 标签 -->
|
||||
<su-popup :show="showPopbq" mode="bottom" round="20"
|
||||
:customStyle="{ 'width': '750rpx', 'height': '1040rpx', 'zIndex': '999' }" :closeable="false"
|
||||
@close="closebq" :closeOnClickOverlay="false">
|
||||
<!-- <image @click="closebq" src="@/static/center/close.png" mode=""
|
||||
style="width: 44rpx;height: 44rpx;position: absolute;right: 30rpx;top: -160rpx;z-index: 155;">
|
||||
</image> -->
|
||||
<view class="popup_bq">
|
||||
<view class="flex align-items justify-around" style="width: 100%;height: 42rpx;padding: 30rpx;">
|
||||
<view class="flex align-items"
|
||||
style="width: 690rpx;height: 42rpx;padding: 30rpx;justify-content: space-between;">
|
||||
<view @click="closebq"
|
||||
style="z-index: 200;font-size: 28rpx;line-height: 39rpx;color: #9b9b9b;font-weight: 400;">
|
||||
style="z-index: 200;font-size: 28rpx;line-height: 39rpx;color: #9b9b9b;font-weight: 400;position: relative;left: 0;">
|
||||
取消</view>
|
||||
<view
|
||||
style="z-index: 200;font-size: 30rpx;line-height: 42rpx;color: #3d3d3d;font-weight: bold;">
|
||||
选择标签(3个)</view>
|
||||
style="z-index: 200;font-size: 30rpx;line-height: 42rpx;color: #3d3d3d;font-weight: bold;position: relative;left: 0%;">
|
||||
选择标签(可选3个)</view>
|
||||
<view @click="checkTagTrue"
|
||||
style="z-index: 200;font-size: 28rpx;line-height: 39rpx;color: #333333;font-weight: 400;">
|
||||
style="z-index: 200;font-size: 28rpx;line-height: 39rpx;color: #333333;font-weight: 400;position: relative;right: 0%;">
|
||||
确定</view>
|
||||
</view>
|
||||
|
||||
<view style="color: #d8d8d8;height: 2rpx;width: 100%;"></view>
|
||||
<view style="background-color: #d8d8d8;height: 2rpx;width: 100%;margin-bottom: 30rpx;"></view>
|
||||
|
||||
<view class="flex flex-column w-100 bqlist">
|
||||
<scroll-view scroll-y="true" class="flex align-items allbqs">
|
||||
<view style="display: flex; flex-wrap: wrap;padding: 0 30rpx;margin: 0 auto;" >
|
||||
<view class="flex align-items justify-center"
|
||||
v-for="(item, index) in tagList" :key="index" @click="addbq(item, index)">
|
||||
<view style="padding: 0 20rpx;margin: 0 auto;display: flex;flex-wrap: wrap;width: 100%;">
|
||||
<view style="box-sizing: border-box;display: grid; column-gap: 30rpx;"
|
||||
v-for="(item, index) in tagShowList" :key="index" @click="addbq(item, index)">
|
||||
<view class="selectedBox"
|
||||
:style="item.isSelect == true ? 'background-color: #fcc74e' : 'background-color: #f0f0f0'">
|
||||
{{ item.name }}
|
||||
@ -245,17 +262,11 @@
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view>
|
||||
<view @click="checkTagTrue" class="btn_1">确定选择</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</su-popup>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</s-layout>
|
||||
|
||||
</template>
|
||||
@ -277,6 +288,9 @@
|
||||
address,
|
||||
region
|
||||
} from '@/sheep/validate/form';
|
||||
import {
|
||||
baseUrl
|
||||
} from '@/sheep/config';
|
||||
|
||||
const state = reactive({
|
||||
showRegion: false,
|
||||
@ -293,59 +307,68 @@
|
||||
address,
|
||||
region,
|
||||
},
|
||||
formData: {
|
||||
content: '',
|
||||
phone: '',
|
||||
images: [],
|
||||
type: '',
|
||||
},
|
||||
imageFiles: [],
|
||||
});
|
||||
const popupStyle = {
|
||||
width: '620rpx',
|
||||
padding: '50rpx 40rpx 42rpx 40rpx',
|
||||
height: '984rpx',
|
||||
margin: '0 auto', // 水平居中
|
||||
display: 'flex',
|
||||
justifyContent: 'start',
|
||||
alignItems: 'center',
|
||||
flexColumn: 'column'
|
||||
}
|
||||
const proCity = ref('')
|
||||
const form = ref({
|
||||
title: null,
|
||||
title: '',
|
||||
area: '',
|
||||
address_detail: null,
|
||||
content: null,
|
||||
stock: null,
|
||||
cate_idsName: null,
|
||||
address1: null,
|
||||
categoryId: null,
|
||||
tags: '',
|
||||
contacts: '',
|
||||
contact_number: '',
|
||||
content: '',
|
||||
address_detail: '',
|
||||
type: '',
|
||||
images: '',
|
||||
province: '',
|
||||
city: '',
|
||||
cate_ids: '',
|
||||
province: null,
|
||||
district: null,
|
||||
keywords: null,
|
||||
cateName: '',
|
||||
imageList: [],
|
||||
})
|
||||
|
||||
const onRegionConfirm = (e) => {
|
||||
console.log('onRegionConfirm', e);
|
||||
state.model = {
|
||||
...state.model,
|
||||
...e,
|
||||
};
|
||||
proCity.value = state.model.province_name + " " + state.model.city_name
|
||||
form.value.area = state.model.province_name + " " + state.model.city_name
|
||||
|
||||
console.log('onRegionConfirm33', state.model, proCity.value);
|
||||
form.value.province = state.model.province_id
|
||||
form.value.city = state.model.city_id
|
||||
console.log('onRegionConfirm33', state.model, proCity.value);
|
||||
state.showRegion = false;
|
||||
};
|
||||
|
||||
|
||||
|
||||
const show = ref(false)
|
||||
const showPopbq = ref(false)
|
||||
const tagList = ref(false)
|
||||
const tagShowList = ref(false)
|
||||
const priceShow = ref(false)
|
||||
const cardShow = ref(false)
|
||||
const list = ref([]);//已选择标签
|
||||
const current = ref();
|
||||
const show = ref(false) //发布须知显隐
|
||||
const agreeAdd = ref(false) //同意须知的勾选
|
||||
const agreeShow = ref(false) //须知的同意按钮
|
||||
const Negotiate = ref('') //富文本
|
||||
const cardShow = ref(false) //身份认证
|
||||
const status = ref(0)
|
||||
|
||||
|
||||
onShow(() => {
|
||||
getTagList();
|
||||
getTypeList();
|
||||
})
|
||||
|
||||
//标签
|
||||
function openPopbq() {
|
||||
showPopbq.value = true;
|
||||
// getTagList();
|
||||
}
|
||||
function closebq() {
|
||||
showPopbq.value = false;
|
||||
}
|
||||
async function getTagList() {
|
||||
const res = await sheep.$api.rent.tagsList({});
|
||||
if (res.code == 1) {
|
||||
@ -363,58 +386,226 @@
|
||||
console.log('tagList', tagList.value, tagShowList.value);
|
||||
}
|
||||
}
|
||||
async function getTypeList() {
|
||||
const res = await sheep.$api.rent.listType({});
|
||||
if (res.code == 1) {
|
||||
typeList.value = res.data
|
||||
typeShowList.value = Object.values(typeList.value)
|
||||
console.log('typeList', typeList.value, typeShowList.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//项目类型
|
||||
const showType = ref(false)
|
||||
const typeList = ref([])
|
||||
const typeShowList = ref([])
|
||||
const typeName = ref('')
|
||||
const typeIndex = ref(0); //已选择项目类型
|
||||
function closeType() {
|
||||
console.log('取消type', typeIndex.value);
|
||||
showType.value = false
|
||||
}
|
||||
|
||||
function selectType(e) {
|
||||
console.log('选择项目类型', e);
|
||||
typeIndex.value = e.detail.value;
|
||||
form.value.type = typeShowList.value[typeIndex.value];
|
||||
showType.value = false;
|
||||
}
|
||||
|
||||
|
||||
//标签
|
||||
const showPopbq = ref(false)
|
||||
const tagList = ref([])
|
||||
const tagShowList = ref([])
|
||||
const selectTagslist = ref([]); //已选择标签
|
||||
const tagSelectedNum = ref(0)
|
||||
|
||||
function openPopbq() {
|
||||
showPopbq.value = true;
|
||||
}
|
||||
|
||||
function closebq() {
|
||||
showPopbq.value = false;
|
||||
}
|
||||
//选中标签
|
||||
function addbq(item, index) {
|
||||
current.value = index;
|
||||
|
||||
console.log('选择标签',current.value);
|
||||
tagShowList.value[current.value].isSelect = true
|
||||
// let arrbql = uni.getStorageSync("zjlist");
|
||||
// let arrbq = JSON.parse(arrbql);
|
||||
// let isbq = true;
|
||||
// for (let i = 0; i < arrbq.length; i++) {
|
||||
// if (arrbq[i].id == val.id) {
|
||||
// uni.showToast({
|
||||
// title: "已选择该标签",
|
||||
// icon: "none",
|
||||
// duration: 2000,
|
||||
// });
|
||||
// return isbq = false;
|
||||
// }
|
||||
// }
|
||||
// if (list.value.length < 3) {
|
||||
// if (isbq) {
|
||||
// list.value.push(val);
|
||||
// uni.setStorageSync('zjlist', JSON.stringify(list.value))
|
||||
// }
|
||||
// } else {
|
||||
// uni.showToast({
|
||||
// title: "最多添加3个标签",
|
||||
// icon: "none",
|
||||
// duration: 2000,
|
||||
// });
|
||||
// }
|
||||
// let arr = list.value.map((item) => {
|
||||
// return item.name
|
||||
// })
|
||||
// form.value.cate_idsName = arr.join(',');
|
||||
}
|
||||
//删除标签(本地)
|
||||
function removebq(i) {
|
||||
list.value.splice(i, 1);
|
||||
uni.setStorageSync('zjlist', JSON.stringify(list.value))
|
||||
let arr = list.value.map((item) => {
|
||||
return item.name
|
||||
if (tagShowList.value[index].isSelect == false) {
|
||||
if (tagSelectedNum.value < 3) {
|
||||
tagSelectedNum.value += 1;
|
||||
tagShowList.value[index].isSelect = true;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '最多选择三个标签',
|
||||
icon: 'none'
|
||||
})
|
||||
form.value.cate_idsName = arr.join(',')
|
||||
}
|
||||
} else {
|
||||
if (tagSelectedNum.value > 0) {
|
||||
tagSelectedNum.value -= 1;
|
||||
tagShowList.value[index].isSelect = false;
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '至少选择一个',
|
||||
icon: 'none'
|
||||
})
|
||||
}
|
||||
}
|
||||
console.log('选择标签', tagSelectedNum.value);
|
||||
}
|
||||
|
||||
function checkTagTrue() {
|
||||
console.log('确定选择的标签');
|
||||
selectTagslist.value = []
|
||||
for (let i = 0; i < tagShowList.value.length; i++) {
|
||||
if (tagShowList.value[i].isSelect == true) {
|
||||
selectTagslist.value.push(tagShowList.value[i])
|
||||
}
|
||||
}
|
||||
console.log('selectTagslist', selectTagslist.value);
|
||||
showPopbq.value = false
|
||||
}
|
||||
|
||||
//删除标签(本地)
|
||||
function removebq(i) {
|
||||
selectTagslist.value.splice(i, 1);
|
||||
tagSelectedNum.value -= 1;
|
||||
console.log('删除标签', tagSelectedNum.value);
|
||||
let arr = selectTagslist.value.map((item) => {
|
||||
return item.name
|
||||
})
|
||||
}
|
||||
|
||||
function change() {
|
||||
agreeAdd.value = true;
|
||||
show.value = false
|
||||
}
|
||||
//同意
|
||||
function handleScroll() {
|
||||
console.log(123)
|
||||
agreeShow.value = true
|
||||
}
|
||||
|
||||
function apply() {
|
||||
if (agreeAdd.value == false) {
|
||||
uni.showToast({
|
||||
title: '请先同意发布须知',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
form.value.cate_ids = selectTagslist.value.map((item) => item.id).join(',')
|
||||
console.log('cate_ids', form.value.cate_ids, state.formData.images);
|
||||
|
||||
form.value.images = state.formData.images.join(',');
|
||||
console.log('images', form.value.images);
|
||||
|
||||
if (form.value.title == '') {
|
||||
uni.showToast({
|
||||
title: '请输入标题',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (form.value.province == '' && form.value.city == '') {
|
||||
uni.showToast({
|
||||
title: '请选择地区',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (form.value.address_detail == '') {
|
||||
uni.showToast({
|
||||
title: '请输入详细地址',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (form.value.contacts == '') {
|
||||
uni.showToast({
|
||||
title: '请输入联系人',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (form.value.contact_number == '') {
|
||||
uni.showToast({
|
||||
title: '请输入联系人电话',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!/^1[3-9]\d{9}$/.test(form.value.contact_number)) {
|
||||
uni.showToast({
|
||||
title: '请输入正确的手机号',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return;
|
||||
}
|
||||
if (form.value.content == '') {
|
||||
uni.showToast({
|
||||
title: '请输入详细信息',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (form.value.images == '') {
|
||||
uni.showToast({
|
||||
title: '请上传图片',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (form.value.type == '') {
|
||||
uni.showToast({
|
||||
title: '请选择项目类型',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
if (form.value.cate_ids == '') {
|
||||
uni.showToast({
|
||||
title: '请选择标签',
|
||||
icon: 'none',
|
||||
})
|
||||
return
|
||||
}
|
||||
console.log('apply——form:', form.value);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.checkedLabel {
|
||||
width: 690rpx;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
flex-wrap: wrap;
|
||||
word-wrap: break-word; /* 允许长单词或URL换行 */
|
||||
overflow-wrap: break-word;
|
||||
align-items: center;
|
||||
|
||||
.tagLab {
|
||||
width: 197rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
// display: grid;
|
||||
// box-sizing: border-box;
|
||||
// column-gap: 20rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 10rpx 20rpx;
|
||||
background-color: rgba(247, 97, 0, 0.2);
|
||||
border-radius: 163rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
.container {
|
||||
.backImg {
|
||||
height: 90vh;
|
||||
@ -482,6 +673,9 @@
|
||||
width: 160rpx;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.pic_view {
|
||||
width: 190rpx;
|
||||
height: 190rpx;
|
||||
@ -628,31 +822,16 @@
|
||||
height: 196rpx !important;
|
||||
}
|
||||
|
||||
.bottom {
|
||||
.bottomBtn {
|
||||
width: 750rpx;
|
||||
height: 230rpx;
|
||||
height: 200rpx;
|
||||
background: #FFFFFF;
|
||||
// box-shadow: 0rpx -6rpx 12rpx 0rpx rgba(111, 190, 255, 0.1);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
bottom: 120rpx;
|
||||
bottom: 0;
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
|
||||
span {
|
||||
// width: 642rpx;
|
||||
width: 435rpx;
|
||||
height: 80rpx;
|
||||
background: #323232;
|
||||
border-radius: 401rpx 401rpx 401rpx 401rpx;
|
||||
font-family: YouSheBiaoTiHei;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #BBFC5B;
|
||||
line-height: 32rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.btns {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@ -660,70 +839,17 @@
|
||||
align-items: center;
|
||||
margin-top: 30rpx;
|
||||
|
||||
span {
|
||||
// width: 642rpx;
|
||||
width: 435rpx;
|
||||
height: 80rpx;
|
||||
background: #323232;
|
||||
border-radius: 401rpx 401rpx 401rpx 401rpx;
|
||||
font-family: YouSheBiaoTiHei;
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #BBFC5B;
|
||||
line-height: 32rpx;
|
||||
margin: 0 auto;
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.saveDraft {
|
||||
width: 235rpx;
|
||||
height: 84rpx;
|
||||
// position: relative;
|
||||
// top: 10rpx;
|
||||
border: 2rpx solid #323232;
|
||||
background-color: #ffffff;
|
||||
text-align: center;
|
||||
color: #323232;
|
||||
font-family: YouSheBiaoTiHei;
|
||||
font-size: 36rpx;
|
||||
font-weight: 400;
|
||||
border-radius: 50rpx;
|
||||
margin: 0 auto;
|
||||
display: grid;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.draftBox {
|
||||
width: 235rpx;
|
||||
height: 84rpx;
|
||||
// position: relative;
|
||||
// top: 10rpx;
|
||||
border: 2rpx solid #323232;
|
||||
background-color: #ffffff;
|
||||
text-align: center;
|
||||
color: #323232;
|
||||
font-family: YouSheBiaoTiHei;
|
||||
font-size: 36rpx;
|
||||
font-weight: 400;
|
||||
border-radius: 50rpx;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.submitPublish {
|
||||
margin-left: 20rpx;
|
||||
width: 435rpx;
|
||||
height: 90rpx;
|
||||
width: 100%;
|
||||
height: 98rpx;
|
||||
// border: 2rpx solid #323232;
|
||||
background-color: #323232;
|
||||
color: #BBFC5B;
|
||||
background-color: #fcc74e;
|
||||
color: #333333;
|
||||
font-family: YouSheBiaoTiHei;
|
||||
font-size: 36rpx;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
border-radius: 50rpx;
|
||||
margin: 0 auto;
|
||||
display: grid;
|
||||
align-items: center;
|
||||
@ -749,7 +875,7 @@
|
||||
font-size: 28rpx;
|
||||
color: #343434;
|
||||
line-height: 32rpx;
|
||||
width: 450rpx;
|
||||
width: 500rpx;
|
||||
}
|
||||
|
||||
.shenfen ::v-deep .u-transition.data-v-39e33bf2.vue-ref.u-fade-enter-to.u-fade-enter-active:not(:first-child) {
|
||||
@ -844,29 +970,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
.popup_bq {
|
||||
display: flex;
|
||||
.popup_type {
|
||||
display: grid;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 950rpx;
|
||||
height: 550rpx;
|
||||
position: relative;
|
||||
|
||||
img {
|
||||
position: absolute;
|
||||
width: 750rpx;
|
||||
height: 1040rpx;
|
||||
top: -164rpx;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.bqlist {
|
||||
margin-top: 30rpx;
|
||||
.typelist {
|
||||
margin-top: 100rpx;
|
||||
z-index: 200;
|
||||
// margin-left: 80rpx;
|
||||
height: 100%;
|
||||
min-height: 500rpx;
|
||||
// padding: 30rpx;
|
||||
|
||||
.selectedBox {
|
||||
.selectedTypeBox {
|
||||
margin: 10rpx;
|
||||
border-radius: 163rpx;
|
||||
width: 140rpx auto;
|
||||
@ -874,17 +992,13 @@
|
||||
padding: 14rpx 22rpx;
|
||||
}
|
||||
|
||||
.allmybqs {
|
||||
flex-wrap: wrap;
|
||||
width: 720rpx;
|
||||
}
|
||||
|
||||
.allbqs {
|
||||
.allTypes {
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
flex-wrap: wrap;
|
||||
height: 690rpx;
|
||||
width: 700rpx;
|
||||
width: 690rpx;
|
||||
justify-content: flex-start;
|
||||
|
||||
.titles_fl {
|
||||
width: 112rpx;
|
||||
@ -900,29 +1014,70 @@
|
||||
}
|
||||
}
|
||||
|
||||
.bqpiece {
|
||||
width: 210rpx;
|
||||
height: 70rpx;
|
||||
background: #F7F7F7;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
margin: 20rpx 20rpx 20rpx 0;
|
||||
|
||||
span {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
.popup_bq {
|
||||
// display: grid;
|
||||
// flex-direction: column;
|
||||
align-items: center;
|
||||
height: 800rpx;
|
||||
position: relative;
|
||||
|
||||
img {
|
||||
position: absolute;
|
||||
width: 750rpx;
|
||||
height: 1040rpx;
|
||||
top: -164rpx;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.bqlist {
|
||||
// margin-top: 30rpx;
|
||||
margin: 0 auto;
|
||||
z-index: 200;
|
||||
max-height: 100%;
|
||||
|
||||
.selectedBox {
|
||||
margin: 10rpx;
|
||||
border-radius: 163rpx;
|
||||
width: 140rpx auto;
|
||||
text-align: center;
|
||||
padding: 14rpx 22rpx;
|
||||
}
|
||||
|
||||
.allmybqs {
|
||||
flex-wrap: wrap;
|
||||
width: 690rpx;
|
||||
}
|
||||
|
||||
.allbqs {
|
||||
overflow-y: auto;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
flex-wrap: wrap;
|
||||
max-height: 100%;
|
||||
width: 690rpx;
|
||||
justify-content: flex-start;
|
||||
|
||||
.titles_fl {
|
||||
width: 112rpx;
|
||||
height: 39rpx;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 400;
|
||||
font-size: 26rpx;
|
||||
color: #323232;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #999999;
|
||||
line-height: 39rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
text-transform: none;
|
||||
}
|
||||
}
|
||||
|
||||
.bqpiece.active {
|
||||
background: #C9FC7E;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -185,6 +185,16 @@
|
||||
},
|
||||
});
|
||||
|
||||
const getAreaData = () => {
|
||||
if (_.isEmpty(uni.getStorageSync('areaData'))) {
|
||||
sheep.$api.data.area().then((res) => {
|
||||
if (res.code === 1) {
|
||||
uni.setStorageSync('areaData', res.data);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const proCity = ref('')
|
||||
|
||||
const onRegionConfirm = (e) => {
|
||||
|
@ -21,6 +21,7 @@ export default {
|
||||
showLoading: false,
|
||||
},
|
||||
}),
|
||||
//招租详情
|
||||
rentInfo: (id) =>
|
||||
request({
|
||||
url: 'meal.information/detail',
|
||||
@ -36,4 +37,19 @@ export default {
|
||||
method: 'POST',
|
||||
data,
|
||||
}),
|
||||
// 项目类型
|
||||
listType: (params) =>
|
||||
request({
|
||||
url: 'meal.information/type_list',
|
||||
method: 'GET',
|
||||
params,
|
||||
|
||||
}),
|
||||
//提交发布
|
||||
addRent: (data)=>
|
||||
request({
|
||||
url: 'meal.information/add',
|
||||
method: 'POST',
|
||||
data,
|
||||
})
|
||||
};
|
@ -21,7 +21,10 @@
|
||||
>
|
||||
<slot>
|
||||
<view class="is-add">
|
||||
<image :src="imgsrc" class="add-icon"></image>
|
||||
<!-- <image :src="imgsrc" class="add-icon"></image> -->
|
||||
<image src="https://jiangxiaoxian.0rui.cn/fabuAddImg.png" mode="widthFix"
|
||||
style="width: 44rpx;height: 44rpx;" />
|
||||
<span class="texts">添加图片</span>
|
||||
</view>
|
||||
</slot>
|
||||
</upload-image>
|
||||
@ -659,7 +662,14 @@
|
||||
display: flex;
|
||||
/* #endif */
|
||||
align-items: center;
|
||||
flex-flow: column;
|
||||
justify-content: center;
|
||||
|
||||
.texts {
|
||||
margin-top: 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #3D3D3D;
|
||||
}
|
||||
}
|
||||
.add-icon {
|
||||
width: 57rpx;
|
||||
|
@ -222,7 +222,8 @@ export default {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
margin: 5px;
|
||||
border: 1px #eee solid;
|
||||
// border: 1px #f7f7f7 solid;
|
||||
background-color: #f7f7f7;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
@ -104,7 +104,8 @@
|
||||
});
|
||||
const emits = defineEmits(['confirm', 'cancel', 'change']);
|
||||
|
||||
const provinceList = areaData;
|
||||
// const provinceList = areaData;
|
||||
const provinceList = proFirst.concat(uni.getStorageSync('areaData'))
|
||||
console.log('province',provinceList.value);
|
||||
|
||||
const cityList = computed(() => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user