h5_market_user_1103_2
This commit is contained in:
@@ -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'));
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
<div class="container relative bg-no-repeat bg-size-fullwidth bg-pos-top" style="background-image:url(https://qs.haodian.cn/web/images/project/H5-ShiYu/theme-bg.png?v=221008)">
|
||||
<div class="pt30 pb30">
|
||||
<div class="pl30 pr30">
|
||||
<img class="text-middle imgsize-35X35 ulib-r750" :src="info.headimg" alt="#" />
|
||||
<span class="text-middle font-22 color-fff">{{info.nickname}}</span>
|
||||
<a class="fn-fr font-22 color-fff bg-000-op50 ulib-r750 pt5 pb5 pl10 pr10" href="javascript:;" @click="logout()">
|
||||
<span class="text-middle ml10">退出</span>
|
||||
</a>
|
||||
<img class="text-middle imgsize-60X60 ulib-r750" :src="info.headimg" alt="#" />
|
||||
<span class="text-middle font-28 color-fff">{{info.nickname}}</span>
|
||||
<a class="fn-fr font-22 bg-fff ulib-r750 pt5 pb5 pl15 pr15" href="javascript:void(0);"
|
||||
@click="logout()"><i class="iconfont icon-tuichu text-middle"></i><span
|
||||
class="text-middle ml10">退出</span></a>
|
||||
</div>
|
||||
<div class="fn-flex mt40 text-center color-fff">
|
||||
<div class="fn-flex-item" v-for="item in info.count">
|
||||
|
||||
@@ -4,20 +4,21 @@
|
||||
style="background-image:url(https://qs.haodian.cn/web/images/project/H5-ShiYu/theme-bg.png?v=221008)">
|
||||
<div class="pt30 pb60">
|
||||
<div class="relative pl30 pr30 fn-clear">
|
||||
<? if ($group_id < 2) { ?>
|
||||
<? if ($group_id == 2) { ?>
|
||||
<a class="fn-fl font-22 bg-fff ulib-r750 pt5 pb5 pl15 pr15"
|
||||
href="/h5/market/sylive/user?biz_id=<?= $biz_id ?>"><i
|
||||
class="iconfont icon-guanli text-middle"></i><span class="text-middle ml10">顾问管理</span></a>
|
||||
<? } ?>
|
||||
<? if ($group_id < 2) { ?>
|
||||
<a class="fn-fr font-22 bg-fff ulib-r750 pt5 pb5 pl15 pr15"
|
||||
href="/h5/market/sylive/biz/lists?area_id=<?= $area_id ?>">
|
||||
<i class="iconfont icon-qiehuan text-middle"></i><span class="text-middle ml10">切换门店</span></a>
|
||||
<? } ?>
|
||||
<? if ($group_id == 3 || $group_id == 2) { ?>
|
||||
<a class="fn-fl font-22 bg-fff ulib-r750 pt5 pb5 pl15 pr15" href="javascript:void(0);"
|
||||
<a class="fn-fr font-22 bg-fff ulib-r750 pt5 pb5 pl15 pr15" href="javascript:void(0);"
|
||||
@click="logout()"><i class="iconfont icon-tuichu text-middle"></i><span
|
||||
class="text-middle ml10">退出</span></a>
|
||||
<? } ?>
|
||||
<? if ($group_id <= 2) { ?>
|
||||
<a class="fn-fr font-22 bg-fff ulib-r750 pt5 pb5 pl15 pr15" href="/h5/market/sylive/user?biz_id=<?= $biz_id ?>"><i
|
||||
class="iconfont icon-guanli text-middle"></i><span class="text-middle ml10">顾问管理</span></a>
|
||||
<? } ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="relative bg-fff mt10 ml30 mr30 inner30 ulib-r20 box-shadow-darkGray" style="min-height:75vh;">
|
||||
@@ -57,7 +58,7 @@
|
||||
</mugen-scroll>
|
||||
</div>
|
||||
</div>
|
||||
<? if ($group_id < 2) { ?>
|
||||
<? if (!$group_id) { ?>
|
||||
<? $this->load->view('h5/market/sylive/nav') ?>
|
||||
<? } ?>
|
||||
</div>
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
<body class="bg-f6">
|
||||
<div id="app" ref="app">
|
||||
<div class="container relative bg-no-repeat bg-size-fullwidth bg-pos-top pb50" style="background-image:url(https://qs.haodian.cn/web/images/project/H5-ShiYu/theme-bg.png?v=221008)">
|
||||
<div class="container relative bg-no-repeat bg-size-fullwidth bg-pos-top pb50"
|
||||
style="background-image:url(https://qs.haodian.cn/web/images/project/H5-ShiYu/theme-bg.png?v=221008)">
|
||||
<div class="pt30 pb30">
|
||||
<div class="relative pl30 pr30 fn-clear">
|
||||
<div class="fn-fl">
|
||||
<img class="text-middle imgsize-35X35 ulib-r750" :src="info.headimg" alt="#" />
|
||||
<span class="text-middle font-22 color-fff">{{info.nickname}}</span>
|
||||
<img class="text-middle imgsize-60X60 ulib-r750" :src="info.headimg" alt="#"/>
|
||||
<span class="text-middle font-28 color-fff">{{info.nickname}}</span>
|
||||
</div>
|
||||
<?if(!$group_id){?>
|
||||
<a class="fn-fr font-22 color-fff bg-000-op50 ulib-r750 pt5 pb5 pl10 pr10" href="/h5/market/sylive/biz/brands">
|
||||
<i class="iconfont icon-qiehuan text-middle"></i><span class="text-middle ml10">切换区域</span>
|
||||
</a>
|
||||
<?}?>
|
||||
<?if($group_id==1){?>
|
||||
<a class="fn-fr font-22 color-fff bg-000-op50 ulib-r750 pt5 pb5 pl10 pr10" href="javascript:;" @click="logout()">
|
||||
<span class="text-middle ml10">退出</span>
|
||||
</a>
|
||||
<?}?>
|
||||
<? if (!$group_id) { ?>
|
||||
<a class="fn-fr font-22 bg-fff ulib-r750 pt5 pb5 pl15 pr15"
|
||||
href="/h5/market/sylive/biz/brands">
|
||||
<i class="iconfont icon-qiehuan text-middle"></i><span class="text-middle ml10">切换区域</span></a>
|
||||
<? } ?>
|
||||
<? if ($group_id == 1) { ?>
|
||||
<a class="fn-fr font-22 bg-fff ulib-r750 pt5 pb5 pl15 pr15" href="javascript:void(0);"
|
||||
@click="logout()"><i class="iconfont icon-tuichu text-middle"></i><span
|
||||
class="text-middle ml10">退出</span></a>
|
||||
<? } ?>
|
||||
</div>
|
||||
<div class="fn-flex mt40 text-center color-fff">
|
||||
<div class="fn-flex-item" v-for="item in info.count">
|
||||
@@ -30,26 +31,35 @@
|
||||
<div class="height-60"></div>
|
||||
<div class="fixed top-0 left-0 right-0 z-index-10 bg-fff pl30 pr30 pt20 pb20">
|
||||
<div class="relative height-60 ml50 mr50 fn-flex text-center">
|
||||
<div class="fn-flex-item" v-for="(item,index) in info.tab"><a :class="'relative inline-block tab-menu '+ [tabid == item.id?'font-36 active':'font-32']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
<div class="fn-flex-item" v-for="(item,index) in info.tab"><a
|
||||
:class="'relative inline-block tab-menu '+ [tabid == item.id?'font-36 active':'font-32']"
|
||||
@click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
<div :class="'glider glider-'+tabIndex"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="relative height-60 ml50 mr50 fn-flex text-center">
|
||||
<div class="fn-flex-item" v-for="(item,index) in info.tab"><a :class="'relative inline-block tab-menu '+ [tabid == item.id?'font-36 active':'font-32']" @click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
<div class="fn-flex-item" v-for="(item,index) in info.tab"><a
|
||||
:class="'relative inline-block tab-menu '+ [tabid == item.id?'font-36 active':'font-32']"
|
||||
@click="changeTab(item.id,index)" href="javascript:">{{item.title}}</a></div>
|
||||
<div :class="'glider glider-'+tabIndex"></div>
|
||||
</div>
|
||||
<div class="pt30">
|
||||
<!--大区列表-->
|
||||
<div v-if="tabid==1">
|
||||
<a class="block relative mb30 bg-f9 pt20 pb20 pl30 pr200 ulib-r20" v-for="(item,index) in list" :href="item.url">
|
||||
<a class="block relative mb30 bg-f9 pt20 pb20 pl30 pr200 ulib-r20" v-for="(item,index) in list"
|
||||
:href="item.url">
|
||||
<div class="font-32">{{item.title}}</div>
|
||||
<div class="mt20 font-22 color-999">
|
||||
<span><i class="iconfont icon-wode text-middle"></i><span class="text-middle ml10 font-22">顾问</span><span class="text-middle ml10 font-22">{{item.storenum}}</span></span>
|
||||
<span class="ml20"><i class="iconfont icon-huodong text-middle"></i><span class="text-middle ml10 font-22">活动</span><span class="text-middle ml10 font-22">{{item.activitynum}}</span></span>
|
||||
<span><i class="iconfont icon-wode text-middle"></i><span class="text-middle ml10 font-22">顾问</span><span
|
||||
class="text-middle ml10 font-22">{{item.storenum}}</span></span>
|
||||
<span class="ml20"><i class="iconfont icon-huodong text-middle"></i><span
|
||||
class="text-middle ml10 font-22">活动</span><span
|
||||
class="text-middle ml10 font-22">{{item.activitynum}}</span></span>
|
||||
</div>
|
||||
<div class="absolute right-0 box-middle pr30">
|
||||
<span :class="'inline-block pl10 pr10 line-height-15 text-middle ulib-r750 font-22 color-fff '+item.state.class" v-if="item.state.title">{{item.state.title}}</span>
|
||||
<span :class="'inline-block pl10 pr10 line-height-15 text-middle ulib-r750 font-22 color-fff '+item.state.class"
|
||||
v-if="item.state.title">{{item.state.title}}</span>
|
||||
<i class="text-middle iconfont icon-gengduo text-middle font-28 color-666"></i>
|
||||
</div>
|
||||
</a>
|
||||
@@ -61,7 +71,9 @@
|
||||
<div class="space-nowrap">
|
||||
<a class="inline-block actitle font-32" :href="item.url">{{item.title}}</a>
|
||||
<a class="inline-block vertical10" :href="item.stat_url">
|
||||
<div class="inline-block pl20 pr20 line-height-15 text-middle ulib-r750 font-22 color-fff bg-fe9538"><i class="iconfont icon-shuju text-middle"></i><span class="text-middle ml5">数据</span></div>
|
||||
<div class="inline-block pl20 pr20 line-height-15 text-middle ulib-r750 font-22 color-fff bg-fe9538">
|
||||
<i class="iconfont icon-shuju text-middle"></i><span
|
||||
class="text-middle ml5">数据</span></div>
|
||||
</a>
|
||||
</div>
|
||||
<a class="block mt10 font-22 color-999" :href="item.url">
|
||||
@@ -73,9 +85,13 @@
|
||||
<!--end活动列表-->
|
||||
</div>
|
||||
<mugen-scroll :handler="fetchData" :should-handle="!loading" scroll-container="app">
|
||||
<div class="pt100 pb100 text-center color-ccc" v-if="isNoData"></i><span class="text-middle font-22">暂无数据</span></div>
|
||||
<div class="pt20 pb20 text-center color-ccc" v-else-if="loading"><i class="iconfont icon-jiazai text-middle"></i><span class="text-middle font-22">请稍等...</span></div>
|
||||
<div class="pt20 pb20 text-center font-22 color-ccc" v-else-if="isDataEnd && list.length>10">我们是有底线的</div>
|
||||
<div class="pt100 pb100 text-center color-ccc" v-if="isNoData"></i><span class="text-middle font-22">暂无数据</span>
|
||||
</div>
|
||||
<div class="pt20 pb20 text-center color-ccc" v-else-if="loading"><i
|
||||
class="iconfont icon-jiazai text-middle"></i><span class="text-middle font-22">请稍等...</span>
|
||||
</div>
|
||||
<div class="pt20 pb20 text-center font-22 color-ccc" v-else-if="isDataEnd && list.length>10">我们是有底线的
|
||||
</div>
|
||||
</mugen-scroll>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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')
|
||||
},
|
||||
},
|
||||
})
|
||||
</script>
|
||||
<?=$this->load->view('h5/market/sylive/hidden_wx_share')?>
|
||||
<?= $this->load->view('h5/market/sylive/hidden_wx_share') ?>
|
||||
</body>
|
||||
Reference in New Issue
Block a user