fix: fix the bug of the play view
This commit is contained in:
Binary file not shown.
@@ -131,12 +131,12 @@ func (svc *Service) List(ctx context.Context, tenantId, userId int64, filter *Li
|
||||
|
||||
if filter.OffsetID > 0 {
|
||||
if filter.Action == 0 {
|
||||
stmt = stmt.WHERE(tbl.ID.GT(Int(filter.OffsetID)))
|
||||
stmt = stmt.WHERE(tbl.ID.LT(Int(filter.OffsetID)))
|
||||
stmt = stmt.LIMIT(10)
|
||||
}
|
||||
|
||||
if filter.Action == 1 {
|
||||
stmt = stmt.WHERE(tbl.ID.LT(Int(filter.OffsetID)))
|
||||
stmt = stmt.LIMIT(10)
|
||||
stmt = stmt.WHERE(tbl.ID.GT(Int(filter.OffsetID)))
|
||||
}
|
||||
} else {
|
||||
stmt = stmt.LIMIT(10)
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
<van-back-top bottom="80" />
|
||||
|
||||
|
||||
<van-list v-model:loading="loading" :finished="finished" finished-text="没有更多了" offset="100" @load="loadData">
|
||||
<van-list style="padding-bottom: 3em" v-model:loading="loading" :finished="finished" finished-text="没有更多了"
|
||||
offset="100" @load="loadData">
|
||||
<list-item-card v-for="item in items" :key="item" :item="item" :bought="bought" />
|
||||
</van-list>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineComponent, ref, onMounted } from "vue";
|
||||
import ListItemCard from "@/components/ListItemCard.vue";
|
||||
import request from "@/utils/request";
|
||||
import { defineComponent, ref } from "vue";
|
||||
|
||||
export default defineComponent({
|
||||
props: {
|
||||
|
||||
@@ -16,11 +16,17 @@ const router = createRouter({
|
||||
path: '',
|
||||
name: 'tab.home',
|
||||
component: HomeView,
|
||||
meta: {
|
||||
title: '首页',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'bought',
|
||||
name: 'tab.bought',
|
||||
component: () => import('../views/tabs/BoughtView.vue'),
|
||||
meta: {
|
||||
title: '已购买',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'user',
|
||||
@@ -29,6 +35,9 @@ const router = createRouter({
|
||||
// this generates a separate chunk (About.[hash].js) for this route
|
||||
// which is lazy-loaded when the route is visited.
|
||||
component: () => import('../views/tabs/UserView.vue'),
|
||||
meta: {
|
||||
title: '个人中心',
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
@@ -36,6 +45,9 @@ const router = createRouter({
|
||||
path: '/t/:tenant/play/:hash',
|
||||
name: 'play',
|
||||
component: () => import('../views/PlayView.vue'),
|
||||
meta: {
|
||||
title: '播放',
|
||||
}
|
||||
},
|
||||
],
|
||||
})
|
||||
@@ -55,4 +67,8 @@ router.beforeEach((to, from, next) => {
|
||||
// }
|
||||
})
|
||||
|
||||
router.afterEach((to, from) => {
|
||||
document.title = to.meta.title || ''
|
||||
})
|
||||
|
||||
export default router
|
||||
|
||||
@@ -155,6 +155,7 @@ const formatTime = (time) => {
|
||||
}
|
||||
|
||||
#video {
|
||||
background-color: #cccccc;
|
||||
aspect-ratio: 4 / 3;
|
||||
width: 100%;
|
||||
object-fit: fill;
|
||||
|
||||
Reference in New Issue
Block a user