Files
xl-mobile/src/components/TaskItem.vue

102 lines
2.6 KiB
Vue
Raw Normal View History

2025-03-27 15:38:21 +08:00
<script setup>
import dy from "../static/images/抖音.png";
import qrw from "../static/icons/qrw.png";
2025-05-12 19:45:27 +08:00
import {numberToCharacter, toPage} from "../utils/uils.js";
import dayjs from "dayjs";
const {data} = defineProps({
data: {
type: Object,
default: null
}
});
2025-03-27 15:38:21 +08:00
</script>
<template>
2025-06-12 20:56:58 +08:00
<view class="rounded-[8rpx] bg-[#fff] !p-[24rpx]" @click="toPage(`/pages/taskDetails/index?id=${data.id}&home=1`)">
2025-03-27 15:38:21 +08:00
<view class="!flex gap-[26rpx]">
2025-06-26 19:46:37 +08:00
<image class="!size-[88rpx] rounded-[50%] overflow-hidden" mode="aspectFill" :src="data.logo"></image>
2025-03-27 15:38:21 +08:00
<view class="!h-[88rpx] !flex flex-col justify-between">
2025-05-12 19:45:27 +08:00
<view class="title">{{ data.goods_name }}</view>
2025-03-27 15:38:21 +08:00
<view class="!flex gap-[8rpx]">
2025-05-12 19:45:27 +08:00
<view class="tag">{{ data.platform }}</view>
<view class="tag">{{ numberToCharacter(data.fb_num - 1) }}连发</view>
2025-03-27 15:38:21 +08:00
</view>
</view>
<view class="!h-[88rpx] !ml-auto">
<view class="price">
<text class="unit">¥</text>
2025-05-12 19:45:27 +08:00
{{ data.real_price.toFixed(2) }}
2025-03-27 15:38:21 +08:00
</view>
2025-05-12 19:45:27 +08:00
<view class="price-info">剩余{{ data.children_num }}个名额</view>
2025-03-27 15:38:21 +08:00
</view>
</view>
<view class="!mt-[34rpx] !px-[20rpx] !py-[10rpx] bg-[#F2F3F5] info relative">
2025-05-12 19:45:27 +08:00
截止时间{{ dayjs(data.end_time).format('MM月DD日 HH:mm') }}
2025-03-27 15:38:21 +08:00
<view class="absolute top-1/2 -translate-y-1/2 right-0">
<image class="!w-[168rpx]" :src="qrw" mode="widthFix"></image>
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
.qrw {
}
.info {
color: rgb(78, 89, 105);
font-size: 12px;
font-weight: 500;
line-height: 140%;
letter-spacing: 0;
text-align: left;
}
.title {
color: rgb(29, 33, 41);
font-size: 14px;
font-weight: 500;
line-height: 140%;
letter-spacing: 0;
text-align: left;
}
.price-info {
/* 12/Regular */
color: rgb(255, 87, 34);
font-size: 12px;
font-weight: 400;
line-height: 140%;
letter-spacing: 0;
text-align: right;
}
.price {
color: rgb(29, 33, 41);
font-size: 20px;
font-weight: 700;
line-height: 140%;
letter-spacing: 0;
text-align: right;
.unit {
font-size: 22rpx;
}
}
.tag {
color: rgb(22, 93, 255);
font-size: 10px;
font-weight: 400;
line-height: 140%;
letter-spacing: 0;
text-align: center;
border-radius: 4rpx;
background: rgb(232, 243, 255);
padding: 3rpx 8rpx;
}
</style>