|
@@ -10,14 +10,28 @@
|
|
<navbars :list="navBarsList" v-if="isRequest"></navbars>
|
|
<navbars :list="navBarsList" v-if="isRequest"></navbars>
|
|
</view>
|
|
</view>
|
|
<view class="container-section tui-skeleton">
|
|
<view class="container-section tui-skeleton">
|
|
- <!-- 推荐专区 -->
|
|
|
|
- <hot-product :list="RecommendList" :userIdentity="userIdentity" v-if="isRequest"></hot-product>
|
|
|
|
- <!-- 楼层 -->
|
|
|
|
- <pages-product :list="pagesList" v-if="isRequest"></pages-product>
|
|
|
|
- <!-- 商品专题 -->
|
|
|
|
- <special-product :list="specialList" :listB="specialProList" v-if="isRequest"></special-product>
|
|
|
|
- <!-- 供应商专题 -->
|
|
|
|
- <supplier-list :list="supplierList" v-if="isRequest"></supplier-list>
|
|
|
|
|
|
+ <view v-for="(item,index) in flootData" :key="index">
|
|
|
|
+ <template v-if="item.type === 1">
|
|
|
|
+ <!-- 推荐专区 -->
|
|
|
|
+ <hot-product :list="RecommendList" :userIdentity="userIdentity" v-if="isRequest"></hot-product>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="item.type === 3">
|
|
|
|
+ <!-- 供应商专题 -->
|
|
|
|
+ <supplier-list :list="item.floorData" v-if="isRequest"></supplier-list>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="item.type === 4">
|
|
|
|
+ <!-- 商品专题 -->
|
|
|
|
+ <special-product :list="item.floorData" v-if="isRequest"></special-product>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="item.type === 5">
|
|
|
|
+ <!-- 小专题 -->
|
|
|
|
+ <small-product :list="item.floorData" v-if="isRequest"></small-product>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="item.type === 6">
|
|
|
|
+ <!-- 楼层 -->
|
|
|
|
+ <pages-product :list="item.subFloors" v-if="isRequest"></pages-product>
|
|
|
|
+ </template>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
<!-- 侧边 -->
|
|
<!-- 侧边 -->
|
|
<scroll-top v-if="isScrollTop"></scroll-top>
|
|
<scroll-top v-if="isScrollTop"></scroll-top>
|
|
@@ -33,6 +47,7 @@
|
|
import hotProduct from '@/components/cm-module/homeIndex/hotProduct.vue'
|
|
import hotProduct from '@/components/cm-module/homeIndex/hotProduct.vue'
|
|
import pagesProduct from '@/components/cm-module/homeIndex/pagesProduct.vue'
|
|
import pagesProduct from '@/components/cm-module/homeIndex/pagesProduct.vue'
|
|
import specialProduct from '@/components/cm-module/homeIndex/specialProduct.vue'
|
|
import specialProduct from '@/components/cm-module/homeIndex/specialProduct.vue'
|
|
|
|
+ import smallProduct from '@/components/cm-module/homeIndex/smallProduct.vue'
|
|
import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
|
|
import supplierList from '@/components/cm-module/homeIndex/supplierList.vue'
|
|
import { userInfoLogin } from "@/api/use.js"
|
|
import { userInfoLogin } from "@/api/use.js"
|
|
import { mapState,mapMutations} from 'vuex';
|
|
import { mapState,mapMutations} from 'vuex';
|
|
@@ -45,6 +60,7 @@
|
|
navbars,
|
|
navbars,
|
|
pagesProduct,
|
|
pagesProduct,
|
|
specialProduct,
|
|
specialProduct,
|
|
|
|
+ smallProduct,
|
|
supplierList
|
|
supplierList
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
@@ -75,41 +91,14 @@
|
|
navBarsList:[],//导航分类
|
|
navBarsList:[],//导航分类
|
|
pagesList:[],//楼层
|
|
pagesList:[],//楼层
|
|
RecommendList:[],//热门推荐
|
|
RecommendList:[],//热门推荐
|
|
- specialList:[],//商品专题轮播
|
|
|
|
- specialProList:[],//商品专题商品
|
|
|
|
- supplierList:[],//供应商列表
|
|
|
|
- organizeProducts:[],//常用商品
|
|
|
|
- productsClassifyList:[
|
|
|
|
- {classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
|
|
|
|
- {classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
|
|
|
|
- {classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
|
|
|
|
- {classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'},
|
|
|
|
- {classifyImage:'https://admin-b.caimei365.com/userfiles/1/images/photo/2020/04/%E7%BB%84%201238.png',classifyName:'采美'}
|
|
|
|
- ],//分类导航
|
|
|
|
- firstModulesName:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAAZU0AACaPrfbB8I435.png', //优惠模块1
|
|
|
|
- secondModulesName:'', //优惠模块2
|
|
|
|
- firstModulesImage:'https://img.caimei365.com/group1/M00/03/8C/Cmis215XHXSAAZU0AACaPrfbB8I435.png',//优惠模块icon1
|
|
|
|
- secondModulesImage:'',//优惠模块icon2
|
|
|
|
- thirdModulesName:'', //优惠模块3
|
|
|
|
- navInforList:[
|
|
|
|
- {text:'会员中心',icon:'https://img.caimei365.com/group1/M00/03/B0/Cmis217Z9LCABdf_AAAfdMmM_xY655.png'},
|
|
|
|
- {text:'在线客服',icon:'https://img.caimei365.com/group1/M00/03/B0/Cmis217Z9BSAXPobAAApo6I0Tlo684.png'}
|
|
|
|
- ],
|
|
|
|
- navServerList:[
|
|
|
|
- {text:'会员优惠',icon:'../../../static/temp/server1@2x.png',path:'/pages/service/member'},
|
|
|
|
- {text:'售后无忧',icon:'../../../static/temp/server2@2x.png',path:'/pages/service/aftersale'},
|
|
|
|
- {text:'购物须知',icon:'../../../static/temp/server3@2x.png',path:'/pages/service/shoppingnotice'},
|
|
|
|
- {text:'联系我们',icon:'../../../static/temp/server4@2x.png',path:''},
|
|
|
|
- ],
|
|
|
|
isScrollTop:false,
|
|
isScrollTop:false,
|
|
isRequest:false
|
|
isRequest:false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.$api.getStorage().then((resolve) =>{
|
|
this.$api.getStorage().then((resolve) =>{
|
|
- this.userID = resolve.userID
|
|
|
|
|
|
+ this.userID = resolve.userID ? resolve.userID : 0
|
|
this.userIdentity = resolve.userIdentity
|
|
this.userIdentity = resolve.userIdentity
|
|
- this.GetHomeFloorInfo()
|
|
|
|
this.getHomeInformation()
|
|
this.getHomeInformation()
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -133,23 +122,7 @@
|
|
},
|
|
},
|
|
GetHomeFloorInfo(){//初始化首页楼层数据
|
|
GetHomeFloorInfo(){//初始化首页楼层数据
|
|
this.CommonService.GetHomeFloorInfo({}).then(response =>{
|
|
this.CommonService.GetHomeFloorInfo({}).then(response =>{
|
|
- let data = response.data
|
|
|
|
- data.forEach((item,index) => {
|
|
|
|
- switch(item.type){
|
|
|
|
- case 3:
|
|
|
|
- this.supplierList = item.floorData
|
|
|
|
- break;
|
|
|
|
- case 4:
|
|
|
|
- this.specialList = item.floorData
|
|
|
|
- break;
|
|
|
|
- case 5:
|
|
|
|
- this.specialProList = item.floorData
|
|
|
|
- break;
|
|
|
|
- case 6:
|
|
|
|
- this.pagesList = item.subFloors
|
|
|
|
- break;
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ this.flootData = response.data
|
|
}).catch(error =>{
|
|
}).catch(error =>{
|
|
this.$util.msg(error.msg,2000)
|
|
this.$util.msg(error.msg,2000)
|
|
})
|
|
})
|
|
@@ -158,15 +131,9 @@
|
|
this.CommonService.GetHomeModulesDataInfo({ userId:this.userID }).then(res =>{
|
|
this.CommonService.GetHomeModulesDataInfo({ userId:this.userID }).then(res =>{
|
|
let data = res.data;
|
|
let data = res.data;
|
|
this.bannerImageList = data.bannerImageList
|
|
this.bannerImageList = data.bannerImageList
|
|
- this.mallPageModules = data.mallPageModules
|
|
|
|
- this.firstModulesName= data.firstModulesName
|
|
|
|
- this.secondModulesName= data.secondModulesName
|
|
|
|
- this.firstModulesImage= data.firstModulesImage
|
|
|
|
- this.secondModulesImage= data.secondModulesImage
|
|
|
|
- this.thirdModulesName= data.thirdModulesName
|
|
|
|
- this.productsClassifyList = data.productsClassifyList
|
|
|
|
this.$store.commit('updateAllNum',data.shoppingCartCount)
|
|
this.$store.commit('updateAllNum',data.shoppingCartCount)
|
|
this.GetHomeInit();
|
|
this.GetHomeInit();
|
|
|
|
+ this.GetHomeFloorInfo()
|
|
this.GetHomeRecommendInfo()
|
|
this.GetHomeRecommendInfo()
|
|
}).catch(error =>{
|
|
}).catch(error =>{
|
|
this.$util.msg(error.msg,2000)
|
|
this.$util.msg(error.msg,2000)
|