From 0f268fb419032e0869f528d2a183a107aaea7723 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=82=93=E6=B4=81?= <209192278@qq.com>
Date: Sun, 19 Nov 2023 18:46:42 +0800
Subject: [PATCH] =?UTF-8?q?=E9=82=93=E6=B4=81=20:=20"=E6=88=91=E7=9A=84"?=
=?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=88=A0=E9=99=A4=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/SearchShopList/SearchShopList.vue | 36 ++++----
.../SearchShopListItem/SearchShopListItem.vue | 91 ++++++++++++-------
components/ShowShopList/ShowShopList.vue | 47 ++++------
.../ShowShopListItem/ShowShopListItem.vue | 2 +-
pages/index/index.vue | 6 +-
pages/published/published.vue | 68 +++++++++++---
service/request.js | 6 ++
7 files changed, 161 insertions(+), 95 deletions(-)
diff --git a/components/SearchShopList/SearchShopList.vue b/components/SearchShopList/SearchShopList.vue
index 4fe4956..8cd3de1 100644
--- a/components/SearchShopList/SearchShopList.vue
+++ b/components/SearchShopList/SearchShopList.vue
@@ -1,13 +1,7 @@
-
+
@@ -19,7 +13,7 @@
* @property {Object} customQuery 自定义查询参数
*/
export default {
- name:"SearchShopList",
+ name: "SearchShopList",
data() {
return {
pageSize: 5,
@@ -27,40 +21,44 @@
};
},
props: {
- searchInfoList:{
+ searchInfoList: {
type: Array,
- default(){
+ default () {
return []
}
},
- showStyle:{
+ showStyle: {
type: Number,
- default() {
+ default () {
return 0
}
},
isEdit: {
type: Boolean,
- default() {
+ default () {
return false
}
},
- listType:{
+ listType: {
type: Number,
- default(){
+ default () {
return 2
}
},
- customQuery:{
+ customQuery: {
type: Object,
- default(){
+ default () {
return {}
}
}
},
methods: {
- handleDel(shopid){
+ handleUpdate(searchid) {
+ this.$emit('updateItem', searchid)
+ },
+ handleDel(shopid) {
console.log("删除了商铺", shopid);
+ this.$emit('delItem', shopid)
// const delindex = this.shopInfoList.findIndex((item,index)=> item.shopid === shopid)
// TODO:不能直接修改
// if(delindex !== -1) this.shopInfoList = this.shopInfoList.slice(delindex,1)
diff --git a/components/SearchShopListItem/SearchShopListItem.vue b/components/SearchShopListItem/SearchShopListItem.vue
index 6241990..3433e8b 100644
--- a/components/SearchShopListItem/SearchShopListItem.vue
+++ b/components/SearchShopListItem/SearchShopListItem.vue
@@ -6,7 +6,7 @@
{{shopInfo.tt}}
-
+
租金:{{shopInfo.zujin}}元/月
@@ -44,7 +44,7 @@
-
+
@@ -68,7 +68,7 @@
{{shopInfo.mobile}}
-
+
@@ -89,7 +89,7 @@
发布日期:{{$u.timeFormat(shopInfo.pub_time,'yyyy-mm-dd')}}
-
+
@@ -100,7 +100,7 @@
删除
-
+
@@ -110,41 +110,41 @@
export default {
props: {
shopInfo: {
- type:Object,
- default(){
+ type: Object,
+ default () {
return {
-
+
}
}
},
showStyle: {
- type:Number,
- default() {
+ type: Number,
+ default () {
return 0
}
},
isEdit: {
- type:Boolean,
- default(){
+ type: Boolean,
+ default () {
return false
}
}
-
+
},
data() {
return {
-
+
}
-
+
},
computed: {
-
+
},
methods: {
handleEdit(searchid) {
// TODO 完成页面跳转
- console.log("点击了编辑ID为",searchid);
-
+ console.log("点击了编辑ID为", searchid);
+ this.$emit('updateItem', searchid)
},
handleDel(searchid) {
this.$emit('delItem', searchid)
@@ -156,23 +156,28 @@