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)
$str = '<div clas=\"recommend-info\">';
foreach ($list as $val) {
$str .= "<div class=\"news-item portal-course\">
<a href=\"{$val['url']}\" class=\"content pb-none\">
<div class=\"tit\">{$val['name']}</div>
<div class=\"img-item-box\">
<div class=\"img-item\"><img src=\"{$val['preview_pic']}-ym.preview\" alt=\"\"></div>
</div>
</a>
<div class=\"portal-news-info clearfix\">
<span class=\"time fl\">来自扳手学院</span>
<span class=\"fr\">{$val['view_count']}人阅读</span>
</div>
</div>";
//自适应 http, https
$val['url'] = str_replace('http://', '//', $val['url']);
$str .= <<<EOD
<div class=\"news-item portal-course\">
<a href=\"{$val['url']}\" class=\"content pb-none\">
<div class=\"tit\">{$val['name']}</div>
<div class=\"img-item-box\">
<div class=\"img-item\"><img src=\"{$val['preview_pic']}-ym.preview\" alt=\"\"></div>
</div>
</a>
<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) {
$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\">
<a href=\"{$val['url']}\" class=\"content pb-none\" style=\"min-height: 80px;\">
<div class=\"tit\">{$val['subject']}</div>
<div class=\"img-item-box clearfix\">
<div class=\"img-item\"><img src=\"{$val['image']}\" alt=\"\"></div>
</div>
</a>
<div class=\"portal-news-info clearfix\">
<span class=\"time fl\">来自扳手社区</span>
<span class=\"fr\">{$val['views']}人已参与</span>
</div>
</div>";
<div class=\"img-item-box clearfix\">
<div class=\"img-item\"><img src=\"{$val['image']}\" alt=\"\"></div>
</div>
</a>
<div class=\"portal-news-info clearfix\">
<span class=\"time fl\">来自扳手社区</span>
<span class=\"fr\">{$val['views']}人已参与</span>
</div>
</div>
EOD;
}
echo $str . '</div>';
......
......@@ -13,13 +13,38 @@ use internalApi\base\Client;
class Thread extends Client
{
public static function getHotThreads($num=1)
public static function getHotThreads($num = 1)
{
return self::call('thread.getHotThreads', compact('num'));
}
/**
* 获取指定用户发表的帖子的数量
* @param int $uid
* @return int
*/
public static function countThreads($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
$scheme = (isset($_SERVER['REQUEST_SCHEME']) && $_SERVER['REQUEST_SCHEME'] == 'http') ? $_SERVER['REQUEST_SCHEME'] : 'https';
$config = [
//是否使用用户中心
......@@ -18,15 +19,15 @@ $config = [
'debug' => FALSE,
'server_ip' => ['54.222.158.174', '172.31.12.30'],
'logs' => 'e/data/phpcas.log',
'uc_base_url' => 'http://u.ibanshou.cn/',
'uc_base_url' => $scheme.'://u.ibanshou.cn/',
],
//产品
'wxhpro' => [
'ucenter' => 'http://u.ibanshou.cn',
'xue' => 'http://xue.ibanshou.cn',
's' => 'http://s.ibanshou.cn',
'bbs' => 'http://bbs.ibanshou.cn',
'ucenter' => $scheme.'://u.ibanshou.cn',
'xue' => $scheme.'://xue.ibanshou.cn',
's' => $scheme.'://s.ibanshou.cn',
'bbs' => $scheme.'://bbs.ibanshou.cn',
],
//wxh_internal_api
......
......@@ -286,7 +286,7 @@ $('#favor').click(function () {
function setVideo(node, vu, w, h) {
node.setAttribute("width", w);
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);
\ 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