Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
98e6190c
Commit
98e6190c
authored
Mar 09, 2019
by
jason233
Committed by
linlinjava
Mar 09, 2019
Browse files
小程序首页增加搜索 (#135)
* 小程序首页增加搜索
parent
26118544
Changes
4
Hide whitespace changes
Inline
Side-by-side
litemall-wx/pages/index/index.js
View file @
98e6190c
...
@@ -15,7 +15,8 @@ Page({
...
@@ -15,7 +15,8 @@ Page({
floorGoods
:
[],
floorGoods
:
[],
banner
:
[],
banner
:
[],
channel
:
[],
channel
:
[],
coupon
:
[]
coupon
:
[],
goodsCount
:
0
},
},
onShareAppMessage
:
function
()
{
onShareAppMessage
:
function
()
{
...
@@ -50,6 +51,11 @@ Page({
...
@@ -50,6 +51,11 @@ Page({
});
});
}
}
});
});
util
.
request
(
api
.
GoodsCount
).
then
(
function
(
res
)
{
that
.
setData
({
goodsCount
:
res
.
data
.
goodsCount
});
});
},
},
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
...
...
litemall-wx/pages/index/index.wxml
View file @
98e6190c
<!--index.wxml-->
<!--index.wxml-->
<view class="container">
<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 class="banner" indicator-dots="true" autoplay="true" interval="3000" duration="1000">
<swiper-item wx:for="{{banner}}" wx:key="id">
<swiper-item wx:for="{{banner}}" wx:key="id">
<!-- <navigator url="{{item.link}}"> -->
<!-- <navigator url="{{item.link}}"> -->
...
...
litemall-wx/pages/index/index.wxss
View file @
98e6190c
...
@@ -514,3 +514,36 @@
...
@@ -514,3 +514,36 @@
align-items: center;
align-items: center;
justify-content: 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;
}
\ No newline at end of file
litemall-wx/project.config.json
View file @
98e6190c
...
@@ -262,4 +262,4 @@
...
@@ -262,4 +262,4 @@
]
]
}
}
}
}
}
}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment