diff --git a/pages/detail/productsDetail/productsDetail.vue b/pages/detail/productsDetail/productsDetail.vue index 5b675c8..4c8e3f9 100644 --- a/pages/detail/productsDetail/productsDetail.vue +++ b/pages/detail/productsDetail/productsDetail.vue @@ -313,9 +313,9 @@ align-items: center; .title { - font-size: 36rpx; - font-weight: 400; - color: #0EBB5B; + font-size: 44rpx; + font-weight: blod; + color: #134b40; line-height: 50rpx; overflow: hidden; white-space: nowrap; @@ -336,7 +336,7 @@ } .desc { - font-size: 30rpx; + font-size: 38rpx; font-family: PingFangSC-Regular, PingFang SC; font-weight: 400; color: #3E3E3E; @@ -345,11 +345,11 @@ } .classify { - width: 80rpx; + width: 100rpx; height: 30rpx; border-radius: 6rpx; border: 1rpx solid #EEEEEE; - font-size: 20rpx; + font-size: 24rpx; font-family: PingFangSC-Regular, PingFang SC; font-weight: 400; color: #666666; @@ -362,7 +362,7 @@ justify-content: space-between; align-items: center; padding-top: 14rpx; - font-size: 20rpx; + font-size: 24rpx; font-family: PingFangSC-Regular, PingFang SC; font-weight: 400; color: #CCCCCC; diff --git a/pages/ideasAndNeeds/ideasAndNeeds.vue b/pages/ideasAndNeeds/ideasAndNeeds.vue index ae92e6e..8813120 100644 --- a/pages/ideasAndNeeds/ideasAndNeeds.vue +++ b/pages/ideasAndNeeds/ideasAndNeeds.vue @@ -79,7 +79,7 @@ - + @@ -87,11 +87,11 @@ - + - + @@ -373,12 +373,18 @@ }) }, submitForm() { - if (this.needsPublishForm.contactWay === 'mobile' && !/^1[3456789]\d{9}$/.test(this.needsPublishForm - .mobile)) { + if (!this.needsPublishForm.mobile && !this.needsPublishForm.email) { + this.$toast.warn('请输入正确的手机号或者正确的邮箱地址') + return false + } + if (this.tabCurrent === 1 && this.fileList1.length < 1) { + this.$toast.warn('请至少上传一张图片') + return false + } + if (this.needsPublishForm.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)) { + } else if (this.needsPublishForm.email && !/^([0-9a-zA-Z_\.\-\])+\@([0-9a-zA-Z_\.\-\])+\.([a-zA-Z]+)$/.test(this.needsPublishForm.email)) { this.$toast.warn('请输入正确的邮箱地址') return false } @@ -410,15 +416,19 @@ ...this.needsPublishForm } apiService.submitIdeasAndNeeds(data).then(res => { - this.$toast.success('提交成功') - // if (this.needsPublishForm.id) { - uni.navigateTo({ - url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1) - }) - // } - this.tabCurrent = 0 - this.fileList1 = [] - this.needsPublishForm = {} + if (res.data.code === 1) { + this.$toast.success('提交成功') + // if (this.needsPublishForm.id) { + uni.navigateTo({ + url: '../../packageMy/myRelease/myRelease?index=' + (this.tabCurrent + 1) + }) + // } + this.tabCurrent = 0 + this.fileList1 = [] + this.needsPublishForm = {} + } else{ + this.$toast.warn(res.data.msg) + } // this.$toast.success(res.data.msg) }).catch(error => { this.$toast.warn(error)