var topicPage = new Vue({ el: "#topicPage", data: { pageType: 0, floorDatas: [], buttonName:'', buttonLink:'' }, computed: { }, methods: { getFloorDatas: function () { var _self = this; if(_self.pageType ===0){return;} PagesApi.GetPageTopicData({type: _self.pageType},function(response){ if(response.code === 0){ _self.floorDatas = response.data; }else{ CAIMEI.Alert(response.msg, '确定', false); } }); }, GetPageTopicBanner:function(){ var _self = this; PagesApi.GetPageTopicInfoData({type: _self.pageType},function(response){ if(response.code === 0){ _self.buttonLink = response.data.buttonLink; _self.buttonName = response.data.buttonName; }else{ CAIMEI.Alert(response.msg, '确定', false); } }); } }, created: function () { this.pageType = getUrlParam("type") ? getUrlParam("type")*1 : 0; // 获取列表数据 this.getFloorDatas(); this.GetPageTopicBanner(); }, mounted: function () { var _self = this; } });