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
7b4833d4
Commit
7b4833d4
authored
Nov 27, 2017
by
汪波
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/test' into test
parents
be8faa16
b05f6fb9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
80 additions
and
34 deletions
+80
-34
unquestion.php
e/action/unquestion.php
+11
-0
userfun.php
e/class/userfun.php
+36
-27
Thread.php
e/extend/internalApi/bbs/Thread.php
+26
-1
config_ibanshou.php
environments/prod/e/config/config_ibanshou.php
+6
-5
videoClass.js
skin/default/js/videoClass.js
+1
-1
No files found.
e/action/unquestion.php
0 → 100644
View file @
7b4833d4
<?php
/**
* Created by PhpStorm.
* User: xiabin
* Date: 20/11/2017
* Time: 5:04 PM
*/
require
(
__DIR__
.
'/../extend/internalApi/autoload.php'
);
require
(
__DIR__
.
'/../config/config_ibanshou.php'
);
\internalApi\base\Client
::
config
(
$config
[
'wxh.internal'
][
'client'
]);
echo
\internalApi\bbs\Thread
::
getUnresolveQustion
();
\ No newline at end of file
e/class/userfun.php
View file @
7b4833d4
...
@@ -15,37 +15,46 @@ function user_ibanshou($num)
...
@@ -15,37 +15,46 @@ function user_ibanshou($num)
$str
=
'<div clas=\"recommend-info\">'
;
$str
=
'<div clas=\"recommend-info\">'
;
foreach
(
$list
as
$val
)
{
foreach
(
$list
as
$val
)
{
$str
.=
"<div class=
\"
news-item portal-course
\"
>
//自适应 http, https
<a href=
\"
{
$val
[
'url'
]
}
\"
class=
\"
content pb-none
\"
>
$val
[
'url'
]
=
str_replace
(
'http://'
,
'//'
,
$val
[
'url'
]);
<div class=
\"
tit
\"
>
{
$val
[
'name'
]
}
</div>
$str
.=
<<<EOD
<div class=
\"
img-item-box
\"
>
<div class=\"news-item portal-course\">
<div class=
\"
img-item
\"
><img src=
\"
{
$val
[
'preview_pic'
]
}
-ym.preview
\"
alt=
\"\"
></div>
<a href=\"{$val['url']}\" class=\"content pb-none\">
</div>
<div class=\"tit\">{$val['name']}</div>
</a>
<div class=
\"
portal-news-info clearfix
\"
>
<div class=\"img-item-box\">
<span class=
\"
time fl
\"
>来自扳手学院</span>
<div class=\"img-item\"><img src=\"{$val['preview_pic']}-ym.preview\" alt=\"\"></div>
<span class=
\"
fr
\"
>
{
$val
[
'view_count'
]
}
人阅读</span>
</div>
</div>
</a>
</div>"
;
<div class=\"portal-news-info clearfix\">
<span class=\"time fl\">来自扳手学院</span>
<span class=\"fr\">{$val['view_count']}人阅读</span>
</div>
</div>
EOD;
}
}
foreach
(
$thread
as
$val
)
{
foreach
(
$thread
as
$val
)
{
$val
[
'image'
]
=
$val
[
'image'
]
?
:
'/skin/default/images/notimg.gif'
;
//自适应 http, https
$val
[
'image'
]
=
$val
[
'image'
]
?
str_replace
(
'http://'
,
'//'
,
$val
[
'image'
])
:
'/skin/default/images/notimg.gif'
;
$val
[
'url'
]
=
str_replace
(
'http://'
,
'//'
,
$val
[
'url'
]);
$str
.=
<<<EOD
<div class=\"news-item has-pic one-picture\">
<a href=\"{$val['url']}\" class=\"content pb-none\" style=\"min-height: 80px;\">
<div class=\"tit\">{$val['subject']}</div>
$str
.=
"<div class=
\"
news-item has-pic one-picture
\"
>
<div class=\"img-item-box clearfix\">
<a href=
\"
{
$val
[
'url'
]
}
\"
class=
\"
content pb-none
\"
style=
\"
min-height: 80px;
\"
>
<div class=\"img-item\"><img src=\"{$val['image']}\" alt=\"\"></div>
<div class=
\"
tit
\"
>
{
$val
[
'subject'
]
}
</div>
</div>
</a>
<div class=
\"
img-item-box clearfix
\"
>
<div class=\"portal-news-info clearfix\">
<div class=
\"
img-item
\"
><img src=
\"
{
$val
[
'image'
]
}
\"
alt=
\"\"
></div>
<span class=\"time fl\">来自扳手社区</span>
</div>
<span class=\"fr\">{$val['views']}人已参与</span>
</a>
</div>
<div class=
\"
portal-news-info clearfix
\"
>
</div>
<span class=
\"
time fl
\"
>来自扳手社区</span>
EOD;
<span class=
\"
fr
\"
>
{
$val
[
'views'
]
}
人已参与</span>
</div>
</div>"
;
}
}
echo
$str
.
'</div>'
;
echo
$str
.
'</div>'
;
...
...
e/extend/internalApi/bbs/Thread.php
View file @
7b4833d4
...
@@ -13,13 +13,38 @@ use internalApi\base\Client;
...
@@ -13,13 +13,38 @@ use internalApi\base\Client;
class
Thread
extends
Client
class
Thread
extends
Client
{
{
public
static
function
getHotThreads
(
$num
=
1
)
public
static
function
getHotThreads
(
$num
=
1
)
{
{
return
self
::
call
(
'thread.getHotThreads'
,
compact
(
'num'
));
return
self
::
call
(
'thread.getHotThreads'
,
compact
(
'num'
));
}
}
/**
* 获取指定用户发表的帖子的数量
* @param int $uid
* @return int
*/
public
static
function
countThreads
(
$uid
)
public
static
function
countThreads
(
$uid
)
{
{
return
self
::
call
(
'thread.countThreads'
,
compact
(
'uid'
));
return
self
::
call
(
'thread.countThreads'
,
compact
(
'uid'
));
}
}
/**
* 根据帖子ID获取帖子信息
* @param int $tid
* @return array|null
*/
public
static
function
info
(
$tid
)
{
return
self
::
call
(
'thread.info'
,
compact
(
'tid'
));
}
/**
* 获取未解决问题数量
* @return mixed
*/
public
static
function
getUnresolveQustion
()
{
return
self
::
call
(
'thread.getUnresolveQustion'
);
}
}
}
\ No newline at end of file
environments/prod/e/config/config_ibanshou.php
View file @
7b4833d4
<?php
<?php
$scheme
=
(
isset
(
$_SERVER
[
'REQUEST_SCHEME'
])
&&
$_SERVER
[
'REQUEST_SCHEME'
]
==
'http'
)
?
$_SERVER
[
'REQUEST_SCHEME'
]
:
'https'
;
$config
=
[
$config
=
[
//是否使用用户中心
//是否使用用户中心
...
@@ -18,15 +19,15 @@ $config = [
...
@@ -18,15 +19,15 @@ $config = [
'debug'
=>
FALSE
,
'debug'
=>
FALSE
,
'server_ip'
=>
[
'54.222.158.174'
,
'172.31.12.30'
],
'server_ip'
=>
[
'54.222.158.174'
,
'172.31.12.30'
],
'logs'
=>
'e/data/phpcas.log'
,
'logs'
=>
'e/data/phpcas.log'
,
'uc_base_url'
=>
'http
://u.ibanshou.cn/'
,
'uc_base_url'
=>
$scheme
.
'
://u.ibanshou.cn/'
,
],
],
//产品
//产品
'wxhpro'
=>
[
'wxhpro'
=>
[
'ucenter'
=>
'http
://u.ibanshou.cn'
,
'ucenter'
=>
$scheme
.
'
://u.ibanshou.cn'
,
'xue'
=>
'http
://xue.ibanshou.cn'
,
'xue'
=>
$scheme
.
'
://xue.ibanshou.cn'
,
's'
=>
'http
://s.ibanshou.cn'
,
's'
=>
$scheme
.
'
://s.ibanshou.cn'
,
'bbs'
=>
'http
://bbs.ibanshou.cn'
,
'bbs'
=>
$scheme
.
'
://bbs.ibanshou.cn'
,
],
],
//wxh_internal_api
//wxh_internal_api
...
...
skin/default/js/videoClass.js
View file @
7b4833d4
...
@@ -286,7 +286,7 @@ $('#favor').click(function () {
...
@@ -286,7 +286,7 @@ $('#favor').click(function () {
function
setVideo
(
node
,
vu
,
w
,
h
)
{
function
setVideo
(
node
,
vu
,
w
,
h
)
{
node
.
setAttribute
(
"width"
,
w
);
node
.
setAttribute
(
"width"
,
w
);
node
.
setAttribute
(
"height"
,
h
);
node
.
setAttribute
(
"height"
,
h
);
node
.
src
=
'
http:
//yuntv.letv.com/bcloud.html?uu=pjseptwfce&vu='
+
vu
+
'&pu=510360dfc7&auto_play=1&width='
+
w
+
'&height='
+
h
+
'&lang=zh_CN'
;
node
.
src
=
'//yuntv.letv.com/bcloud.html?uu=pjseptwfce&vu='
+
vu
+
'&pu=510360dfc7&auto_play=1&width='
+
w
+
'&height='
+
h
+
'&lang=zh_CN'
;
}
}
})(
jQuery
);
})(
jQuery
);
\ No newline at end of file
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