diff --git a/yuan ma/mp-shop/pages/search/search.js b/yuan ma/mp-shop/pages/search/search.js index 9f040fd..8263f11 100644 --- a/yuan ma/mp-shop/pages/search/search.js +++ b/yuan ma/mp-shop/pages/search/search.js @@ -12,6 +12,19 @@ Page({ }, /** * 生命周期函数--监听页面加载2 + *.list-keywords { + *margin: 10px; + *padding: 10px; + *background: #fff; + *} + *.list-keywords .item{ + *display: inline-block; + *padding: 5px 10px; + *background: #f1f1f1; + *margin: 5px; + *font-size: 12px; + *color: #666; + *} */ onLoad(options) { getHotSearch().then(res =>{//获取热点搜索函数 @@ -61,4 +74,10 @@ Page({ } }) } -}) \ No newline at end of file +}) /** + * 展示搜索数据,在goods页面展示4 + * 1. 在搜索页面通过网络请求获取数据,传递到goods页面显示5 + * 2. 在搜索页面将搜索的关键字传递到goods页面,在goods页面做网络请求6 + */ + + // 实现搜索7 \ No newline at end of file diff --git a/yuan ma/mp-shop/pages/search/search.wxml b/yuan ma/mp-shop/pages/search/search.wxml index ed1a9c3..aa69fe2 100644 --- a/yuan ma/mp-shop/pages/search/search.wxml +++ b/yuan ma/mp-shop/pages/search/search.wxml @@ -1,6 +1,6 @@ - 搜索 + 搜索//搜索提示 {{ item.content }} diff --git a/yuan ma/mp-shop/pages/search/search.wxss b/yuan ma/mp-shop/pages/search/search.wxss index 7e21917..baf9e30 100644 --- a/yuan ma/mp-shop/pages/search/search.wxss +++ b/yuan ma/mp-shop/pages/search/search.wxss @@ -1,13 +1,13 @@ -.list-keywords { - margin: 10px; - padding: 10px; - background: #fff; +.list-keywords {//搜索框设置 + margin: 10px;//外边距 + padding: 10px;//内边距 + background: #fff;//背景色 } .list-keywords .item{ - display: inline-block; - padding: 5px 10px; - background: #f1f1f1; - margin: 5px; - font-size: 12px; - color: #666; -} \ No newline at end of file + display: inline-block;//样式 + padding: 5px 10px;//内边距 + background: #f1f1f1;//背景 + margin: 5px;//外边距 + font-size: 12px;//字号 + color: #666;//颜色 +}