Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
hager
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
2024-12-09 16:38:08 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
592c8f38c18ae79aadf70a2211fb7cc195fd02c3
592c8f38
1 parent
6a63e58c
🐞 fix: 底部解决方案跳转在解决方案页面不处理问题
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
21 deletions
src/views/solution/detail.vue
src/views/solution/detail.vue
View file @
592c8f3
<!--
* @Date: 2024-09-29 15:49:27
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-12-09 1
3:46:50
* @LastEditTime: 2024-12-09 1
6:36:59
* @FilePath: /hager/src/views/solution/detail.vue
* @Description: 文件描述
-->
...
...
@@ -212,29 +212,39 @@ export default {
category_description: '',
}
},
async mounted () {
const { code, data } = await getSolutionCaseAPI({ cid: this.$route.query.id });
if (code) {
this.case_info = data;
this.case_banner = data.file?.banner ? data.file?.banner[0] : 'https://cdn.ipadbiz.cn/hager/banner/banner08.png';
this.case_list = data.list;
this.current_index = this.$route.query.current_index ? +this.$route.query.current_index : 0;
this.current_id = this.case_list[this.current_index]['id'];
this.success_data_list = this.case_list[this.current_index].list ?? [];
this.category_description = this.case_list[this.current_index].category_description ?? '';
this.case_img = this.case_list[this.current_index].file?.img ? this.case_list[this.current_index].file?.img : ['https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'];
this.product_list = this.case_list[this.current_index].product ?? [];
mounted () {
this.initialize();
},
watch: {
'$route.query.id' (old, val) {
if (old !== val) {
this.initialize();
}
}
this.$nextTick(() => {
this.$refs.myProductSwiper.$swiper?.on('breakpoint', (swiper) => {
// breakpoint时 显示的条数
this.productSlidesPerView = swiper.slidesPerView
});
clampText('.clamp-text', 3); // 限制显示三行文本
});
},
methods: {
async initialize () {
const { code, data } = await getSolutionCaseAPI({ cid: this.$route.query.id });
if (code) {
this.case_info = data;
this.case_banner = data.file?.banner ? data.file?.banner[0] : 'https://cdn.ipadbiz.cn/hager/banner/banner08.png';
this.case_list = data.list;
this.current_index = this.$route.query.current_index ? +this.$route.query.current_index : 0;
this.current_id = this.case_list[this.current_index]['id'];
this.success_data_list = this.case_list[this.current_index].list ?? [];
this.category_description = this.case_list[this.current_index].category_description ?? '';
this.case_img = this.case_list[this.current_index].file?.img ? this.case_list[this.current_index].file?.img : ['https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg'];
this.product_list = this.case_list[this.current_index].product ?? [];
}
this.$nextTick(() => {
this.$refs.myProductSwiper.$swiper?.on('breakpoint', (swiper) => {
// breakpoint时 显示的条数
this.productSlidesPerView = swiper.slidesPerView
});
clampText('.clamp-text', 3); // 限制显示三行文本
});
},
onClickImg (item) {
window.open(item, '_blank');
},
...
...
Please
register
or
login
to post a comment