Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
tswj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2022-10-01 21:21:14 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
59ae729e678fb20e60a38c1f49986d64e40cdc86
59ae729e
1 parent
10ddd22e
客户新需求:书籍列表传值kg_id
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
src/composables/useVideoList.js
src/views/client/chooseBook.vue
src/composables/useVideoList.js
View file @
59ae729
/*
* @Date: 2022-05-05 18:07:16
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-
06-20 11:01:53
* @LastEditTime: 2022-
10-01 21:13:07
* @FilePath: /tswj/src/composables/useVideoList.js
* @Description: 文件描述
*/
...
...
@@ -21,7 +21,7 @@ export const useVideoList = () => {
const
chooseLanguage
=
ref
({
text
:
'普通话'
,
val
:
'普通话'
});
// 默认选中普通话
/**
* 切换视频语言回调
* @param {*} type
* @param {*} type
*/
const
toggleLanguage
=
(
type
)
=>
{
if
(
type
===
'mandarin'
)
{
...
...
@@ -70,11 +70,11 @@ export const useVideoList = () => {
})
.
catch
(
err
=>
{
// tslint:disable-next-line: no-console
console
.
error
(
err
);
console
.
error
(
err
);
})
const
showPicker
=
ref
(
false
);
/**
* 选择方言确认后回调
* @param {*} param
...
...
@@ -108,7 +108,7 @@ export const useVideoList = () => {
*/
const
onLoad
=
async
()
=>
{
// 异步更新数据
const
{
data
,
code
}
=
await
bookInfoAPI
({
book_id
:
$route
.
query
.
id
,
localism_type
:
chooseLanguage
.
value
.
text
,
limit
:
limit
.
value
,
offset
:
offset
.
value
})
const
{
data
,
code
}
=
await
bookInfoAPI
({
book_id
:
$route
.
query
.
id
,
kg_id
:
$route
.
query
.
kg_id
?
$route
.
query
.
kg_id
:
0
,
localism_type
:
chooseLanguage
.
value
.
text
,
limit
:
limit
.
value
,
offset
:
offset
.
value
})
if
(
code
===
1
)
{
bookInfo
.
value
=
data
;
flowFn
(
data
.
prod_list
,
prod_list
,
offset
,
loading
,
finished
,
finishedTextStatus
,
emptyStatus
);
...
...
src/views/client/chooseBook.vue
View file @
59ae729
...
...
@@ -43,7 +43,7 @@
</van-sticky> -->
<template v-for="(item, key) in kgInfo.book_list" :key="key">
<book-card v-if="item.show" :type="USER_ROLE.CLIENT" :item="item"
@on-click="go('/client/bookDetail', { id: item.id })" />
@on-click="go('/client/bookDetail', { id: item.id
, kg_id: $route.query.kg_id
})" />
</template>
<van-empty v-if="emptyStatus" class="custom-image" :image="no_image" description="暂无书籍信息" />
</div>
...
...
@@ -66,6 +66,7 @@ import { ref, watch } from 'vue'
import { USER_ROLE } from '@/constant'
import { sharePage } from '@/composables/useShare.js'
const $route = useRoute();
const go = useGo();
// 删除所有的 keep-alive 缓存
killPages();
...
...
Please
register
or
login
to post a comment