mrr.sj.front/pages/shop/manHour/components/buyOrderCard.vue

162 lines
3.4 KiB
Vue
Raw Normal View History

2026-03-24 11:45:13 +08:00
<template>
2026-03-30 14:32:03 +08:00
<view class="order-card">
<view class="order-card-header">
<view class="order-card-header__left">{{ info.title }}</view>
<view class="order-card-header__right">
<image src="/static/images/icons/location_icon.png" mode="aspectFit"
class="order-card-header__right__img"></image>
{{ distance }}km
</view>
</view>
<view class="order-card-content">
<view class="order-card-content__left">
<image :src="photo && photo[0]" mode="aspectFill" class="order-card-content__left__img"></image>
</view>
<view class="order-card-content__right">
<view class="order-card-content__right__price">价格{{ info.price }} /10分钟</view>
<view class="order-card-content__right__scope">服务范围:{{ info.first_class_title }}
{{ second_class_title }}</view>
<view class="order-card-content__right__button">
<view>销量:{{info.sales_num}}</view>
<view class="order-card-content__right__button__btn" @tap="placeOrder"> 去下单 </view>
</view>
</view>
</view>
</view>
2026-03-24 11:45:13 +08:00
</template>
<script>
2026-03-30 14:32:03 +08:00
export default {
name: "buyOrderCard",
props: {
info: {
type: Object,
},
},
data() {
return {};
},
created() {},
computed: {
distance() {
return this.info.distance.toFixed(2);
},
photo() {
return JSON.parse(this.info.photo);
},
second_class_title() {
return this.info.second_class_title.join("、");
},
},
methods: {
placeOrder() {
this.$emit('placeOrder', this.info.id);
}
}
};
2026-03-24 11:45:13 +08:00
</script>
<style scoped lang="less">
2026-03-30 14:32:03 +08:00
.order-card {
padding: 34rpx 20rpx 40rpx 20rpx;
background: #ffffff;
border-radius: 20rpx;
margin: 20rpx 30rpx;
.order-card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 40rpx;
&__left {
font-weight: 500;
font-size: 30rpx;
color: #333333;
line-height: 34rpx;
text-align: left;
font-style: normal;
}
&__right {
font-weight: 500;
font-size: 24rpx;
color: #666666;
line-height: 33rpx;
text-align: left;
font-style: normal;
display: flex;
align-items: center;
&__img {
width: 23rpx;
height: 24rpx;
margin-right: 7rpx;
}
}
}
.order-card-content {
display: flex;
justify-content: flex-start;
align-items: flex-start;
&__left {
margin-right: 30rpx;
&__img {
width: 172rpx;
height: 172rpx;
border-radius: 20rpx;
}
}
&__right {
&__price {
font-weight: 500;
font-size: 26rpx;
color: #333333;
line-height: 34rpx;
text-align: left;
font-style: normal;
margin-bottom: 14rpx;
}
&__scope {
font-weight: 400;
font-size: 26rpx;
color: #666666;
line-height: 34rpx;
text-align: left;
font-style: normal;
margin-bottom: 27rpx;
}
&__button {
width: 438rpx;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
font-size: 26rpx;
color: #666666;
&__btn {
display: flex;
align-items: center;
justify-content: center;
font-weight: 400;
font-size: 26rpx;
2026-06-02 11:39:23 +08:00
color: #FF4767;
2026-03-30 14:32:03 +08:00
line-height: 37rpx;
text-align: left;
font-style: normal;
width: 160rpx;
height: 58rpx;
border-radius: 32rpx;
2026-06-02 11:39:23 +08:00
border: 2rpx solid #FF4767;
2026-03-30 14:32:03 +08:00
}
}
}
}
}
</style>