diff --git a/home/controllers/h5/market/sylive/User.php b/home/controllers/h5/market/sylive/User.php index c7d8ce79..0124e68d 100644 --- a/home/controllers/h5/market/sylive/User.php +++ b/home/controllers/h5/market/sylive/User.php @@ -21,7 +21,7 @@ class User extends Admin public function index() { - if ($this->group_id > 2) { + if ($this->group_id != 2) { throw new Hd_exception('权限不足', 400); } $row = $this->market_sylive_organization_model->get(['organizationId' => $this->biz_id]); @@ -36,7 +36,7 @@ class User extends Admin public function lists() { - if ($this->group_id > 2) { + if ($this->group_id != 2) { $this->show_json('', 400, '权限不足'); } $keyWord = $this->input->get('keyWord'); @@ -72,7 +72,7 @@ class User extends Admin public function add() { - if ($this->group_id > 2) { + if ($this->group_id != 2) { $this->show_json('', 400, '权限不足'); } $uname = $this->input->post('uname'); @@ -112,7 +112,7 @@ class User extends Admin public function edit() { - if ($this->group_id > 2) { + if ($this->group_id != 2) { $this->show_json('', 400, '权限不足'); } $uname = $this->input->post('uname'); @@ -148,7 +148,7 @@ class User extends Admin public function status() { - if ($this->group_id > 2) { + if ($this->group_id != 2) { $this->show_json('', 400, '权限不足'); } $userId = intval($this->input->post('userId')); diff --git a/home/views/h5/market/sylive/biz/brands.php b/home/views/h5/market/sylive/biz/brands.php index 0851dcc5..f08280b1 100644 --- a/home/views/h5/market/sylive/biz/brands.php +++ b/home/views/h5/market/sylive/biz/brands.php @@ -3,11 +3,11 @@
- # - {{info.nickname}} - - 退出 - + # + {{info.nickname}} + 退出
diff --git a/home/views/h5/market/sylive/biz/index.php b/home/views/h5/market/sylive/biz/index.php index 8c11e57c..da3e7863 100644 --- a/home/views/h5/market/sylive/biz/index.php +++ b/home/views/h5/market/sylive/biz/index.php @@ -4,20 +4,21 @@ style="background-image:url(https://qs.haodian.cn/web/images/project/H5-ShiYu/theme-bg.png?v=221008)">
@@ -57,7 +58,7 @@
- + load->view('h5/market/sylive/nav') ?>
diff --git a/home/views/h5/market/sylive/biz/lists.php b/home/views/h5/market/sylive/biz/lists.php index 407d8d22..24dfaddd 100644 --- a/home/views/h5/market/sylive/biz/lists.php +++ b/home/views/h5/market/sylive/biz/lists.php @@ -1,22 +1,23 @@
-
+
- # - {{info.nickname}} + # + {{info.nickname}}
- - - 切换区域 - - - - - 退出 - - + + + 切换区域 + + + 退出 +
@@ -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':},function (result) { + $.get('/h5/market/sylive/biz/nav', {'area_id':}, 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':,'page':that.page},function (result) { + $.get('/h5/market/sylive/biz/biz_lists', { + 'area_id':, + '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':,'page':that.page},function (result) { + $.get('/h5/market/sylive/biz/act_list', { + 'area_id':, + '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') }, }, }) -load->view('h5/market/sylive/hidden_wx_share')?> +load->view('h5/market/sylive/hidden_wx_share') ?> \ No newline at end of file