hookehuyr

fix 修复产品资料选中后,切换产品显示错误问题

<!--
* @Date: 2024-09-29 14:26:41
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-11-01 08:15:53
* @LastEditTime: 2024-11-01 08:36:00
* @FilePath: /hager/src/views/product/detail.vue
* @Description: 文件描述
-->
......@@ -146,35 +146,7 @@ export default {
mixins: [mixin.init],
data () {
return {
download_list: [{
id: 1,
type: 'yangben',
name: '产品样本',
show: false,
list: [],
checked_sum: 0,
}, {
id: 2,
type: 'canshu',
name: '技术参数',
show: false,
list: [],
checked_sum: 0,
}, {
id: 3,
type: 'shuomingshu',
name: '产品说明书',
show: false,
list: [],
checked_sum: 0,
}, {
id: 4,
type: 'jiaocheng',
name: '安装教程',
show: false,
list: [],
checked_sum: 0,
}],
download_list: [],
info: {},
info_images: [],
product_advantages: [],
......@@ -210,6 +182,35 @@ export default {
},
methods: {
async getInfo () {
this.download_list = [{
id: 1,
type: 'yangben',
name: '产品样本',
show: false,
list: [],
checked_sum: 0,
}, {
id: 2,
type: 'canshu',
name: '技术参数',
show: false,
list: [],
checked_sum: 0,
}, {
id: 3,
type: 'shuomingshu',
name: '产品说明书',
show: false,
list: [],
checked_sum: 0,
}, {
id: 4,
type: 'jiaocheng',
name: '安装教程',
show: false,
list: [],
checked_sum: 0,
}];
const { code, data } = await getProductInfoAPI( { id: this.$route.query.id });
if (code) {
this.info = data;
......