搜索
This commit is contained in:
parent
a09b330797
commit
6f32ad42c6
@ -7,7 +7,7 @@
|
|||||||
- index 首页
|
- index 首页
|
||||||
- utils 插件
|
- utils 插件
|
||||||
- [bin.js](./doc/bin.md)
|
- [bin.js](./doc/bin.md)
|
||||||
|
- doc 文档存放
|
||||||
## 页面路由
|
## 页面路由
|
||||||
- pages/index/index 首页 <br>
|
- pages/index/index 首页 <br>
|
||||||
组件
|
组件
|
||||||
|
1
app.json
1
app.json
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"pages": [
|
"pages": [
|
||||||
|
"pages/search/search",
|
||||||
"pages/index/index"
|
"pages/index/index"
|
||||||
],
|
],
|
||||||
"window": {
|
"window": {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
>input{
|
>input{
|
||||||
height: 30rpx;
|
height: 30rpx;
|
||||||
width: 480rpx;
|
width: 480rpx;
|
||||||
margin-top: 25rpx;
|
margin-top: 20rpx;
|
||||||
margin-left: 17rpx;
|
margin-left: 17rpx;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
.search{width:613rpx;height:76rpx;margin-top:30rpx;box-sizing:border-box;border-radius:15rpx;display:flex;border:1rpx solid #c6c6c6}.search>image{width:42rpx;height:42rpx;background-color:#000;margin-left:40rpx;margin-top:17rpx}.search>input{height:30rpx;width:480rpx;margin-top:25rpx;margin-left:17rpx;font-size:30rpx}
|
.search{width:613rpx;height:76rpx;margin-top:30rpx;box-sizing:border-box;border-radius:15rpx;display:flex;border:1rpx solid #c6c6c6}.search>image{width:42rpx;height:42rpx;background-color:#000;margin-left:40rpx;margin-top:17rpx}.search>input{height:30rpx;width:480rpx;margin-top:20rpx;margin-left:17rpx;font-size:30rpx}
|
||||||
|
8
components/search/hot/index.js
Normal file
8
components/search/hot/index.js
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
Component({
|
||||||
|
properties: {
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
}
|
||||||
|
})
|
3
components/search/hot/index.json
Normal file
3
components/search/hot/index.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"component": true
|
||||||
|
}
|
22
components/search/hot/index.scss
Normal file
22
components/search/hot/index.scss
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
.hot {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
.title {
|
||||||
|
font-size: 34rpx;
|
||||||
|
color: #333;
|
||||||
|
font-weight: bold;
|
||||||
|
width: 415rpx;
|
||||||
|
height: 61rpx;
|
||||||
|
line-height: 61rpx;
|
||||||
|
text-align: center;
|
||||||
|
background-image: linear-gradient(to right, #fff, #ecfff8, #fff);
|
||||||
|
margin-top: 53rpx;
|
||||||
|
margin-bottom: 38rpx;
|
||||||
|
}
|
||||||
|
.word{
|
||||||
|
font-size: 30rpx;
|
||||||
|
color: #999;
|
||||||
|
margin-bottom: 55rpx;
|
||||||
|
}
|
||||||
|
}
|
5
components/search/hot/index.wxml
Normal file
5
components/search/hot/index.wxml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<view class="hot">
|
||||||
|
<view class="title">热门搜索</view>
|
||||||
|
<view class="word">化妆品</view>
|
||||||
|
<view class="word">化妆品</view>
|
||||||
|
</view>
|
1
components/search/hot/index.wxss
Normal file
1
components/search/hot/index.wxss
Normal file
@ -0,0 +1 @@
|
|||||||
|
.hot{display:flex;align-items:center;flex-direction:column}.hot .title{font-size:34rpx;color:#333;font-weight:bold;width:415rpx;height:61rpx;line-height:61rpx;text-align:center;background-image:linear-gradient(to right, #fff, #ecfff8, #fff);margin-top:53rpx;margin-bottom:38rpx}.hot .word{font-size:30rpx;color:#999;margin-bottom:55rpx}
|
@ -4,5 +4,8 @@ Page({
|
|||||||
},
|
},
|
||||||
onLoad(){
|
onLoad(){
|
||||||
|
|
||||||
|
},
|
||||||
|
searchs(){
|
||||||
|
console.log(10)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<view class="box">
|
<view class="box">
|
||||||
<search></search>
|
<search bind:tap="searchs"></search>
|
||||||
<list></list>
|
<list></list>
|
||||||
</view>
|
</view>
|
66
pages/search/search.js
Normal file
66
pages/search/search.js
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
// pages/search/search.js
|
||||||
|
Page({
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面的初始数据
|
||||||
|
*/
|
||||||
|
data: {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面加载
|
||||||
|
*/
|
||||||
|
onLoad: function (options) {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
|
*/
|
||||||
|
onHide: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
|
*/
|
||||||
|
onUnload: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
|
*/
|
||||||
|
onPullDownRefresh: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面上拉触底事件的处理函数
|
||||||
|
*/
|
||||||
|
onReachBottom: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
|
*/
|
||||||
|
onShareAppMessage: function () {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
6
pages/search/search.json
Normal file
6
pages/search/search.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"usingComponents": {
|
||||||
|
"search":"../components/index/search/index",
|
||||||
|
"hot":"../components/search/hot/index"
|
||||||
|
}
|
||||||
|
}
|
7
pages/search/search.scss
Normal file
7
pages/search/search.scss
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
.box {
|
||||||
|
border-top: #eaeaea solid 1rpx;
|
||||||
|
width: 750rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
4
pages/search/search.wxml
Normal file
4
pages/search/search.wxml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<view class="box">
|
||||||
|
<search></search>
|
||||||
|
<hot></hot>
|
||||||
|
</view>
|
1
pages/search/search.wxss
Normal file
1
pages/search/search.wxss
Normal file
@ -0,0 +1 @@
|
|||||||
|
.box{border-top:#eaeaea solid 1rpx;width:750rpx;display:flex;align-items:center;flex-direction:column}
|
Loading…
x
Reference in New Issue
Block a user