<template>
<section>
<div class="details_info pos_r">
<div class="details_info_main pos_r h100">
<p class="info_name" v-model="customName">{{customName}}</p>
<p class="goods_price pos_r">
<span class="price_minus">¥</span>
<span class="min_price" v-model="priceMin">{{priceMin}}</span>
<span class="link_minus">-</span>
<span class="max_price" v-model="p_max">{{p_max}}</span>
</p>
<p class="goods_sales flex flex-pack-justify">
<span>
<b>快递:</b>
<b v-model="made_kp" v-if="made_kp === '0'">免运费</b>
<b v-model="made_kp" v-else>{{made_kp}}</b>
</span>
<span v-model="shop_address">{{shop_address}}</span>
</p>
<div class="info_btn pos_r clearfix">
<div class="info_btn_l h100 fl">
<a href="javascript:;" class="dialogue fl" @click="chatClick()">
<i class="fa fa-comments-o d-b text-c"></i>
<span class="d-b text-c">客服</span>
</a>
<a href="javascript:;" class="collect fr" @click="chatClick()">
<i class="fa fa-star-o d-b text-c"></i>
<span class="d-b text-c">收藏</span>
</a>
</div>
<div class="info_btn_r h100 fr">
<a href="javascript:;" class="customBtn d-b h100 text-c" @click="chatClick()">立即订制</a>
</div>
</div>
</div>
</div>
</section>
</template>
<script>
import '../static/css/public.css'
import '../static/css/customDInfo.css'
import globalconfig from '../plugins/globalconfig/globalconfig'
import axios from 'axios'
export default {
data () {
return {
customName: '',
priceMin: '',
p_max: '',
made_kp: '',
shop_address: ''
}
},
head () {
return {
title: this.customName,
meta: [
{hid: 'source', name: this.customName, content: this.customName},
{hid: 'source1', name: '诚订1', content: this.customName}
]
}
},
async asyncData ({params}) { // 运行状态监测
// 获取订制商品价格等信息
let goodsTopUrl = globalconfig.getUrl('customInfo')
console.log({params})
let customGoods = axios.post(goodsTopUrl, {
made_id: 580
}).then(function (res) {
console.log(res)
let madeName = res.data.data.made_name
let pMin = res.data.data.made_pmin
let pMax = res.data.data.made_pmax
let madeKp = res.data.data.made_kp
let shopAddress = res.data.data.shop_address
return {
customName: madeName,
priceMin: pMin,
p_max: pMax,
made_kp: madeKp,
shop_address: shopAddress
}
})
return customGoods
},
mounted: function () {
let b = this.$route.params
console.log(b)
},
methods: {
// 点击跳转下载APP页面
chatClick: function () {
this.$router.push({path: '/downLoad/'})
}
}
}
</script>
<style scoped>
</style>
建议给代码加上高亮