diff --git a/components/ShowShopList/ShowShopList.vue b/components/ShowShopList/ShowShopList.vue index 95f17c1..c8294a0 100644 --- a/components/ShowShopList/ShowShopList.vue +++ b/components/ShowShopList/ShowShopList.vue @@ -6,6 +6,7 @@ :shopInfo="item" :is-adshow="isADshow" :show-style="showStyle" + @delItem="handleDel" > @@ -15,6 +16,7 @@ * @property {Array} shopInfoList 对象数组,(带图片)需要展示的商铺列表 * @property {Number} showStyle 展示商铺的样式类型(0为首页默认) * @property {Boolean} isADshow 是否显示推广广告 + * @property {Boolean} isEdit 是否显示编辑和删除 */ export default { name:"ShowShopList", @@ -27,7 +29,7 @@ showStyle:{ type: Number, default() { - return 0 + return 1 } }, isADshow: { @@ -76,6 +78,15 @@ }, computed: { + }, + 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/ShowShopListItem/ShowShopListItem.vue b/components/ShowShopListItem/ShowShopListItem.vue index c18883f..c08d77e 100644 --- a/components/ShowShopListItem/ShowShopListItem.vue +++ b/components/ShowShopListItem/ShowShopListItem.vue @@ -35,7 +35,8 @@ - + + @@ -61,14 +62,26 @@ {{shopInfo.phoneNum}} - + + - 已将该店推给 + 已将该店推给 {{shopInfo.promotionNum}} 位潜在客户 我也要推广>> + + + + + 编辑 + + + + 删除 + + @@ -89,7 +102,7 @@ showStyle:{ type: Number, default() { - return 1 + return 0 } }, isADShow: { @@ -97,17 +110,33 @@ default() { return true } + }, + isEdit: { + type: Boolean, + default() { + return false + } } }, data() { return { - + delshopid: 0, } }, computed: { + }, + methods: { + handleEdit(shopid) { + // TODO 完成页面跳转 + console.log("edit clicked"); + console.log(shopid); + }, + handleDel(shopid) { + this.$emit('delItem', shopid) + } } } @@ -161,10 +190,16 @@ } } } - .cart-and-date { - display: flex; + + .bottom-common { border-top: 1px solid #f7f7f7; padding-top: 5px; + display: flex; + > view { + display: flex; + } + } + .cart-and-date { margin-bottom: 6px; justify-content: space-between; font-weight: 500; @@ -174,17 +209,27 @@ } >view { flex:1; - display: flex; >view { margin-right: 4px; } } } + .del-and-edit{ + margin-top: 6px; + justify-content: flex-end; + >view{ + margin-left: 38rpx; + } + text { + margin-left: 4px; + color: #666666; + } + } .list-ads { - border-top: 1px solid #f7f7f7; - padding-top: 5px; - display: flex; justify-content: space-between; + text { + color: #359867; + } } } diff --git a/static/shoplist/dp_icon_pj.png b/static/shoplist/dp_icon_pj.png new file mode 100644 index 0000000..d7e9d37 Binary files /dev/null and b/static/shoplist/dp_icon_pj.png differ diff --git a/static/shoplist/dp_icon_sc.png b/static/shoplist/dp_icon_sc.png new file mode 100644 index 0000000..e9a4159 Binary files /dev/null and b/static/shoplist/dp_icon_sc.png differ