From 9a209d8c3229b99a7d229593aa07a557367665bd Mon Sep 17 00:00:00 2001 From: meo <18801474720@163.com> Date: Fri, 17 May 2019 14:20:35 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=95=86=E6=88=B7=E5=88=97=E8=A1=A8][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9]:[=E5=95=86=E6=88=B7=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E4=BC=98=E6=83=A0=E4=BF=A1=E6=81=AF=E4=BF=AE=E6=94=B9]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/coupons/index.js | 25 ++++- components/coupons/index.wxml | 35 +++++-- components/coupons/index.wxss | 119 ++++++++++++++++++------ pages/coupon/detail/index.js | 2 - pages/getuserinfo/index.js | 2 - pages/index/searchbar/detail/index.js | 10 +- pages/index/searchbar/detail/index.wxml | 18 ++-- pages/index/searchbar/detail/index.wxss | 38 ++++---- pages/rushToBuy/index.js | 2 - 9 files changed, 174 insertions(+), 77 deletions(-) diff --git a/components/coupons/index.js b/components/coupons/index.js index c40b1f7..cd326e6 100644 --- a/components/coupons/index.js +++ b/components/coupons/index.js @@ -5,6 +5,7 @@ Component({ */ properties: { paramAtoB: String, + from: String, data: { value: {}, type: Object @@ -16,6 +17,26 @@ Component({ */ data: {}, methods: { - + gotoDetail(e) { + console.log(e.currentTarget.dataset.couponid); + console.log(e.currentTarget.dataset.title); + console.log(e.currentTarget.dataset.id); + let couponId = e.currentTarget.dataset.couponid; + let title = e.currentTarget.dataset.title; + let id = e.currentTarget.dataset.id; + let targetAd = e.currentTarget.dataset.targetad; + if (targetAd) { + + } + if (id && targetAd != 7) { + wx.navigateTo({ + url: `/pages/coupon/detail/index?couponChannelId=${id}&couponId=${couponId}&title=${title}`, + }) + } else if (targetAd == 7) { + wx.navigateTo({ + url: `/pages/spellGroup/mySpellGroup/index?couponChannelId=${id}&couponId=${couponId}&title=${title}`, + }) + } + } } -}); +}); \ No newline at end of file diff --git a/components/coupons/index.wxml b/components/coupons/index.wxml index c1e332f..cde635a 100644 --- a/components/coupons/index.wxml +++ b/components/coupons/index.wxml @@ -1,6 +1,18 @@ - + + + + + + + + + 限时券 + 砍价券 + 拼团券 + 消费卡 + @@ -9,7 +21,11 @@ {{data.subTitle}} - {{data.salePriceStr}} + {{data.salePriceStr}} + 抢购价{{data.salePriceStr}} + 可砍至{{data.salePriceStr}} + 拼团价{{data.salePriceStr}} + {{data.priceStr}}元 {{data.priceStr}}小时 @@ -17,21 +33,20 @@ {{data.priceStr}}元 - {{data.priceStr}}小时 - + {{data.priceStr}}小时 - - 免费领 - 马上购 + 免费领 + 购买 + 去抢购 + 去砍价 + 去拼团 已售罄 已下架 - - + \ No newline at end of file diff --git a/components/coupons/index.wxss b/components/coupons/index.wxss index f148a33..4c4f8ce 100644 --- a/components/coupons/index.wxss +++ b/components/coupons/index.wxss @@ -1,10 +1,12 @@ @import "../../app.wxss"; + .coupons { + position: relative; width: 335rpx; display: inline-block; - position: relative; - + overflow: hidden; } + .coupons-border { height: 1rpx; left: 30rpx; @@ -14,7 +16,6 @@ bottom: 0; } - .coupons-img { border-radius: 10rpx; } @@ -30,13 +31,13 @@ .coupons-info { width: 335rpx; height: 152rpx; - border-radius:0rpx 0rpx 10rpx 10rpx; + border-radius: 0rpx 0rpx 10rpx 10rpx; background: #fff; } .coupons-info-name { font-size: 28rpx; - color: #333333; + color: #333; letter-spacing: 0; line-height: 38rpx; } @@ -53,17 +54,19 @@ .coupons-info-price-p { display: block; font-size: 50rpx; - color: #FF4949; -} -.price{ - font-size:34rpx; - font-family:PingFang-SC-Bold; - font-weight:bold; - color:rgba(255,50,50,1); - line-height:44rpx; + color: #ff4949; +} + +.price { + font-size: 34rpx; + font-family: PingFang-SC-Bold; + font-weight: bold; + color: rgba(255, 50, 50, 1); + line-height: 44rpx; margin-left: 16rpx; padding-top: 16rpx; } + .tit { overflow: hidden; white-space: nowrap; @@ -108,7 +111,6 @@ } .coupons-btn-gm { - background: #AF6E34 !important; border-radius: 10px 0px 5px 0px !important; margin: 0 !important; padding: 0 !important; @@ -118,6 +120,7 @@ height: 51rpx !important; width: 100rpx !important; line-height: 51rpx !important; + background: #af6e34 !important; } .coupons-btn-gms { @@ -138,7 +141,7 @@ .subtitle { font-size: 24rpx; - color: #999999; + color: #999; overflow: hidden; height: 24rpx; padding-left: 10rpx; @@ -153,7 +156,7 @@ font-size: 20rpx; line-height: 34rpx; display: inline-block; - color: #FF4949; + color: #ff4949; letter-spacing: 0; } @@ -169,23 +172,28 @@ width: 300rpx; margin-top: 16rpx; } -.coupons-info-manjian text{ + +.coupons-info-manjian text { display: block; line-height: 20rpx; } -.coupons-info-manjian > text:nth-of-type(1){ + +.coupons-info-manjian > text:nth-of-type(1) { display: block; /* color: #FF4949; */ - opacity: .6; + opacity: 0.6; } -.view01{ - text-decoration:line-through; - color: #999999 !important; + +.view01 { + text-decoration: line-through; + color: #999 !important; } -.txt2{ + +.txt2 { display: block; color: #ccc; } + /**上拉加载更多**/ .userinfo { @@ -247,13 +255,70 @@ scroll-view { font-size: 26rpx; line-height: 15rpx; } -.navigator-hover{ - opacity: 1!important; + +.navigator-hover { + opacity: 1 !important; background: #fff; } -navigator{ +.hover{ + opacity: .6; +} +.navigator { display: inline-block; } -navigator:nth-of-type(2n+1){ + +.navigator:nth-of-type(2n+1) { + margin-right: 10rpx; +} + +.superscript { + position: absolute; + top: -10rpx; + left: -12rpx; + width: 86rpx; + height: 86rpx; + overflow: hidden; +} + +/* 使用背景色渐变 */ + +.superscript .gradual { + width: 100%; + height: 100%; + background: linear-gradient(135deg, #31b968 50%, transparent 50%); +} + +/* 使用三角形 */ + +.superscript .triangle { + width: 0; + height: 0; + border-top: 130rpx solid #31b968; + border-right: 130rpx solid transparent; +} + +/* 使用矩形旋转, 和父节点的 overflow:hidden 配合 */ + +.superscript .rect { + width: 176rpx; + height: 183rpx; + margin: -91rpx 0 0 -91rpx; + transform: rotateZ(45deg); +} + +.superscript .desc { + position: absolute; + top: 29%; + left: 16%; + z-index: 1; + color: #fff; + font-size: 23rpx; + transform: rotate(-45deg); +} + +.saleprice { + font-size: 24rpx; + display: inline-block; margin-right: 10rpx; + font-weight: 400; } diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index d2e98ae..31070c6 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -369,8 +369,6 @@ Page({ * 获取用户信息 */ onLoad(options) { - console.log(options) - debugger let that = this; wx.showLoading({ title: "加载中..." diff --git a/pages/getuserinfo/index.js b/pages/getuserinfo/index.js index 39881ea..bd672dd 100755 --- a/pages/getuserinfo/index.js +++ b/pages/getuserinfo/index.js @@ -13,8 +13,6 @@ Page({ }, onLoad: function(options) { var that = this; - console.log(options) - debugger if (options && options.spellGroup){ that.setData({ spellGroup: options.spellGroup diff --git a/pages/index/searchbar/detail/index.js b/pages/index/searchbar/detail/index.js index 152f14a..5d0bc7a 100644 --- a/pages/index/searchbar/detail/index.js +++ b/pages/index/searchbar/detail/index.js @@ -19,12 +19,10 @@ Page({ imglist: null, shopVoList: [], couponList: [], //活动劵列表 - data: { - currentTab: 0, - isshare: false, - showpost: false, - imgHeight: 0, - }, + currentTab: 0, + isshare: false, + showpost: false, + imgHeight: 0, id: null, windowWidth: 0, windowHeight: 0, diff --git a/pages/index/searchbar/detail/index.wxml b/pages/index/searchbar/detail/index.wxml index 2761dd7..f3798e9 100644 --- a/pages/index/searchbar/detail/index.wxml +++ b/pages/index/searchbar/detail/index.wxml @@ -1,4 +1,3 @@ - @@ -50,7 +49,7 @@ - + 优惠信息 @@ -61,7 +60,7 @@ - + @@ -80,7 +79,6 @@ 信息完善中,敬请期待。 - - + - - - - - + + + + + diff --git a/pages/index/searchbar/detail/index.wxss b/pages/index/searchbar/detail/index.wxss index 917ab1e..9fadf24 100644 --- a/pages/index/searchbar/detail/index.wxss +++ b/pages/index/searchbar/detail/index.wxss @@ -44,12 +44,11 @@ } .merchant-detail { - width: 92%; - padding: 30rpx 4% 0; + width: 100%; + padding: 30rpx 0 0; background: #fff; border-top-left-radius: 20rpx; border-top-right-radius: 20rpx; - margin-top: -25rpx; } .merchant-brand, .merchant-shop, .merchant-phone { @@ -61,15 +60,15 @@ } .merchant-brand view:nth-child(1) { - width: 160rpx; + width: 130rpx; border-radius: 16rpx; - height: 160rpx; + height: 130rpx; } .merchant-brand view:nth-child(1) image { display: block; - width: 160rpx; - height: 160rpx; + width: 130rpx; + height: 130rpx; border-radius: 16rpx; border: 1px solid #e5e5e5; } @@ -106,9 +105,11 @@ } .merchant-phones { + border-top:8px solid #efefef; padding: 20rpx 0; display: block; font-size: 30rpx; + background: linear-gradient(0deg, rgba(235, 235, 235, 1) 0%, rgba(255, 255, 255, 0.8) 100%); } .tel { @@ -149,8 +150,13 @@ .merchant-brand { border: none !important; + width: 92%; + margin: 0 auto; +} +.merchant-shop,.merchant-phone{ + width: 92%; + margin: 0 auto; } - .tabs-item.selected { color: rgba(171, 149, 109, 0.8); border-bottom: 2px solid rgba(171, 149, 109, 0.8); @@ -173,7 +179,7 @@ flex-flow: row; height: 88rpx; line-height: 88rpx; - margin-bottom: 40rpx; + margin-bottom: 30rpx; } .swiper-tab-item { @@ -183,8 +189,8 @@ } .active-tab { - color: #1693fc; - border-bottom: 10rpx solid #1693fc; + color: #af6e34; + border-bottom: 6rpx solid #af6e34; } .fenxiang { @@ -193,7 +199,9 @@ top: 27rpx; width: 108rpx; } - +.merchant-phones{ + padding: 0 4%; +} .fenxiang image { width: 108rpx; position: absolute; @@ -244,12 +252,10 @@ } .swiperactive { - min-height: 300rpx; - margin-bottom: 20rpx; + min-height: 400rpx; + padding-bottom: 44rpx; } -/* modal */ - .modal { width: 100%; height: 100%; diff --git a/pages/rushToBuy/index.js b/pages/rushToBuy/index.js index 04070ae..02fffb5 100644 --- a/pages/rushToBuy/index.js +++ b/pages/rushToBuy/index.js @@ -75,8 +75,6 @@ Page({ that.setData({ list: tmpArr }) - console.log(that.data.list,222) - // debugger for (let i = page*8-8; i < that.data.list.length; i++) { var startTime = util.formatTime(that.data.list[i].endTime, "yyyy-MM-dd hh:mm:ss"); var beginTimes = util.formatTime(that.data.list[i].beginTime, "yyyy-MM-dd hh:mm:ss");