From 5cb4378e81c2f1e5854090e2586fa8d296c08224 Mon Sep 17 00:00:00 2001 From: yvan.ni <765199919@qq.com> Date: Thu, 26 Sep 2019 19:51:21 +0800 Subject: [PATCH] 商品详情,收藏 --- pages/goods/goodsInfo/goodsInfo.js | 47 +++++++++++++++++++++++------------------------ pages/user/collect_list/collect_list.js | 165 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------- pages/user/collect_list/collect_list.wxml | 73 +++++++++++++++++++++++++++---------------------------------------------- pages/user/collect_list/collect_list.wxss | 19 ++++++++++--------- 4 files changed, 154 insertions(+), 150 deletions(-) diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index d565aaf..79a85d6 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -2787,23 +2787,8 @@ close_popup:function(e){ //确定def_pick为选择的门店 sure_pick:function (e) { var th=this; var item=null; - var openindstore = e.currentTarget.dataset.openindstore; - if (openindstore == 1) { - - th.setData({ - openSpecModal: !0, - openSpecModal_ind: openindstore, }); - } else if (openindstore == 2) { - - th.setData({ - openSpecModal: !0, - openSpecModal_ind: openindstore, }); - } else { - - th.setData({ - store: 0, choice_sort_store: 0, sort_store: 0 - }) - } + var openindstore = e.currentTarget.dataset.openindstore; + if(th.data.choice_sort_store==0 ){ var index=th.data.fir_pick_index; if(th.data.is_show_sto_cat==1){ @@ -2811,13 +2796,31 @@ close_popup:function(e){ }else{ item=th.data.only_pk[index]; //当没有门店分类的时候 } + }else{ var index=th.data.sec_pick_index; item=th.data.sec_sto.s_arr[index]; } - console.log("选择门店刷新","def_pick_store",item); - th.setData({def_pick_store:item,sto_sele_name:item.pickup_name, - sto_sele_id:item.pickup_id,sto_sele_distr:item.distr_type,store:0,choice_sort_store:0}); + + //th.setData({fir_pick_index:0}); + console.log("选择门店刷新","def_pick_store",item); + th.setData({def_pick_store:item,sto_sele_name:item.pickup_name, + sto_sele_id:item.pickup_id,sto_sele_distr:item.distr_type,store:0,choice_sort_store:0, fir_pick_index:0}); + + if (openindstore == 1) { + th.setData({ + openSpecModal: !0, + openSpecModal_ind: openindstore, }); + } else if (openindstore == 2) { + th.setData({ + openSpecModal: !0, + openSpecModal_ind: openindstore, }); + } else { + th.setData({ + store: 0, choice_sort_store: 0, sort_store: 0 + }) + } + }, //---点击二级之后的选择--- choose_for_store: function (e) { @@ -2834,18 +2837,14 @@ close_popup:function(e){ var index=th.data.fir_pick_index; if(th.data.is_show_sto_cat==1){ - item=th.data.def_pickpu_list[index]; - }else{ - item=th.data.only_pk[index]; //当没有门店分类的时候 } }else{ var index=th.data.sec_pick_index; item=th.data.sec_sto.s_arr[index]; - } var store_id=o.stoid; diff --git a/pages/user/collect_list/collect_list.js b/pages/user/collect_list/collect_list.js index 61b7b0f..0cc324b 100644 --- a/pages/user/collect_list/collect_list.js +++ b/pages/user/collect_list/collect_list.js @@ -17,48 +17,57 @@ Page({ collects: null, currentPage: 1, curpage: 1, - ismore: 0, iscollects: 0, - editEd: 0, //商品编辑按钮是否点击 isall: false, //是否全选 sum: 0, - total_collects:0, - is_goods:0, - pageSize:8,//分页数量 + total_collects: 0, + is_goods: 0, + pageSize: 8, //分页数量 + isdelete: 0 }, onLoad: function() { o.init(this, "", "collects"), - this.requestCollectList(); - // this.requestList(); + this.requestCollectList(); }, requestCollectList: function() { var th = this; - e = "/api/weshop/goodscollect/list?" + "pageSize=" + th.data.pageSize +"&user_id=" + + e = "/api/weshop/goodscollect/list?" + "pageSize=" + th.data.pageSize + "&user_id=" + app_d.user_id + "&store_id=" + oo.stoid + "&page=" + th.data.currentPage; - o.request(e, function(e) { - th.data.currentPage++; - if(th.data.total_collects==0){ - th.setData({ iscollects: 1, total_collects:e.data.data.total}) - } - if (th.data.total_collects - - - - - - {{item.goods_name}} - - ¥{{item.shop_price}} - 删除 - 看相似 - - - - - - 没有相关的数据 - 去逛逛 - - --> - + 当前暂无收藏 @@ -38,18 +17,19 @@ 共{{total_collects}}件商品 - {{editEd?'完成':'编辑'}} - + {{editEd==1?'完成':'编辑'}} + - + + - + @@ -74,11 +54,11 @@ - - + + 找相似 - + @@ -86,24 +66,25 @@ - - + + + - - - - - - - 好物推荐 - - - - - + + + + + + + 好物推荐 + + + + + @@ -120,9 +101,9 @@ {{sum>0?sum:'0'}} 件 - - 删除 + + {{isdelete==0?'删除':'删除中'}} - + \ No newline at end of file diff --git a/pages/user/collect_list/collect_list.wxss b/pages/user/collect_list/collect_list.wxss index f681d96..0c1362f 100644 --- a/pages/user/collect_list/collect_list.wxss +++ b/pages/user/collect_list/collect_list.wxss @@ -230,19 +230,18 @@ page { } .commodity .collects_max .collect .attribute .attribute_money .money_right .similar { - width: 90rpx; - height: 29rpx; + width: 97rpx; + height: 30rpx; border-radius: 21rpx; - border: 1rpx solid rgb(147, 147, 147); - font-size: 18rpx; + border: 1rpx solid rgb(162, 162, 162); margin-right: 22rpx; - color: rgb(89, 89, 89); + color: rgb(110,110, 110); align-items: center; } .commodity .collects_max .collect .attribute .attribute_money .money_right view { - height: 27rpx; - line-height: 27rpx; + height: 30rpx; + line-height: 30rpx; } .commodity .collects_max .collect .attribute .attribute_money .money_right image { @@ -318,7 +317,7 @@ page { } */ .Recommend { - height: 95rpx; + height: 80rpx; padding-top: 7rpx; } @@ -503,7 +502,9 @@ page { height: 100%; background-color: rgb(219, 27, 52); } - +.abs .Deleting{ + background-color: rgb(131, 131, 131); +} .abs .Number { margin-right: 18rpx; letter-spacing: 0rpx; -- libgit2 0.21.4