@@ -16,6 +16,7 @@ | |||
border-radius: 16rpx; | |||
overflow: hidden; | |||
position: relative; | |||
} | |||
.dots { | |||
@@ -0,0 +1,87 @@ | |||
// pages/index/sw/index.js | |||
let config = require("../../config/config.js"); | |||
let Http = require("../../utils/HttpBasics"); | |||
let app = getApp(); | |||
const imgurl = require("../../utils/imgurl"); | |||
Component({ | |||
/** | |||
* 组件的属性列表 | |||
*/ | |||
properties: {}, | |||
/** | |||
* 组件的初始数据 | |||
*/ | |||
data: { | |||
change: imgurl.change.url, | |||
None: imgurl.None.url, | |||
jianUrl: imgurl.jian.url, | |||
barginicon: imgurl.barginicon.url, | |||
wangmeimeibargin: imgurl.wangmeimeibargin.url, | |||
list: [], | |||
total: '' | |||
}, | |||
/** | |||
* 组件的方法列表 | |||
*/ | |||
methods: { | |||
gotoBargainList() { | |||
wx.navigateTo({ | |||
url: "/pages/bargain/bargain" | |||
}) | |||
}, | |||
getList() { | |||
let that = this; | |||
Http.get({ | |||
url: config.api.couponChannelList, | |||
data: { | |||
pageNum: 1, | |||
pageSize: 5, | |||
targetAd: 6 | |||
} | |||
}).then(res => { | |||
console.log(res.data.list) | |||
that.setData({ | |||
list: res.data.list, | |||
total: res.data.total | |||
}); | |||
console.log(this.data.list) | |||
}) | |||
.catch(err => { | |||
console.log(err) | |||
wx.showToast({ | |||
title: err.errMsg, | |||
icon: 'none', | |||
duration: 2000, | |||
mask: false | |||
}); | |||
}) | |||
}, | |||
gotomore: function () { | |||
wx.navigateTo({ | |||
url: "/pages/bargain/bargain" | |||
}); | |||
}, | |||
gotodetail: function (e) { | |||
wx.navigateTo({ | |||
url: `/pages/coupon/detail/index?couponChannelId=${ | |||
e.currentTarget.dataset.couponchannelid | |||
}&couponId=${ | |||
e.currentTarget.dataset.couponid | |||
}&targetAd=${ | |||
e.currentTarget.dataset.targetad | |||
}` | |||
}); | |||
} | |||
}, | |||
ready() { | |||
app.couponChannelListCallback = token => { | |||
Http.setToken(token); | |||
this.getList(); | |||
}; | |||
if (app.globalData.token && app.globalData.token != null) { | |||
app.couponChannelListCallback(app.globalData.token); | |||
} | |||
} | |||
}); |
@@ -0,0 +1,4 @@ | |||
{ | |||
"component": true, | |||
"usingComponents": {} | |||
} |
@@ -0,0 +1,58 @@ | |||
<!--components/hot/hot.wxml--> | |||
<view class='hotBox'> | |||
<view class='hotTitle'> | |||
<view class='titleL'> | |||
<view class='sql'></view> | |||
<text>爆款专区</text> | |||
</view> | |||
<view class='titleR'> | |||
<text>换一换</text> | |||
<view> | |||
<image src='{{change}}' bindtap='' mode='aspectFill'></image> | |||
</view> | |||
</view> | |||
</view> | |||
<view class='hotCon'> | |||
<view class='kanjia' wx:if="{{list.length>0}}" > | |||
<view > | |||
<image mode='aspectFill' lazy-load='true' src="{{item.coverImg}}" /> | |||
</view> | |||
<view class='kjText'> | |||
<text class='title'>{{item.title}}</text> | |||
<text class='price'>¥{{item.priceStr}}</text> | |||
<text class='sale'><text>¥</text>{{item.salePriceStr}}</text> | |||
<view class=' btn btnk'>砍价</view> | |||
</view> | |||
</view> | |||
<view class='kanjia' wx:if="{{list.length==0}}"> | |||
<view> | |||
<image src='{{None}}' bindtap='' mode='aspectFill'></image> | |||
</view> | |||
<view class='kjText'> | |||
<text class='title'>疯狂补货中…</text> | |||
<text class='price'>敬请期待</text> | |||
<view class='btnk btnNone'>砍价</view> | |||
</view> | |||
</view> | |||
<view class='pintuan'> | |||
<view wx:if="{{1==0}}"> | |||
<image></image> | |||
</view> | |||
<view class='ptText' wx:if="{{1==0}}"> | |||
<text class='title'>日本bilii杯子</text> | |||
<text class='price'>¥2.8</text> | |||
<text class='sale'> <text>¥</text>1.99</text> | |||
<view class='btn btnp'>拼团</view> | |||
</view> | |||
<view wx:if="{{1!=0}}"> | |||
<image src='{{None}}' bindtap='' mode='aspectFill'></image> | |||
</view> | |||
<view class='ptText'wx:if="{{1!=0}}"> | |||
<text class='title'>疯狂补货中...</text> | |||
<text class='expect'>敬请期待</text> | |||
<view class='btnp btnNone'>拼团</view> | |||
</view> | |||
</view> | |||
</view> | |||
</view> |
@@ -0,0 +1,131 @@ | |||
/* components/hot/hot.wxss */ | |||
@import "../../app.wxss"; | |||
.hotBox{ | |||
width:710rpx; | |||
height: 220rpx; | |||
margin: 0 auto 20rpx; | |||
} | |||
.hotTitle{ | |||
width: 100%; | |||
height: 60rpx; | |||
line-height: 60rpx; | |||
font-size: 30rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
font-family:PingFangSC-Medium; | |||
} | |||
.titleL .titleR{ | |||
width: 100rpx; | |||
} | |||
.titleR text{ | |||
float: left; | |||
margin-right: 10rpx; | |||
color: #2C8DFF; | |||
font-family:PingFangSC-Regular!important; | |||
} | |||
.titleR view{ | |||
height: 40rpx; | |||
width: 40rpx; | |||
/* margin-top: 10rpx; */ | |||
float: left; | |||
} | |||
.titleR image{ | |||
height: 28rpx; | |||
width: 28rpx; | |||
} | |||
.sql{ | |||
width:12rpx; | |||
height:24rpx; | |||
background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); | |||
border-radius:8rpx; | |||
float: left; | |||
margin: 20rpx 10rpx 0 0; | |||
} | |||
.hotCon{ | |||
width: 100%; | |||
} | |||
.kanjia, .pintuan{ | |||
width: 346rpx; | |||
height: 156rpx; | |||
float: left; | |||
border-radius: 12rpx; | |||
display: flex; | |||
justify-content: space-between; | |||
position: relative; | |||
} | |||
.kanjia{ | |||
margin-right: 18rpx; | |||
background:linear-gradient(130deg,rgba(50,177,252,1) 0%,rgba(47,108,255,1) 100%); | |||
} | |||
.pintuan{ | |||
background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%); | |||
} | |||
.hotCon image{ | |||
width: 86rpx; | |||
height: 86rpx; | |||
border: 1rpx solid #fff; | |||
margin: 24rpx 0 46rpx 16rpx; | |||
} | |||
.hotCon .btn{ | |||
width:80rpx; | |||
height:44rpx; | |||
line-height: 44rpx; | |||
background:rgba(255,255,255,1); | |||
border-radius:18rpx; | |||
font-size: 24rpx; | |||
position: absolute; | |||
right: 20rpx; | |||
bottom: 20rpx; | |||
text-align: center; | |||
} | |||
.btnk{ | |||
color: #2C8DFF; | |||
} | |||
.btnp{ | |||
color: #FD782D; | |||
} | |||
.btnNone{ | |||
width:80rpx; | |||
height:44rpx; | |||
line-height: 44rpx; | |||
border-radius:18rpx; | |||
font-size: 24rpx; | |||
position: absolute; | |||
right: 20rpx; | |||
bottom: 20rpx; | |||
text-align: center; | |||
background:rgba(255,255,255,0.5) | |||
} | |||
.kjText,.ptText{ | |||
color: #FFFFFF; | |||
margin: 14rpx 10rpx 20rpx 10rpx; | |||
} | |||
.title{ | |||
width: 210rpx; | |||
font-size: 30rpx; | |||
overflow: hidden; | |||
text-overflow:ellipsis; | |||
white-space:nowrap; | |||
float: left; | |||
} | |||
.price{ | |||
width: 210rpx; | |||
font-size: 22rpx; | |||
text-decoration:line-through; | |||
float: left; | |||
} | |||
.expect{ | |||
width: 210rpx; | |||
font-size: 22rpx; | |||
float: left; | |||
} | |||
.sale{ | |||
width: 210rpx; | |||
font-size: 32rpx; | |||
float: left; | |||
margin-top: -8rpx; | |||
} | |||
.sale text{ | |||
font-size: 20rpx!important; | |||
} |
@@ -8,7 +8,7 @@ | |||
justify-content: space-around; | |||
align-items: center; | |||
-webkit-box-align: center; | |||
/* background: #fff */ | |||
background: #fff | |||
} | |||
.i-tabs::after { | |||
@@ -6,7 +6,8 @@ | |||
"c-spellGroup": "./spellGroup/index", | |||
"c-coupons": "./coupons/index", | |||
"g-entry": "../../components/gameentry/gentry", | |||
"c-rushtobyCard": "./rushtobyCard/index" | |||
"c-rushtobyCard": "./rushtobyCard/index", | |||
"c-hot": "../../components/hot/index" | |||
}, | |||
"navigationBarTitleText": "首页", | |||
"enablePullDownRefresh": true, | |||
@@ -65,14 +65,16 @@ | |||
<text>今日好货推荐,满1000减200元…</text> | |||
<view class='qg'><text>抢购</text></view> | |||
</view> | |||
<!-- 爆款专区 --> | |||
<c-hot id="hot"/> | |||
<!-- 砍价专场 --> | |||
<c-bargain id="bargain"/> | |||
<!-- 专题 --> | |||
<!-- <c-bargain id="bargain"/> --> | |||
<!-- 专题 --> | |||
<view class='product' wx:if="{{showTopic}}"> | |||
<image src='{{cover}}' bindtap='gotoTopic' mode='aspectFill'></image> | |||
</view> | |||
<!-- 拼团专场 --> | |||
<c-spellGroup id="spellGroup"/> | |||
<!-- <c-spellGroup id="spellGroup"/> --> | |||
<!-- 小游戏暂时注释 --> | |||
<view class='game' wx-if="{{showIf}}"> | |||
<view class='game-entry'> | |||
@@ -1,4 +1,4 @@ | |||
@import "../../app.wxss"; | |||
@import "../../app.wxss"; | |||
page{ | |||
background: #F4F5F9; | |||
} | |||
@@ -361,13 +361,14 @@ progress{ | |||
margin:0 auto; | |||
display: flex; | |||
justify-content: space-between; | |||
background: #F4F5F9; | |||
} | |||
.kjBox{ | |||
width: 104rpx; | |||
height: 148rpx; | |||
font-size: 24rpx; | |||
color: #A6A6A6; | |||
margin-top: 50rpx; | |||
margin-top: 46rpx; | |||
text-align: center; | |||
} | |||
.kjBox image{ | |||
@@ -375,13 +376,15 @@ progress{ | |||
height: 104rpx; | |||
} | |||
.toutiao{ | |||
width:688rpx; | |||
width:710rpx; | |||
height: 82rpx; | |||
line-height: 82rpx; | |||
margin:0 auto; | |||
background: #FAFBFD; | |||
box-shadow:0px 6rpx 16rpx 0px rgba(236,238,243,1); | |||
border-radius:12rpx; | |||
margin-top: 18rpx; | |||
margin-bottom:18rpx; | |||
} | |||
.toutiao text{ | |||
font-size:26rpx; | |||
@@ -417,4 +420,7 @@ progress{ | |||
font-family:PingFangSC-Medium; | |||
font-weight:500; | |||
color:#FD782D; | |||
} | |||
i-tabs i-tabs-scroll{ | |||
background: #F4F5F9!important; | |||
} |
@@ -3,12 +3,13 @@ module.exports = { | |||
// 我的 | |||
"user": { | |||
"banneColor": "linear-gradient(180deg,rgba(253,131,45,1) 0%,rgba(254,74,22,1) 100%))", | |||
}, | |||
}, | |||
colorSecond:{ | |||
// 我的 | |||
"user": { | |||
"banneColor": '' | |||
"banneColor": 'linear-gradient(180deg,rgba(50,177,252,1) 0%,rgba(47,108,255,1) 100%)', | |||
}, | |||
} | |||
@@ -637,4 +637,12 @@ module.exports = { | |||
'url': baseUrl + "toutiao.png", | |||
'name': '' | |||
}, | |||
'change': { | |||
'url': baseUrl + "change.png", | |||
'name': '' | |||
}, | |||
'None': { | |||
'url': baseUrl + "None.png", | |||
'name': '' | |||
}, | |||
} |