|
@@ -6,8 +6,8 @@
|
|
:hasHeight="false"></app-nav-bar>
|
|
:hasHeight="false"></app-nav-bar>
|
|
|
|
|
|
<!--商品轮播图-->
|
|
<!--商品轮播图-->
|
|
- <app-goods-banner v-bind:pic-list="goods.pic_url" v-bind:share="goods.share"
|
|
|
|
- v-bind:video-url="goods.video_url" v-bind:goods_id="goodsId" :isCart="true"></app-goods-banner>
|
|
|
|
|
|
+ <app-goods-banner :pic-list="goods.pic_url" :share="goods.share"
|
|
|
|
+ :video-url="goods.video_url" :goods_id="goodsId" :isCart="true"></app-goods-banner>
|
|
<!-- 套装内商品 -->
|
|
<!-- 套装内商品 -->
|
|
<view style="background-color: #fff;">
|
|
<view style="background-color: #fff;">
|
|
<view class="link ">
|
|
<view class="link ">
|
|
@@ -19,31 +19,32 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<hxj-scroll-list :itemWidth="'168rpx'" :itemHeight="'168rpx'" :list="list"></hxj-scroll-list>
|
|
<hxj-scroll-list :itemWidth="'168rpx'" :itemHeight="'168rpx'" :list="list"></hxj-scroll-list>
|
|
- <hxj-bd-info :theme="getTheme" :name="name" :price="price" :original-price="original_price"
|
|
|
|
- :sales="sales" :goods-id="goodsId" :extra-quick-share="extra_quick_share"
|
|
|
|
|
|
+ <hxj-bd-info :theme="getTheme" :name="compositionList.name" :price="compositionList.price" :original-price="compositionList.price"
|
|
|
|
+ :sales="compositionList.sale_num+compositionList.virtual_sale_num" :goods-id="goodsId" :extra-quick-share="extra_quick_share"
|
|
:app-share-pic="app_share_pic ? app_share_pic : goods.pic_url[0].pic_url"
|
|
:app-share-pic="app_share_pic ? app_share_pic : goods.pic_url[0].pic_url"
|
|
:app-share-title="app_share_title ? app_share_title : name"
|
|
:app-share-title="app_share_title ? app_share_title : name"
|
|
:poster-config="poster_config + `&goods_id=` + goodsId"
|
|
:poster-config="poster_config + `&goods_id=` + goodsId"
|
|
:poster-generate="poster_generate + `&goods_id=` + goodsId" :has-poster-nav="true" :goods="goods"
|
|
:poster-generate="poster_generate + `&goods_id=` + goodsId" :has-poster-nav="true" :goods="goods"
|
|
- @share="hShareAppMessage" @quickShare="quickShare" @receive="receive"></hxj-bd-info>
|
|
|
|
|
|
+ @share="hShareAppMessage" @quickShare="quickShare" @receive="receive">
|
|
|
|
+ </hxj-bd-info>
|
|
<view class="hxj-goods-list" :style="{ height: isOpen ? 'auto' : '270rpx' }">
|
|
<view class="hxj-goods-list" :style="{ height: isOpen ? 'auto' : '270rpx' }">
|
|
<view class="main-between" style="width: 560rpx;">
|
|
<view class="main-between" style="width: 560rpx;">
|
|
<view class="title">套装内商品</view>
|
|
<view class="title">套装内商品</view>
|
|
<view class="title">数量</view>
|
|
<view class="title">数量</view>
|
|
</view>
|
|
</view>
|
|
<view class="main-between item"
|
|
<view class="main-between item"
|
|
- v-for="(item, index) in ['ins风高档皮质沙发','歌尚雅新款单人沙发布艺小户型客厅','梵瑟 北欧全实木沙发组合新中式现代简约','梵瑟 北欧全实木沙发组合新中式现代简约','客厅家用茶几桌轻奢现代小户型']"
|
|
|
|
|
|
+ v-for="(item, index) in list"
|
|
:key="index">
|
|
:key="index">
|
|
<view class="main-between" style="width: 560rpx;">
|
|
<view class="main-between" style="width: 560rpx;">
|
|
- <view class="name t-omit">{{item}}</view>
|
|
|
|
- <view class="num">x1</view>
|
|
|
|
|
|
+ <view class="name t-omit">{{item.name}}</view>
|
|
|
|
+ <view class="num">x{{item.goods_num}}</view>
|
|
</view>
|
|
</view>
|
|
- <view class="zk cropss-center" v-if="index === 1 && isOpen === false" @click="isOpen = true">
|
|
|
|
|
|
+ <view class="zk cropss-center" v-if="index === 1 &&list.length>2 && isOpen === false" @click="isOpen = true">
|
|
展开
|
|
展开
|
|
<image src="https://t17.9026.com/web/statics/image/user-center/arrow-bottom.png" mode="">
|
|
<image src="https://t17.9026.com/web/statics/image/user-center/arrow-bottom.png" mode="">
|
|
</image>
|
|
</image>
|
|
</view>
|
|
</view>
|
|
- <view class="zk cropss-center" v-if="index === 4 && isOpen === true" @click="isOpen = false">
|
|
|
|
|
|
+ <view class="zk cropss-center" v-if="index===list.length-1 && isOpen === true" @click="isOpen = false">
|
|
收起
|
|
收起
|
|
<image src="https://t17.9026.com/web/statics/image/user-center/arrow-top.png" mode="">
|
|
<image src="https://t17.9026.com/web/statics/image/user-center/arrow-top.png" mode="">
|
|
</image>
|
|
</image>
|
|
@@ -85,9 +86,9 @@
|
|
<!-- 客服组件 -->
|
|
<!-- 客服组件 -->
|
|
<bd-service :name="name" :url="sendPath"></bd-service>
|
|
<bd-service :name="name" :url="sendPath"></bd-service>
|
|
</template>
|
|
</template>
|
|
- <view class="bd-back dir-top-nowrap main-center cross-center box-grow-0" @click="setFavorite">
|
|
|
|
|
|
+ <view class="bd-back dir-top-nowrap main-center cross-center box-grow-0" @click="setCollect">
|
|
<image class="bd-icon" :src="
|
|
<image class="bd-icon" :src="
|
|
- favorite
|
|
|
|
|
|
+ compositionList.is_collect
|
|
? 'https://shop.9026.com/web/statics/image/mall/static/icon/icon-favorite-active.png'
|
|
? 'https://shop.9026.com/web/statics/image/mall/static/icon/icon-favorite-active.png'
|
|
: 'https://shop.9026.com/web/statics/image/mall/static/icon/icon-favorite.png'
|
|
: 'https://shop.9026.com/web/statics/image/mall/static/icon/icon-favorite.png'
|
|
"></image>
|
|
"></image>
|
|
@@ -162,10 +163,6 @@
|
|
</template>
|
|
</template>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <!--快捷导航-->
|
|
|
|
- <!-- <app-quick-navigation></app-quick-navigation> -->
|
|
|
|
- <u-attr v-if="is_negotiable === 0 && exchangeStatus == null && goods && goods.type" v-model="attrShow"
|
|
|
|
- :goods="goods" :theme="getTheme" :checked="checked" @check="check" @update="updateCartNumber"></u-attr>
|
|
|
|
</template>
|
|
</template>
|
|
<app-close v-if="showClose" :modal="false" @update="getMall"></app-close>
|
|
<app-close v-if="showClose" :modal="false" @update="getMall"></app-close>
|
|
</app-layout>
|
|
</app-layout>
|
|
@@ -228,31 +225,9 @@
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
isCouponShow: false,
|
|
isCouponShow: false,
|
|
- list: [{
|
|
|
|
- image: 'https://t17.9026.com/web/statics/image/index/temporary/jhk-1634283687206.png',
|
|
|
|
- title: '',
|
|
|
|
- tag: '',
|
|
|
|
- link: ''
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- image: 'https://t17.9026.com/web/statics/image/index/temporary/jhk-1634284372084.png',
|
|
|
|
- title: '',
|
|
|
|
- tag: '',
|
|
|
|
- link: ''
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- image: 'https://t17.9026.com/web/statics/image/index/temporary/jhk-1634283667210.png',
|
|
|
|
- title: '',
|
|
|
|
- tag: '',
|
|
|
|
- link: ''
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- image: 'https://t17.9026.com/web/statics/image/index/2.png',
|
|
|
|
- title: '',
|
|
|
|
- tag: ''
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
|
|
+ list: [],
|
|
isOpen: false, //hxj套装内商品是否展开
|
|
isOpen: false, //hxj套装内商品是否展开
|
|
|
|
+ compositionList:[], //套餐详情
|
|
|
|
|
|
showClose: false,
|
|
showClose: false,
|
|
is_open: 0,
|
|
is_open: 0,
|
|
@@ -544,11 +519,20 @@
|
|
this.$request({
|
|
this.$request({
|
|
url: this.$api.composition.info,
|
|
url: this.$api.composition.info,
|
|
data: {
|
|
data: {
|
|
- composition_id: id
|
|
|
|
|
|
+ composition_id: 3
|
|
},
|
|
},
|
|
method: 'post'
|
|
method: 'post'
|
|
}).then(res => {
|
|
}).then(res => {
|
|
-
|
|
|
|
|
|
+ if(res.code===0){
|
|
|
|
+ this.compositionList=res.data
|
|
|
|
+ for (let i = 0; i < this.compositionList.compositionGoods.length; i++) {
|
|
|
|
+ let image=this.compositionList.compositionGoods[i].goods.cover_pic
|
|
|
|
+ let id=this.compositionList.compositionGoods[i].goods.id
|
|
|
|
+ let name=this.compositionList.compositionGoods[i].goods.name
|
|
|
|
+ let goods_num=this.compositionList.compositionGoods[i].goods_num
|
|
|
|
+ this.list.push({image,link:`/pages/goods/goods?id=${id}`,name,goods_num})
|
|
|
|
+ }
|
|
|
|
+ }
|
|
})
|
|
})
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
this.$showLoading();
|
|
this.$showLoading();
|
|
@@ -604,11 +588,6 @@
|
|
template_message_list,
|
|
template_message_list,
|
|
is_finish_sell
|
|
is_finish_sell
|
|
} = response.data.goods;
|
|
} = response.data.goods;
|
|
- uni.setNavigationBarTitle({
|
|
|
|
- title: name
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
- this.name = name;
|
|
|
|
this.app_share_pic = app_share_pic;
|
|
this.app_share_pic = app_share_pic;
|
|
this.app_share_title = app_share_title;
|
|
this.app_share_title = app_share_title;
|
|
this.goods = response.data.goods;
|
|
this.goods = response.data.goods;
|
|
@@ -697,21 +676,17 @@
|
|
url: '/pages/index/index'
|
|
url: '/pages/index/index'
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- setFavorite() {
|
|
|
|
- let url = this.$api.user.favorite_add;
|
|
|
|
- let favorite = true;
|
|
|
|
- if (this.favorite) {
|
|
|
|
- url = this.$api.user.favorite_remove;
|
|
|
|
- favorite = false;
|
|
|
|
- }
|
|
|
|
- this.favorite = favorite;
|
|
|
|
|
|
+ setCollect() {
|
|
this.$request({
|
|
this.$request({
|
|
- url: url,
|
|
|
|
|
|
+ url: this.$api.composition.collect,
|
|
data: {
|
|
data: {
|
|
- goods_id: this.goodsId
|
|
|
|
- }
|
|
|
|
|
|
+ composition_id: this.compositionList.id
|
|
|
|
+ },
|
|
|
|
+ method:'post'
|
|
}).then(response => {
|
|
}).then(response => {
|
|
- if (response.code === 0) {} else {
|
|
|
|
|
|
+ if (response.code === 0) {
|
|
|
|
+ this.compositionList.is_collect==0?this.compositionList.is_collect=1:this.compositionList.is_collect=0
|
|
|
|
+ } else {
|
|
uni.showModal({
|
|
uni.showModal({
|
|
title: '提示',
|
|
title: '提示',
|
|
content: response.msg,
|
|
content: response.msg,
|
|
@@ -741,7 +716,7 @@
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: '/plugins/composition/detail/detail?composition_id=3'
|
|
|
|
|
|
+ url: `/plugins/composition/detail/detail?composition_id=${this.compositionList.id}`
|
|
});
|
|
});
|
|
// this.attrShow = true;
|
|
// this.attrShow = true;
|
|
console.log('结束');
|
|
console.log('结束');
|