|
@@ -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>
|