|
@@ -1,77 +0,0 @@
|
|
|
-<template>
|
|
|
- <div id="">
|
|
|
- <el-row>
|
|
|
- <el-col :span="24" class="style">
|
|
|
- <el-col :span="24" class="top">
|
|
|
- <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="main">
|
|
|
- <prodDetails :productInfo="productInfo"></prodDetails>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-import NavBar from '@/layout/common/topInfo.vue';
|
|
|
-import prodDetails from '@/layout/market/prodDetail.vue';
|
|
|
-import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
-const { mapActions: marketproduct } = createNamespacedHelpers('marketproduct');
|
|
|
-
|
|
|
-export default {
|
|
|
- name: 'prodDetail',
|
|
|
- props: {},
|
|
|
- components: {
|
|
|
- NavBar,
|
|
|
- prodDetails, //详情
|
|
|
- },
|
|
|
- data: () => ({
|
|
|
- // 头部标题
|
|
|
- title: '',
|
|
|
- // meta为true
|
|
|
- isleftarrow: '',
|
|
|
- // 返回
|
|
|
- navShow: true,
|
|
|
- // 产品名称
|
|
|
- productInfo: {},
|
|
|
- }),
|
|
|
- created() {
|
|
|
- this.search();
|
|
|
- },
|
|
|
- computed: {
|
|
|
- id() {
|
|
|
- return this.$route.query.id;
|
|
|
- },
|
|
|
- },
|
|
|
- methods: {
|
|
|
- ...marketproduct(['fetch']),
|
|
|
- async search() {
|
|
|
- let res = await this.fetch(this.id);
|
|
|
- this.$set(this, `productInfo`, res.data);
|
|
|
- },
|
|
|
- },
|
|
|
- mounted() {
|
|
|
- this.title = this.$route.meta.title;
|
|
|
- this.isleftarrow = this.$route.meta.isleftarrow;
|
|
|
- },
|
|
|
-};
|
|
|
-</script>
|
|
|
-
|
|
|
-<style lang="less" scoped>
|
|
|
-.style {
|
|
|
- width: 100%;
|
|
|
- min-height: 667px;
|
|
|
- position: relative;
|
|
|
- background-color: #f9fafc;
|
|
|
-}
|
|
|
-.top {
|
|
|
- height: 46px;
|
|
|
- overflow: hidden;
|
|
|
- position: relative;
|
|
|
- z-index: 999;
|
|
|
-}
|
|
|
-.main {
|
|
|
- min-height: 570px;
|
|
|
-}
|
|
|
-</style>
|