diff --git a/common/api/shop.js b/common/api/shop.js index 9771263..2db23d5 100644 --- a/common/api/shop.js +++ b/common/api/shop.js @@ -173,10 +173,17 @@ export default { goods_id: id }); }, - getStoreGoodsList({ id, page = 0}){ + getStoreGoodsList({ id, page, order, gc_id }){ return vm.$u.post('Store/getStoreGoodsList', { id: id, - page:page + page: page, + order: order, + gc_id: gc_id, + }); + }, + getStoreClassifyList({ id }) { + return vm.$u.post('Store/getStoreClassifyList', { + id: id }); }, getStoreImgVideoList({id}){ @@ -306,7 +313,11 @@ export default { // 达人上架商品 goodsShelves({live_id}){ return vm.$u.post('Specialci/goodsShelves',{live_id}) - } + }, + // + addFavoriteStore({ id }) { + return vm.$u.post('member/addFavoriteStore',{ fid: id }) + }, } } diff --git a/common/api/user.js b/common/api/user.js index 2eafe9e..19d6fd8 100644 --- a/common/api/user.js +++ b/common/api/user.js @@ -175,9 +175,10 @@ export default { return vm.$u.post('Member/getFavoritesList', params); }, // 取消收藏(商品/店铺) - removeFavorite({ id }) { + removeFavorite({ id, type }) { return vm.$u.post('Member/removeFavorite', { - id: id, + fav_id: id, + type: type, }); }, // 设置-用户信息 diff --git a/components/shop/group/index.vue b/components/shop/group/index.vue index 5c69287..f954b6e 100644 --- a/components/shop/group/index.vue +++ b/components/shop/group/index.vue @@ -7,7 +7,7 @@ - + @@ -97,8 +97,8 @@ export default { box-sizing: border-box; padding: 0 30rpx; display: flex; - &:not(:nth-child(3n)) { - > view { + > view { + &:not(:nth-child(3n)) { margin-right: 20rpx; } } diff --git a/components/shop/list/index.vue b/components/shop/list/index.vue index 35f2e4f..b301b7b 100644 --- a/components/shop/list/index.vue +++ b/components/shop/list/index.vue @@ -2,7 +2,7 @@ 商品推荐 - + @@ -39,6 +39,7 @@ export default { watch: { current(index) { this.page = 1; + this.goodsList = []; const id = this.classifyList[index].gc_id; this.getGoodsRecommend({gc_id: id}); } @@ -68,7 +69,7 @@ export default { this.page--; }) }, - getGoodsClassRecommend(gc_id) { + getGoodsClassRecommend() { this.$u.api.getGoodsClassRecommend().then(res => { if (res.errCode == 0) { // 初始化 current @@ -82,6 +83,7 @@ export default { page: page, gc_id: gc_id, }) + // this.swiperCurrent = this.current; if (res.errCode == 0) { this.timer = true; if(reload) this.goodsList = res.data.goodsList; @@ -93,13 +95,14 @@ export default { }, setSwiperHeight() { // height: 230px, margin-bottom: 13 - // const height = Math.ceil(this.goodsList.length / 2) * (510 + 26); - // this.swiperHeight = height == 0 ? '230rpx' : height + 'rpx'; - this.swiperHeight = Math.ceil(this.goodsList.length / 2) * (270 + 13) + 'px'; + const height = Math.ceil(this.goodsList.length / 2) * (540 + 26); + this.swiperHeight = height == 0 ? '230rpx' : height + 'rpx'; + // this.swiperHeight = Math.ceil(this.goodsList.length / 2) * (270 + 13) + 'px'; }, // tabs通知swiper切换 tabsChange(index) { - this.swiperCurrent = index; + this.current = index; + // this.getGoodsRecommend({ gc_id: this.classifyList[this.current].gc_id }); }, // swiper-item左右移动,通知tabs的滑块跟随移动 transition(e) { @@ -111,8 +114,9 @@ export default { animationfinish(e) { let current = e.detail.current; this.$refs.uTabs.setFinishCurrent(current); - this.swiperCurrent = current; this.current = current; + this.swiperCurrent = current; + // this.getGoodsRecommend({ gc_id: this.classifyList[this.current].gc_id }); }, } } diff --git a/pageB/sdetails/index.vue b/pageB/sdetails/index.vue index acf6c69..76ceb0b 100644 --- a/pageB/sdetails/index.vue +++ b/pageB/sdetails/index.vue @@ -135,7 +135,7 @@ - + 店铺 @@ -155,7 +155,7 @@ - + 店铺 @@ -183,7 +183,8 @@ export default { data() { return { list: [], // 轮播图列表 - goodsInfo: {}, // 商品信息 + goodsInfo: {}, // 商品信息 + storeInfo: {}, glist: [], // 规格列表 id: 0, // 商品id/秒杀id/拼团 id type: '', // 商品类型 商品详情 1普通 2拼团 3秒杀 4优惠券 @@ -311,6 +312,7 @@ export default { if (res.errCode == 0) { this.evaluate = res.data.goods_evaluate_info; this.goodsInfo = res.data.goods; + this.storeInfo = res.data.store; this.setSwiperList(res.data.goods_image); this.glist = res.data.spec_list; // console.log(this.goodsInfo.mobile_body); @@ -452,6 +454,9 @@ export default { title: title }); }, + toOthersPage(url) { + this.$u.route(url); + }, viewComment() { this.$u.route({ url: 'pageB/comment/index', diff --git a/pageC/cart/ConfirmOrder.vue b/pageC/cart/ConfirmOrder.vue index de275a3..5437805 100644 --- a/pageC/cart/ConfirmOrder.vue +++ b/pageC/cart/ConfirmOrder.vue @@ -200,11 +200,13 @@ export default { if(!this.debounce) return; this.debounce = false; if(this.orderType == 2) { + // this.sendOrder(0); this.withImmediate(); } else if(this.orderType == 1) { this.sendOrder(0); + } else { + this.sendOrder(1); } - else this.sendOrder(1); }, // @params {Number} ifcart 是否是购物车商品 sendOrder(ifcart) { @@ -254,6 +256,7 @@ export default { // console.log(params); this.$u.api.sendOrder(params).then(res => { if(res.errCode == 0) { + // this.withImmediate(); this.$u.route({ type: 'redirect', url: '/pageC/cart/cashier', diff --git a/pageC/merchant/classifyGoods.vue b/pageC/merchant/classifyGoods.vue new file mode 100644 index 0000000..469cf36 --- /dev/null +++ b/pageC/merchant/classifyGoods.vue @@ -0,0 +1,215 @@ + + + \ No newline at end of file diff --git a/pageC/merchant/details.vue b/pageC/merchant/details.vue index dd9f66a..e8514c2 100644 --- a/pageC/merchant/details.vue +++ b/pageC/merchant/details.vue @@ -3,14 +3,14 @@ {{info.store_name}} - 创建时间:{{store_addtime|date}} | {{info.live_store_address}} + 创建时间:{{ info.store_addtime | date('yyyy年mm月dd日') }} | {{ info.live_store_address || '暂无地址' }} {{info.store_collect}} 粉丝数 - 23435 + {{ info.evaluatecount }} 评价 @@ -22,9 +22,9 @@ 工商执照 - + - + @@ -37,9 +37,9 @@ export default { info:{} } }, - onLoad(){ - this.$u.api.getStoreInfo({id:1}).then((res)=>{ - console.log(res) + onLoad(option){ + this.$u.api.getStoreInfo({id: option.id}).then((res)=>{ + // console.log(res) this.info = res.data }) } @@ -113,11 +113,6 @@ export default { font-weight: 500; color: rgba(51,51,51,1); } - > image { - width: 24rpx; - height: 14rpx; - background-color: aqua; - } } .image-list { background-color: #ffffff; diff --git a/pageC/merchant/goods.vue b/pageC/merchant/goods.vue new file mode 100644 index 0000000..423e43c --- /dev/null +++ b/pageC/merchant/goods.vue @@ -0,0 +1,200 @@ + + + \ No newline at end of file diff --git a/pageC/merchant/index.vue b/pageC/merchant/index.vue index 798eaa6..5f3fc26 100644 --- a/pageC/merchant/index.vue +++ b/pageC/merchant/index.vue @@ -1,6 +1,6 @@ \ No newline at end of file diff --git a/pageC/merchant/storeClassify.vue b/pageC/merchant/storeClassify.vue new file mode 100644 index 0000000..fd62b9d --- /dev/null +++ b/pageC/merchant/storeClassify.vue @@ -0,0 +1,88 @@ + + + \ No newline at end of file diff --git a/pageE/mine/StoreCollection.vue b/pageE/mine/StoreCollection.vue index 29818d0..fd796ca 100644 --- a/pageE/mine/StoreCollection.vue +++ b/pageE/mine/StoreCollection.vue @@ -3,13 +3,13 @@ - + @@ -46,12 +46,15 @@ export default { getStoreFavoritesList() { this.$u.api.getFavoritesList({ type: 2 // 店铺 type: 2 + }).then(res => { + this.list = res.data; }) }, removeFavorite(id) { console.log(id); this.$u.api.removeFavorite({ - id: id + id: id, + type: 'store' }).then(res => { this.$u.toast(res.message); if(res.errCode == 0) { @@ -59,6 +62,11 @@ export default { } }) }, + toDetailsPage(id) { + this.$u.route('pageC/merchant/index', { + id: id + }); + }, open(index) { // 先将正在被操作的swipeAction标记为打开状态,否则由于props的特性限制, // 原本为'false',再次设置为'false'会无效 diff --git a/pages.json b/pages.json index 99adf7c..b26be16 100644 --- a/pages.json +++ b/pages.json @@ -301,23 +301,28 @@ { "path": "merchant/index", "style": { + "enablePullDownRefresh": true, "app-plus": { "titleSize": "36px", "titleNView": { "titleColor": "#333333", "backgroundColor": "rgba(255,255,255,0)", "buttons": [ - { - "type":"none", - "text":"...", - "float":"right", - "fontSize":"16" - }, + // { + // "type":"none", + // "text":"\ue62b", + // "float":"right", + // "fontSize":"20", + // "fontSrc": "/static/fonts/more.ttf", + // "color": "#FFFFFF" + // }, { "type":"none", - "text":"\ue582", + "text":"\ue636", "float":"right", - "fontSize":"16" + "fontSize":"22", + "fontSrc": "/static/fonts/cart.ttf", + "color": "#FFFFFF" } ], "searchInput": { @@ -345,6 +350,32 @@ } } }, + { + "path": "merchant/storeClassify", + "style": { + "navigationBarTitleText": "商品分类", + "app-plus": { + "titleSize": "36px", + "titleNView": { + "titleColor": "#333333", + "backgroundColor": "#FFFFFF" + } + } + } + }, + { + "path": "merchant/classifyGoods", + "style": { + "navigationBarTitleText": "", + "app-plus": { + "titleSize": "36px", + "titleNView": { + "titleColor": "#333333", + "backgroundColor": "#FFFFFF" + } + } + } + }, { "path": "cart/ConfirmOrder", "style": { diff --git a/pages/mine/index.vue b/pages/mine/index.vue index 8c5f496..cb68eba 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -22,8 +22,8 @@ + @@ -248,8 +248,8 @@ export default { box-sizing: border-box; padding: 0 30rpx; display: flex; - justify-content: space-around; - // justify-content: flex-start; + // justify-content: space-between; + justify-content: flex-start; > view { margin-right: 80rpx; text-align: center; diff --git a/static/fonts/more.ttf b/static/fonts/more.ttf new file mode 100644 index 0000000..025b581 Binary files /dev/null and b/static/fonts/more.ttf differ diff --git a/static/image/shop/10.png b/static/image/shop/10.png new file mode 100644 index 0000000..8d35be7 Binary files /dev/null and b/static/image/shop/10.png differ diff --git a/static/image/shop/11.png b/static/image/shop/11.png new file mode 100644 index 0000000..a44930c Binary files /dev/null and b/static/image/shop/11.png differ diff --git a/static/image/shop/12.png b/static/image/shop/12.png new file mode 100644 index 0000000..982b65c Binary files /dev/null and b/static/image/shop/12.png differ diff --git a/static/image/shop/13.png b/static/image/shop/13.png new file mode 100644 index 0000000..16ea712 Binary files /dev/null and b/static/image/shop/13.png differ diff --git a/static/image/shop/8.png b/static/image/shop/8.png new file mode 100644 index 0000000..7d485e5 Binary files /dev/null and b/static/image/shop/8.png differ diff --git a/static/image/shop/9.png b/static/image/shop/9.png new file mode 100644 index 0000000..47c6e56 Binary files /dev/null and b/static/image/shop/9.png differ