名称修改

需求发布,联系方式二选一
This commit is contained in:
”chenxuelian“
2023-04-18 21:26:17 +08:00
parent c5430c18cb
commit 139ac36ddf
6 changed files with 75 additions and 28 deletions

View File

@@ -72,10 +72,37 @@
</view>
<view style="background-color: #fff;">
<u-form-item label="手机" borderBottom>
<u-form-item label="联系方式" borderBottom>
<u-radio-group
v-model="needsPublishForm.contactWay"
placement="row"
>
<u-radio
:customStyle="{marginRight: '16px'}"
label="手机"
name="mobile"
>
</u-radio>
<u-radio
label="邮箱"
name="email"
>
</u-radio>
</u-radio-group>
</u-form-item>
<u-form-item v-if="needsPublishForm.contactWay === 'mobile'" label="手机" borderBottom>
<u--input placeholder="请输入手机号" :border="false" v-model="needsPublishForm.mobile"
placeholder-style="color:#CCCCCC"></u--input>
</u-form-item>
<u-form-item v-if="needsPublishForm.contactWay === 'email'" label="邮箱" borderBottom>
<u--input placeholder="请输入邮箱地址" :border="false" v-model="needsPublishForm.email"
placeholder-style="color:#CCCCCC"></u--input>
</u-form-item>
<view style="padding: 6rpx 20rpx 0;text-align: left;background-color: #fff;">
<text style="font-size: 24rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #C8C8C8;line-height: 28rpx;">
联系方式将不对外发布如有相关意向平台会以您留下的联系方式通知您
</text>
</view>
<!-- <u-form-item label="验证" borderBottom>
<view style="display: flex;padding-right: 20rpx;align-items: center;">
<u--input placeholder="请输入验证码" :border="false" v-model="needsPublishForm.invalidCode"
@@ -89,9 +116,10 @@
<view style="padding: 30rpx;background-color: #fff;">
<u-button color="#0EBB5B" text="确定发布" @tap.stop="submitForm"></u-button>
</view>
<view style="padding: 20rpx;text-align: center;background-color: #fff;">
<text
style="font-size: 24rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #C8C8C8;line-height: 28rpx;">承诺声明预留文字位置承诺声明预留文字位置</text>
<view style="padding: 10rpx 20rpx;text-align: center;background-color: #fff;">
<text style="font-size: 24rpx;font-family: PingFangSC-Regular, PingFang SC;font-weight: 400;color: #C8C8C8;line-height: 28rpx;">
您在确认发布后会由平台管理方经行审核审核通过后予以发布对于用户在本站发表的信息由用户个人承担对应责任本平台不承担任何法律责任
</text>
</view>
</view>
</u--form>
@@ -156,14 +184,14 @@
},
onTabItemTap() {
console.log('----onShow')
if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
console.log(uni.getStorageSync('loginToken'))
this.isLoad = false
// uni.navigateTo({
// url: '../../pages/my/login/login'
// })
return
}
// if (!uni.getStorageSync('loginToken') || uni.getStorageSync('loginToken').length === 0) {
// console.log(uni.getStorageSync('loginToken'))
// this.isLoad = false
// // uni.navigateTo({
// // url: '../../pages/my/login/login'
// // })
// return
// }
this.imgUrl = uni.getStorageSync('img_url')
console.log(this.imgUrl)
this.isLoad = true
@@ -369,9 +397,12 @@
},
submitForm() {
console.log(this.fileList1)
if (!/^1[3456789]\d{9}$/.test(this.needsPublishForm.mobile)) {
if (this.needsPublishForm.contactWay === 'mobile' && !/^1[3456789]\d{9}$/.test(this.needsPublishForm.mobile)) {
this.$toast.warn('请输入正确的手机号')
return false
} else if (this.needsPublishForm.contactWay === 'email' && !/^([0-9a-zA-Z_\.\-\])+\@([0-9a-zA-Z_\.\-\])+\.([a-zA-Z]+)$/.test(this.needsPublishForm.email)) {
this.$toast.warn('请输入正确的邮箱地址')
return false
}
this.needsPublishForm.type = Number(this.tabCurrent + 1)
this.needsPublishForm.pub_time = this.needsPublishForm.pub_time ? this.needsPublishForm.pub_time :

View File

@@ -54,10 +54,10 @@
classifyList: [],
tabCurrent: 0,
tabList: [{
name: '上架时间'
name: '新品发布' // 上架时间(改)
},
{
name: '点赞量'
name: '新创意' // 点赞量(改)
},
],
imgUrl: '',

View File

@@ -26,7 +26,7 @@
<view class="subtitle">
<u--image src="/static/report/hy_icon_fux.png" width="24rpx" height="24rpx" :lazy-load="true">
</u--image>
<text class="xpfb_text text">新品发布</text>
<text class="xpfb_text text">企业需求</text>
</view>
<productsByTime></productsByTime>
</view>
@@ -53,7 +53,7 @@
},
{
src: '/static/report/hy_icon_fu.png',
title: '新品发布'
title: '企业需求'
},
{
src: '/static/report/hy_icon_cj.png',