切换导航条
此项目
正在载入...
登录
景龙
/
xingqiu
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
景龙
6 years ago
提交
00b3be99235b0d1ddf3bb5c973408bb83c67119d
1 个父辈
0ef20d37
1 个管道 的构建
通过
耗费 1 秒
增加退出登录功能
变更
9
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
9 个修改的文件
包含
88 行增加
和
19 行删除
app/debug.php
app/portal/controller/LoginController.php
public/themes/simpleboot3/portal/login/info.html
public/themes/simpleboot3/public/assets/css/person.css
public/themes/simpleboot3/public/assets/images/logout.png
public/themes/simpleboot3/public/assets/js/public.js
public/themes/simpleboot3_mobile/portal/login/info.html
public/themes/simpleboot3_mobile/public/assets/images/logout.png
public/themes/simpleboot3_mobile/public/assets/js/public.js
app/debug.php
查看文件 @
00b3be9
...
...
@@ -11,8 +11,8 @@
return
[
// 应用调试模式
'app_debug'
=>
tru
e
,
'app_debug'
=>
fals
e
,
// 应用Trace
'app_trace'
=>
tru
e
,
'app_trace'
=>
fals
e
,
];
\ No newline at end of file
...
...
app/portal/controller/LoginController.php
查看文件 @
00b3be9
...
...
@@ -112,7 +112,16 @@ class LoginController extends HomeBaseController
//首页个人中心
public
function
info
(){
return
$this
->
fetch
();
$login
=
cmf_is_user_login
();
if
(
$login
)
{
return
$this
->
fetch
();
}
}
//退出登录
public
function
logout
(){
cmf_update_current_user
(
NULL
);
$this
->
apiResponse
(
1
,
'退出成功!'
);
}
//首页个人中心修改头像
...
...
@@ -157,7 +166,10 @@ class LoginController extends HomeBaseController
//个人中心编辑页面
public
function
editInfo
(){
return
$this
->
fetch
();
$login
=
cmf_is_user_login
();
if
(
$login
)
{
return
$this
->
fetch
();
}
}
//个人中心编辑提交
...
...
@@ -186,23 +198,25 @@ class LoginController extends HomeBaseController
//我的收藏列表
public
function
myCollection
(){
$limit
=
$this
->
limit
;
$uid
=
cmf_get_current_user_id
();
$login
=
cmf_is_user_login
();
if
(
$login
)
{
$limit
=
$this
->
limit
;
$uid
=
cmf_get_current_user_id
();
// $collectionModel = new CollectionModel();
// $res = $collectionModel
// ->where(['uid'=>$uid])
// ->field('id,post_id,category_name,city_name,post_url')
// ->order('id desc')
// ->paginate($limit);
$res
=
Db
::
name
(
'collection'
)
->
alias
(
'c'
)
->
join
(
'portal_post p'
,
'c.post_id = p.id'
)
->
where
([
'c.uid'
=>
$uid
,
'p.delete_time'
=>
0
])
->
field
(
'c.id,c.category_name,c.city_name,c.post_url,p.post_title,p.post_excerpt,p.post_favorites'
)
->
order
(
'c.id desc'
)
->
paginate
(
$limit
);
$data
=
$res
->
toArray
();
$page
=
$res
->
render
();
$res
=
Db
::
name
(
'collection'
)
->
alias
(
'c'
)
->
join
(
'portal_post p'
,
'c.post_id = p.id'
)
->
where
([
'c.uid'
=>
$uid
,
'p.delete_time'
=>
0
])
->
field
(
'c.id,c.category_name,c.city_name,c.post_url,p.post_title,p.post_excerpt,p.post_favorites'
)
->
order
(
'c.id desc'
)
->
paginate
(
$limit
);
$data
=
$res
->
toArray
();
$page
=
$res
->
render
();
// $post_ids = array_unique(array_column($data['data'],'post_id'));
// $data1 = Db::name('portal_post')
// ->whereIn('id',$post_ids)
...
...
@@ -223,9 +237,10 @@ class LoginController extends HomeBaseController
// }
// }
// }
$this
->
assign
(
'res'
,
$data
[
'data'
]);
$this
->
assign
(
'page'
,
$page
);
return
$this
->
fetch
();
$this
->
assign
(
'res'
,
$data
[
'data'
]);
$this
->
assign
(
'page'
,
$page
);
return
$this
->
fetch
();
}
}
//搜索列表
...
...
public/themes/simpleboot3/portal/login/info.html
查看文件 @
00b3be9
...
...
@@ -50,6 +50,13 @@
</div>
<span>
我的收藏
</span>
</div>
<!--退出登录-->
<div
class=
"Collection clearfix"
id=
"logout"
>
<div
class=
"Collection_icon"
>
<img
style=
"width:21px;height:21px;"
src=
"__TMPL__/public/assets/images/logout.png"
alt=
""
>
</div>
<span>
退出登录
</span>
</div>
</div>
<div
class=
"Keep"
>
...
...
public/themes/simpleboot3/public/assets/css/person.css
查看文件 @
00b3be9
...
...
@@ -10,7 +10,7 @@
}
.personal_center
{
width
:
487px
;
height
:
3
3
0px
;
height
:
3
9
0px
;
background
:
rgba
(
255
,
255
,
255
,
1
);
box-shadow
:
0px
32px
36px
2px
rgba
(
0
,
0
,
0
,
0.04
);
border-radius
:
20px
;
...
...
public/themes/simpleboot3/public/assets/images/logout.png
0 → 100644
查看文件 @
00b3be9
803 字节
public/themes/simpleboot3/public/assets/js/public.js
查看文件 @
00b3be9
...
...
@@ -170,6 +170,25 @@ $(function() {
}
});
});
//退出登录
$
(
'#logout'
).
click
(
function
()
{
$
.
ajax
({
type
:
'POST'
,
url
:
"/portal/login/logout"
,
data
:
{
},
dataType
:
'json'
,
success
:
function
(
data
)
{
console
.
log
(
data
);
if
(
data
.
code
==
1
)
{
mask
(
data
.
msg
);
window
.
location
.
href
=
'/'
;
}
else
{
mask
(
data
.
msg
);
}
}
});
});
//关于我们
$
(
'#about_us,#about_us1'
).
click
(
function
()
{
window
.
location
.
href
=
'/portal/index/aboutUs'
;
...
...
public/themes/simpleboot3_mobile/portal/login/info.html
查看文件 @
00b3be9
...
...
@@ -56,6 +56,14 @@
我的收藏
</div>
</div>
<div
class=
"index_ninth_one"
id=
"logout"
>
<div
class=
"index_ninth_one_img"
>
<img
src=
"__TMPL__/public/assets/images/logout.png"
alt=
""
/>
</div>
<div
class=
"index_ninth_one_title"
>
退出登录
</div>
</div>
</div>
<div
class=
"index_ninth_photo"
>
<notempty
name=
"user.avatar"
>
...
...
public/themes/simpleboot3_mobile/public/assets/images/logout.png
0 → 100644
查看文件 @
00b3be9
803 字节
public/themes/simpleboot3_mobile/public/assets/js/public.js
查看文件 @
00b3be9
...
...
@@ -206,6 +206,26 @@ $(function() {
}
});
});
//退出登录
$
(
'#logout'
).
click
(
function
()
{
$
.
ajax
({
type
:
'POST'
,
url
:
"/portal/login/logout"
,
data
:
{
},
dataType
:
'json'
,
success
:
function
(
data
)
{
console
.
log
(
data
);
if
(
data
.
code
==
1
)
{
mask
(
data
.
msg
);
window
.
location
.
href
=
'/'
;
}
else
{
mask
(
data
.
msg
);
}
}
});
});
//关于我们
$
(
'#about_us,#about_us1'
).
click
(
function
()
{
window
.
location
.
href
=
'/portal/index/aboutUs'
;
...
...
请
注册
或
登录
后发表评论