From afccd4c183dcddb927a34f7137979147b428f141 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com>
Date: Fri, 24 Feb 2023 12:20:41 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B0=8F=E7=A8=8B=E5=BA=8Fbu?=
=?UTF-8?q?g?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/myAvatar/myAvatar.vue | 2 +-
components/productsBtn/productsBtn.vue | 4 ++--
components/productsByThumb/productsByThumb.vue | 2 +-
packageMy/memberCenter/memberCenter.vue | 7 +++----
packageSearch/search-products/search-products.vue | 13 ++++++++++---
pages/detail/productsDetail/productsDetail.vue | 14 +++++++++-----
pages/ideasAndNeeds/ideasAndNeeds.vue | 1 -
pages/index/index.vue | 8 +++++---
static/styles/products.scss | 5 +----
9 files changed, 32 insertions(+), 24 deletions(-)
diff --git a/components/myAvatar/myAvatar.vue b/components/myAvatar/myAvatar.vue
index 9d4db2d..0a5b733 100644
--- a/components/myAvatar/myAvatar.vue
+++ b/components/myAvatar/myAvatar.vue
@@ -6,7 +6,7 @@
-
+
diff --git a/components/productsBtn/productsBtn.vue b/components/productsBtn/productsBtn.vue
index 3ae1745..889c331 100644
--- a/components/productsBtn/productsBtn.vue
+++ b/components/productsBtn/productsBtn.vue
@@ -18,7 +18,7 @@
- {{item.desc}}
+ {{item.title}}
{{item.name}}
-
+
{{item.title}}
@@ -24,7 +24,7 @@
:lazy-load="true">
发布日期:
- {{item.pub_time}}
+ {{item.pub_time_str}}
@@ -44,7 +44,8 @@
},
queryTitle: null,
imgUrl: null,
- productList: []
+ productList: [],
+ tagsArray: [],
}
},
onLoad(options) {
@@ -59,6 +60,12 @@
title: this.queryTitle
}
this.$apiServe.getProductList(data).then(res => {
+ let tags = res.data.data
+ for (const item of tags) {
+ let tag = item.tags
+ this.tagsArray = tag.split(',')
+ item.tags = this.tagsArray[0]
+ }
this.productList = res.data.data
}).finally(_ => {})
},
diff --git a/pages/detail/productsDetail/productsDetail.vue b/pages/detail/productsDetail/productsDetail.vue
index 751eb4c..e8e3d29 100644
--- a/pages/detail/productsDetail/productsDetail.vue
+++ b/pages/detail/productsDetail/productsDetail.vue
@@ -48,18 +48,18 @@
-
+
点赞
-
+
- {{detailList.thumb}} 赞
+ {{detailList.thumb==NaN?1:detailList.thumb}} 赞
@@ -151,12 +151,16 @@
this.showUpdate = true
}
//升级VIP正在审核中
- if (dataCode == 0 && detail.mytpe == 99) {
+ if (dataCode == 0 && detail.mytpe == 3) {
this.showUpdating = true
}
+
+
if (detail) {
detail.pub_time = dateFormatDetail(detail.pub_time)
- detail.tags = detail.tags.split(',')
+ if (detail.tags) {
+ detail.tags = detail.tags.split(',')
+ }
//点赞数
if (detail.thumbcount !== 0 && detail.is_thumb == 0) {
detail.thumb = parseInt(detail.thumb) + parseInt(detail.thumbcount)
diff --git a/pages/ideasAndNeeds/ideasAndNeeds.vue b/pages/ideasAndNeeds/ideasAndNeeds.vue
index 374b805..9e7f885 100644
--- a/pages/ideasAndNeeds/ideasAndNeeds.vue
+++ b/pages/ideasAndNeeds/ideasAndNeeds.vue
@@ -214,7 +214,6 @@
},
getFormData() {
this.$apiServe.getIdeasAndNeedsFormdata().then(res => {
- console.log(res.data)
const formData = res.data.data
this.productPickerColumn[0] = formData.product
this.positionPickerColumn[0] = formData.loc
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 0d1c2fe..8e17331 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -141,10 +141,12 @@
getBanner() {
this.$apiServe.getBanner().then(res => {
let banner = res.data.data
- for (const item of banner) {
- item.img = this.imgUrl + item.img
+ if (banner) {
+ for (const item of banner) {
+ item.img = this.imgUrl + item.img
+ }
+ this.swiperList = res.data.data
}
- this.swiperList = res.data.data
}).finally(_ => {})
},
//点击轮播图
diff --git a/static/styles/products.scss b/static/styles/products.scss
index a2a7c32..5281675 100644
--- a/static/styles/products.scss
+++ b/static/styles/products.scss
@@ -8,10 +8,7 @@
position: absolute;
right: 0;
top: 0;
-
- .u-image__image {
- margin-left: 6px;
- }
+ width:356rpx;
.img_tag {
position: absolute;