|
@@ -11,7 +11,7 @@
|
|
</view>
|
|
</view>
|
|
<!-- 楼层 -->
|
|
<!-- 楼层 -->
|
|
<view class="container-section tui-skeleton">
|
|
<view class="container-section tui-skeleton">
|
|
- <page-floor :list="pageList" :userIdentity="userIdentity"></page-floor>
|
|
|
|
|
|
+ <page-floor :list="pageList" :userIdentity="userIdentity" :pageType="2" v-if="isRequest"></page-floor>
|
|
</view>
|
|
</view>
|
|
<!-- 侧边 -->
|
|
<!-- 侧边 -->
|
|
<scroll-top :isScrollTop="isScrollTop" :bottom="50"></scroll-top>
|
|
<scroll-top :isScrollTop="isScrollTop" :bottom="50"></scroll-top>
|
|
@@ -23,7 +23,6 @@
|
|
import customFloor from '@/components/cm-custom/custom-floor' //自定义导航
|
|
import customFloor from '@/components/cm-custom/custom-floor' //自定义导航
|
|
import templateNav from '@/components/cm-module/pageTemplate/templateNav.vue'
|
|
import templateNav from '@/components/cm-module/pageTemplate/templateNav.vue'
|
|
import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
|
|
import pageFloor from '@/components/cm-module/homeIndex/pageFloor.vue'
|
|
- import { pageList } from '@/common/json/data.json.js' //本地数据
|
|
|
|
|
|
|
|
export default{
|
|
export default{
|
|
components:{
|
|
components:{
|
|
@@ -33,29 +32,31 @@
|
|
},
|
|
},
|
|
data(){
|
|
data(){
|
|
return{
|
|
return{
|
|
|
|
+ userID:0,
|
|
|
|
+ shopId:0,
|
|
userIdentity:0,
|
|
userIdentity:0,
|
|
skeletonShow:true,
|
|
skeletonShow:true,
|
|
headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
|
|
headerBtnPosi: this.setHeaderBtnPosi(), //获取设备顶部胶囊高度
|
|
systeminfo: this.setSysteminfo(), //获取设备信息
|
|
systeminfo: this.setSysteminfo(), //获取设备信息
|
|
CustomBar:this.CustomBar,// 顶部导航栏高度
|
|
CustomBar:this.CustomBar,// 顶部导航栏高度
|
|
navBarsList:[],
|
|
navBarsList:[],
|
|
- pageList:pageList,//楼层
|
|
|
|
|
|
+ pageList:[],//楼层
|
|
isRequest:false,
|
|
isRequest:false,
|
|
isScrollTop:false,
|
|
isScrollTop:false,
|
|
- linkId:'',
|
|
|
|
|
|
+ pageId:'',
|
|
|
|
+ typeSort:'',
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
console.log(option)
|
|
console.log(option)
|
|
- this.linkId = option.linkId
|
|
|
|
|
|
+ this.pageId = option.linkId
|
|
this.$api.getComStorage('userInfo').then((resolve) =>{
|
|
this.$api.getComStorage('userInfo').then((resolve) =>{
|
|
- this.clubStatus = resolve.clubStatus
|
|
|
|
this.userID = resolve.userID ? resolve.userID : 0;
|
|
this.userID = resolve.userID ? resolve.userID : 0;
|
|
this.shopId = resolve.shopID ? resolve.shopID : 0;
|
|
this.shopId = resolve.shopID ? resolve.shopID : 0;
|
|
this.userIdentity = resolve.userIdentity
|
|
this.userIdentity = resolve.userIdentity
|
|
- // this.getListFromServer();
|
|
|
|
|
|
+ this.GetInstrumentPageData();
|
|
}).catch(error =>{
|
|
}).catch(error =>{
|
|
- // this.getListFromServer();
|
|
|
|
|
|
+ this.GetInstrumentPageData();
|
|
})
|
|
})
|
|
setTimeout(()=>{
|
|
setTimeout(()=>{
|
|
this.skeletonShow = false
|
|
this.skeletonShow = false
|
|
@@ -65,10 +66,19 @@
|
|
...mapState(['hasLogin','userInfo','identity'])
|
|
...mapState(['hasLogin','userInfo','identity'])
|
|
},
|
|
},
|
|
methods:{
|
|
methods:{
|
|
- GetHomeInit(){//金刚区分类
|
|
|
|
- this.CommonService.GetFirstClassly({typeSort:1,source:'crm'}).then(response =>{
|
|
|
|
|
|
+ GetInstrumentPageData(){//获取楼层数据
|
|
|
|
+ this.CommonService.GetInstrumentPageData({pageId:this.pageId,userId:this.userID,source:2}).then(response =>{
|
|
let data = response.data
|
|
let data = response.data
|
|
- this.navBarsList = data
|
|
|
|
|
|
+ this.typeSort = data.page.typeSort
|
|
|
|
+ this.pageList = data.floorList
|
|
|
|
+ this.GetHomeInit()
|
|
|
|
+ }).catch(error =>{
|
|
|
|
+ this.$util.msg(error.msg,2000)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ GetHomeInit(){//金刚区分类
|
|
|
|
+ this.CommonService.GetFirstClassly({typeSort:this.typeSort,source:'crm'}).then(response =>{
|
|
|
|
+ this.navBarsList = response.data
|
|
this.isRequest =true
|
|
this.isRequest =true
|
|
}).catch(error =>{
|
|
}).catch(error =>{
|
|
this.$util.msg(error.msg,2000)
|
|
this.$util.msg(error.msg,2000)
|
|
@@ -102,7 +112,7 @@
|
|
}, 200)
|
|
}, 200)
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
- this.GetHomeInit()
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|