From e04e0a3859b492347055c2656d79fdcd84524c79 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com>
Date: Mon, 27 Nov 2023 14:09:47 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E9=82=93=E6=B4=81=20=EF=BC=9A=20=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E5=9C=B0=E5=9B=BE=E5=88=97=E8=A1=A8=E8=B7=B3=E8=BD=AC?=
=?UTF-8?q?=E8=AF=A6=E6=83=85=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ShowShopListItem/ShowShopListItem.vue | 7 ++--
pages/index/map/map.vue | 38 +++----------------
2 files changed, 9 insertions(+), 36 deletions(-)
diff --git a/components/ShowShopListItem/ShowShopListItem.vue b/components/ShowShopListItem/ShowShopListItem.vue
index c7d1fcd..55d1555 100644
--- a/components/ShowShopListItem/ShowShopListItem.vue
+++ b/components/ShowShopListItem/ShowShopListItem.vue
@@ -5,7 +5,7 @@
-
+
@@ -157,7 +157,7 @@
this.$emit('delItem', shopid)
},
enterDetail() {
- // console.log("进入详情页面");
+ console.log("进入详情页面", this.shopInfo.id, this.shopInfo.type);
const query = this.$u.queryParams({
id: this.shopInfo.id,
type: this.shopInfo.type
@@ -205,7 +205,8 @@
flex-direction: column;
justify-content: space-between;
- >text, >u-text {
+ >text,
+ >u-text {
font-size: 14px;
}
diff --git a/pages/index/map/map.vue b/pages/index/map/map.vue
index e3b429b..c1a75cd 100644
--- a/pages/index/map/map.vue
+++ b/pages/index/map/map.vue
@@ -118,21 +118,7 @@
// alpha: 1
// }
],
- shopList: {
- shopid: 1,
- imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
- title: '琴行铺面转让',
- promotionNum: 23,
- price: 6000,
- date: '2023-11-02',
- pos: '锦江区',
- exactPos: '锦江区-汇源南路366号',
- sqr: 100,
- zrfText: "转让费:20万",
- category: '餐饮美食',
- uname: "张先生",
- phoneNum: 13348946108,
- }
+ shopList: {}
}
},
onShow() {
@@ -189,24 +175,10 @@
console.log('详情', res);
const data = res.data.data
if (res.data.code == 1) {
- this.shopList = data
- // {
- // shopid: 1,
- // pics: this.$api.imgUrl + data.pics,
- // tt: data.tt,
- // num: data.num,
- // zujin: data.zujin,
- // date: data.update_time,
- // area1: data.area1,
- // address: data.address,
- // mianji: data.mianji,
- // zhuanrangfei: "转让费:" + data.zhuanrangfei,
- // trade: data.trade,
- // lianxiren: data.lianxiren,
- // mobile: data.mobile,
- // }
- // data.pics = [this.$api.imgUrl + data.pics]
- // this.shopInfo = data
+ this.shopList = {
+ ...data,
+ id: id
+ }
}
})
},
From 0bbe5b6be60a2fa9c1e07496e3c35f81aa76c177 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com>
Date: Mon, 27 Nov 2023 14:18:18 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E9=82=93=E6=B4=81=20=EF=BC=9A=20=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9=E5=9C=B0=E5=9B=BE=E5=BA=97=E9=93=BA=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E6=B8=B2=E6=9F=93=E7=BB=86=E8=8A=82?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/ShowShopListItem/ShowShopListItem.vue | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/components/ShowShopListItem/ShowShopListItem.vue b/components/ShowShopListItem/ShowShopListItem.vue
index 55d1555..f2a2c1a 100644
--- a/components/ShowShopListItem/ShowShopListItem.vue
+++ b/components/ShowShopListItem/ShowShopListItem.vue
@@ -142,9 +142,22 @@
},
computed: {
+ },
+ watch: {
+ shopInfo(newVal, oldVal) {
+ if (newVal.pics.includes(",")) {
+ this.leftImage = this.$api.imgUrl + newVal.pics.split(',')[0]
+ } else {
+ this.leftImage = this.$api.imgUrl + newVal.pics
+ }
+ }
},
created() {
- this.leftImage = this.$api.imgUrl + this.shopInfo.pics.split(',')[0]
+ if (this.shopInfo.pics.includes(",")) {
+ this.leftImage = this.$api.imgUrl + this.shopInfo.pics.split(',')[0]
+ } else {
+ this.leftImage = this.$api.imgUrl + this.shopInfo.pics
+ }
},
methods: {
handleEdit(shopid) {