|
@@ -1,117 +1,177 @@
|
|
|
<template>
|
|
|
- <view clang="ranking-main">
|
|
|
- <view class="serve-title ranking-title">本月热门服务</view>
|
|
|
- <view class="ranking-list">
|
|
|
- <view v-for="item in datas" :key="item.id" class="ranking-item">
|
|
|
- <img :src="item.img" alt="" srcset="" style="width: 160rpx;height: 160rpx;margin-right: 32rpx;">
|
|
|
- <view class="ranking-item-info">
|
|
|
- <view class="ranking-item-name">{{ item.name }}</view>
|
|
|
- <view class="ranking-item-tag flex-center">{{ item.tag }}</view>
|
|
|
- <view class="ranking-item-dese">{{ item.dese }}</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="ranking-item-start-box flex-center">
|
|
|
- <img src="/static/serverImg/home/start.png" alt="" style="width: 32rpx;height: 32rpx;">
|
|
|
- <view class="ranking-item-count">{{ item.count }}</view>
|
|
|
+ <view class="ranking-main">
|
|
|
+ <view>
|
|
|
+ <view class="ranking-title">
|
|
|
+ <image src="@/static/img/容器@1x (1).png" mode="widthFix" class="ranking-title-img"></image>
|
|
|
+ <view class="ranking-title-text">本月热门服务</view>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="ranking-list">
|
|
|
+ <view v-for="(item, index) in gitList" :key="index" class="ranking-list-item">
|
|
|
+ <image :src="item.businessIcon" mode="widthFix" class="ranking-list-item-img"></image>
|
|
|
+ <view class="ranking-list-item-content">
|
|
|
+ <view class="ranking-list-item-header">
|
|
|
+ <view class="ranking-list-item-title">{{ item.businessName }}</view>
|
|
|
+ <view class="ranking-list-item-rating">
|
|
|
+ <image src="@/static/img/容器@1x (3).png" mode="widthFix" class="star-icon"></image>
|
|
|
+ <text class="score-text">{{ item.score }}星</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="ranking-list-item-bottom">
|
|
|
+ <view class="ranking-list-item-tag">
|
|
|
+ <view class="ranking-list-item-tag-text">
|
|
|
+ {{ item.businessTierName }}
|
|
|
</view>
|
|
|
-
|
|
|
+ </view>
|
|
|
+ <view class="ranking-list-item-count">本月已服务:{{ item.totalCount }}</view>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
+ </view>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
+import { userSortShotService } from '@/api/VolunteerList.js'
|
|
|
+import { onMounted, ref } from 'vue';
|
|
|
+
|
|
|
+const userType = uni.getStorageSync('userType'); //读取本地存储
|
|
|
+const gitList = ref([])
|
|
|
+
|
|
|
+const gitData = async () => {
|
|
|
+ if (userType === 2) {
|
|
|
+ const res = await userSortShotService()
|
|
|
+ console.log(res, '>>>>>>>>>>>res')
|
|
|
+ gitList.value = res.data
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
-const datas = [
|
|
|
- {
|
|
|
- id: 1,
|
|
|
- img: '/static/serverImg/home/ranking2.png',
|
|
|
- name: '一对一解答',
|
|
|
- tag: '孩子陪伴',
|
|
|
- text: '个性化解答,有效提升',
|
|
|
- dese: '本月已服务360',
|
|
|
- count: '4.9'
|
|
|
- },
|
|
|
- {
|
|
|
- id: 2,
|
|
|
- img: '/static/serverImg/home/ranking.png',
|
|
|
- name: '专业深度保洁',
|
|
|
- tag: '家庭保洁',
|
|
|
- text: '专业设备,深度除螨,全面消毒',
|
|
|
- dese: '本月已服务289',
|
|
|
- count: '4.8'
|
|
|
- },
|
|
|
-
|
|
|
-]
|
|
|
-
|
|
|
+onMounted(() => {
|
|
|
+ gitData()
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
+.ranking-main {
|
|
|
+ padding: 30rpx;
|
|
|
+}
|
|
|
+
|
|
|
.ranking-title {
|
|
|
- margin-bottom: 18rpx ;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: flex-start;
|
|
|
+ margin-bottom: 30rpx;
|
|
|
+
|
|
|
+ .ranking-title-img {
|
|
|
+ width: 36rpx;
|
|
|
+ height: 36rpx;
|
|
|
+ margin-right: 10rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ranking-title-text {
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-size: 34rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ color: rgba(0, 0, 0, 0.8);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.ranking-list {
|
|
|
+ .ranking-list-item {
|
|
|
+ display: flex;
|
|
|
+ padding: 30rpx 0;
|
|
|
+ border-bottom: 1rpx solid rgba(0, 0, 0, 0.05);
|
|
|
+
|
|
|
+ .ranking-list-item-img {
|
|
|
+ width: 84rpx;
|
|
|
+ height: 84rpx;
|
|
|
+ border-radius: 50%;
|
|
|
+ margin-right: 20rpx;
|
|
|
+ flex-shrink: 0;
|
|
|
+ top: 33rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .ranking-list-item-content {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
|
|
|
- .ranking-item {
|
|
|
+ .ranking-list-item-header {
|
|
|
display: flex;
|
|
|
- align-items: flex-start;
|
|
|
justify-content: space-between;
|
|
|
- padding: 12px ;
|
|
|
- margin-bottom: 32rpx;
|
|
|
-
|
|
|
- border-radius: 8px;
|
|
|
- background: rgba(255, 255, 255, 1);
|
|
|
-
|
|
|
- border: 1px solid rgba(243, 244, 246, 1);
|
|
|
-
|
|
|
- box-shadow: 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px rgba(0, 0, 0, 0), 0px 1px 2px rgba(0, 0, 0, 0.05);
|
|
|
-
|
|
|
- .ranking-item-info {
|
|
|
- flex: 1;
|
|
|
-
|
|
|
- .ranking-item-name {
|
|
|
- font-size: 32rpx;
|
|
|
- font-weight: 400;
|
|
|
- line-height: 48rpx;
|
|
|
- color: rgba(51, 51, 51, 1);
|
|
|
- margin-bottom: 16rpx;
|
|
|
- }
|
|
|
-
|
|
|
- .ranking-item-tag {
|
|
|
- width: 128.03rpx;
|
|
|
- height: 46rpx;
|
|
|
- opacity: 1;
|
|
|
- border-radius: 19998rpx;
|
|
|
- background: rgba(251, 229, 225, 1);;
|
|
|
- margin-bottom: 16rpx;
|
|
|
- font-size: 24rpx;
|
|
|
- font-weight: 400;
|
|
|
- line-height: 32rpx;
|
|
|
- color: rgba(221, 94, 69, 1);
|
|
|
-
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- .ranking-item-dese {
|
|
|
- font-size: 24rpx;
|
|
|
- font-weight: 400;
|
|
|
- line-height: 32rpx;
|
|
|
- color: rgba(153, 153, 153, 1);
|
|
|
- }
|
|
|
+ align-items: center;
|
|
|
+ margin-bottom: -3rpx;
|
|
|
+
|
|
|
+ .ranking-list-item-title {
|
|
|
+ width: 374rpx;
|
|
|
+ height: 42rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-size: 32rpx;
|
|
|
+ font-weight: normal;
|
|
|
+ line-height: 42rpx;
|
|
|
+ letter-spacing: normal;
|
|
|
+ color: rgba(0, 0, 0, 0.8);
|
|
|
+ }
|
|
|
+
|
|
|
+ .ranking-list-item-rating {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .star-icon {
|
|
|
+ width: 84rpx;
|
|
|
+ height: 84rpx;
|
|
|
+ margin-right: 8rpx;
|
|
|
+ }
|
|
|
+
|
|
|
+ .score-text {
|
|
|
+ color: #FF7043;
|
|
|
+ font-size: 28rpx;
|
|
|
+ font-weight: 500;
|
|
|
+ }
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- .ranking-item-start-box {
|
|
|
- display: flex;
|
|
|
+ .ranking-list-item-bottom {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .ranking-list-item-tag {
|
|
|
+ /* 自动布局子元素 */
|
|
|
+ // width: 252rpx;
|
|
|
+ height: 34rpx;
|
|
|
+ /* 自动布局 */
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ // padding: 8rpx 12rpx;
|
|
|
+ z-index: 0;
|
|
|
+ border-radius: 10rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ border: 1rpx solid rgba(237, 93, 49, 0.8);
|
|
|
+ .ranking-list-item-tag-text{
|
|
|
+ /* 自动布局子元素 */
|
|
|
+ // width: 228rpx;
|
|
|
+ height: 22rpx;
|
|
|
+ z-index: 0;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-size: 26rpx;
|
|
|
+ font-weight: normal;
|
|
|
+ line-height: 22rpx;
|
|
|
+ letter-spacing: 0.02em;
|
|
|
+ color: #ED5D31;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- .ranking-item-count {
|
|
|
- font-size: 28rpx;
|
|
|
- font-weight: 400;
|
|
|
- line-height: 40rpx;
|
|
|
- color: rgba(51, 51, 51, 1);
|
|
|
- margin-left: 9rpx;
|
|
|
- }
|
|
|
+ .ranking-list-item-count {
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: rgba(0, 0, 0, 0.5);
|
|
|
+ text-align: right;
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|