chenlei 7 kuukautta sitten
vanhempi
commit
e83ee6aedf

+ 40 - 0
components/audio-item/audio-item.vue

@@ -79,6 +79,15 @@ async function handlePlayAudio(){
                 <text class="time">{{dayjs(props.data.publishedTime).format('YYYY-MM-DD')}}</text>
             </view>
         </view>
+        <view class="payment-info">
+            <view class="risk-level">
+                风险评级:R3
+            </view>
+            <view class="sub-box">
+                <view class="price">199¥</view>
+                <view class="sub-btn">立即订阅</view>
+            </view>
+        </view>
     </view>
 </template>
 
@@ -118,5 +127,36 @@ async function handlePlayAudio(){
         overflow: hidden;
         display: flex;
     }
+    .payment-info {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        margin-top: 10rpx;
+        .risk-level {
+            color: rgba(213, 73, 65, 1);
+            font-size: 24rpx;
+        }
+        .sub-box {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            .price {
+                line-height: 38rpx;
+                font-size: 38rpx;
+                color: rgba(241, 146, 92, 1);
+                margin-right: 10rpx;
+            }
+            .sub-btn {
+                font-size: 24rpx;
+                color: #fff;
+                width: 130rpx;
+                height: 48rpx;
+                line-height: 48rpx;
+                text-align: center;
+                border-radius: 24rpx;
+                background-color: var(--primary-color);
+            }
+        }
+    }
 }
 </style>

+ 44 - 4
components/report-item/report-item.vue

@@ -26,7 +26,7 @@ const props = defineProps({
     default:'reportId',
   },
   positionType:{ //布局格式 产品非要两种报告样式
-    type:Number,
+    type:Number, // 现在又不要了...
     default:1,
   }
 })
@@ -58,8 +58,17 @@ const title=computed(()=>{
         <view class="report-info">
             <!-- eslint-disable-next-line -->
             <view :class="['text-ellipsis--l' + 2, 'report-title']" v-html="title"></view>
-            <view :class="['text-ellipsis--l' + props.desLine, 'report-des']">{{props.data.abstract}}</view>
-            <view class="report-bot item-info" v-if="positionType===2">
+            <view :class="['text-ellipsis--l' + props.desLine, 'report-des']">研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介研究员简介</view>
+            <view class="sub">
+                <view class="risk">
+                    风险评级:R3
+                </view>
+                <view class="sub-box">
+                    <view class="price">199¥</view>
+                    <view class="sub-btn">立即订阅</view>
+                </view>
+            </view>
+            <!-- <view class="report-bot item-info" v-if="positionType===2">
                 <view class="report-label item-label">
                     <view v-for="item in props.data.permissionNames" :key="item" class="label-text"
                         :style="`color:#0078E8;border-color:#0078E8`"
@@ -68,7 +77,7 @@ const title=computed(()=>{
                 <view>
                     <text class="time">{{props.data.publishedTime}}</text>
                 </view>
-            </view>
+            </view> -->
         </view>
     </view>
     <view class="report-bot item-info" v-if="positionType===1">
@@ -122,12 +131,43 @@ const title=computed(()=>{
             }
         }
         .report-des {
+            height: 36rpx;
             margin: 16rpx 0;
             color: var(--text-color-grey);
             font-size: var(--font-size-small);
             line-height: 1.5;
             flex: 1;
         }
+        .sub {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            .risk {
+                font-style: 24rpx;
+                color: rgba(213, 73, 65, 1);
+            }
+            .sub-box {
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+                .price {
+                    line-height: 38rpx;
+                    font-size: 38rpx;
+                    color: rgba(241, 146, 92, 1);
+                    margin-right: 10rpx;
+                }
+                .sub-btn {
+                    font-size: 24rpx;
+                    color: #fff;
+                    width: 130rpx;
+                    height: 48rpx;
+                    line-height: 48rpx;
+                    text-align: center;
+                    border-radius: 24rpx;
+                    background-color: var(--primary-color);
+                }
+            }
+        }
     }
   }
 }

+ 40 - 0
components/video-item/video-item.vue

@@ -119,6 +119,15 @@ function handleVideoPause(){
                 <text class="time">{{dayjs(props.data.publishedTime).format('YYYY-MM-DD')}}</text>
             </view>
         </view>
+        <view class="payment-info">
+            <view class="risk-level">
+                风险评级:R3
+            </view>
+            <view class="sub-box">
+                <view class="price">199¥</view>
+                <view class="sub-btn">立即订阅</view>
+            </view>
+        </view>
     </view>
 </template>
 
@@ -158,5 +167,36 @@ function handleVideoPause(){
             }
         }
     }
+    .payment-info {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        margin-top: 10rpx;
+        .risk-level {
+            color: rgba(213, 73, 65, 1);
+            font-size: 24rpx;
+        }
+        .sub-box {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            .price {
+                line-height: 38rpx;
+                font-size: 38rpx;
+                color: rgba(241, 146, 92, 1);
+                margin-right: 10rpx;
+            }
+            .sub-btn {
+                font-size: 24rpx;
+                color: #fff;
+                width: 130rpx;
+                height: 48rpx;
+                line-height: 48rpx;
+                text-align: center;
+                border-radius: 24rpx;
+                background-color: var(--primary-color);
+            }
+        }
+    }
 }
 </style>

+ 28 - 7
pages-report/reportSearch/index.vue

@@ -1,5 +1,5 @@
 <script setup>
