From f3cec1461eb91ee2861eb77be8642fceb30832bb Mon Sep 17 00:00:00 2001 From: LuoShijie Date: Sat, 18 Nov 2023 00:17:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=97=E4=B8=96=E6=9D=B0=EF=BC=9A=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E5=88=97=E8=A1=A8=E5=AD=97=E6=AE=B5=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/ShowShopList/ShowShopList.vue | 72 +++---------------- .../ShowShopListItem/ShowShopListItem.vue | 7 +- 2 files changed, 15 insertions(+), 64 deletions(-) diff --git a/components/ShowShopList/ShowShopList.vue b/components/ShowShopList/ShowShopList.vue index 8c28097..b60061f 100644 --- a/components/ShowShopList/ShowShopList.vue +++ b/components/ShowShopList/ShowShopList.vue @@ -71,66 +71,11 @@ return 1 } }, - shopInfoList: { - type: Array, - default() { - return [ - { - id: 1, - type: 1, - shopid: 1, - imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg', - title: '琴行铺面转让', - promotionNum: 23, - price: 5000, - date: '2023-11-02', - pos: '锦江区', - exactPos: '锦江区-汇源南路366号', - sqr: 100, - zrfText: "转让费:20000万", - category: '餐饮美食', - uname: "张先生", - phoneNum: 13348946108, - }, - { - "id": "1", - "pic": "3", - "tt": "333", - "type": "0", - "adress": "", - "trade1": "啊", - "trade2": "餐馆", - "btype1": "", - "btype2": "", - "area1": "青羊区", - "area2": "", - "mianji": "33", - "zhuanrangfei": "44", - "zujin": "44", - "hits": "0", - "58url": "", - "personurl": "", - "kw": "", - "remark": "", - "content": "44vv", - "pics": "", - "user_level_id": "1", - "lianxiren": "3333", - "mobile": "44444", - "status": "1", - "shangpulx": "1", - "zhuangtai": "1", - "lng": "2222.00000000", - "lat": "3333.00000000", - "pub_time": "0", - "create_time": "1699973131", - "update_time": "1699973131", - "delete_time": "0", - "userid": "1", - "success": "2" - } - ] - } + + }, + data() { + return { + shopInfoList: [] } }, methods: { @@ -149,7 +94,12 @@ }) this.$api.getShopList(query).then(res => { console.log("shoplist",res.data.data); - + this.shopInfoList = res.data.data + this.shopInfoList.forEach(item=>{ + item.pics =this.$api.imgUrl + item.pics + }); + console.log("shoplist",res.data.data); + }) } }, diff --git a/components/ShowShopListItem/ShowShopListItem.vue b/components/ShowShopListItem/ShowShopListItem.vue index 4392766..15f9e70 100644 --- a/components/ShowShopListItem/ShowShopListItem.vue +++ b/components/ShowShopListItem/ShowShopListItem.vue @@ -5,7 +5,7 @@ - {{shopInfo.title}} + {{shopInfo.tt}} @@ -30,8 +30,9 @@ 租金:{{shopInfo.zujin}}元/月 - 发布日期:{{shopInfo.create_time}} + 发布日期:{{$u.timeFormat(shopInfo.create_time,'yyyy-mm-dd')}} 转让费:{{shopInfo.zhuanrangfei}} + @@ -163,7 +164,7 @@ id: this.shopInfo.id, type: this.shopInfo.type }) - // console.log("query",query); + console.log("query",query); uni.navigateTo({ url: '/pages/detail/detail' + `${query}` })