From 9d701e7442600ee477a0303634ca33983af9822e Mon Sep 17 00:00:00 2001 From: LuoShijie Date: Tue, 7 Nov 2023 21:41:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=BD=97=E4=B8=96=E6=9D=B0=EF=BC=9Afaet?= =?UTF-8?q?=EF=BC=9ASearchShopList=E7=BB=84=E4=BB=B6=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E7=A7=8D=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/SearchShopList/SearchShopList.vue | 29 ++++- .../SearchShopListItem/SearchShopListItem.vue | 115 +++++++++++++++++- components/ShowShopList/ShowShopList.vue | 6 + .../ShowShopListItem/ShowShopListItem.vue | 3 +- pages/index/index.vue | 2 +- 5 files changed, 146 insertions(+), 9 deletions(-) diff --git a/components/SearchShopList/SearchShopList.vue b/components/SearchShopList/SearchShopList.vue index 4627a85..5fd1b56 100644 --- a/components/SearchShopList/SearchShopList.vue +++ b/components/SearchShopList/SearchShopList.vue @@ -4,6 +4,8 @@ v-for="item in shopInfoList" :key="searchid" :shopInfo="item" + :show-style="showStyle" + @delItem="handleDel" > @@ -20,6 +22,18 @@ }; }, props: { + showStyle:{ + type: Number, + default() { + return 0 + } + }, + isEdit: { + type: Boolean, + default() { + return false + } + }, shopInfoList: { type: Array, default() { @@ -33,7 +47,8 @@ pos: '锦江区', category: '餐饮美食', uname: 'A先生', - sqr: 500 + sqr: 500, + yjtzText: "423万元" }, { searchid: 2, @@ -44,11 +59,21 @@ pos: '锦江区', category: '餐饮美食', uname: '王先生', - sqr: 200 + sqr: 200, + yjtzText: "423万元" } ] } } + }, + methods: { + handleDel(shopid){ + console.log("删除了商铺", shopid); + // const delindex = this.shopInfoList.findIndex((item,index)=> item.shopid === shopid) + // TODO:不能直接修改 + // if(delindex !== -1) this.shopInfoList = this.shopInfoList.slice(delindex,1) + // console.log(this.shopInfoList); + } } } diff --git a/components/SearchShopListItem/SearchShopListItem.vue b/components/SearchShopListItem/SearchShopListItem.vue index 2665eac..b714832 100644 --- a/components/SearchShopListItem/SearchShopListItem.vue +++ b/components/SearchShopListItem/SearchShopListItem.vue @@ -3,6 +3,28 @@ {{shopInfo.title}} + + + + 租金:{{shopInfo.price}}元/月 + 预计投资:{{shopInfo.yjtzText}} + + + + + + + {{shopInfo.category}} + + + + + + {{shopInfo.pos}} + + + + @@ -23,7 +45,8 @@ {{shopInfo.phoneNum}} - + + @@ -43,6 +66,18 @@ 发布日期:{{shopInfo.date}} + + + + + 编辑 + + + + 删除 + + + @@ -66,7 +101,18 @@ } } }, - + showStyle: { + type:Number, + default() { + return 0 + } + }, + isEdit: { + type:Boolean, + default(){ + return false + } + } }, data() { @@ -77,6 +123,15 @@ }, computed: { + }, + methods: { + handleEdit(searchid) { + // TODO 完成页面跳转 + console.log("点击了编辑ID为",searchid); + }, + handleDel(searchid) { + this.$emit('delItem', searchid) + } } } @@ -91,7 +146,26 @@ font-size: 12px; .list-container { display: flex; - height: 90px; + height: auto; + } + .bottom-common { + border-top: 1px solid #f7f7f7; + padding-top: 5px; + display: flex; + > view { + display: flex; + } + } + .del-and-edit{ + margin-top: 6px; + justify-content: flex-end; + >view{ + margin-left: 38rpx; + } + text { + margin-left: 4px; + color: #666666; + } } .text-area { display: flex; @@ -103,13 +177,43 @@ >view { display: flex; >view { - flex:1; display: flex; >view { margin-right: 4px; } } } + + .style2 { + display: flex; + flex-direction: column; + color: #CC3333; + font-weight: 500; + .rent-and-cost { + text{ + margin-right: 26rpx; + } + margin-top: 5px; + padding-top: 5px; + padding-bottom: 6px; + } + .cart-and-pos{ + > view{ + margin-right: 27px; + display: flex; + } + display: flex; + border-top: 1px solid #f7f7f7; + padding-top: 5px; + margin-bottom: 5px; + justify-content: start; + font-weight: 500; + text { + color: #CC3333; + line-height: 12px; + } + } + } .pos-and-sqr { justify-content: space-between; margin-top: 5px; @@ -119,6 +223,7 @@ line-height: 12px; } >view { + flex:1; display: flex; >view { margin-right: 4px; @@ -126,6 +231,7 @@ } } .cart-and-date { + display: flex; border-top: 1px solid #f7f7f7; padding-top: 5px; justify-content: space-between; @@ -133,6 +239,7 @@ text { color: #CC3333; line-height: 12px; + margin-right: 48rpx; } } } diff --git a/components/ShowShopList/ShowShopList.vue b/components/ShowShopList/ShowShopList.vue index c8294a0..d6c99dc 100644 --- a/components/ShowShopList/ShowShopList.vue +++ b/components/ShowShopList/ShowShopList.vue @@ -38,6 +38,12 @@ return true } }, + isEdit: { + type: Boolean, + default() { + return false + } + }, shopInfoList: { type: Array, default() { diff --git a/components/ShowShopListItem/ShowShopListItem.vue b/components/ShowShopListItem/ShowShopListItem.vue index c08d77e..5e03e70 100644 --- a/components/ShowShopListItem/ShowShopListItem.vue +++ b/components/ShowShopListItem/ShowShopListItem.vue @@ -131,8 +131,7 @@ methods: { handleEdit(shopid) { // TODO 完成页面跳转 - console.log("edit clicked"); - console.log(shopid); + console.log("点击了编辑ID为",shopid); }, handleDel(shopid) { this.$emit('delItem', shopid) diff --git a/pages/index/index.vue b/pages/index/index.vue index 54da2f1..0f2f41c 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -32,7 +32,7 @@ data() { return { notice: '寒雨连江夜入吴 平明送客楚山孤 洛阳亲友如相问 一片冰心在玉壶', - chooseIndex: 0, + chooseIndex: 1, statisticsNum: [231753, 1345] } }, From c443043533559cbc371278581aa18618b4bbd7c6 Mon Sep 17 00:00:00 2001 From: LuoShijie Date: Wed, 8 Nov 2023 00:19:10 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=BD=97=E4=B8=96=E6=9D=B0=EF=BC=9Afaet?= =?UTF-8?q?=EF=BC=9A=E5=BA=97=E9=93=BA=E8=BD=AC=E8=AE=A9=E3=80=81=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E9=80=89=E5=9D=80=E9=A1=B5=E9=9D=A2=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/DropDown/DropDown.vue | 50 ++++++++++++++++++ components/DropDown/DropDownItem.vue | 8 +++ components/ShowShopList/ShowShopList.vue | 2 +- .../{ => HomeMainContent}/HomeNavCard.vue | 0 .../{ => HomeMainContent}/HomeNoticeBar.vue | 0 .../{ => HomeMainContent}/Statistics.vue | 0 pages/index/index.vue | 8 +-- pages/shopAddress/shopAddress.vue | 19 +++++-- pages/shopTransfer/shopTransfer.vue | 45 ++++++++++++++-- static/dropdown/dp_icon_hlxia.png | Bin 0 -> 270 bytes static/dropdown/dp_icon_lxia.png | Bin 0 -> 273 bytes 11 files changed, 118 insertions(+), 14 deletions(-) create mode 100644 components/DropDown/DropDown.vue create mode 100644 components/DropDown/DropDownItem.vue rename pages/index/{ => HomeMainContent}/HomeNavCard.vue (100%) rename pages/index/{ => HomeMainContent}/HomeNoticeBar.vue (100%) rename pages/index/{ => HomeMainContent}/Statistics.vue (100%) create mode 100644 static/dropdown/dp_icon_hlxia.png create mode 100644 static/dropdown/dp_icon_lxia.png diff --git a/components/DropDown/DropDown.vue b/components/DropDown/DropDown.vue new file mode 100644 index 0000000..80034ea --- /dev/null +++ b/components/DropDown/DropDown.vue @@ -0,0 +1,50 @@ + + + + + \ No newline at end of file diff --git a/components/DropDown/DropDownItem.vue b/components/DropDown/DropDownItem.vue new file mode 100644 index 0000000..02409e3 --- /dev/null +++ b/components/DropDown/DropDownItem.vue @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/components/ShowShopList/ShowShopList.vue b/components/ShowShopList/ShowShopList.vue index d6c99dc..043493c 100644 --- a/components/ShowShopList/ShowShopList.vue +++ b/components/ShowShopList/ShowShopList.vue @@ -29,7 +29,7 @@ showStyle:{ type: Number, default() { - return 1 + return 0 } }, isADshow: { diff --git a/pages/index/HomeNavCard.vue b/pages/index/HomeMainContent/HomeNavCard.vue similarity index 100% rename from pages/index/HomeNavCard.vue rename to pages/index/HomeMainContent/HomeNavCard.vue diff --git a/pages/index/HomeNoticeBar.vue b/pages/index/HomeMainContent/HomeNoticeBar.vue similarity index 100% rename from pages/index/HomeNoticeBar.vue rename to pages/index/HomeMainContent/HomeNoticeBar.vue diff --git a/pages/index/Statistics.vue b/pages/index/HomeMainContent/Statistics.vue similarity index 100% rename from pages/index/Statistics.vue rename to pages/index/HomeMainContent/Statistics.vue diff --git a/pages/index/index.vue b/pages/index/index.vue index 0f2f41c..78900ff 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -20,9 +20,9 @@ - diff --git a/pages/shopTransfer/shopTransfer.vue b/pages/shopTransfer/shopTransfer.vue index 7cbd61a..6ed7966 100644 --- a/pages/shopTransfer/shopTransfer.vue +++ b/pages/shopTransfer/shopTransfer.vue @@ -1,6 +1,12 @@ @@ -9,7 +15,30 @@ export default { data() { return { - + value1: 1, + value2: 2, + options1: [{ + label: '默认排序', + value: 1, + }, + { + label: '距离优先', + value: 2, + }, + { + label: '价格优先', + value: 3, + } + ], + options2: [{ + label: '去冰', + value: 1, + }, + { + label: '加冰', + value: 2, + }, + ], } }, methods: { @@ -18,6 +47,12 @@ } - diff --git a/static/dropdown/dp_icon_hlxia.png b/static/dropdown/dp_icon_hlxia.png new file mode 100644 index 0000000000000000000000000000000000000000..e8ecd9824f0a2a127b2eccc12d237683724586d4 GIT binary patch literal 270 zcmV+p0rCEcP)Px#$Vo&&R47xGkFgEHFc3xmxr7N2f&rikwjyR=2m%!YumvN~5Y_>kG=Ux>3I+fv z60(saVnvZH!Ik&_yZfKu8OeDMz#0I(%W^Z#^GDl8?SGgp- z0E^baR4BC!f|BzDKPx#%Sl8*R47xG&^-=%yTa^HoLMe3tFzjaPt&-sx!01nSWjF`0 z`xC~3fl_JD##TC!I+2`_rBn}wbsq^{KWGb zauY>SY^_b3AQ2^6>-sNVU`yUA*Ym*-*pT;NjG1z-R>(u&_xq0HtT+l0t+m#-_vb$V XMKnE)V-co~00000NkvXXu0mjfyw7e{ literal 0 HcmV?d00001