This commit is contained in:
pplokijuhyg 2020-01-02 14:28:07 +08:00
parent 4152f5ffb6
commit d2bdc02fc9
14 changed files with 52 additions and 19 deletions

View File

@ -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;
}
}
}
}

View File

@ -5,8 +5,8 @@
<view class="introduce">
<text class="towline">{{item.goods_name}}</text>
<view>
<text>¥{{item.shop_price}}</text>
<text>加入购物车</text>
<view>${{item.shop_price}}<text>(¥price)</text></view>
<view>加入购物车</view>
</view>
</view>
</view>

View File

@ -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}

View File

@ -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;
}
}
}
}

View File

@ -5,8 +5,8 @@
<text class="towline">{{title}}</text>
<view>
<text>¥{{price}}</text>
<text>加入购物车</text>
<view>${{price}}<text>(¥price)</text></view>
<view>加入购物车</view>
</view>
</view>
</view>

View File

@ -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}

View File

@ -1,6 +1,7 @@
Component({
properties: {
list:Array
list:Array,
huilv:String
},
data: {
},

View File

@ -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;
}
}
}

View File

@ -1,4 +1,4 @@
<view class="list">
<text class="title">热门商品</text>
<view class="title"><text>热门商品</text><text>€1=¥{{huilv}}</text></view>
<commodity wx:for="{{list}}" title="{{item.goods_name}}" price="{{item.shop_price}}" img="{{item.image}}" shopid="{{item.goods_id}}"></commodity>
</view>

View File

@ -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}

View File

@ -19,6 +19,7 @@ Page({
data: {
parent_id: 2
}
}).then((res) => {
// console.log(res)
this.setData({

View File

@ -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)

View File

@ -1,4 +1,4 @@
<view class="box">
<search bind:tap="searchs"></search>
<list list="{{list}}"></list>
<list list="{{list}}" huilv="{{huilv}}"></list>
</view>