From 52219b9a8623f7bcf1523c9df1e7f266d9beaefb Mon Sep 17 00:00:00 2001 From: lccsw <805383944@qq.com> Date: Sun, 9 Oct 2022 15:58:34 +0800 Subject: [PATCH] add-market-sylive-logout --- home/controllers/h5/market/sylive/Act.php | 9 ++----- home/controllers/h5/market/sylive/Login.php | 10 +++----- home/views/h5/market/sylive/biz/brands.php | 23 +++++++++++++++++ home/views/h5/market/sylive/biz/index.php | 28 +++++++++++++++++++++ home/views/h5/market/sylive/biz/lists.php | 25 ++++++++++++++++++ 5 files changed, 82 insertions(+), 13 deletions(-) diff --git a/home/controllers/h5/market/sylive/Act.php b/home/controllers/h5/market/sylive/Act.php index f5a9e773..b2510cd2 100644 --- a/home/controllers/h5/market/sylive/Act.php +++ b/home/controllers/h5/market/sylive/Act.php @@ -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); diff --git a/home/controllers/h5/market/sylive/Login.php b/home/controllers/h5/market/sylive/Login.php index 109a93ac..c610defb 100644 --- a/home/controllers/h5/market/sylive/Login.php +++ b/home/controllers/h5/market/sylive/Login.php @@ -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, '退出成功'); } } \ No newline at end of file diff --git a/home/views/h5/market/sylive/biz/brands.php b/home/views/h5/market/sylive/biz/brands.php index a1bc41b2..d0d72940 100644 --- a/home/views/h5/market/sylive/biz/brands.php +++ b/home/views/h5/market/sylive/biz/brands.php @@ -5,6 +5,9 @@
# {{info.nickname}} + + 退出 +
@@ -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') + }, }, }) diff --git a/home/views/h5/market/sylive/biz/index.php b/home/views/h5/market/sylive/biz/index.php index e507e3c7..d4be4aa8 100644 --- a/home/views/h5/market/sylive/biz/index.php +++ b/home/views/h5/market/sylive/biz/index.php @@ -8,6 +8,11 @@ 切换门店 + + + 退出 + +
@@ -34,6 +39,9 @@
+ + 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 4016b1bf..079cfce0 100644 --- a/home/views/h5/market/sylive/biz/lists.php +++ b/home/views/h5/market/sylive/biz/lists.php @@ -12,6 +12,11 @@ 切换区域 + + + 退出 + +
@@ -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') + }, }, })