|
@@ -2,48 +2,13 @@ var homeData = new Vue({
|
|
|
el: '#container',
|
|
|
data: {
|
|
|
userId:0,
|
|
|
- // images: [],
|
|
|
- //listLoading:true,
|
|
|
- //advertising: [],
|
|
|
asideNav: [],
|
|
|
- //productIdArr:[],
|
|
|
liveList:[],//右侧直播模块
|
|
|
cmImageList:[],//右侧活动模块
|
|
|
infoList:[],//右侧文章模块
|
|
|
- //pageList:[],//左侧楼层
|
|
|
- //supplierImage:'',//供应商banner
|
|
|
- //supplierWwwLink:'',//供应商banner 链接
|
|
|
- //supplierList:[],//供应商列表
|
|
|
- // topMenuList:[],
|
|
|
- popupFlag:false,
|
|
|
+ popupFlag:false
|
|
|
},
|
|
|
filters: {
|
|
|
- statusType:function(value) {
|
|
|
- switch (value) {
|
|
|
- case 1:
|
|
|
- return '未开始';
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- return '直播中';
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- return '看回放';
|
|
|
- break;
|
|
|
- }
|
|
|
- },
|
|
|
- statusTypeClass:function(value) {
|
|
|
- switch (value) {
|
|
|
- case 1:
|
|
|
- return 'icon-wart';
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- return 'icon-live';
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- return 'icon-end';
|
|
|
- break;
|
|
|
- }
|
|
|
- },
|
|
|
NumFormat: function(value) {//处理金额
|
|
|
return Number(value).toFixed(2);
|
|
|
},
|
|
@@ -104,85 +69,6 @@ var homeData = new Vue({
|
|
|
}
|
|
|
},300);
|
|
|
},
|
|
|
- // GetNavigationMenu :function(){//获取顶部导航分类
|
|
|
- // var _self = this;
|
|
|
- // PublicApi.GetNavigationMenu({source:1},function(response){
|
|
|
- // if(response.code == 0){
|
|
|
- // _self.topMenuList = response.data.topMenuList;
|
|
|
- // }else{
|
|
|
- // CAIMEI.Alert(response.msg, '确定');
|
|
|
- // }
|
|
|
- // });
|
|
|
- // },
|
|
|
- // GetHomeFloorData: function(){
|
|
|
- // var _self = this;
|
|
|
- // // 预设静态数据
|
|
|
- // var staticJson = $("#floorJson").val();
|
|
|
- // if (staticJson) {
|
|
|
- // var staticData = JSON.parse(staticJson);
|
|
|
- // _self.setFloorData(staticData);
|
|
|
- // }
|
|
|
- // // 如果没有静态数据(重新请求) 或 用户登录(重新请求获取价格)
|
|
|
- // if (!staticJson || GLOBAL_USER_ID>0){
|
|
|
- // PublicApi.GetHomeData({userId:GLOBAL_USER_ID,source:1},function(response){
|
|
|
- // if(response.code == 0){
|
|
|
- // var data = response.data;
|
|
|
- // _self.setFloorData(data);
|
|
|
- // }else{
|
|
|
- // CAIMEI.Alert(response.msg, '确定');
|
|
|
- // }
|
|
|
- // });
|
|
|
- // }
|
|
|
- // },
|
|
|
- // setFloorData: function(data){
|
|
|
- // var _self = this;
|
|
|
- // _self.listLoading = false;
|
|
|
- // _self.pageList = data.homePageFloor;
|
|
|
- // // _self.liveList = data.liveList;
|
|
|
- // _self.supplierList = data.supplierImage.qualitySupplierList;
|
|
|
- // _self.supplierImage = data.supplierImage.wwwImage;
|
|
|
- // _self.supplierWwwLink = data.supplierImage.wwwLink;
|
|
|
- // _self.pageList.forEach(function(page){
|
|
|
- // if(page.floorContent){
|
|
|
- // if(isPC){
|
|
|
- // if(page.floorContent.templateType == '1' || page.floorContent.templateType == '3'){
|
|
|
- // if (page.floorImageList.length>7){
|
|
|
- // page.isPageMore = true;
|
|
|
- // }
|
|
|
- // }else if(page.floorContent.templateType == '2' || page.floorContent.templateType == '4' || page.floorContent.templateType == '7'){
|
|
|
- // if (page.floorImageList.length>5){
|
|
|
- // page.isPageMore = true;
|
|
|
- // }
|
|
|
- // }else if(page.floorContent.templateType == '5'){
|
|
|
- // if (page.floorImageList.length>10){
|
|
|
- // page.isPageMore = true;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }else{
|
|
|
- // if(page.floorContent.templateType == '1' || page.floorContent.templateType == '3'){
|
|
|
- // if (page.floorImageList.length>3){
|
|
|
- // page.isPageMore = true;
|
|
|
- // }
|
|
|
- // }else if(page.floorContent.templateType == '2' || page.floorContent.templateType == '4'){
|
|
|
- // if (page.floorImageList.length>2){
|
|
|
- // page.isPageMore = true;
|
|
|
- // }
|
|
|
- // }else if(page.floorContent.templateType == '5'){
|
|
|
- // if (page.floorImageList.length>4){
|
|
|
- // page.isPageMore = true;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
- // });
|
|
|
- // _self.GetHomeRightData();
|
|
|
- // setTimeout(function() {
|
|
|
- // // 设置侧边导航数据
|
|
|
- // _self.SetAsideNav();
|
|
|
- // _self.swiperFloor();
|
|
|
- // },500);
|
|
|
- // console.log(_self.pageList)
|
|
|
- // },
|
|
|
GetHomeRightData: function(){
|
|
|
var _self = this;
|
|
|
PublicApi.GetHomeRightData({ source: 1 },function(response){
|
|
@@ -325,8 +211,6 @@ var homeData = new Vue({
|
|
|
}).done(function (res) {
|
|
|
if (res.code === 0 && res.data) {
|
|
|
var priceList = res.data;
|
|
|
- $(".main_price_none").hide();
|
|
|
- $(".main_price_login").show();
|
|
|
priceList.map(function(price){
|
|
|
// 用户身份 0、个人 1、协销 2、会员机构 3、供应商 4,普通机构
|
|
|
var clubFlag = (userIdentity===2 || userIdentity===4);
|
|
@@ -338,6 +222,8 @@ var homeData = new Vue({
|
|
|
if(price.promotions && price.promotions.type*1===1 && price.promotions.mode*1===1){
|
|
|
parent.find(".main_price_show.none").show();
|
|
|
}
|
|
|
+ parent.find(".main_price_none").hide();
|
|
|
+ parent.find(".main_price_login").show();
|
|
|
}
|
|
|
});
|
|
|
}
|