hookehuyr

跳转作品详情页链接新增字段

......@@ -124,7 +124,8 @@ export default {
path: '/client/videoDetail',
query: {
prod_id: this.item.id,
type: this.item.type // 特殊标识,判断入口 为keepAlive使用
type: this.item.type, // 特殊标识,判断入口 为keepAlive使用
perf_id: this.item.perf_id
}
});
},
......
/*
* @Author: hookehuyr hookehuyr@gmail.com
* @Date: 2022-05-23 14:33:37
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2022-06-02 13:14:23
* @FilePath: /tswj/src/components/MuiVideo/methods.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import { prodActionAPI } from '@/api/C/prod.js'
import { Toast } from 'vant';
export const goToDetail = ({ id, book_id, type }, $router) => {
export const goToDetail = ({ id, book_id, type, perf_id }, $router) => {
$router.push({
path: '/client/videoDetail',
query: {
prod_id: id,
book_id,
type // 特殊标识,判断入口 为keepAlive使用
type, // 特殊标识,判断入口 为keepAlive使用
perf_id
}
});
}
......
......@@ -111,7 +111,8 @@ const goTo = () => { // 跳转作品详情页
query: {
prod_id: props.item.id,
book_id: props.item.book_id,
type: props.item.type // 特殊标识,判断入口 为keepAlive使用
type: props.item.type, // 特殊标识,判断入口 为keepAlive使用
perf_id: props.item.perf_id
}
});
}
......
......@@ -68,10 +68,7 @@
<template v-for="item in prod_list" :key="item">
<video-card :item="item">
<template #bookDetailSub>
<div
style="color: #999999; padding: 0px 1rem 0.5rem;"
@click="goToDetail(item.id, item.book_id, item.type, item.perf_id)"
>
<div style="color: #999999; padding: 0px 1rem 0.5rem;" @click="goToDetail(item)">
{{ item.kg_name }} | {{ item.localism_type }}
</div>
</template>
......@@ -291,14 +288,14 @@ onBeforeRouteLeave(() => {
})
/****************** 视频组件相关操作 *******************/
const goToDetail = (prod_id, book_id, type, perf_id) => { // 跳转作品详情页
const goToDetail = (v) => { // 跳转作品详情页
$router.push({
path: '/client/videoDetail',
query: {
prod_id,
book_id,
type, // 特殊标识,判断入口 为keepAlive使用
perf_id
prod_id: v.id,
book_id: v.book_id,
type: v.type, // 特殊标识,判断入口 为keepAlive使用
perf_id: v.perf_id
}
});
}
......
......@@ -121,7 +121,8 @@ const onClick = (item) => { // 跳转作品详情页
$router.push({
path: '/client/videoDetail',
query: {
prod_id: item.prod_id
prod_id: item.prod_id,
perf_id: item.perf_id
}
});
}
......