@@ -15,7 +15,8 @@ Page({
|
||||
floorGoods: [],
|
||||
banner: [],
|
||||
channel: [],
|
||||
coupon: []
|
||||
coupon: [],
|
||||
goodsCount: 0
|
||||
},
|
||||
|
||||
onShareAppMessage: function() {
|
||||
@@ -50,6 +51,11 @@ Page({
|
||||
});
|
||||
}
|
||||
});
|
||||
util.request(api.GoodsCount).then(function (res) {
|
||||
that.setData({
|
||||
goodsCount: res.data.goodsCount
|
||||
});
|
||||
});
|
||||
},
|
||||
onLoad: function(options) {
|
||||
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
<!--index.wxml-->
|
||||
<view class="container">
|
||||
<view class="search">
|
||||
<navigator url="/pages/search/search" class="input">
|
||||
<image class="icon"></image>
|
||||
<text class="txt">商品搜索, 共{{goodsCount}}款好物</text>
|
||||
</navigator>
|
||||
</view>
|
||||
<swiper class="banner" indicator-dots="true" autoplay="true" interval="3000" duration="1000">
|
||||
<swiper-item wx:for="{{banner}}" wx:key="id">
|
||||
<!-- <navigator url="{{item.link}}"> -->
|
||||
|
||||
@@ -514,3 +514,36 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.search {
|
||||
height: 88rpx;
|
||||
width: 100%;
|
||||
padding: 0 30rpx;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.search .input {
|
||||
width: 690rpx;
|
||||
height: 56rpx;
|
||||
background: #ededed;
|
||||
border-radius: 8rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.search .icon {
|
||||
background: url(http://yanxuan.nosdn.127.net/hxm/yanxuan-wap/p/20161201/style/img/icon-normal/search2-2fb94833aa.png) center no-repeat;
|
||||
background-size: 100%;
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
|
||||
.search .txt {
|
||||
height: 42rpx;
|
||||
line-height: 42rpx;
|
||||
color: #666;
|
||||
padding-left: 10rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
@@ -262,4 +262,4 @@
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user