123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <template>
- <view class="bookInfo_content">
- <view class="container">
- <view class="container__book-cover">
- <image class="image" :src="book_data.book_cover" mode="aspectFit"></image>
- </view>
- <view class="container__info">
- <view class="container__info__book-name">
- {{ book_data.book_name }}
- </view>
- <view class="container__info__author-name">
- {{ book_data.author_name }}
- </view>
- <view class="container__info__category-name">
- {{book_data.category_name + ' · '}}{{category_string}}
- </view>
- <view class="container__info__bottom-info">
- <view class="container__info__bottom-info__read-number">
- {{util.convertUnit(book_data.book_read_num)}}人在读
- </view>
- <view class="container__info__bottom-info__score">
- <view class="container__info__bottom-info__score__number">
- {{book_data.book_score}}
- </view>
- <view class="container__info__bottom-info__score__unit">分</view>
- </view>
- </view>
- </view>
- </view>
-
- </view>
- </template>
- <script setup lang="ts">
- import { ref } from 'vue';
- import { util } from '../../framework/util';
- const props = defineProps({
- book_data: Object,
- })
- let category_string = ref('')
- category_string.value = props.book_data.book_is_action==1?`完结`:`连载至${props.book_data.chapter_count}章`
- let rate = ref(props.book_data.book_score/2)
- </script>
- <style lang="scss">
- .bookInfo_content{
- display: flex;
- flex-direction: column;
- background-color: $uni-theme-color;
-
- .container{
- display: flex;
- flex-direction: row;
- padding: 40rpx 20rpx 30rpx 20rpx;
-
- &__book-cover{
- flex-shrink: 0;
- width: 200rpx;
- height: 250rpx;
- .image{
- width: 100%;
- height: 100%;
- }
- }
- &__info {
- display: flex;
- width: 100%;
- flex-direction: column;
- margin-left: 20rpx;
- // background-color: green;
-
- &__book-name {
- margin-top: 2rpx;
- font-size: 22px;
- }
- &__author-name {
- margin-top: 18rpx;
- font-size: 17px;
- color: #894D4D;
- }
- &__category-name {
- margin-top: 18rpx;
- font-size: 16px;
- color: #323232;
- }
- &__bottom-info{
- margin-top: 18rpx;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- // background-color: green;
- &__read-number {
- font-size: 16px;
- color: #323232;
- }
- &__score {
- display: flex;
- flex-direction: row;
- // align-items: flex-end;
- // background-color: red;
- &__number {
- font-size: 22px;
- font-weight: 480;
- color: #323232;
- }
- &__unit{
- margin-top: 20rpx;
- margin-left: 5rpx;
- font-size: 12px;
- color: #323232;
- }
- }
- }
- }
- }
-
- }
- </style>
|