let id = this.$route.params.id;??
<script>
  export default {
    name: 'Show',
    data() {
      return {
        product: {},
        recommends: []
      }
    },
    //初始化
    created() {
      this.init();
    },
    methods: {
      init: function () {
       
        this.axios.get(`api/product/show/${id}`).then((res) => {
          //console.log(res);
          this.product = res.data.product;
          this.recommends = res.data.recommends;
        })
      },
 
                            