diff --git a/common/api/shop.js b/common/api/shop.js index e39de01..dbdf7e4 100644 --- a/common/api/shop.js +++ b/common/api/shop.js @@ -1,6 +1,16 @@ export default { init(vm){ return { + // 发现列表 + getArticlelist({ page, value, store_id, member_id, is_video_img }){ + return vm.$u.post('article/articlelist', { + page: page, + like: value, // 搜索内容 + store_id: store_id, + member_id: member_id, + is_video_img: is_video_img, + }); + }, // 获取商城首页信息(顶部轮播图与商品分类) getShopTopList(){ return vm.$u.post('Shop/getShopTopList'); @@ -29,7 +39,13 @@ export default { // 购物车删除商品 deleteCart({ id }) { return vm.$u.post('cart/cartDel', { - cart_id: id + cart_ids: id + }); + }, + // 商品详情 + getGoodsDetails({ id }) { + return vm.$u.post('Goods/goodDetails', { + goods_id: id }); } } diff --git a/common/api/user.js b/common/api/user.js index 586052d..2b93d3d 100644 --- a/common/api/user.js +++ b/common/api/user.js @@ -189,7 +189,12 @@ export default { sex: gender, avatar: avatar, }); - } + }, + // 用户浏览记录 + getBrowseList() { + return vm.$u.post('Member/BrowseList'); + }, + } } } \ No newline at end of file diff --git a/components/index/video-item/index.vue b/components/index/video-item/index.vue index 2e62ace..08104b2 100644 --- a/components/index/video-item/index.vue +++ b/components/index/video-item/index.vue @@ -1,16 +1,33 @@ @@ -33,7 +50,7 @@ color: #333; font-weight: 500; line-height: 30rpx; - width: 307rpx; + width: 300rpx; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; @@ -46,7 +63,7 @@ font-size: 22rpx; color: #666; line-height: 30rpx; - width: 307rpx; + width: 300rpx; margin-left: 18rpx; overflow:hidden; text-overflow:ellipsis; @@ -61,8 +78,9 @@ align-items: center; margin:0 auto; margin-top: 20rpx; - width: 307rpx; - >view{ + width: 300rpx; + position: relative; + .info { display: flex; align-items: center; >image{ @@ -81,6 +99,70 @@ width: 37rpx; height: 8rpx; } + .action { + z-index: 19; + position: absolute; + right: 0rpx; + bottom: 55rpx; + // width: 234rpx; + background: rgba(255,255,255,1); + box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12); + border-radius: 6rpx; + .bubble { + position: relative; + background-color: #fff; + &::after { + position: absolute; + right: 10rpx; + bottom: 0; + content: ''; + width: 60rpx; + height: 40rpx; + background-color: inherit; + transform: rotate(45deg); + margin-top: -10rpx; + z-index: -1; + box-shadow: 0rpx 0rpx 6rpx 0rpx rgba(35,24,21,0.12); + } + > view { + padding: 9rpx 12rpx; + display: flex; + align-items: center; + &:not(:last-child) { + border-bottom: 2rpx #ECECEC solid; + } + @mixin image-class($width, $height, $right) { + width: $width; + height: $height; + margin-right: $right; + } + > image { + &:first-child { + @include image-class($width: 21rpx, $height: 22rpx, $right: 12rpx); + } + &:nth-child(2) { + @include image-class($width: 22rpx, $height: 22rpx, $right: 12rpx); + } + &:last-child { + @include image-class($width: 24rpx, $height: 20rpx, $right: 9rpx); + } + } + > text { + font-size: 20rpx; + color: rgba(51,51,51,1); + } + } + } + } + .layer { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 9; + background-color: transparent; + } } } @@ -89,9 +171,18 @@ export default { name:"index-item", data(){ return { - + show: -1, } }, - props:["isguanzhu"] + props:["isguanzhu", "item"], + mounted() { + // console.log(this.item); + this.show = -1; + }, + methods: { + showAction() { + this.show = this.show > 0 ? -1 : this.item.article_id; + } + }, } \ No newline at end of file diff --git a/components/shop/list/item.vue b/components/shop/list/item.vue index 7679877..7695070 100644 --- a/components/shop/list/item.vue +++ b/components/shop/list/item.vue @@ -1,5 +1,5 @@ @@ -62,7 +63,7 @@ export default { }) checkedGoods = checkedGoods.concat(temp); }) - // console.log(checkedGoods); + console.log(checkedGoods); this.checkedGoods = checkedGoods; }, deep: true @@ -88,9 +89,23 @@ export default { }) }, deleteGoods() { + if(!this.checkedGoods.length) return false; let id = []; + this.checkedGoods.forEach(item => { + id.push(item.cart_id); + }) + // console.log(id); + this.$u.api.deleteCart({ id }).then(res => { if (res.errCode == 0) { + if(!res.data.msg) { + this.getCartList(); + } else { + this.$refs.uToast.show({ + title: res.data.msg, + type: 'error', + }) + } } }) }, diff --git a/pageE/tool/MineHistory.vue b/pageE/tool/MineHistory.vue index 98ec682..5a02ad1 100644 --- a/pageE/tool/MineHistory.vue +++ b/pageE/tool/MineHistory.vue @@ -3,19 +3,20 @@ - + 小米店铺 - + {{ item }} - + + @@ -26,8 +27,18 @@ export default { historyList: [1, 2, 3, 6] }; }, - onLoad() {}, - methods: {} + onLoad() { + this.getBrowseList(); + }, + methods: { + getBrowseList () { + this.$u.api.getBrowseList().then(res => { + if(res.errCode == 0) { + this.historyList = res.data.storeInfo; + } + }) + } + } }; \ No newline at end of file diff --git a/static/image/common/1.png b/static/image/common/1.png new file mode 100644 index 0000000..8aa6d13 Binary files /dev/null and b/static/image/common/1.png differ diff --git a/static/image/common/12.png b/static/image/common/12.png new file mode 100644 index 0000000..c955d46 Binary files /dev/null and b/static/image/common/12.png differ diff --git a/static/image/common/3.png b/static/image/common/3.png new file mode 100644 index 0000000..afb4e03 Binary files /dev/null and b/static/image/common/3.png differ diff --git a/static/image/common/4.png b/static/image/common/4.png new file mode 100644 index 0000000..de5ec6d Binary files /dev/null and b/static/image/common/4.png differ diff --git a/static/image/common/5.png b/static/image/common/5.png new file mode 100644 index 0000000..055aa76 Binary files /dev/null and b/static/image/common/5.png differ diff --git a/static/image/common/6.png b/static/image/common/6.png new file mode 100644 index 0000000..db98493 Binary files /dev/null and b/static/image/common/6.png differ diff --git a/static/image/common/7.png b/static/image/common/7.png new file mode 100644 index 0000000..15a7f11 Binary files /dev/null and b/static/image/common/7.png differ diff --git a/static/image/common/8.png b/static/image/common/8.png new file mode 100644 index 0000000..3ef68e7 Binary files /dev/null and b/static/image/common/8.png differ diff --git a/static/image/common/9.png b/static/image/common/9.png new file mode 100644 index 0000000..80cb135 Binary files /dev/null and b/static/image/common/9.png differ