-import { onReachBottom } from '@dcloudio/uni-app'
+import { onReachBottom, onShareAppMessage, onReady,onShow,onPullDownRefresh } from '@dcloudio/uni-app'
 import { ref } from 'vue'
 import apiReport from '@/api/report'
 
@@ -9,6 +9,11 @@ let pageSize = 20
 let latestId = ref(0)
 const finished = ref(false)
 let loading = false
+const activeType = ref(2)
+const tabs = ref(null)
+onReady(() => {
+  tabs.value.setTrack()//设置滑块位置
+})
 async function getList() {
     loading = true
     const res=await apiReport.reportSearch({
@@ -45,14 +50,28 @@ onReachBottom(() => {
 function goReportDetail(item){
     
 }
+function handleChangeType(e) {
+    activeType.value = e.detail.value
+    wx.nextTick(()=>{
+        tabs.value.setTrack()//设置滑块位置
+    })
+ }
 </script>
 
 <template>
     <default-page>
         <view :class="['report-search-page', list.length > 0 ? 'grey-bg' : '']">
-            <view class="search-box">
-                <t-search :value="keyword" placeholder="请输入关键词" shape="round" action="搜索" @change="handleInputChange"
-                    @actionclick="handleSearch" @submit="handleSearch" />
+            <view class="search">
+                <view class="search-box">
+                    <t-search :value="keyword" placeholder="请输入关键词" shape="round" action="搜索" @change="handleInputChange"
+                        @actionclick="handleSearch" @submit="handleSearch" />
+                </view>
+                <t-tabs ref="tabs" theme="tag" :value="activeType" :space-evenly="false" @click="handleChangeType">
+                    <t-tab-panel label="报告" :value="0" />
+                    <t-tab-panel label="音频" :value="1" />
+                    <t-tab-panel label="视频" :value="2" />
+                    <t-tab-panel label="套餐" :value="3" />
+                </t-tabs>
             </view>
             <view class="report-list-wrap">
                 <report-item 
@@ -75,12 +94,14 @@ function goReportDetail(item){
 .report-search-page {
     --td-search-height: 70rpx;
     min-height: 100vh;
-
-    .search-box {
-        padding: var(--page-padding);
+    .search {
         position: sticky;
         top: 0;
         background-color: var(--bg-color);
     }
+    .search-box {
+        // padding: var(--page-padding);
+        padding: 34rpx 34rpx 0 34rpx;
+    }
 }
 </style>

+ 1 - 1
pages-user/authordetail/index.vue

@@ -163,7 +163,7 @@ const customTopBarRef = ref(null)
                     <template v-if="activeType===0">
                         <report-item 
                             v-for="item in authorInfo.workList?.reportList" :key="item.reportId"
-                            :positionType="2"
+                            :positionType="1"
                             :data="item"
                         ></report-item>
                         <empty-box v-if="authorInfo.workList?.reportList?.length === 0" text="暂无报告"></empty-box>

+ 67 - 0
pages/index/index.vue

@@ -41,6 +41,13 @@ async function goReportDetail(item){
     }); 
 }
 
+async function goTeam() {
+    await checkUserIsBind()
+      uni.navigateTo({
+      url: '/pages-user/teaminfo/index'
+    })
+}
+
 let bannerList = ref([])
 function getBannerList(){
     apiReport.getHottestReportList({size:3}).then(res=>{
@@ -108,6 +115,16 @@ onPullDownRefresh(()=>{
           </swiper-item>
         </swiper>
       </view>
+      <view class="to-team">
+        <view class="bg">
+          <view class="team-txt">
+            <view>研究团队</view>
+            <view class="team-btn" @click="goTeam()">立即前往</view>
+          </view>
+          <image mode="aspectFill" src="@/static/img/team.png" class="bg-img"></image>
+          <image mode="aspectFill" src="@/static/img/team-icon.png" class="img"></image>
+        </view>
+      </view>
       <view class="list-wrap report-list-wrap">
         <view class="label-box">
           <image
@@ -231,6 +248,56 @@ onPullDownRefresh(()=>{
     border-radius: 8rpx;
   }
 }
+.to-team {
+  height: 125rpx;
+  padding: 0 var(--page-padding);
+  .bg {
+    border-radius: 16rpx;
+    position:relative;
+    width: 100%;
+    height: 100%;
+    .team-txt{
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+      padding-left: 50rpx;
+      position: absolute;
+      z-index: 2;
+      font-size: 34rpx;
+      font-weight: 600;
+      line-height: 115rpx;
+      text-align: left;
+      color: rgba(255, 255, 255, 1);
+      .team-btn {
+        margin-left: 20rpx;
+        width: 168rpx;
+        height: 48rpx;
+        background-color: #fff;
+        font-family: PingFang SC;
+        color: #0078E8;
+        font-size: 24rpx;
+        font-weight: 600;
+        line-height: 48rpx;
+        text-align: center;
+        border-radius: 24rpx;
+      }
+    }
+    .bg-img {
+      position: absolute;
+      width: 100%;
+      height: 100%;
+      z-index: 1;
+    }
+    .img {
+      position: absolute;
+      z-index: 2;
+      right: 10rpx;
+      bottom: 10rpx;
+      width: 98rpx;
+      height: 98rpx;
+    }
+  }
+}
 .list-wrap {
   .label-box {
     padding: 0 var(--page-padding);

BIN
static/img/team-icon.png


BIN
static/img/team.png