-
![#]()
-
{{info.nickname}}
+
![#]()
+
{{info.nickname}}
-
-
- 切换区域
-
- }?>
-
-
- 退出
-
- }?>
+ if (!$group_id) { ?>
+
+ 切换区域
+ } ?>
+ if ($group_id == 1) { ?>
+
退出
+ } ?>
- 暂无数据
- 请稍等...
- 我们是有底线的
+ 暂无数据
+
+ 请稍等...
+
+ 我们是有底线的
+
@@ -86,23 +102,21 @@
var app = new Vue({
el: '#app',
data: {
- tabFixed:false,
- tabIndex:0,
- tabid:'1',//1大区列表 /2活动列表
- info:'',//基础信息
+ tabFixed: false,
+ tabIndex: 0,
+ tabid: '1',//1大区列表 /2活动列表
+ info: '',//基础信息
loading: false,
isDataEnd: false,
isNoData: false,
page: 1, //页数
size: 10, //每页取多少个数据
- list:[],
+ list: [],
},
- created(){
-
- },
- computed: {
+ created() {
},
+ computed: {},
mounted() {
window.addEventListener('scroll', this.handleScroll, true)
this.getInfo()
@@ -111,25 +125,25 @@
},
//离开页面时
- destroyed () {
+ destroyed() {
window.removeEventListener('scroll', this.handleScroll)
},
methods: {
//获取基础信息
- getInfo(){
+ getInfo() {
var that = this;
- $.get('/h5/market/sylive/biz/nav',{'area_id':=$area_id ? $area_id : 0?>},function (result) {
+ $.get('/h5/market/sylive/biz/nav', {'area_id':=$area_id ? $area_id : 0?>}, function (result) {
that.info = result.data
- },'json')
+ }, 'json')
},
//tab切换
- changeTab(id,index){
- if(id != this.tabid&&!this.loading){
- if(this.tabFixed){
+ changeTab(id, index) {
+ if (id != this.tabid && !this.loading) {
+ if (this.tabFixed) {
let mainoffsetTop = document.querySelector('#main').offsetTop
- $('html,body').animate({scrollTop: mainoffsetTop+5},500);
+ $('html,body').animate({scrollTop: mainoffsetTop + 5}, 500);
}
this.tabid = id
this.tabIndex = index
@@ -137,16 +151,16 @@
this.isNoData = false
this.page = 1
this.list = []
- if(this.tabid == 1){
+ if (this.tabid == 1) {
this.getRegionList()
- }else if(this.tabid == 2){
+ } else if (this.tabid == 2) {
this.getActivityList()
}
}
},
//判断导航是否需要吸顶
- handleScroll () {
+ handleScroll() {
let scrollTop = document.querySelector('#app').scrollTop
let mainoffsetTop = document.querySelector('#main').offsetTop
if (scrollTop > mainoffsetTop) {
@@ -157,21 +171,24 @@
},
//拉取数据
- fetchData: function() {
- if(this.tabid == 1){
+ fetchData: function () {
+ if (this.tabid == 1) {
this.getRegionList()
- }else if(this.tabid == 2){
+ } else if (this.tabid == 2) {
this.getActivityList()
}
},
//获取大区列表
- getRegionList(){
- let that=this;
+ getRegionList() {
+ let that = this;
if (!that.isNoData && !that.isDataEnd && !that.loading) {
that.loading = true;
//请求接口
- $.get('/h5/market/sylive/biz/biz_lists',{'area_id':=$area_id ? $area_id : 0?>,'page':that.page},function (result) {
+ $.get('/h5/market/sylive/biz/biz_lists', {
+ 'area_id':=$area_id ? $area_id : 0?>,
+ 'page': that.page
+ }, function (result) {
that.loading = false;
that.page = that.page + 1;
that.list = that.list.concat(result.data.list);
@@ -180,16 +197,19 @@
} else if (that.list.length == result.data.total) {
that.isDataEnd = true;
}
- },'json')
+ }, 'json')
}
},
//获取大区列表
- getActivityList(){
- let that=this;
+ getActivityList() {
+ let that = this;
if (!that.isNoData && !that.isDataEnd && !that.loading) {
that.loading = true;
//请求接口
- $.get('/h5/market/sylive/biz/act_list',{'area_id':=$area_id ? $area_id : 0?>,'page':that.page},function (result) {
+ $.get('/h5/market/sylive/biz/act_list', {
+ 'area_id':=$area_id ? $area_id : 0?>,
+ 'page': that.page
+ }, function (result) {
that.loading = false;
that.page = that.page + 1;
that.list = that.list.concat(result.data.list);
@@ -198,31 +218,31 @@
} else if (that.list.length == result.data.total) {
that.isDataEnd = true;
}
- },'json')
+ }, 'json')
}
},
- logout(){
- $.get('/h5/market/sylive/login/logout',function (response) {
- if(response.code==200){
+ logout() {
+ $.get('/h5/market/sylive/login/logout', function (response) {
+ if (response.code == 200) {
mDialog.msg({
duration: 250,
pause: 2000,
content: response.msg,
- onClose:function(){
+ onClose: function () {
window.location = '/h5/market/sylive/login'
}
});
- }else{
+ } else {
mDialog.msg({
duration: 250,
pause: 2000,
content: response.msg
});
}
- },'json')
+ }, 'json')
},
},
})
-=$this->load->view('h5/market/sylive/hidden_wx_share')?>
+= $this->load->view('h5/market/sylive/hidden_wx_share') ?>
\ No newline at end of file