From 57b4387dd69b54e9990b2e9b9dd3ac705c3907d3 Mon Sep 17 00:00:00 2001 From: rui <1593038819@qq.com> Date: Thu, 1 Aug 2019 00:20:40 +0800 Subject: [PATCH] =?UTF-8?q?[=E9=A6=96=E9=A1=B5=EF=BC=8C=E9=99=90=E6=97=B6?= =?UTF-8?q?=E7=A7=92=E6=9D=80][=E4=BF=AE=E6=94=B9][=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E6=98=BE=E7=A4=BA=E5=AD=97=E6=AE=B5]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/bannerdetail/index.wxml | 5 ++--- pages/bannerdetail/index.wxss | 13 +++++++----- pages/main/index.js | 37 +++++++++++++++++++++++++++++++++-- pages/main/index.wxml | 15 ++++++++------ pages/main/index.wxss | 13 +++++++++++- pages/radetail/index.wxml | 5 ++--- pages/radetail/index.wxss | 1 + pages/topicDetail/index.wxml | 4 ++-- pages/topicDetail/index.wxss | 16 ++++++++------- wxParse/wxParse.wxss | 3 ++- 10 files changed, 82 insertions(+), 30 deletions(-) diff --git a/pages/bannerdetail/index.wxml b/pages/bannerdetail/index.wxml index 010516d..7f3b7a6 100644 --- a/pages/bannerdetail/index.wxml +++ b/pages/bannerdetail/index.wxml @@ -5,7 +5,8 @@ - + + {{data.title}} {{data.subTitle}} @@ -21,8 +22,6 @@ {{data.detail}} - - diff --git a/pages/bannerdetail/index.wxss b/pages/bannerdetail/index.wxss index cc84bb1..b373ba5 100644 --- a/pages/bannerdetail/index.wxss +++ b/pages/bannerdetail/index.wxss @@ -10,21 +10,24 @@ page { } .coupons-body { + padding:40rpx 40rpx; flex: 1; /* overflow: auto; */ } .banner { position: relative; - width: 750rpx; - height: 280rpx; + width: 670rpx; + height: 300rpx; overflow: hidden; box-shadow:0px 14px 26px 0px rgba(199,203,211,1); + } .banner image { - width: 750rpx; - height: 280rpx; + width: 670rpx; + height: 300rpx; + border-radius: 12rpx; } .act { @@ -34,7 +37,7 @@ page { border-radius: 12rpx; width: 100%; /* height: 212rpx; */ - margin:44rpx auto 0; + /* margin:44rpx auto 0; */ padding-bottom: 20rpx; } diff --git a/pages/main/index.js b/pages/main/index.js index 8f979c6..bc608cf 100644 --- a/pages/main/index.js +++ b/pages/main/index.js @@ -43,6 +43,7 @@ Page({ duihuan: imgurl.duihuan.url, market: app.globalData.market, list: [], + xslist:[], loading: true, fistLogin: null, alphaData: null, @@ -66,7 +67,11 @@ Page({ optionsData: null, credit: 0, score: '0', - page: 1 // 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 + page: 1 ,// 刷新进入页面时已经加载了第一页数据,onReachBottom时 page++,从第2页开始加载 + // Ttitle:'', + // xstitle:null, + // priceStr:null, + // salePriceStr:null, }, close: function() { this.setData({ @@ -329,6 +334,7 @@ Page({ that.getmemberId(app.globalData.token); that.getBannerlist(); that.topicShow(); + that.getxsList(); that.getMallInfo(app.globalData.token); if (app.couponChannelListCallback) { app.couponChannelListCallback(app.globalData.token); @@ -444,6 +450,33 @@ Page({ // 不需要错误提示 }); }, + //获取限时抢购列表 + getxsList(){ + let that = this; + Http.get({ + url: config.api.couponChannelList, + data: { + pageNum: 1, + pageSize: 3, + targetAd: 2 + } + }).then(res => { + if (res && res.data) { + that.setData({ + xslist: res.data.list, + }); + } + }) + .catch(err => { + console.log(err) + wx.showToast({ + title: err.errMsg, + icon: 'none', + duration: 2000, + mask: false + }); + }) + }, /** * banner */ @@ -480,7 +513,7 @@ Page({ that.setData({ name: res.data.name, cover: res.data.cover, - title: res.data.title, + Ttitle: res.data.title, id: res.data.id, showTopic: true }) diff --git a/pages/main/index.wxml b/pages/main/index.wxml index 3ceb160..cbd768e 100644 --- a/pages/main/index.wxml +++ b/pages/main/index.wxml @@ -62,21 +62,24 @@ - 今日好货推荐,满1000减200元… + + 今日好物推荐, + '{{xslist[0].title}}'原价 {{xslist[0].priceStr}} 现价... + 抢购 - - - - + + + + {{name}} {{title}} - + diff --git a/pages/main/index.wxss b/pages/main/index.wxss index 1d9007c..28c7922 100644 --- a/pages/main/index.wxss +++ b/pages/main/index.wxss @@ -426,12 +426,23 @@ progress{ margin-top: 18rpx; margin-bottom:18rpx; } -.toutiao text{ +.toutiao view:nth-child(2){ font-size:26rpx; font-family:PingFangSC-Regular; font-weight:400; color:rgba(60,60,60,1); float: left; + width: 500rpx; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} +.toutiao view:nth-child(2) text:nth-child(1){ + color: red; +} +.toutiao view:nth-child(2) text:nth-child(2){ + text-decoration: line-through; + color: red; } .toutiao .imgBox{ width: 64rpx; diff --git a/pages/radetail/index.wxml b/pages/radetail/index.wxml index 9c16163..fcd2fe7 100644 --- a/pages/radetail/index.wxml +++ b/pages/radetail/index.wxml @@ -9,7 +9,8 @@ - + + {{data.title}} {{data.subTitle}} @@ -25,8 +26,6 @@ 活动结束时间:{{activityEndTime}} - - diff --git a/pages/radetail/index.wxss b/pages/radetail/index.wxss index ea01891..e898425 100644 --- a/pages/radetail/index.wxss +++ b/pages/radetail/index.wxss @@ -589,6 +589,7 @@ button::after{ border: none; } .banner image { width: 750rpx; /* height: 280rpx; */ + border-radius: 16rpx; } .box{ width: 100%; diff --git a/pages/topicDetail/index.wxml b/pages/topicDetail/index.wxml index 2772f9a..8a8c84f 100644 --- a/pages/topicDetail/index.wxml +++ b/pages/topicDetail/index.wxml @@ -6,8 +6,8 @@ - {{data.name}} - {{data.title}} + {{data.name}} + {{data.title}} {{data.content}} diff --git a/pages/topicDetail/index.wxss b/pages/topicDetail/index.wxss index 85e3176..86e6d31 100644 --- a/pages/topicDetail/index.wxss +++ b/pages/topicDetail/index.wxss @@ -12,12 +12,16 @@ .banner { position: relative; - width: 750rpx; + width: 590rpx; + /* box-shadow:0px 14px 26px 0px rgba(199,203,211,1); */ + padding:50rpx 40rpx; + height: 204rpx; } .banner image { display: block; - width: 750rpx; + width: 670rpx; + border-radius: 12rpx; } .act { @@ -25,20 +29,18 @@ z-index: 1000000000; background: #fff; border-radius: 12rpx; - width: 705rpx; + width: 100%; margin: 30rpx auto 0; padding-bottom: 20rpx; } -.act text { - display: block; - text-align: center; +.act view { padding-left: 4.8%; padding-right: 4.8%; } .txt001 { - display: block; + /* display: block; */ font-size: 34rpx; color: #363636; letter-spacing: 0; diff --git a/wxParse/wxParse.wxss b/wxParse/wxParse.wxss index 43edc89..c078c8b 100644 --- a/wxParse/wxParse.wxss +++ b/wxParse/wxParse.wxss @@ -18,7 +18,8 @@ line-height: 1.8; } view{ - word-break:break-all; overflow:auto; + word-break:break-all; + overflow:auto; background: #FFF; } .wxParse-inline{