From 1fee50156029cbc427857a62ed2bea2b2892bf30 Mon Sep 17 00:00:00 2001 From: pplokijuhyg <1162963624@qq.com> Date: Fri, 13 Dec 2019 11:43:02 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.wxss | 4 +- components/index/list/commodity/index.js | 8 ++++ components/index/list/commodity/index.json | 3 ++ components/index/list/commodity/index.scss | 49 ++++++++++++++++++++++ components/index/list/commodity/index.wxml | 13 ++++++ components/index/list/commodity/index.wxss | 1 + components/index/list/index.js | 8 ++++ components/index/list/index.json | 6 +++ components/index/list/index.scss | 12 ++++++ components/index/list/index.wxml | 4 ++ components/index/list/index.wxss | 1 + components/index/search/index.js | 8 ++++ components/index/search/index.json | 3 ++ components/index/search/index.scss | 23 ++++++++++ components/index/search/index.wxml | 4 ++ components/index/search/index.wxss | 1 + pages/index/index.json | 5 ++- pages/index/index.scss | 20 ++++----- pages/index/index.wxml | 5 +-- pages/index/index.wxss | 2 +- 20 files changed, 162 insertions(+), 18 deletions(-) create mode 100644 components/index/list/commodity/index.js create mode 100644 components/index/list/commodity/index.json create mode 100644 components/index/list/commodity/index.scss create mode 100644 components/index/list/commodity/index.wxml create mode 100644 components/index/list/commodity/index.wxss create mode 100644 components/index/list/index.js create mode 100644 components/index/list/index.json create mode 100644 components/index/list/index.scss create mode 100644 components/index/list/index.wxml create mode 100644 components/index/list/index.wxss create mode 100644 components/index/search/index.js create mode 100644 components/index/search/index.json create mode 100644 components/index/search/index.scss create mode 100644 components/index/search/index.wxml create mode 100644 components/index/search/index.wxss diff --git a/app.wxss b/app.wxss index b6eb821..eee4054 100644 --- a/app.wxss +++ b/app.wxss @@ -9,7 +9,7 @@ */ html { - line-height: 1.15; /* 1 */ + line-height: 1; /* 1 */ -webkit-text-size-adjust: 100%; /* 2 */ } @@ -164,7 +164,7 @@ select, textarea { font-family: inherit; /* 1 */ font-size: 100%; /* 1 */ - line-height: 1.15; /* 1 */ + line-height: 1; /* 1 */ margin: 0; /* 2 */ } diff --git a/components/index/list/commodity/index.js b/components/index/list/commodity/index.js new file mode 100644 index 0000000..035c745 --- /dev/null +++ b/components/index/list/commodity/index.js @@ -0,0 +1,8 @@ +Component({ + properties: { + }, + data: { + }, + methods: { + } + }) \ No newline at end of file diff --git a/components/index/list/commodity/index.json b/components/index/list/commodity/index.json new file mode 100644 index 0000000..fba482a --- /dev/null +++ b/components/index/list/commodity/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/components/index/list/commodity/index.scss b/components/index/list/commodity/index.scss new file mode 100644 index 0000000..bcb00be --- /dev/null +++ b/components/index/list/commodity/index.scss @@ -0,0 +1,49 @@ +.commodity { + width: 623rpx; + height: 143rpx; + margin-top: 32rpx; + display: flex; + align-items: center; + .content { + width: 614rpx; + height: 100%; + display: flex; + align-items: center; + box-shadow: 0 0 24rpx 0 rgba(227, 227, 227, 0.4); + .imgthumb { + width: 105rpx; + height: 105rpx; + margin-left: 40rpx; + background-color: #333; + } + .introduce { + width: 410rpx; + margin-left: 40rpx; + display: flex; + flex-direction: column; + > text { + font-size: 26rpx; + color: #333; + margin-bottom: 22rpx; + } + > view { + display: flex; + align-items: center; + justify-content: space-between; + > text:first-child { + font-size: 30rpx; + color: #dec499; + } + > text:last-child { + font-size: 22rpx; + color: #999; + } + } + } + } + .decorate { + width: 9rpx; + height: 102rpx; + background-color: #3fb66e; + } + } \ No newline at end of file diff --git a/components/index/list/commodity/index.wxml b/components/index/list/commodity/index.wxml new file mode 100644 index 0000000..6c27b73 --- /dev/null +++ b/components/index/list/commodity/index.wxml @@ -0,0 +1,13 @@ + + + + + 产品名称产品名称产品名称产品名称产品名称产品名称产品名称 + + ¥657 + 加入购物车 + + + + + \ No newline at end of file diff --git a/components/index/list/commodity/index.wxss b/components/index/list/commodity/index.wxss new file mode 100644 index 0000000..8647b14 --- /dev/null +++ b/components/index/list/commodity/index.wxss @@ -0,0 +1 @@ +.commodity{width:623rpx;height:143rpx;margin-top:32rpx;display:flex;align-items:center}.commodity .content{width:614rpx;height:100%;display:flex;align-items:center;box-shadow:0 0 24rpx 0 rgba(227,227,227,0.4)}.commodity .content .imgthumb{width:105rpx;height:105rpx;margin-left:40rpx;background-color:#333}.commodity .content .introduce{width:410rpx;margin-left:40rpx;display:flex;flex-direction:column}.commodity .content .introduce>text{font-size:26rpx;color:#333;margin-bottom:22rpx}.commodity .content .introduce>view{display:flex;align-items:center;justify-content:space-between}.commodity .content .introduce>view>text:first-child{font-size:30rpx;color:#dec499}.commodity .content .introduce>view>text:last-child{font-size:22rpx;color:#999}.commodity .decorate{width:9rpx;height:102rpx;background-color:#3fb66e} diff --git a/components/index/list/index.js b/components/index/list/index.js new file mode 100644 index 0000000..035c745 --- /dev/null +++ b/components/index/list/index.js @@ -0,0 +1,8 @@ +Component({ + properties: { + }, + data: { + }, + methods: { + } + }) \ No newline at end of file diff --git a/components/index/list/index.json b/components/index/list/index.json new file mode 100644 index 0000000..7f8058e --- /dev/null +++ b/components/index/list/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "commodity":"./commodity/index" + } +} \ No newline at end of file diff --git a/components/index/list/index.scss b/components/index/list/index.scss new file mode 100644 index 0000000..aae32e5 --- /dev/null +++ b/components/index/list/index.scss @@ -0,0 +1,12 @@ +.list { + width: 623rpx; + margin-top: 36rpx; + .title { + font-size: 30rpx; + color: #333; + font-weight: bold; + margin-left: 32rpx; + // margin-bottom: 32rpx; + } + + } \ No newline at end of file diff --git a/components/index/list/index.wxml b/components/index/list/index.wxml new file mode 100644 index 0000000..7983d11 --- /dev/null +++ b/components/index/list/index.wxml @@ -0,0 +1,4 @@ + + 热门商品 + + \ No newline at end of file diff --git a/components/index/list/index.wxss b/components/index/list/index.wxss new file mode 100644 index 0000000..1704712 --- /dev/null +++ b/components/index/list/index.wxss @@ -0,0 +1 @@ +.list{width:623rpx;margin-top:36rpx}.list .title{font-size:30rpx;color:#333;font-weight:bold;margin-left:32rpx} diff --git a/components/index/search/index.js b/components/index/search/index.js new file mode 100644 index 0000000..035c745 --- /dev/null +++ b/components/index/search/index.js @@ -0,0 +1,8 @@ +Component({ + properties: { + }, + data: { + }, + methods: { + } + }) \ No newline at end of file diff --git a/components/index/search/index.json b/components/index/search/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/components/index/search/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/components/index/search/index.scss b/components/index/search/index.scss new file mode 100644 index 0000000..76978b2 --- /dev/null +++ b/components/index/search/index.scss @@ -0,0 +1,23 @@ +.search{ + width: 613rpx; + height: 76rpx; + margin-top: 30rpx; + box-sizing: border-box; + border-radius: 15rpx; + display: flex; + border:1rpx solid rgba(198,198,198,1); + >image{ + width: 42rpx; + height: 42rpx; + background-color: #000; + margin-left: 40rpx; + margin-top: 17rpx; + } + >input{ + height: 30rpx; + width: 480rpx; + margin-top: 25rpx; + margin-left: 17rpx; + font-size: 30rpx; + } +} \ No newline at end of file diff --git a/components/index/search/index.wxml b/components/index/search/index.wxml new file mode 100644 index 0000000..3129295 --- /dev/null +++ b/components/index/search/index.wxml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/components/index/search/index.wxss b/components/index/search/index.wxss new file mode 100644 index 0000000..e899d3f --- /dev/null +++ b/components/index/search/index.wxss @@ -0,0 +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} diff --git a/pages/index/index.json b/pages/index/index.json index 8835af0..bb6644d 100644 --- a/pages/index/index.json +++ b/pages/index/index.json @@ -1,3 +1,6 @@ { - "usingComponents": {} + "usingComponents": { + "search":"../components/index/search/index", + "list":"../components/index/list/index" + } } \ No newline at end of file diff --git a/pages/index/index.scss b/pages/index/index.scss index 4cd6588..912df96 100644 --- a/pages/index/index.scss +++ b/pages/index/index.scss @@ -1,11 +1,9 @@ -.box{ - border-top: #eaeaea solid 1rpx; - width: 750rpx; - overflow: hidden; - display: flex; - flex-direction: column; - .search{ - width: 613px; - height: 76px; - } -} \ No newline at end of file +.box { + border-top: #eaeaea solid 1rpx; + width: 750rpx; + // overflow: hidden; + display: flex; + align-items: center; + flex-direction: column; + +} diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 91079d2..6797ad1 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,5 +1,4 @@ - - - + + \ No newline at end of file diff --git a/pages/index/index.wxss b/pages/index/index.wxss index e1a3214..3b5be87 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -1 +1 @@ -.box{border-top:#eaeaea solid 1rpx;width:750rpx;overflow:hidden;display:flex;flex-direction:column}.box .search{width:613px;height:76px} +.box{border-top:#eaeaea solid 1rpx;width:750rpx;display:flex;align-items:center;flex-direction:column}