From e81b87f8271364314b36911d4ba4ec8beef93a35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Dchenxuelian=E2=80=9C?= <“chenxuelian@cjiedata.com”> Date: Sun, 7 May 2023 16:40:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=81=94=E7=B3=BB=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=E4=BA=8C=E9=80=89=E4=B8=80=E3=80=81=E5=95=86=E5=93=81=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=83=A8=E5=88=86=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../detail/productsDetail/productsDetail.vue | 14 +++---- pages/ideasAndNeeds/ideasAndNeeds.vue | 42 ++++++++++++------- 2 files changed, 33 insertions(+), 23 deletions(-) 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) From 7b84933f91347f439576446b5ddef4284d8a7d62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Dchenxuelian=E2=80=9C?= <“chenxuelian@cjiedata.com”> Date: Sun, 7 May 2023 16:51:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E9=A6=96=E9=A1=B5=EF=BC=8C=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E9=9C=80=E6=B1=82=E6=8E=A5=E5=8F=A3=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/productsByThumb/productsByThumb.vue | 7 ++----- service/request.js | 7 +++++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/productsByThumb/productsByThumb.vue b/components/productsByThumb/productsByThumb.vue index 9c226f3..eb90cac 100644 --- a/components/productsByThumb/productsByThumb.vue +++ b/components/productsByThumb/productsByThumb.vue @@ -65,14 +65,11 @@ methods: { //获取按点赞量排列的产品列表 getProductsByThumb() { - this.$apiServe.getProductList({ - cateId: 0, - tagIds: 0, - sortType: 1, + this.$apiServe.getProductsByCateId({ + cateId: '9', pageSize: this.pageSize, pageNum: this.pageNum }).then(res => { - let tags = res.data.data console.log('企业需求列表', tags); for (const item of tags) { diff --git a/service/request.js b/service/request.js index 4e1cebe..15095c5 100644 --- a/service/request.js +++ b/service/request.js @@ -361,6 +361,13 @@ const apiService = { resolve(service.get(url, data)) }) }, + // 获取首页分类 + getProductsByCateId(data) { + const url = `/home/plist` + return new Promise((resolve, reject) => { + resolve(service.get(url, data)) + }) + }, // 搜索发现 热搜 getDiscover() { const url = `/home/discover`