diff --git a/README.md b/README.md
index 3bd6c41..71cce07 100644
--- a/README.md
+++ b/README.md
@@ -7,10 +7,14 @@
- index 首页
- utils 插件
- [bin.js](./doc/bin.md)
-
+- doc 文档存放
## 页面路由
- pages/index/index 首页
组件
- index/search 顶部搜索框
- index/list 商品列表
- index/lsit/commodity 商品单条
+- pages/search/search 搜索页
+ 组件
+ - index/search 顶部搜索框
+ - search/hot 热门上搜索列表
\ No newline at end of file
diff --git a/app.json b/app.json
index 4ad6790..b5407e6 100644
--- a/app.json
+++ b/app.json
@@ -1,16 +1,15 @@
{
- "pages": [
- "pages/shopping/shopping",
- "pages/index/index",
- "pages/logs/logs"
-
- ],
- "window": {
- "backgroundTextStyle": "light",
- "navigationBarBackgroundColor": "#fff",
- "navigationBarTitleText": "WeChat",
- "navigationBarTextStyle": "black"
- },
- "style": "v2",
- "sitemapLocation": "sitemap.json"
+ "pages": [
+ "pages/shopping/shopping",
+ "pages/search/search",
+ "pages/index/index"
+ ],
+ "window": {
+ "backgroundTextStyle": "light",
+ "navigationBarBackgroundColor": "#fff",
+ "navigationBarTitleText": "WeChat",
+ "navigationBarTextStyle": "black"
+ },
+ "style": "v2",
+ "sitemapLocation": "sitemap.json"
}
\ No newline at end of file
diff --git a/components/index/search/index.scss b/components/index/search/index.scss
index 76978b2..e1dee72 100644
--- a/components/index/search/index.scss
+++ b/components/index/search/index.scss
@@ -16,7 +16,7 @@
>input{
height: 30rpx;
width: 480rpx;
- margin-top: 25rpx;
+ margin-top: 20rpx;
margin-left: 17rpx;
font-size: 30rpx;
}
diff --git a/components/index/search/index.wxss b/components/index/search/index.wxss
index e899d3f..e30d4e7 100644
--- a/components/index/search/index.wxss
+++ b/components/index/search/index.wxss
@@ -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}
diff --git a/components/search/hot/index.js b/components/search/hot/index.js
new file mode 100644
index 0000000..9f59aa7
--- /dev/null
+++ b/components/search/hot/index.js
@@ -0,0 +1,8 @@
+Component({
+ properties: {
+ },
+ data: {
+ },
+ methods: {
+ }
+})
\ No newline at end of file
diff --git a/components/search/hot/index.json b/components/search/hot/index.json
new file mode 100644
index 0000000..32640e0
--- /dev/null
+++ b/components/search/hot/index.json
@@ -0,0 +1,3 @@
+{
+ "component": true
+}
\ No newline at end of file
diff --git a/components/search/hot/index.scss b/components/search/hot/index.scss
new file mode 100644
index 0000000..f6b3ef9
--- /dev/null
+++ b/components/search/hot/index.scss
@@ -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;
+ }
+ }
\ No newline at end of file
diff --git a/components/search/hot/index.wxml b/components/search/hot/index.wxml
new file mode 100644
index 0000000..1842cb4
--- /dev/null
+++ b/components/search/hot/index.wxml
@@ -0,0 +1,5 @@
+
+ 热门搜索
+ 化妆品
+ 化妆品
+
\ No newline at end of file
diff --git a/components/search/hot/index.wxss b/components/search/hot/index.wxss
new file mode 100644
index 0000000..e142220
--- /dev/null
+++ b/components/search/hot/index.wxss
@@ -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}
diff --git a/pages/index/index.js b/pages/index/index.js
index bfd65c2..95bc36d 100644
--- a/pages/index/index.js
+++ b/pages/index/index.js
@@ -4,5 +4,8 @@ Page({
},
onLoad(){
+ },
+ searchs(){
+ console.log(10)
}
})
diff --git a/pages/index/index.wxml b/pages/index/index.wxml
index 6797ad1..4e25615 100644
--- a/pages/index/index.wxml
+++ b/pages/index/index.wxml
@@ -1,4 +1,4 @@
-
+
\ No newline at end of file
diff --git a/pages/search/search.js b/pages/search/search.js
new file mode 100644
index 0000000..ede280c
--- /dev/null
+++ b/pages/search/search.js
@@ -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 () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/search/search.json b/pages/search/search.json
new file mode 100644
index 0000000..dd3996b
--- /dev/null
+++ b/pages/search/search.json
@@ -0,0 +1,6 @@
+{
+ "usingComponents": {
+ "search":"../components/index/search/index",
+ "hot":"../components/search/hot/index"
+ }
+}
\ No newline at end of file
diff --git a/pages/search/search.scss b/pages/search/search.scss
new file mode 100644
index 0000000..67cdbfa
--- /dev/null
+++ b/pages/search/search.scss
@@ -0,0 +1,7 @@
+.box {
+ border-top: #eaeaea solid 1rpx;
+ width: 750rpx;
+ display: flex;
+ align-items: center;
+ flex-direction: column;
+}
diff --git a/pages/search/search.wxml b/pages/search/search.wxml
new file mode 100644
index 0000000..10d31b6
--- /dev/null
+++ b/pages/search/search.wxml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/pages/search/search.wxss b/pages/search/search.wxss
new file mode 100644
index 0000000..3b5be87
--- /dev/null
+++ b/pages/search/search.wxss
@@ -0,0 +1 @@
+.box{border-top:#eaeaea solid 1rpx;width:750rpx;display:flex;align-items:center;flex-direction:column}