@@ -5,7 +5,8 @@ | |||
<view class='banner'> | |||
<image src='{{data.coverImg}}'></image> | |||
</view> | |||
<view class='act'> | |||
</view> | |||
<view class='act'> | |||
<text class='txt001'>{{data.title}}</text> | |||
<text class='txt002'>{{data.subTitle}}</text> | |||
<view class="proct"> | |||
@@ -21,8 +22,6 @@ | |||
<text><text class='spot'></text>{{data.detail}}</text> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='contain clearfix'> | |||
<!-- 优惠券 --> | |||
<navigator wx:for="{{data.coupons}}" wx:key="{{index}}" url="/pages/coupon/detail/index?couponChannelId={{item.id}}&couponId={{item.couponId}}"> | |||
@@ -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; | |||
} | |||
@@ -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 | |||
}) | |||
@@ -62,21 +62,24 @@ | |||
<view class='imgBox'> | |||
<image src='{{toutiao}}' mode='aspectFill'></image> | |||
</view> | |||
<text>今日好货推荐,满1000减200元…</text> | |||
<view> | |||
今日好物推荐, | |||
<text>'{{xslist[0].title}}'</text>原价 <text>{{xslist[0].priceStr}}</text> 现价... | |||
</view> | |||
<view class='qg' style='border-color:{{qg}}'><text>抢购</text></view> | |||
</view> | |||
<!-- 专题 --> | |||
<view class='product' wx:if="{{showTopic}}"> | |||
<!-- <view class='ztTitle'>点击进入{{title}}</view> --> | |||
<view class='gift'> | |||
<image src='{{giftHr}}' bindtap='gotoTopic' mode='aspectFill' ></image> | |||
<view class='product' wx:if="{{showTopic}}" bindtap='gotoTopic'> | |||
<!-- <view class='ztTitle'>点击进入{{Ttitle}}</view> --> | |||
<view class='gift' > | |||
<image src='{{giftHr}}' mode='aspectFill' ></image> | |||
</view> | |||
<view class='textBox'> | |||
<view class='name'>{{name}}</view> | |||
<view class='title'>{{title}}</view> | |||
</view> | |||
<view class='next'> | |||
<image src='{{next}}' bindtap='gotoTopic' mode='aspectFill' ></image> | |||
<image src='{{next}}' mode='aspectFill' ></image> | |||
</view> | |||
<!-- <image src='{{cover}}' bindtap='gotoTopic' mode='aspectFill'></image> --> | |||
</view> | |||
@@ -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; | |||
@@ -9,7 +9,8 @@ | |||
<view class='banner'> | |||
<image src='{{data.coverImg}}' mode='widthFix'></image> | |||
</view> | |||
<view class='box'> | |||
</view> | |||
<view class='box'> | |||
<view class='act'> | |||
<text class='txt001'>{{data.title}}</text> | |||
<text class='txt002'>{{data.subTitle}}</text> | |||
@@ -25,8 +26,6 @@ | |||
<view class='time'>活动结束时间:{{activityEndTime}}</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- 自由图文格式 --> | |||
<view wx:if="{{data.type == 2}}"> | |||
@@ -589,6 +589,7 @@ button::after{ border: none; } | |||
.banner image { | |||
width: 750rpx; | |||
/* height: 280rpx; */ | |||
border-radius: 16rpx; | |||
} | |||
.box{ | |||
width: 100%; | |||
@@ -6,8 +6,8 @@ | |||
<image src='{{data.advert}}' mode='widthFix'></image> | |||
</view> | |||
<view class='act'> | |||
<text class='txt001'>{{data.name}}</text> | |||
<text class='txt002'>{{data.title}}</text> | |||
<view class='txt001'>{{data.name}}</view> | |||
<view class='txt002'>{{data.title}}</view> | |||
<view class="proct"> | |||
<text>{{data.content}}</text> | |||
</view> | |||
@@ -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; | |||
@@ -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{ | |||