Commit 7b4833d4 authored by 汪波's avatar 汪波

Merge remote-tracking branch 'origin/test' into test

parents be8faa16 b05f6fb9
<?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
...@@ -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>';
......
...@@ -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
<?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
......
...@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment