| xqd
@@ -26,14 +26,14 @@
|
|
|
<view class="subtitle">臻选整装 · 安全无甲醛 · 7天入住</view>
|
|
|
</view>
|
|
|
<view class="lg_list">
|
|
|
- <view class="item" v-for="(item,index) in homePages[5].data.list" :key="index"
|
|
|
+ <view class="item" v-for="(item,index) in compositionList" :key="index"
|
|
|
@click="goPage(item.type=='goods'?`/pages/goods/goods?id=${item.id}`:`/pages/case/projectInfo?id=${item.id}`)">
|
|
|
- <image class="imgBox" :src="item.cover_pic">
|
|
|
+ <image class="imgBox" :src="item.cover_img">
|
|
|
</image>
|
|
|
<view class="b_card main-between">
|
|
|
<view class="left">
|
|
|
<view class="title t-omit" style="width: 420rpx;">{{item.name}}</view>
|
|
|
- <view class="desc t-omit" style="width: 420rpx;">{{item.subtitle}}</view>
|
|
|
+ <view class="desc t-omit" style="width: 420rpx;">{{item.tag}}</view>
|
|
|
</view>
|
|
|
<view class="right">
|
|
|
<view class="price"><text class="rmb">¥</text><text>{{item.price}}</text><text
|
| xqd
@@ -55,7 +55,7 @@
|
|
|
|
|
|
</view>
|
|
|
<view class="coupon main-left">
|
|
|
- <view class="item main-left" v-for="(item,index) in homePages[6].data.coupon_list" :key="index" @click="goPage(`/pages/coupon/list/list`)">
|
|
|
+ <view class="item main-left" v-for="(item,index) in homePages[6].data.coupon_list" :key="index" @click="receive(index)">
|
|
|
<view class="Wb">
|
|
|
<view>
|
|
|
<view class="title_2">定制优享礼券 <text class="hjx-tc-B19D60 hjx-ts-21 hxj-ml-10">立即领取</text></view>
|
| xqd
@@ -76,31 +76,31 @@
|
|
|
</view>
|
|
|
<view class="hxdz">
|
|
|
<view class="main-left q">
|
|
|
- <view class="l">
|
|
|
+ <view class="l" @click="goPage(homePages[7].data.list[0].link.new_link_url)">
|
|
|
<view class="title_2">明星套装</view>
|
|
|
<view class="desc_2">自然高端好家居</view>
|
|
|
- <image src="https://t17.9026.com/web/statics/image/index/4.png" mode=""></image>
|
|
|
+ <image :src="homePages[7].data.list[0].pic_url" mode=""></image>
|
|
|
</view>
|
|
|
<view class="main-between-y">
|
|
|
- <view class="r1" @click="goPage('/pages/case/selectedCases')">
|
|
|
+ <view class="r1" @click="goPage(homePages[7].data.list[1].link.new_link_url)">
|
|
|
<view class="title_2">优选</view>
|
|
|
<view class="desc_2">优选家居</view>
|
|
|
- <image src="https://t17.9026.com/web/statics/image/index/5.png" mode=""></image>
|
|
|
+ <image :src="homePages[7].data.list[1].pic_url" mode=""></image>
|
|
|
</view>
|
|
|
- <view class="r2">
|
|
|
+ <view class="r2" @click="goPage(homePages[7].data.list[2].link.new_link_url)">
|
|
|
<view class="title_2">专属</view>
|
|
|
<view class="desc_2">定制精品</view>
|
|
|
- <image src="https://t17.9026.com/web/statics/image/index/6.png" mode=""></image>
|
|
|
+ <image :src="homePages[7].data.list[2].pic_url" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<scroll-view scroll-x="true">
|
|
|
<view class="main-left w">
|
|
|
- <view class="item" v-for="(item,index) in qwe" :key="index">
|
|
|
+ <view class="item" v-for="(item,index) in homePages[8].data.navs" :key="index">
|
|
|
<image class="borradu_20"
|
|
|
- :src="`https://t17.9026.com/web/statics/image/index/temporary/${item.cover_image}.png`"
|
|
|
+ :src="item.icon_url"
|
|
|
mode=""></image>
|
|
|
- <view class="title_2">{{item.title}}</view>
|
|
|
+ <view class="title_2">{{item.name}}</view>
|
|
|
<view class="desc_2">独到品味的代表备份</view>
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -128,11 +128,11 @@
|
|
|
<view class="group_list">
|
|
|
<swiper style="height: 606rpx;" :indicator-dots="false" :autoplay="false" :interval="3000" :duration="1000"
|
|
|
previous-margin="75rpx" next-margin="75rpx">
|
|
|
- <swiper-item class="" v-for="(item,index) in 3" :key="index"
|
|
|
- @click="goPage('/plugins/pt/goods/goods?goods_id=29')">
|
|
|
+ <swiper-item class="" v-for="(item,index) in homePages[9].data.list" :key="index"
|
|
|
+ @click="goPage(item.page_url)">
|
|
|
<view class="item">
|
|
|
<view class="imgBox">
|
|
|
- <image class="img" src="https://t17.9026.com/web/statics/image/index/3.png"></image>
|
|
|
+ <image class="img" :src="item.cover_pic"></image>
|
|
|
</view>
|
|
|
<view class="b_card main-between">
|
|
|
<view class="main-left cross-center left">
|
| xqd
@@ -143,7 +143,7 @@
|
|
|
<view class="i">45</view>
|
|
|
</view>
|
|
|
<view class="right">
|
|
|
- <view class="price"><text class="rmb">¥</text><text>56800</text><text
|
|
|
+ <view class="price"><text class="rmb">¥</text><text>{{item.pintuan_price}}</text><text
|
|
|
class="dw">元</text></view>
|
|
|
</view>
|
|
|
</view>
|
| xqd
@@ -200,6 +200,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {mapState} from 'vuex'
|
|
|
import appScrollList from './components/scroll-list.vue'
|
|
|
export default {
|
|
|
components: {
|
| xqd
@@ -214,6 +215,33 @@
|
|
|
};
|
|
|
},
|
|
|
},
|
|
|
+ page_id:{
|
|
|
+ type:Number,
|
|
|
+ default:0
|
|
|
+ },
|
|
|
+ dIndex: {
|
|
|
+ type: Array,
|
|
|
+ default () {
|
|
|
+ return [0, 0];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mIndex: {
|
|
|
+ type: Array,
|
|
|
+ default () {
|
|
|
+ return [0, 0];
|
|
|
+ }
|
|
|
+ },
|
|
|
+ dType:String
|
|
|
+ },
|
|
|
+ computed:{
|
|
|
+ ...mapState({
|
|
|
+ selectedProperties:state=>state.user.selectedProperties
|
|
|
+ })
|
|
|
+ },
|
|
|
+ watch:{
|
|
|
+ selectedProperties(){
|
|
|
+ this.getComposition()
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
| xqd
@@ -239,12 +267,13 @@
|
|
|
image: 'https://t17.9026.com/web/statics/image/index/temporary/jhk-1634283667210.png',
|
|
|
title: '定制产品',
|
|
|
tag: '预约',
|
|
|
- link: '/pages/case/appointment/appointment-form'
|
|
|
+ link: '/pages/case/appointment/appointment-list'
|
|
|
},
|
|
|
{
|
|
|
image: 'https://t17.9026.com/web/statics/image/index/2.png',
|
|
|
title: '明星套装',
|
|
|
- tag: '套装'
|
|
|
+ tag: '套装',
|
|
|
+ link: '/pages/case/appointment/appointment-list'
|
|
|
}
|
|
|
],
|
|
|
// jdlg: [{
|
| xqd
@@ -266,21 +295,24 @@
|
|
|
// cover_image: 'temporary/jhk-1634284367308'
|
|
|
// }
|
|
|
// ],
|
|
|
- qwe: [
|
|
|
- {
|
|
|
- 'title': '兴城人居',
|
|
|
- 'cover_image': 'jhk-1634283667210'
|
|
|
- }, {
|
|
|
- 'title': '世龙广场',
|
|
|
- 'cover_image': 'jhk-1634284372084'
|
|
|
- }, {
|
|
|
- 'title': '新中式',
|
|
|
- 'cover_image': 'jhk-1634283687206'
|
|
|
- },
|
|
|
- ]
|
|
|
-
|
|
|
+ // qwe: [
|
|
|
+ // {
|
|
|
+ // 'title': '兴城人居',
|
|
|
+ // 'cover_image': 'jhk-1634283667210'
|
|
|
+ // }, {
|
|
|
+ // 'title': '世龙广场',
|
|
|
+ // 'cover_image': 'jhk-1634284372084'
|
|
|
+ // }, {
|
|
|
+ // 'title': '新中式',
|
|
|
+ // 'cover_image': 'jhk-1634283687206'
|
|
|
+ // },
|
|
|
+ // ],
|
|
|
+ compositionList:[],//本期家点灵感
|
|
|
}
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.getComposition()
|
|
|
+ },
|
|
|
methods: {
|
|
|
selectCat(index){
|
|
|
this.bottom_goods_index=index
|
| xqd
@@ -293,7 +325,87 @@
|
|
|
uni.navigateTo({
|
|
|
url: url
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ //获取推荐套餐
|
|
|
+ getComposition(){
|
|
|
+ this.$request({
|
|
|
+ url:this.$api.composition.list,
|
|
|
+ data:{
|
|
|
+ is_recommend:1,
|
|
|
+ limit:3
|
|
|
+ },
|
|
|
+ method:'post'
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.code===0){
|
|
|
+ this.compositionList=res.data.list
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //领取优惠券
|
|
|
+ receive(index) {
|
|
|
+ let list = this.homePages[6].data.coupon_list
|
|
|
+ if (this.sign == 'integral-mall') {
|
|
|
+ this.$jump({
|
|
|
+ url: list[index].page_url,
|
|
|
+ open_type: 'navigate'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (list[index].is_receive == 1) {
|
|
|
+ uni.showToast({
|
|
|
+ mask: true,
|
|
|
+ title: '已领取',
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ uni.showLoading({
|
|
|
+ mask: true,
|
|
|
+ title: '领取中'
|
|
|
+ });
|
|
|
+
|
|
|
+ this.$request({
|
|
|
+ url: this.$api.coupon.receive,
|
|
|
+ data: {
|
|
|
+ coupon_id: list[index].id
|
|
|
+ }
|
|
|
+ }).then(e => {
|
|
|
+ uni.hideLoading();
|
|
|
+ if (e.code === 0) {
|
|
|
+ if (e.data.rest == 0) {
|
|
|
+ this.homePages[6].data.coupon_list[index].is_receive = '1';
|
|
|
+ }
|
|
|
+ let tempList = this.homePages[6].data.coupon_list;
|
|
|
+ this.flushCache(tempList);
|
|
|
+ this.$store.dispatch('page/actionSetCoupon', {
|
|
|
+ list: [Object.assign(tempList[index], e.data)],
|
|
|
+ type: 'receive'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ title: e.msg,
|
|
|
+ icon: 'none'
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ uni.hideLoading();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ flushCache(coupon_list) {
|
|
|
+ if (this.page_id == 0) {
|
|
|
+ let storage = this.$storage.getStorageSync('INDEX_MALL');
|
|
|
+ let dIndex = this.dIndex;
|
|
|
+ let mIndex = this.mIndex;
|
|
|
+
|
|
|
+ if (this.dType === 'module') {
|
|
|
+ storage.home_pages.navs[mIndex[0]].template.data[mIndex[1]].data.list[dIndex[0]].data[dIndex[1]]
|
|
|
+ .data.coupon_list = coupon_list;
|
|
|
+ } else {
|
|
|
+ storage.home_pages.navs[dIndex[0]].template.data[dIndex[1]].data.coupon_list = coupon_list;
|
|
|
+ }
|
|
|
+ this.$storage.setStorageSync('INDEX_MALL', storage);
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|