add-market-sylive-logout

This commit is contained in:
lccsw
2022-10-09 15:58:34 +08:00
parent 6bd6e7d501
commit 52219b9a86
5 changed files with 82 additions and 13 deletions
+2 -7
View File
@@ -86,10 +86,8 @@ class Act extends Wx {
$info['a_id'] = $a_id;
$info['org_id'] = $this->session['org_id'];
$info['subscribemsg'] = $subscribemsg;
$info['shareurl'] = $info['code'] = '';
if($this->group_id==3||$this->group_id==2){
$info['shareurl'] = '/h5/market/sylive/act/share?skey='.$info['skey'];
}
$info['code'] = '';
$info['shareurl'] = '/h5/market/sylive/act/share?skey='.$info['skey'];
$info['statisticsurl'] = '/h5/market/sylive/stic?skey='.$info['skey'];
$info['channelImg'] = build_qiniu_image_url($row['channelImg']);
// $info['live_url'] = 'https://live.liche.cn/watch/'.$row['channelId'];
@@ -181,9 +179,6 @@ class Act extends Wx {
}
public function share(){
if($this->group_id!=2 && $this->group_id!=3){
throw new Hd_exception("页面不存在", 400);
}
$skey = $this->input->get('skey');
if (!$skey) {
throw new Hd_exception("参数错误", 400);
+4 -6
View File
@@ -70,7 +70,7 @@ class Login extends CI_Controller{
}
$redis = &load_cache('redis');
$key = "sylive_login_code_".$mobile;
if(!$code = $redis->get($key)){
if(!$redis->get($key)){
$this->load->helper('string');
$code = random_string('numeric', 4);
$redis->save($key, $code, 60*5);
@@ -87,10 +87,8 @@ class Login extends CI_Controller{
exit(json_encode($data));
}
public function test(){
$this->load->library('market/sylive_entity');
$oid = 1;
$req = $this->sylive_entity->get_level($oid);
print_r($req);
public function logout(){
$_SESSION['market_sylive_session'] = '';
$this->show_json('',200, '退出成功');
}
}
@@ -5,6 +5,9 @@
<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>
</div>
<div class="fn-flex mt40 text-center color-fff">
<div class="fn-flex-item" v-for="item in info.count">
@@ -188,6 +191,26 @@
},'json')
}
},
logout(){
$.get('/h5/market/sylive/login/logout',function (response) {
if(response.code==200){
mDialog.msg({
duration: 250,
pause: 2000,
content: response.msg,
onClose:function(){
window.location = '/h5/market/sylive/login'
}
});
}else{
mDialog.msg({
duration: 250,
pause: 2000,
content: response.msg
});
}
},'json')
},
},
})
</script>
+28
View File
@@ -8,6 +8,11 @@
<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-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>
<?}?>
</div>
</div>
<div class="relative bg-fff mt10 ml30 mr30 inner30 ulib-r20 box-shadow-darkGray" style="min-height:75vh;">
@@ -34,6 +39,9 @@
</mugen-scroll>
</div>
</div>
<?if($group_id<2){?>
<?$this->load->view('h5/market/sylive/nav')?>
<?}?>
</div>
<script>
@@ -98,6 +106,26 @@
},'json')
}
},
logout(){
$.get('/h5/market/sylive/login/logout',function (response) {
if(response.code==200){
mDialog.msg({
duration: 250,
pause: 2000,
content: response.msg,
onClose:function(){
window.location = '/h5/market/sylive/login'
}
});
}else{
mDialog.msg({
duration: 250,
pause: 2000,
content: response.msg
});
}
},'json')
},
},
})
</script>
+25
View File
@@ -12,6 +12,11 @@
<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>
<?}?>
</div>
<div class="fn-flex mt40 text-center color-fff">
<div class="fn-flex-item" v-for="item in info.count">
@@ -194,6 +199,26 @@
},'json')
}
},
logout(){
$.get('/h5/market/sylive/login/logout',function (response) {
if(response.code==200){
mDialog.msg({
duration: 250,
pause: 2000,
content: response.msg,
onClose:function(){
window.location = '/h5/market/sylive/login'
}
});
}else{
mDialog.msg({
duration: 250,
pause: 2000,
content: response.msg
});
}
},'json')
},
},
})
</script>