diff --git a/pages/main/index.js b/pages/main/index.js index db7e1dd..cb77c6c 100644 --- a/pages/main/index.js +++ b/pages/main/index.js @@ -7,6 +7,7 @@ let app = getApp(); Page({ data: { newUrl: "", + cover:"", usergift: imgurl.usergift.url, guanbi1: imgurl.guanbi1.url, icon0001: imgurl.icon0001.url, @@ -475,6 +476,7 @@ Page({ } }).then(res => { console.log(res); + that.data.cover = res.data.list[0].cover }) .catch(err => { console.log(err); diff --git a/pages/topicDetail/index.js b/pages/topicDetail/index.js new file mode 100644 index 0000000..6f17dbe --- /dev/null +++ b/pages/topicDetail/index.js @@ -0,0 +1,52 @@ +let config = require("../../config/config.js"); +let app = getApp(); +const Http = require("../../utils/HttpBasics"); +const util = require("../../utils/util"); +Page({ + data: { + data: {}, + couponId: null, + orderId: "", + day: "", + hour: "", + minute: "", + nodes: '' + }, + onLoad(options) { + let that = this; + if (options.id){ + Http.get({ + url: config.api.bannerDetail, + data: { + id: options.id + } + }).then(res => { + if(res.data.type==2){ + console.log(res.data.html,33333333) + // console.log(JSON.parse(res.data.html),222222222222) + that.setData({ + nodes: res.data.html + }) + } + that.setData({ + data: res.data + }); + }).catch(err => { + wx.showToast({ + title: err.errMsg, + icon: 'none', + duration: 2000, + mask: false + }); + }) + } + }, + gotoactdetail:function(){ + let that = this; + console.log(that.data.data.detail) + + wx.navigateTo({ + url: `/pages/actdetail/actdetail?detail=${that.data.data.detail}`, + }) + } +}); diff --git a/pages/topicDetail/index.json b/pages/topicDetail/index.json new file mode 100644 index 0000000..9fabb8c --- /dev/null +++ b/pages/topicDetail/index.json @@ -0,0 +1,3 @@ +{ + "navigationBarTitleText": "活动详情" +} \ No newline at end of file diff --git a/pages/topicDetail/index.wxml b/pages/topicDetail/index.wxml new file mode 100644 index 0000000..026d8a1 --- /dev/null +++ b/pages/topicDetail/index.wxml @@ -0,0 +1,62 @@ + + + + + + + {{data.title}} + {{data.subTitle}} + + 活动说明 + {{data.detail}} + + + + + + + + + + + + + + + + + {{item.title}} + {{item.subTitle}} + + {{item.salePriceStr}} + + 满¥{{item.usePriceStr}}可用 + + + 仅限本店使用 + + + + + + + + 免费领 + 马上购 + + + + + + \ No newline at end of file diff --git a/pages/topicDetail/index.wxss b/pages/topicDetail/index.wxss new file mode 100644 index 0000000..acab8d0 --- /dev/null +++ b/pages/topicDetail/index.wxss @@ -0,0 +1,542 @@ +@import "../../app.wxss"; + +page { + background: #eee; +} + +.coupons { + width: 100%; + position: relative; +} + +.coupons-body { + flex: 1; + /* overflow: auto; */ +} + +.banner { + position: relative; + width: 750rpx; + height: 280rpx; + overflow: hidden; +} + +.banner image { + width: 750rpx; + height: 280rpx; +} + +.act { + position: relative; + z-index: 1000000000; + background: #fff; + border-radius: 12rpx; + width: 705rpx; + /* height: 212rpx; */ + margin: 24rpx auto 0; + padding-bottom: 20rpx; +} + +.act text { + display: block; + padding-left: 4.8%; + padding-right: 4.8%; +} + +.txt001 { + display: block; + font-size: 34rpx; + color: #363636; + letter-spacing: 0; + text-align: left; + line-height: 48rpx; + padding-top: 3.2%; +} + +.txt002 { + font-size: 24rpx; + color: #999; + letter-spacing: 0; + text-align: left; + line-height: 33rpx; +} + +.proct { + position: relative; + /* height: 60rpx; */ + margin-top: 20rpx; +} + +.proct text:nth-of-type(1) { + display: block; + font-size: 30rpx; + color: #ff4949; + letter-spacing: 0; + line-height: 32rpx; + margin-bottom: 20rpx; + /* width: 60rpx; */ + /* height: 64rpx; */ +} + +.proct text:nth-of-type(2) { + display: block; + /* width: 498rpx; */ + /* height: 63rpx; */ + /* overflow: hidden; */ + word-wrap:break-word; + /* text-overflow: ellipsis; */ + font-size: 22rpx; + color: #6f6f6f; + letter-spacing: 0; + margin: 0 auto; +} + +.orbg { + position: absolute; + top: 256rpx; + z-index: 1000000; +} + +.banner text { + position: absolute; + right: 0; + top: 0; + bottom: 0; + margin: auto; + width: 122rpx; + height: 48rpx; + line-height: 48rpx; + opacity: 0.8; + background: #000; + font-size: 24rpx; + color: #fff; + letter-spacing: 0; + text-indent: 0.5em; + border-top-left-radius: 50rpx; + border-bottom-left-radius: 50rpx; +} + +.coupons_info { + width: 92%; + height: 120rpx; + display: flex; + justify-content: space-between; + padding: 0 4% 4%; + background: #fff; +} + +.coupons_info view { + display: flex; + flex-direction: column; +} + +.coupons_info view:nth-child(1) text { + font-size: 30rpx; + line-height: 32rpx; + margin-top: 10%; +} + +.coupons_info view:nth-child(1) text:nth-child(1) text { + color: #ff3434; + font-size: 24rpx; + border: 1px solid #ff3434; + border-radius: 6rpx; + margin-left: 2%; + padding: 0 5rpx; +} + +.coupons_info view:nth-child(1) text:nth-child(2), +.coupons_info view:nth-child(1) text:nth-child(3) { + color: #b8b8b8; + font-size: 24rpx; + margin-top: 4%; +} + +.coupons_info view:nth-child(1) text:nth-child(2) text, +.coupons_info view:nth-child(1) text:nth-child(3) text { + color: #ff3434; + font-size: 24rpx; +} + +.coupons_info view:nth-child(2) text:nth-child(1) { + font-size: 36rpx; + color: #ff3434; + margin-top: 40rpx; + font-weight: bold; +} + +.coupons_info view:nth-child(2) text:nth-child(2) { + font-size: 24rpx; + color: #b4b4b4; + text-decoration: line-through; + padding-left: 10rpx; + padding-top: 4rpx; +} + +navigator { + display: block; + margin-bottom: 24rpx; + width: 344rpx; +} + +.navigator-hover{ + opacity: 1!important; + background: #fff!important; + border-radius:16rpx; +} +.active{ + opacity: .6; +} +navigator:nth-of-type(2n) { + float: right; +} + +navigator:nth-of-type(2n+1) { + float: left; +} + +.contain { + padding: 24rpx 25rpx 0; +} + +.posi { + width: 92%; + display: flex; + flex-direction: column; + padding: 0 4%; + background: #fff; + margin-top: 2%; +} + +.posi>view:nth-child(2) { + width: 100%; + height: 87rpx; + display: flex; + justify-content: space-between; + border-top: 1px solid #f6f6f6; + line-height: 87rpx; +} + +.posi>view:nth-child(2) text:nth-child(1) { + font-size: 30rpx; + color: #a9a9a9; +} + +.posi>view:nth-child(2) text:nth-child(2) { + font-size: 30rpx; + color: #a9a9a9; +} + +.posi_logo { + width: 100%; + height: 156rpx; + display: flex; + margin-top: 30rpx; +} + +.posi_logo view:nth-child(1) { + width: 126rpx; + height: 126rpx; + border-radius: 50%; + overflow: hidden; + flex: 2; +} + +.posi_logo view:nth-child(1) image { + width: 100%; + height: 100%; +} + +.posi_logo view:nth-child(2) { + display: flex; + flex-direction: column; + flex: 8; + padding-top: 20rpx; + padding-left: 30rpx; +} + +.posi_logo view:nth-child(2) text:nth-child(1) { + font-size: 30rpx; +} + +.posi_logo view:nth-child(2) text:nth-child(2) { + font-size: 24rpx; + color: #b8b8b8; + padding-top: 10rpx; +} + +.notes view:nth-child(1) { + width: 92%; + height: 87rpx; + padding: 0 4%; + line-height: 87rpx; + background: #fff; + /* border-top: 1rpx solid #f5f5f5; */ +} + +.notes view:nth-child(1) text { + font-size: 30rpx; + font-weight: bold; +} + +.notes view:nth-child(2) { + width: 92%; + height: auto; + padding: 0 4% 4%; + background: #fff; + /* border-bottom: 1rpx solid #f5f5f5; */ + display: flex; + flex-direction: column; +} + +.notes view:nth-child(2)>text { + font-size: 28rpx; + color: #a9a9a9; + line-height: 45rpx; +} + +.spot { + width: 12rpx; + height: 12rpx; + display: inline-block; + background: #a9a9a9; + margin-right: 16rpx; + position: relative; + bottom: 4rpx; + border-radius: 50%; +} + +.buy-view { + background: #fff; + position: fixed; + padding-top: 10rpx; + height: 98rpx; + bottom: 0rpx; + left: 0; + right: 0; +} + +.buy { + display: block; + background: #ff4949; + border-radius: 30rpx; + height: 48rpx; + width: 112rpx; + margin: 0 auto; + color: #fff; + font-size: 26rpx; + line-height: 48rpx; + text-align: center; +} + +.coupons1-btn-gm { + background: #00c0ff !important; + border-radius: 10rpx !important; + margin: 0 !important; + padding: 0 !important; + font-family: PingFangSC-Semibold; + font-size: 28rpx; + color: #fff !important; + letter-spacing: 0; + height: 50rpx !important; + width: 138rpx !important; + line-height: 50rpx !important; +} + +.coupons1 { + position: relative; + background: #fff; + border-radius: 16rpx; + padding-bottom: 21rpx; + overflow: hidden; +} + +/* .coupons1-border { + height: 1rpx; + left: 30rpx; + right: 30rpx; + background: #f5f5f5; + position: absolute; + bottom: 0; +} */ + +.coupons1-img { + width: 344rpx; + height: 258rpx; + overflow: hidden; +} + +.coupons1-img image { + display: block; + width: 100%; + height: 100%; +} + +.coupons1-info { + padding-left: 20rpx; +} + +.coupons1-info-name { + font-size: 28rpx; + color: #000; + letter-spacing: 0; +} + +.i { + font-size: 20rpx; + font-style: normal; +} + +.coupons1-info-price-p { + display: inline-block; + font-size: 36rpx; + color: #f96563; + line-height: 50rpx; + margin-top: 21rpx; +} + +.tit { + font-size: 30rpx; + color: #000; + letter-spacing: 0; + line-height: 42rpx; + width: 270rpx; + height: 42rpx; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + padding-top: 16rpx; +} + +.coupons1-info-price-o { + display: block; + text-align: center; + font-size: 26rpx; + color: #b4b4b4; + letter-spacing: 0.96rpx; + text-decoration: line-through; + line-height: 24rpx; +} + +.coupons1-info-distance { + font-size: 22rpx; + color: #c0c0c0; + letter-spacing: 0; + padding-bottom: 10rpx; + line-height: 30rpx; +} + +.coupons1-info-address { + font-size: 22rpx; + color: #585858; + letter-spacing: 0; + line-height: 30rpx; +} + +.coupons1-btn { + position: absolute; + width: 120rpx; + bottom: 25rpx; + right: 13rpx; +} + +.coupons1-btn-gm { + background: #00c0ff !important; + border-radius: 10rpx !important; + margin: 0 !important; + padding: 0 !important; + font-family: PingFangSC-Semibold; + font-size: 28rpx; + color: #fff !important; + letter-spacing: 0; + height: 50rpx !important; + width: 138rpx !important; + line-height: 50rpx !important; +} + +.subtitle { + font-size: 24rpx; + font-weight: 100; + text-align: left; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + width: 300rpx; + color: #999; + letter-spacing: 0; +} + +.coupons1-info-manjian { + color: #fa7c7a; + font-size: 20rpx; + line-height: 34rpx; + display: inline-block; +} + +.jian { + width: 44rpx; + position: absolute; + bottom: 1.7%; + right: 3.5%; +} + +/**上拉加载更多**/ + +.userinfo { + display: flex; + flex-direction: column; + align-items: center; +} + +.userinfo-avatar { + width: 128rpx; + height: 128rpx; + margin: 20rpx; + border-radius: 50%; +} + +.userinfo-nickname { + color: #aaa; +} + +.sy { + display: block; + text-align: center; + width: 120rpx !important; + margin-top: 6rpx; +} + +.usermotto { + margin-top: 200px; +} + +/**/ + +scroll-view { + width: 100%; +} + +.item { + width: 90%; + height: 300rpx; + margin: 20rpx auto; + background: brown; + overflow: hidden; +} + +.item .img { + width: 430rpx; + margin-right: 20rpx; + float: left; +} + +.title { + font-size: 30rpx; + display: block; + margin: 30rpx auto; +} + +.description { + font-size: 26rpx; + line-height: 15rpx; +}