diff --git a/components/classify/list/index.scss b/components/classify/list/index.scss index 58cf53f..118947d 100644 --- a/components/classify/list/index.scss +++ b/components/classify/list/index.scss @@ -48,13 +48,20 @@ display: flex; align-items: center; justify-content: space-between; - > text:first-child { - font-size: 30rpx; + > view:first-child { + // font-size: 30rpx; color: #dec499; } - > text:last-child { + // > text:last-child { + // font-size: 22rpx; + // color: #999; + // } + > view { font-size: 22rpx; color: #999; + >text{ + font-size: 20rpx; + } } } } diff --git a/components/classify/list/index.wxml b/components/classify/list/index.wxml index 0677ed2..3810e1d 100644 --- a/components/classify/list/index.wxml +++ b/components/classify/list/index.wxml @@ -5,8 +5,8 @@ {{item.goods_name}} - ¥{{item.shop_price}} - 加入购物车 + ${{item.shop_price}}(¥price) + 加入购物车 diff --git a/components/classify/list/index.wxss b/components/classify/list/index.wxss index 9e742ec..07315d8 100644 --- a/components/classify/list/index.wxss +++ b/components/classify/list/index.wxss @@ -1 +1 @@ -.list{padding-left:20rpx;width:572rpx;box-sizing:border-box;height:100vh}.list .commodity{width:552rpx;display:flex;align-items:center}.list .commodity .content{width:552rpx;height:100%;display:flex;align-items:center;border-bottom:2rpx solid #eaeaea;padding:30rpx 0}.list .commodity .content .imgthumb{width:105rpx;height:105rpx;margin-left:40rpx;background-color:#333}.list .commodity .content .introduce{width:336rpx;margin-left:40rpx;display:flex;flex-direction:column}.list .commodity .content .introduce .towline{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.list .commodity .content .introduce>text{font-size:22rpx;color:#333;margin-bottom:22rpx}.list .commodity .content .introduce>view{display:flex;align-items:center;justify-content:space-between}.list .commodity .content .introduce>view>text:first-child{font-size:30rpx;color:#dec499}.list .commodity .content .introduce>view>text:last-child{font-size:22rpx;color:#999} +.list{padding-left:20rpx;width:572rpx;box-sizing:border-box;height:100vh}.list .commodity{width:552rpx;display:flex;align-items:center}.list .commodity .content{width:552rpx;height:100%;display:flex;align-items:center;border-bottom:2rpx solid #eaeaea;padding:30rpx 0}.list .commodity .content .imgthumb{width:105rpx;height:105rpx;margin-left:40rpx;background-color:#333}.list .commodity .content .introduce{width:336rpx;margin-left:40rpx;display:flex;flex-direction:column}.list .commodity .content .introduce .towline{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.list .commodity .content .introduce>text{font-size:22rpx;color:#333;margin-bottom:22rpx}.list .commodity .content .introduce>view{display:flex;align-items:center;justify-content:space-between}.list .commodity .content .introduce>view>view:first-child{color:#dec499}.list .commodity .content .introduce>view>view{font-size:22rpx;color:#999}.list .commodity .content .introduce>view>view>text{font-size:20rpx} diff --git a/components/index/list/commodity/index.scss b/components/index/list/commodity/index.scss index 5b5dc8c..2df32d5 100644 --- a/components/index/list/commodity/index.scss +++ b/components/index/list/commodity/index.scss @@ -39,13 +39,20 @@ display: flex; align-items: center; justify-content: space-between; - > text:first-child { - font-size: 30rpx; + > view:first-child { + // font-size: 30rpx; color: #dec499; } - > text:last-child { + // > text:last-child { + // font-size: 22rpx; + // color: #999; + // } + > view { font-size: 22rpx; color: #999; + >text{ + font-size: 20rpx; + } } } } diff --git a/components/index/list/commodity/index.wxml b/components/index/list/commodity/index.wxml index 7f84e81..bbc3df6 100644 --- a/components/index/list/commodity/index.wxml +++ b/components/index/list/commodity/index.wxml @@ -5,8 +5,8 @@ {{title}} - ¥{{price}} - 加入购物车 + ${{price}}(¥price) + 加入购物车 diff --git a/components/index/list/commodity/index.wxss b/components/index/list/commodity/index.wxss index 0d3c5f3..29658ae 100644 --- a/components/index/list/commodity/index.wxss +++ b/components/index/list/commodity/index.wxss @@ -1 +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;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.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} +.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;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.commodity .content .introduce>view{display:flex;align-items:center;justify-content:space-between}.commodity .content .introduce>view>view:first-child{color:#dec499}.commodity .content .introduce>view>view{font-size:22rpx;color:#999}.commodity .content .introduce>view>view>text{font-size:20rpx}.commodity .decorate{width:9rpx;height:102rpx;background-color:#3fb66e} diff --git a/components/index/list/index.js b/components/index/list/index.js index ac32c19..3c5626d 100644 --- a/components/index/list/index.js +++ b/components/index/list/index.js @@ -1,6 +1,7 @@ Component({ properties: { - list:Array + list:Array, + huilv:String }, data: { }, diff --git a/components/index/list/index.scss b/components/index/list/index.scss index dc22751..8dc863c 100644 --- a/components/index/list/index.scss +++ b/components/index/list/index.scss @@ -7,6 +7,14 @@ font-weight: bold; margin-left: 32rpx; // margin-bottom: 32rpx; - } + display: flex; + align-items: center; + justify-content: space-between; + >text:last-child{ + font-size: 24rpx; + color: #666; + } + } + } \ No newline at end of file diff --git a/components/index/list/index.wxml b/components/index/list/index.wxml index c223504..a3e25a8 100644 --- a/components/index/list/index.wxml +++ b/components/index/list/index.wxml @@ -1,4 +1,4 @@ - 热门商品 + 热门商品€1=¥{{huilv}} \ No newline at end of file diff --git a/components/index/list/index.wxss b/components/index/list/index.wxss index 4ff91f5..1b207b5 100644 --- a/components/index/list/index.wxss +++ b/components/index/list/index.wxss @@ -1 +1 @@ -.list{width:623rpx;margin-top:36rpx}.list .title{font-size:30rpx;color:#333;font-weight:bold;margin-left:32rpx} +.list{width:623rpx;margin-top:36rpx}.list .title{font-size:30rpx;color:#333;font-weight:bold;margin-left:32rpx;display:flex;align-items:center;justify-content:space-between}.list .title>text:last-child{font-size:24rpx;color:#666} diff --git a/pages/classify/classify.js b/pages/classify/classify.js index 648cee2..a3c657f 100644 --- a/pages/classify/classify.js +++ b/pages/classify/classify.js @@ -19,6 +19,7 @@ Page({ data: { parent_id: 2 } + }).then((res) => { // console.log(res) this.setData({ diff --git a/pages/index/index.js b/pages/index/index.js index b6af4a5..654a7ee 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -1,7 +1,8 @@ import {request} from "../../utils/bin" Page({ data:{ - list:[] + list:[], + huilv:"" }, onLoad(){ request({ @@ -15,6 +16,14 @@ Page({ list:res.data.result }) }) + request({ + url:"Index/exchangeRate" + }).then((res)=>{ + console.log(res) + this.setData({ + huilv:res.data.data.exchange + }) + }) }, searchs(){ console.log(10) diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 358a9be..16de0ae 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/index/index.wxss b/pages/index/index.wxss index e33517d..3b5be87 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -1 +1 @@ -.box{border-top:#eaeaea solid 1rpx;width:750rpx;display:flex;align-items:center;flex-direction:column} +.box{border-top:#eaeaea solid 1rpx;width:750rpx;display:flex;align-items:center;flex-direction:column}