From 94dd68ab6e69d0eeccafb38e18fffea3d490d53c Mon Sep 17 00:00:00 2001 From: yvan.ni <765199919@qq.com> Date: Mon, 23 Sep 2019 14:30:34 +0800 Subject: [PATCH] 收藏列表 --- pages/user/collect_list/collect_list.js | 304 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------- pages/user/collect_list/collect_list.json | 5 ++++- pages/user/collect_list/collect_list.wxml | 183 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- pages/user/collect_list/collect_list.wxss | 465 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 907 insertions(+), 50 deletions(-) diff --git a/pages/user/collect_list/collect_list.js b/pages/user/collect_list/collect_list.js index fcd4668..4e5ec32 100644 --- a/pages/user/collect_list/collect_list.js +++ b/pages/user/collect_list/collect_list.js @@ -1,56 +1,268 @@ var t = function(t) { return t && t.__esModule ? t : { - default: t + default: t }; -}(require("../../../utils/LoadMore.js")), e = getApp(), a = e.request, o = new t.default(); -var oo = e.globalData.setting, app_d = e.globalData; + }(require("../../../utils/LoadMore.js")), + e = getApp(), + a = e.request, + o = new t.default(); +var oo = e.globalData.setting, + app_d = e.globalData; Page({ - data: { - url: e.globalData.setting.imghost, - resourceUrl: e.globalData.setting.resourceUrl, - iurl: e.globalData.setting.imghost, - collects: null, - currentPage: 1 - }, - onLoad: function() { - o.init(this, "", "collects"), this.requestCollectList(); - }, - requestCollectList: function() { - var t = this, e = "/api/weshop/goodscollect/list?pageSize=10&user_id=" - +app_d.user_id+"&store_id=" + oo.stoid+"&page=" + t.data.currentPage; - o.request(e, function(e) { - console.log("requestCollectList"); - console.log(e); - t.data.currentPage++; + data: { + url: e.globalData.setting.imghost, + resourceUrl: e.globalData.setting.resourceUrl, + iurl: e.globalData.setting.imghost, + collects: null, + currentPage: 1, + curpage: 1, + collects_Recommend: [], + ismore: 0, + iscollects: 0, + loadName: null, + editEd: 0, //商品编辑按钮是否点击 + isall: false, //是否全选 + sum: 0, + total_collects:0, + total_goods:0, + pageSize:8,//分页数量 + }, + onLoad: function() { + o.init(this, "", "collects"), + this.requestCollectList(); + // this.requestList(); + }, + requestCollectList: function() { + isShowLoading: 0; + var th = this; + 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) + th.setData({ iscollects: 1, total_collects:e.data.data.total}) + + if (th.data.total_collects + + + + + + + 当前暂无收藏 + + + 去首页逛逛 + + + + + + + + + 共{{collects.length}}件商品 + {{editEd?'完成':'编辑'}} + + + + + + + + + + + + + + + + + + {{item.goods_name}} + + + + + + + + + {{item.shop_price}} + + + + 零售价: + ¥{{item.market_price}} + + + + + + 找相似 + + + + + + + + + + + + + + + + + + + + + + + + + 好物推荐 + + + + + + + + + + + + + + {{item.goods_name}} + + + + + + {{item.shop_price}} + + + + + {{item.market_price}} + + + + + + + + + {{loadName}} + + + + + + 没有更多内容了 + + + + + + + + + + + + + + + + + + 全选 + + + + 已选 + {{sum>0?sum:'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 0e86f34..f681d96 100644 --- a/pages/user/collect_list/collect_list.wxss +++ b/pages/user/collect_list/collect_list.wxss @@ -1,4 +1,4 @@ -.collect-ul { +/* .collect-ul { width: 100%; background-color: #f0f2f5; } @@ -46,4 +46,465 @@ border-radius: 5rpx; color: #686868; font-size: 30rpx; -} \ No newline at end of file +} */ + +page { + width: 100%; + background-color: rgb(245, 245, 245); + overflow-x: hidden; +} + +.Collection { + overflow-x: hidden; +} + +/* vip开卡框架 */ + +.vip { + width: 100%; + height: 70rpx; + background-color: rgb(250, 242, 219); + font-size: 25rpx; + padding: 0rpx 31rpx; +} + +.vip .vip_image { + width: 40rpx; + height: 40rpx; + background-color: rgb(55, 45, 13); + border-radius: 50%; + line-height: 70rpx; +} + +.vip .vip_image image { + width: 25rpx; + height: 25rpx; + line-height: 70rpx; +} + +.vip .vip_describe { + width: 502prx; + margin-left: 20rpx; + padding-right: 172rpx; + line-height: 70rpx; + border-right: 4rpx solid #000; + height: 25rpx; +} + +.vip .vip_describe .vip_province_money { + color: rgb(254, 0, 0); +} + +.vip .vip_card { + margin-left: 17rpx; + line-height: 70rpx; +} + +.vip .vip_card .vip_go_image { + margin-left: 10rpx; +} + +.vip .vip_card .vip_immediately { + color: rgb(56, 47, 14); +} + +.vip .vip_card .vip_go_image image { + width: 35rpx; + height: 35rpx; +} + +.commodity { + width: 100%; +} + +/* 无收藏样式 */ + +.noCollection image { + width: 329rpx; + height: 229rpx; + margin-top: 202rpx; +} + +.noCollection .xc-ash { + margin-top: 41rpx; + font-weight: 600px; +} + +.noCollection navigator { + margin-top: 73rpx; + border-radius: 40rpx; +} + +.noCollection navigator view { + width: 247rpx; + height: 56rpx; + background-color: rgb(255, 72, 72); + border-radius: 40rpx; +} + +/* 商品详情 */ + +.commodity .sum { + font-size: 25rpx; + height: 70rpx; + background-color: rgb(245, 245, 245); + padding-left: 31rpx; + color: rgb(131, 131, 131); +} + +.commodity .sum view { + height: 100%; + letter-spacing: 1rpx; +} + +.commodity .sum .editEd { + width: 100rpx; + padding-right: 31rpx; +} + +.colls_max { + padding-left: 30rpx; +} + +.commodity .collects_max .collect { + width: 100%; + height: 244rpx; + border-bottom: 4rpx solid rgb(245, 245, 245); + background-color: rgb(255, 255, 255); + padding-right: 31rpx; +} + +.commodity .collects_max .collect .collect_image { + height: 183rpx; + width: 183rpx; + margin-left: 31rpx; +} + +.commodity .collects_max .collect .iconrp { + margin-left: 0rpx; +} + +.commodity .collects_max .collect .collect_image image { + width: 100%; + height: 100%; +} + +.commodity .collects_max .collect .attribute { + line-height: 68rpx; + height: 183rpx; + margin-left: 21rpx; +} + +.commodity .collects_max .collect .attribute .attribute_name { + height: 68rpx; + align-items: center; + width: 474rpx; +} + +.commodity .collects_max .collect .attribute .attribute_name .name { + line-height: 35rpx; +} + +.commodity .collects_max .collect .attribute .attribute_money { + margin-top: 60rpx; + display: flex; + justify-content: space-between; + height: 50rpx; + align-items: flex-end; +} + +.commodity .collects_max .money_left { + height: 54rpx; +} + +.commodity .collects_max .collect .attribute .attribute_money .money_left .price { + font-weight: 1000rpx; + color: rgb(212, 28, 52); + margin-right: 10rpx; + align-items: baseline; +} + +.commodity .collects_max .collect .attribute .attribute_money .money_right { + align-items: flex-end; + padding-bottom: 1rpx; +} + +.commodity .collects_max .collect .attribute .attribute_money .money_right .similar { + width: 90rpx; + height: 29rpx; + border-radius: 21rpx; + border: 1rpx solid rgb(147, 147, 147); + font-size: 18rpx; + margin-right: 22rpx; + color: rgb(89, 89, 89); + align-items: center; +} + +.commodity .collects_max .collect .attribute .attribute_money .money_right view { + height: 27rpx; + line-height: 27rpx; +} + +.commodity .collects_max .collect .attribute .attribute_money .money_right image { + width: 25rpx; + height: 29rpx; + margin-right: 10rpx; + margin-bottom: 1rpx; +} + +.line { + align-items: baseline; +} + +.title .collect { + background-color: rgb(255, 255, 255); +} + +/* 热门好物 */ + +/* .title .China { + width: 100%; + margin-top: 50rpx; + margin-bottom: 10rpx; + line-height: 0rpx; +} + +.title .China .lin view { + width: 2rpx; +} + +.title .China .le { + height: 40rpx; + color: rgb(51,51, 51); +} + +.title .China .line .one { + height: 23rpx; + background-color: #000; + margin-left: 5rpx; +} + +.title .China .line .two { + height: 15rpx; + background-color: #000; + margin-left: 5rpx; +} + +.title .China .line .three { + height: 18rpx; + background-color: #000; + margin-left: 5rpx; +} + +.title .China .Recommend { + margin: 0rpx 20rpx; + font-size: 28rpx; + line-height: 39rpx; + font-weight: bold; +} + +.title .english .silk { + width: 214rpx; + height: 2rpx; + background-color: #000; +} + +.title .english .esh { + margin: 0rpx 15rpx; +} */ + +/* .collects { + margin-top: 40rpx; +} */ + +.Recommend { + height: 95rpx; + padding-top: 7rpx; +} + +.Recommend .lin { + width: 210rpx; + height: 2rpx; + background-color: rgb(167, 167, 167); +} + +.Recommend .flex-center { + margin: 0 20rpx; + color: rgb(51, 51, 51); + font-weight: bold; +} + +.Recommend .flex-center image { + margin-right: 5rpx; + width: 32rpx; + height: 29rpx; +} + +.hang { + width: 100%; + margin: auto; + padding-left: 31rpx; +} + +.hang .collect { + width: 335rpx; + height: 503rpx; + border-radius: 23rpx; + border: 1rpx solid rgb(214, 214, 214); + overflow: hidden; + margin-right: 14rpx; + margin-bottom: 10rpx; +} + +.collect .bottom { + padding: 0rpx 16rpx; +} + +.collect .bottom .goods_name { + height: 68rpx; +} + +.collect .sp { + width: 100%; + height: 315rpx; +} + +.collect .money { + margin-top: 40rpx; + line-height: 28rpx; + align-items: baseline; +} + +.collect .money view { + display: flex; + align-items: baseline; + font-weight: 1000rpx; +} + +.collect .Discount { + width: 156rpx; + height: 28rpx; + border-radius: 20rpx; + background-color: rgb(56, 56, 56); + font-size: 18rpx; + color: rgb(255, 255, 255); +} + +.collect .Discount image { + height: 18rpx; + width: 18rpx; + line-height: 28rpx; + margin-right: 3rpx; +} + +.collect.ml20 { + margin-left: 13rpx; +} + +.fs24.dollar { + padding: 0rpx; +} + +.through { + text-decoration: line-through; + color: rgb(155, 155, 155); + margin-left: 7rpx; +} + +.money .price { + margin-left: 12rpx; + text-decoration: line-through; +} + +.money .price view { + display: flex; + align-items: flex-end; +} + +.province { + line-height: 28rpx; +} + +.nothing { + height: 75rpx; + width: 100%; +} + +.nothing .no_content { + margin: 0rpx 11rpx; + color: rgb(138, 138, 138); +} + +.nothing .Foil { + width: 80rpx; + height: 2rpx; + background-color: rgb(138, 138, 138); +} + +.iconUn { + margin-left: 15rpx; + margin-right: 21rpx; + transform: scale(1.0); +} + +.Un { + margin-left: 0rpx; +} + +.iconClick { + margin-left: 21rpx; + margin-right: 16rpx; +} + +.radioCheck { + height: 100%; + display: flex; + align-items: center; + width: 65rpx; + justify-content: center; +} + +.scale { + transform: scale(0.8); +} + +.load { + width: 100%; + height: 80rpx; + padding: 0rpx 31rpx; +} + +.abs { + position: fixed; + left: 0rpx; + bottom: 0rpx; + height: 100rpx; + background-color: rgb(255, 255, 255); + width: 100%; +} + +.abs .left { + display: flex; + justify-content: space-between; + width: 515rpx; + padding-left: 31rpx; +} + +.abs .allClick { + margin-left: 31rpx; +} + +.abs icon { + margin-right: 31rpx; +} + +.abs .delete { + width: 235rpx; + height: 100%; + background-color: rgb(219, 27, 52); +} + +.abs .Number { + margin-right: 18rpx; + letter-spacing: 0rpx; +} -- libgit2 0.21.4