|
@@ -17,17 +17,6 @@
|
|
<div class="home-detail-information">
|
|
<div class="home-detail-information">
|
|
<div class="house-name">{{detail.name}}</div>
|
|
<div class="house-name">{{detail.name}}</div>
|
|
<div class="sub-title">{{detail.subtitle}}</div>
|
|
<div class="sub-title">{{detail.subtitle}}</div>
|
|
- <div class="product-list">
|
|
|
|
- <div class="coupon-card" v-for="(item,index) in list" :key="index"
|
|
|
|
- @click="checkProduct(item)">
|
|
|
|
- <div class="coupon-card-box" :class="{active:detail.id === item.id}">
|
|
|
|
- <div>{{item.name}}</div>
|
|
|
|
- <div class="icon-check">
|
|
|
|
- <i class="el-icon-check"></i>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
<div class="house-price">
|
|
<div class="house-price">
|
|
<div class="color-danger price">
|
|
<div class="color-danger price">
|
|
<span class="average alibaba">{{detail.price}}</span><span class="unit">元/次</span>
|
|
<span class="average alibaba">{{detail.price}}</span><span class="unit">元/次</span>
|
|
@@ -81,7 +70,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
- getServeListByQuery
|
|
|
|
|
|
+ getServeById
|
|
} from '@/api/serve'
|
|
} from '@/api/serve'
|
|
import {
|
|
import {
|
|
getCustomerServeDetail
|
|
getCustomerServeDetail
|
|
@@ -94,7 +83,7 @@
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
loading: false,
|
|
loading: false,
|
|
- type: '',
|
|
|
|
|
|
+ productId: '',
|
|
detail: {},
|
|
detail: {},
|
|
list: [],
|
|
list: [],
|
|
rotatingImages: [],
|
|
rotatingImages: [],
|
|
@@ -113,35 +102,25 @@
|
|
methods: {
|
|
methods: {
|
|
init() {
|
|
init() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- this.type = Crypto.AES.decrypt(decodeURIComponent(this.$route.query.type), 'bosshand');
|
|
|
|
- if (!this.type) return this.loading = false;
|
|
|
|
|
|
+ this.productId = Crypto.AES.decrypt(decodeURIComponent(this.$route.query.sign), 'bosshand');
|
|
this.getDetail();
|
|
this.getDetail();
|
|
},
|
|
},
|
|
getDetail() {
|
|
getDetail() {
|
|
- getServeListByQuery({
|
|
|
|
- productLevelId: this.type,
|
|
|
|
- state: 1
|
|
|
|
- }).then(res => {
|
|
|
|
|
|
+ getServeById(this.productId).then(res => {
|
|
if (res.state) {
|
|
if (res.state) {
|
|
- if (res.data.length === 0) return this.loading = false;
|
|
|
|
- this.list = res.data;
|
|
|
|
- this.initDetail(this.list.length - 1);
|
|
|
|
- } else {
|
|
|
|
- this.loading = false;
|
|
|
|
|
|
+ this.detail = res.data;
|
|
|
|
+ if (this.detail.rotatingImages) {
|
|
|
|
+ this.rotatingImages = JSON.parse(this.detail.rotatingImages);
|
|
|
|
+ this.initSwiper();
|
|
|
|
+ }
|
|
|
|
+ if (this.detail.detailedImage) {
|
|
|
|
+ this.detailedImage = JSON.parse(this.detail.detailedImage);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.loading = false;
|
|
this.loading = false;
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- initDetail(val) {
|
|
|
|
- this.detail = this.list[val];
|
|
|
|
- if (this.detail.rotatingImages) {
|
|
|
|
- this.rotatingImages = JSON.parse(this.detail.rotatingImages);
|
|
|
|
- this.initSwiper();
|
|
|
|
- }
|
|
|
|
- if (this.detail.detailedImage) {
|
|
|
|
- this.detailedImage = JSON.parse(this.detail.detailedImage);
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
|
|
+ initDetail(val) {},
|
|
initSwiper() {
|
|
initSwiper() {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
this.swiper = new Swiper(".swiper-container", {
|
|
this.swiper = new Swiper(".swiper-container", {
|
|
@@ -153,10 +132,6 @@
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- checkProduct(item) {
|
|
|
|
- let index = this.list.findIndex(node => node.id === item.id);
|
|
|
|
- this.initDetail(index);
|
|
|
|
- },
|
|
|
|
payItem() {
|
|
payItem() {
|
|
if (!this.$store.getters.user.userId) {
|
|
if (!this.$store.getters.user.userId) {
|
|
let index = this.$store.getters.loginVisible;
|
|
let index = this.$store.getters.loginVisible;
|