Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
s_ibanshou
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋林
s_ibanshou
Commits
6b225b20
Commit
6b225b20
authored
Apr 19, 2018
by
汪波
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/test' into test
parents
9a1657e2
eaf79a6d
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
365 additions
and
353 deletions
+365
-353
aa.html
aa.html
+145
-334
credit.php
e/action/credit.php
+39
-0
ClientCas.php
e/extend/ibanshou/ClientCas.php
+1
-1
User.php
e/extend/internalApi/bbs/User.php
+50
-0
Credit.php
e/extend/internalApi/ucenter/Credit.php
+23
-0
indexloginstatus.php
e/member/login/indexloginstatus.php
+21
-2
loginstatus.php
e/member/login/loginstatus.php
+21
-0
config_ibanshou.php
environments/test/e/config/config_ibanshou.php
+1
-1
news.js
skin/default/js/news.js
+64
-15
No files found.
aa.html
View file @
6b225b20
This diff is collapsed.
Click to expand it.
e/action/credit.php
0 → 100644
View file @
6b225b20
<?php
use
internalApi\ucenter\Credit
;
require
(
__DIR__
.
'/../extend/internalApi/autoload.php'
);
require
(
__DIR__
.
"/../class/connect.php"
);
require
(
__DIR__
.
"/../class/db_sql.php"
);
require
(
__DIR__
.
"/../member/class/user.php"
);
require
(
__DIR__
.
"/../class/q_functions.php"
);
require
__DIR__
.
'/../config/config_ibanshou.php'
;
\internalApi\base\Client
::
config
(
$config
[
'wxh.internal'
][
'client'
]);
$link
=
db_connect
();
$empire
=
new
mysqlquery
();
$mod
=
isset
(
$_GET
[
'mod'
])
?
$_GET
[
'mod'
]
:
''
;
$type
=
isset
(
$_GET
[
'type'
])
?
$_GET
[
'type'
]
:
''
;
$user
=
islogin
();
$typeMap
=
[
'share'
=>
1
,
];
if
(
$mod
==
'credit'
){
$userId
=
$user
[
'ucid'
];
if
(
isset
(
$typeMap
[
$type
]))
{
$creditRuleId
=
$typeMap
[
$type
];
}
else
{
echo
json_encode
([
'status'
=>
false
,
'message'
=>
'type 字段错误'
]);
}
$creditRule
=
Credit
::
addCreditLog
(
$userId
,
$creditRuleId
);
if
(
$creditRule
)
{
$creditInfo
=
array
(
'title'
=>
$creditRule
[
'operation_name'
],
'desc'
=>
$creditRule
[
'operation_details'
],
'number'
=>
$creditRule
[
'number'
]);
setcookie
(
'creditNotice'
,
json_encode
(
$creditInfo
),
0
,
'/'
);
echo
json_encode
([
'status'
=>
true
,
'message'
=>
'ok'
,
'creditRule'
=>
$creditRule
]);
}
else
{
echo
json_encode
([
'status'
=>
false
]);
}
}
\ No newline at end of file
e/extend/ibanshou/ClientCas.php
View file @
6b225b20
...
@@ -76,7 +76,7 @@ class ClientCas
...
@@ -76,7 +76,7 @@ class ClientCas
}
}
phpCAS
::
client
(
CAS_VERSION_2_0
,
$this
->
host
,
$this
->
port
,
$this
->
context
);
phpCAS
::
client
(
CAS_VERSION_2_0
,
$this
->
host
,
$this
->
port
,
$this
->
context
);
phpCAS
::
setNoCasServerValidation
();
phpCAS
::
setNoCasServerValidation
();
phpCAS
::
handleLogoutRequests
(
true
,
$this
->
serverIp
);
phpCAS
::
handleLogoutRequests
(
FALSE
,
$this
->
serverIp
);
phpCAS
::
forceAuthentication
();
phpCAS
::
forceAuthentication
();
}
}
...
...
e/extend/internalApi/bbs/User.php
0 → 100644
View file @
6b225b20
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/8/23
* Time: 11:28
*/
namespace
internalApi\bbs
;
use
internalApi\base\Client
;
class
User
extends
Client
{
/**
* 同步更新用户基本信息
*
* @param int $uid
* @param array $data
* @return bool
*/
public
static
function
updateSync
(
$uid
,
$data
)
{
return
self
::
call
(
'user.updateSync'
,
compact
(
'uid'
,
'data'
));
}
/**
* 获取金币
* @param $uid
* @return mixed
*/
public
static
function
getGoldCoin
(
$uid
)
{
return
self
::
call
(
'user.getGoldCoin'
,
compact
(
'uid'
));
}
/**
* @param string $telephone 手机号
* @param int $num 加减的数量 +-num
* @param string $title 记录标题 例如 完工奖励
* @param string $text 记录内容 例如 完成工单奖励金钱+<span>5<span>
* @return mixed
*/
public
static
function
updateGoldCoin
(
$telephone
,
$num
,
$title
,
$text
){
return
self
::
call
(
'user.updateGoldCoin'
,
compact
(
'telephone'
,
'num'
,
'title'
,
'text'
));
}
}
\ No newline at end of file
e/extend/internalApi/ucenter/Credit.php
0 → 100644
View file @
6b225b20
<?php
/**
* Created by PhpStorm.
* User: QQ
* Date: 2018/4/8
* Time: 9:56
*/
namespace
internalApi\ucenter
;
use
internalApi\base\Client
;
class
Credit
extends
Client
{
/**
* 添加积分
* @param $userId
* @param $creditRuleId
* @return mixed
*/
public
static
function
addCreditLog
(
$userId
,
$creditRuleId
)
{
return
self
::
call
(
'credit.addCreditLog'
,
compact
(
'userId'
,
'creditRuleId'
));
}
}
\ No newline at end of file
e/member/login/indexloginstatus.php
View file @
6b225b20
<?php
<?php
require
(
"../../class/connect.php"
);
require
(
"../../class/connect.php"
);
require
(
__DIR__
.
"/../../class/db_sql.php"
);
require
(
__DIR__
.
"/../../member/class/user.php"
);
require
(
__DIR__
.
"/../../class/q_functions.php"
);
$iscas
=
getcvar
(
'mlcas'
);
$iscas
=
getcvar
(
'mlcas'
);
if
(
$iscas
){
$link
=
db_connect
();
$empire
=
new
mysqlquery
();
$user
=
islogin
();
$ucid
=
$user
[
'ucid'
];
}
?>
?>
<?php
if
(
!
$iscas
)
{
?>
<?php
if
(
!
$iscas
)
{
?>
$(function(){
$(function(){
console.log($(".books").attr('href'));
$(".books").attr("href", "/e/member/login");
$(".books").attr("href", "/e/member/login");
console.log($(".books").attr('href'));
$("#loginGits").attr("style", "display:block;");
$("#loginGits").attr("style", "display:block;");
});
});
<?php
}
else
{
?>
var zhugeCheckRunHandler = false;
function zhugeCheckRun(){
if(!window.zhuge){
zhugeCheckRunHandler = setTimeout(zhugeCheckRun,500);
}else{
clearTimeout(zhugeCheckRunHandler);
window.zhuge.identify("
<?=
$ucid
?>
");
}
}
zhugeCheckRun();
<?php
}
?>
<?php
}
?>
e/member/login/loginstatus.php
View file @
6b225b20
<?php
<?php
require
(
"../../class/connect.php"
);
require
(
"../../class/connect.php"
);
require
(
__DIR__
.
"/../../class/db_sql.php"
);
require
(
__DIR__
.
"/../../member/class/user.php"
);
require
(
__DIR__
.
"/../../class/q_functions.php"
);
$iscas
=
getcvar
(
'mlcas'
);
$iscas
=
getcvar
(
'mlcas'
);
if
(
$iscas
){
$link
=
db_connect
();
$empire
=
new
mysqlquery
();
$user
=
islogin
();
$ucid
=
$user
[
'ucid'
];
}
?>
?>
<?php
if
(
!
$iscas
)
{
?>
<?php
if
(
!
$iscas
)
{
?>
$(".send-comment").attr("href", "/e/member/login");
$(".send-comment").attr("href", "/e/member/login");
<?php
}
else
{
?>
var zhugeCheckRunHandler = false;
function zhugeCheckRun(){
if(!window.zhuge){
zhugeCheckRunHandler = setTimeout(zhugeCheckRun,500);
}else{
clearTimeout(zhugeCheckRunHandler);
window.zhuge.identify("
<?=
$ucid
?>
");
}
}
zhugeCheckRun();
<?php
}
?>
<?php
}
?>
environments/test/e/config/config_ibanshou.php
View file @
6b225b20
...
@@ -16,7 +16,7 @@ $config = [
...
@@ -16,7 +16,7 @@ $config = [
'port'
=>
443
,
'port'
=>
443
,
'server_ca_cert_path'
=>
''
,
'server_ca_cert_path'
=>
''
,
'debug'
=>
false
,
'debug'
=>
false
,
'server_ip'
=>
[
'54.222.158.174'
],
'server_ip'
=>
[
'54.222.158.174'
,
'111.230.165.181'
],
'logs'
=>
'e/data/phpcas.log'
,
'logs'
=>
'e/data/phpcas.log'
,
'uc_base_url'
=>
'http://u.test.yunyamooc.com/'
,
'uc_base_url'
=>
'http://u.test.yunyamooc.com/'
,
],
],
...
...
skin/default/js/news.js
View file @
6b225b20
...
@@ -51,21 +51,21 @@ function comments() {
...
@@ -51,21 +51,21 @@ function comments() {
function
tpl
(
comment
)
{
function
tpl
(
comment
)
{
var
html
=
'<li data-id="'
+
comment
.
id
+
'">
\
var
html
=
'<li data-id="'
+
comment
.
id
+
'">
\
<img src="'
+
comment
.
avatar
+
'">
\
<img src="'
+
comment
.
avatar
+
'">
\
<div class="name">'
+
comment
.
nickname
+
'</div>
\
<div class="name">'
+
comment
.
nickname
+
'</div>
\
<div class="comment-main">'
+
comment
.
content
+
'</div>
\
<div class="comment-main">'
+
comment
.
content
+
'</div>
\
<div class="comment-footbar clearfix">
\
<div class="comment-footbar clearfix">
\
<span>'
+
comment
.
created_at
+
'</span>
\
<span>'
+
comment
.
created_at
+
'</span>
\
<a href="javascript:popReplyComment('
+
comment
.
id
+
');" class="pl-reply"><i class="iconfont icon-comment_light"></i>回复</a>
\
<a href="javascript:popReplyComment('
+
comment
.
id
+
');" class="pl-reply"><i class="iconfont icon-comment_light"></i>回复</a>
\
<a href="javascript:likeComment('
+
comment
.
id
+
', '
+
comment
.
islike
+
');" class="pl-zan"><i class="iconfont '
+
(
comment
.
islike
?
"icon-zan-fill"
:
"icon-zan"
)
+
'"></i>赞</a>
\
<a href="javascript:likeComment('
+
comment
.
id
+
', '
+
comment
.
islike
+
');" class="pl-zan"><i class="iconfont '
+
(
comment
.
islike
?
"icon-zan-fill"
:
"icon-zan"
)
+
'"></i>赞</a>
\
</div>'
;
</div>'
;
if
(
!
$
.
isEmptyObject
(
comment
.
reply
))
{
if
(
!
$
.
isEmptyObject
(
comment
.
reply
))
{
var
replys
=
comment
.
reply
;
var
replys
=
comment
.
reply
;
html
+=
'<div class="comment-replay">'
;
html
+=
'<div class="comment-replay">'
;
for
(
i
in
replys
)
{
for
(
i
in
replys
)
{
html
+=
'<div class="comment-replay-list"><span>'
+
replys
[
i
].
nickname
+
':</span>'
+
replys
[
i
].
content
+
' <span>'
+
replys
[
i
].
created_at
+
'</span></div>'
;
html
+=
'<div class="comment-replay-list"><span>'
+
replys
[
i
].
nickname
+
':</span>'
+
replys
[
i
].
content
+
' <span>'
+
replys
[
i
].
created_at
+
'</span></div>'
;
}
}
html
+=
'</div>'
;
html
+=
'</div>'
;
}
}
...
@@ -74,7 +74,7 @@ function tpl(comment) {
...
@@ -74,7 +74,7 @@ function tpl(comment) {
//回复弹窗
//回复弹窗
function
popReplyComment
(
id
)
{
function
popReplyComment
(
id
)
{
var
parent
=
$
(
'.comment-list'
).
find
(
'> li[data-id='
+
id
+
']'
);
var
parent
=
$
(
'.comment-list'
).
find
(
'> li[data-id='
+
id
+
']'
);
var
name
=
parent
.
find
(
'> .name'
).
text
()
+
':'
;
var
name
=
parent
.
find
(
'> .name'
).
text
()
+
':'
;
var
content
=
parent
.
find
(
'> .comment-main'
).
text
();
var
content
=
parent
.
find
(
'> .comment-main'
).
text
();
$
(
'#reply-name'
).
text
(
name
);
$
(
'#reply-name'
).
text
(
name
);
...
@@ -119,15 +119,15 @@ $(".reply-pl").click(function () {
...
@@ -119,15 +119,15 @@ $(".reply-pl").click(function () {
});
});
function
handelReplyComment
(
plid
,
comment
)
{
function
handelReplyComment
(
plid
,
comment
)
{
$
.
each
(
$
(
'.comment-list li'
),
function
()
{
$
.
each
(
$
(
'.comment-list li'
),
function
()
{
if
(
$
(
this
).
attr
(
'data-id'
)
==
plid
)
{
if
(
$
(
this
).
attr
(
'data-id'
)
==
plid
)
{
var
html
=
''
;
var
html
=
''
;
if
(
$
(
this
).
children
(
".comment-replay"
).
html
())
{
if
(
$
(
this
).
children
(
".comment-replay"
).
html
())
{
html
=
'<div class="comment-replay-list"><span>'
+
comment
.
nickname
+
':</span>'
+
comment
.
content
+
' <span>'
+
comment
.
created_at
+
'</span></div>'
;
html
=
'<div class="comment-replay-list"><span>'
+
comment
.
nickname
+
':</span>'
+
comment
.
content
+
' <span>'
+
comment
.
created_at
+
'</span></div>'
;
$
(
this
).
children
(
".comment-replay"
).
append
(
html
);
$
(
this
).
children
(
".comment-replay"
).
append
(
html
);
}
else
{
}
else
{
html
=
'<div class="comment-replay">
\
html
=
'<div class="comment-replay">
\
<div class="comment-replay-list"><span>'
+
comment
.
nickname
+
':</span>'
+
comment
.
content
+
' <span>'
+
comment
.
created_at
+
'</span></div>
\
<div class="comment-replay-list"><span>'
+
comment
.
nickname
+
':</span>'
+
comment
.
content
+
' <span>'
+
comment
.
created_at
+
'</span></div>
\
</div>'
;
</div>'
;
$
(
this
).
append
(
html
);
$
(
this
).
append
(
html
);
}
}
...
@@ -143,7 +143,7 @@ function likeComment(plid, islike) {
...
@@ -143,7 +143,7 @@ function likeComment(plid, islike) {
$
.
post
(
"/e/action/news/comment.php?mod=like"
,
{
plid
:
plid
},
function
(
e
)
{
$
.
post
(
"/e/action/news/comment.php?mod=like"
,
{
plid
:
plid
},
function
(
e
)
{
if
(
e
.
status
)
{
if
(
e
.
status
)
{
$
.
each
(
$
(
'.comment-list li'
),
function
()
{
$
.
each
(
$
(
'.comment-list li'
),
function
()
{
if
(
$
(
this
).
attr
(
'data-id'
)
==
plid
)
{
if
(
$
(
this
).
attr
(
'data-id'
)
==
plid
)
{
$
(
this
).
find
(
".icon-zan"
).
addClass
(
"icon-zan-fill"
).
removeClass
(
"icon-zan"
);
$
(
this
).
find
(
".icon-zan"
).
addClass
(
"icon-zan-fill"
).
removeClass
(
"icon-zan"
);
}
}
...
@@ -154,6 +154,55 @@ function likeComment(plid, islike) {
...
@@ -154,6 +154,55 @@ function likeComment(plid, islike) {
},
'json'
);
},
'json'
);
}
}
function
shareSuccessCallback
(
type
)
{
$
.
ajax
({
type
:
"GET"
,
url
:
"/e/action/credit.php?mod=credit&type="
+
type
,
data
:
''
,
dataType
:
"json"
,
success
:
function
(
response
)
{
if
(
response
.
status
)
{
cookieTips
();
}
}
});
}
function
getCookie
(
sName
)
{
var
aCookie
=
document
.
cookie
.
split
(
"; "
);
for
(
var
i
=
0
;
i
<
aCookie
.
length
;
i
++
)
{
var
aCrumb
=
aCookie
[
i
].
split
(
"="
);
if
(
sName
==
aCrumb
[
0
])
return
unescape
(
aCrumb
[
1
]);
}
return
null
;
}
function
setCookie
(
cname
,
cvalue
)
{
document
.
cookie
=
cname
+
"="
+
cvalue
+
"; "
;
}
function
deleteCookie
(
name
,
path
)
{
// 删除Cookie
var
strCookie
;
// 检查Cookie是否存在
// 设置Cookie的期限为己过期
strCookie
=
name
+
"="
;
strCookie
+=
(
path
)
?
"; path="
+
path
:
""
;
document
.
cookie
=
strCookie
;
}
//end function deleteCookie
function
cookieTips
()
{
var
obj
=
getCookie
(
'creditNotice'
);
if
(
obj
)
{
obj
=
JSON
.
parse
(
obj
);
var
desc
=
'金币 +'
+
obj
.
number
;
Banshou
.
creditTip
(
obj
.
title
,
desc
,
3000
);
deleteCookie
(
'creditNotice'
,
'/'
);
}
}
function
pop
(
msg
,
islogin
)
{
function
pop
(
msg
,
islogin
)
{
if
(
islogin
===
'nologin'
)
{
if
(
islogin
===
'nologin'
)
{
location
.
href
=
"/e/member/login"
;
location
.
href
=
"/e/member/login"
;
...
@@ -178,7 +227,7 @@ function scrollLoading() {
...
@@ -178,7 +227,7 @@ function scrollLoading() {
var
lastplid
=
$
(
".comment-list li:last-child"
).
attr
(
'data-id'
);
var
lastplid
=
$
(
".comment-list li:last-child"
).
attr
(
'data-id'
);
lastplid
=
lastplid
?
lastplid
:
0
;
lastplid
=
lastplid
?
lastplid
:
0
;
scrollLoad
.
html
(
"<img src='"
+
spinner
+
"'>"
);
scrollLoad
.
html
(
"<img src='"
+
spinner
+
"'>"
);
$
.
post
(
"/e/action/news/comment.php"
,
{
newsid
:
newsid
,
lastplid
:
lastplid
},
function
(
e
)
{
$
.
post
(
"/e/action/news/comment.php"
,
{
newsid
:
newsid
,
lastplid
:
lastplid
},
function
(
e
)
{
if
(
!
$
.
isEmptyObject
(
e
.
data
))
{
if
(
!
$
.
isEmptyObject
(
e
.
data
))
{
var
comments
=
e
.
data
;
var
comments
=
e
.
data
;
var
html
=
''
;
var
html
=
''
;
...
@@ -189,7 +238,7 @@ function scrollLoading() {
...
@@ -189,7 +238,7 @@ function scrollLoading() {
}
else
{
}
else
{
scrollLoad
.
html
(
"全部加载完毕"
);
scrollLoad
.
html
(
"全部加载完毕"
);
$
(
window
).
off
(
"scroll"
,
scrollLoading
);
$
(
window
).
off
(
"scroll"
,
scrollLoading
);
setTimeout
(
function
()
{
setTimeout
(
function
()
{
scrollLoad
.
slideUp
();
scrollLoad
.
slideUp
();
},
1000
);
},
1000
);
}
}
...
@@ -224,11 +273,11 @@ $.post("/e/action/news/index.php?mod=init", {newsid: newsid}, function (e) {
...
@@ -224,11 +273,11 @@ $.post("/e/action/news/index.php?mod=init", {newsid: newsid}, function (e) {
//点赞
//点赞
function
diggtop
()
{
function
diggtop
()
{
$
(
'#zan'
).
one
(
'click'
,
function
()
{
$
(
'#zan'
).
one
(
'click'
,
function
()
{
$
.
post
(
"/e/action/news/index.php?mod=diggtop"
,
{
newsid
:
newsid
},
function
(
e
)
{
$
.
post
(
"/e/action/news/index.php?mod=diggtop"
,
{
newsid
:
newsid
},
function
(
e
)
{
if
(
e
.
status
)
{
if
(
e
.
status
)
{
$
(
"#zan"
).
find
(
'i'
).
removeClass
(
'icon-zan'
).
addClass
(
'icon-zan-fill'
);
$
(
"#zan"
).
find
(
'i'
).
removeClass
(
'icon-zan'
).
addClass
(
'icon-zan-fill'
);
$
(
'.zan-tip'
).
animate
({
opacity
:
"1"
,
top
:
"-=30"
},
500
).
animate
({
opacity
:
"0"
,
top
:
"-30"
},
"slow"
);
$
(
'.zan-tip'
).
animate
({
opacity
:
"1"
,
top
:
"-=30"
},
500
).
animate
({
opacity
:
"0"
,
top
:
"-30"
},
"slow"
);
}
else
{
}
else
{
pop
(
e
.
msg
,
e
.
data
);
pop
(
e
.
msg
,
e
.
data
);
}
}
...
@@ -253,9 +302,9 @@ $('#favor').click(function () {
...
@@ -253,9 +302,9 @@ $('#favor').click(function () {
},
'json'
);
},
'json'
);
});
});
(
function
(
$
)
{
(
function
(
$
)
{
//加载乐视视频
//加载乐视视频
$
(
"div.lecloud-video"
).
each
(
function
()
{
$
(
"div.lecloud-video"
).
each
(
function
()
{
var
width
=
640
,
height
=
360
,
rate
=
width
/
height
;
var
width
=
640
,
height
=
360
,
rate
=
width
/
height
;
var
video
=
createVideoElement
(
width
,
height
);
var
video
=
createVideoElement
(
width
,
height
);
$
(
this
).
replaceWith
(
video
);
$
(
this
).
replaceWith
(
video
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment