ZZJ
2022-03-09 cc7401e771e13b40bb7dea11ec26da3acfc8e5c7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<template>
  <div class="productDetail">
    <IndexHeader :opacity="false"></IndexHeader>
    <!-- 面包屑 -->
    <div class="heart" v-if="showData">
      <el-breadcrumb separator=">">
        <el-breadcrumb-item :to="{ path: '/product' }"
          >全部产品</el-breadcrumb-item
        >
        <el-breadcrumb-item>产品详情</el-breadcrumb-item>
      </el-breadcrumb>
 
      <!-- 购买配置 -->
      <PayCard :dataInfo="data"></PayCard>
 
      <!-- 功能区域 -->
      <Function :dataInfo="data"></Function>
    </div>
 
    <!-- 页尾 -->
    <Footer :isBlack="true"></Footer>
  </div>
</template>
 
<script>
import IndexHeader from "@/components/IndexHeader";
import PayCard from "@/views/productDetail/components/PayCard";
import Footer from "@/components/Footer";
import Function from "@/views/productDetail/components/Function";
import { findAllCenterProduct } from "@/api/product";
export default {
  created() {
    this.getProduct();
  },
  data() {
    return {
      data: {
        data: {},
      },
      showData: false,
    };
  },
  components: {
    IndexHeader,
    PayCard,
    Footer,
    Function,
  },
  methods: {
    getProduct() {
      let param = {
        page: 1,
        size: 1,
        inputText: this.$route.query.name,
        archType: "",
        gpuType: "",
        publishStatus: 1,
        productLabelId: "",
      };
      findAllCenterProduct(param)
        .then((res) => {
          this.data.data = res.data.list[0];
          this.showData = true;
        })
        .catch((err) => {
          console.log(err);
          this.$notify({
            type: "error",
            message: "查询产品失败",
            duration: 2500,
            offset: 57,
          });
        });
    },
  },
};
</script>
 
<style scoped lang="scss">
.productDetail {
  background-color: rgb(243, 245, 248);
 
  .el-breadcrumb {
    margin-top: 48px;
    margin-bottom: 24px;
 
    ::v-deep span {
      color: #666;
    }
  }
}
</style>