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
b1045e62
Commit
b1045e62
authored
Jun 29, 2017
by
蒋林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页
parent
5f5addda
Changes
26
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
928 additions
and
419 deletions
+928
-419
firstnews.js
d/js/js/firstnews.js
+1
-1
hotplnews.js
d/js/js/hotplnews.js
+1
-1
newnews.js
d/js/js/newnews.js
+1
-1
config_ibanshou.php
e/back_conf/dev/config_ibanshou.php
+29
-0
config_ibanshou.php
e/back_conf/test/config_ibanshou.php
+35
-6
connect.php
e/class/connect.php
+1
-0
userfun.php
e/class/userfun.php
+42
-0
config.php
e/config/config.php
+1
-1
config_ibanshou.php
e/config/config_ibanshou.php
+37
-0
ClientCas.php
e/extend/ibanshou/ClientCas.php
+0
-1
autoload.php
e/extend/internalApi/autoload.php
+18
-0
Client.php
e/extend/internalApi/base/Client.php
+253
-0
ClientException.php
e/extend/internalApi/base/ClientException.php
+14
-0
Server.php
e/extend/internalApi/base/Server.php
+139
-0
ServerException.php
e/extend/internalApi/base/ServerException.php
+15
-0
Thread.php
e/extend/internalApi/bbs/Thread.php
+25
-0
client_config.exmaple.php
e/extend/internalApi/client_config.exmaple.php
+27
-0
client_config_dev.php
e/extend/internalApi/client_config_dev.php
+25
-0
Medal.php
e/extend/internalApi/code/Medal.php
+24
-0
server.example.php
e/extend/internalApi/server.example.php
+44
-0
Member.php
e/extend/internalApi/ucenter/Member.php
+21
-0
Comment.php
e/extend/internalApi/xue/Comment.php
+43
-0
CourseList.php
e/extend/internalApi/xue/CourseList.php
+27
-0
Favorite.php
e/extend/internalApi/xue/Favorite.php
+27
-0
index.php
e/extend/test/index.php
+15
-0
index.html
index.html
+63
-408
No files found.
d/js/js/firstnews.js
View file @
b1045e62
document
.
write
(
"<li><a href=
\"
/hangye/83.html
\"
title=
\"
格力起诉美的“制冷王”空调侵权 索赔5000万元
\"
>格力起诉美的“制冷王”空调侵权 </a></li><li><a href=
\"
/changshang/2017-06-20/84.html
\"
title=
\"
让台湾观众坠入了美的旋涡
\"
>让台湾观众坠入了美的旋涡</a></li><li><a href=
\"
/shifu/24.html
\"
title=
\"
年轻时遇到了一些艳遇 回想起来依然记忆犹新
\"
>年轻时遇到了一些艳遇 回想起来依</a></li>"
);
document
.
write
(
"<li><a href=
\"
/changshang/2017-06-27/89.html
\"
title=
\"
测试
\"
>测试</a></li><li><a href=
\"
/hangye/83.html
\"
title=
\"
格力起诉美的“制冷王”空调侵权 索赔5000万元
\"
>格力起诉美的“制冷王”空调侵权 </a></li><li><a href=
\"
/changshang/2017-06-20/84.html
\"
title=
\"
让台湾观众坠入了美的旋涡
\"
>让台湾观众坠入了美的旋涡</a></li><li><a href=
\"
/shifu/24.html
\"
title=
\"
年轻时遇到了一些艳遇 回想起来依然记忆犹新
\"
>年轻时遇到了一些艳遇 回想起来依</a></li>"
);
\ No newline at end of file
\ No newline at end of file
d/js/js/hotplnews.js
View file @
b1045e62
document
.
write
(
"<li><a href=
\"
/hangye/76.html
\"
title=
\"
家电回收条例有望年内出台 厂商只卖拒收罚10万
\"
>家电回收条例有望年内出台 厂商只</a></li><li><a href=
\"
/pinlei/bingxiang/guzhangdaima/1.html
\"
title=
\"
科龙BCD-191W电冰箱故障代码表
\"
>科龙BCD-191W电冰箱故障代码表</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/2.html
\"
title=
\"
美的洗衣机MB55-3006G按启动键后就进入洗衣(干洗)状态维修全过程
\"
>美的洗衣机MB55-3006G按启动键后就</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/3.html
\"
title=
\"
自制拆装波轮洗衣机离合器中心螺帽配套工具
\"
>自制拆装波轮洗衣机离合器中心螺帽</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/4.html
\"
title=
\"
自制拆洗衣机排水阀(水堵)工具
\"
>自制拆洗衣机排水阀(水堵)工具</a></li><li><a href=
\"
/shifu/5.html
\"
title=
\"
科龙BCD-242/HC电冰箱故障代码表
\"
>科龙BCD-242/HC电冰箱故障代码表</a></li><li><a href=
\"
/shifu/6.html
\"
title=
\"
小天鹅全自动洗衣机故障可控硅之“元凶”
\"
>小天鹅全自动洗衣机故障可控硅之“</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/7.html
\"
title=
\"
洗衣机故障速修心得
\"
>洗衣机故障速修心得</a></li><li><a href=
\"
/pinlei/dianshiji/jingyanjiqiao/8.html
\"
title=
\"
液晶屏逻辑板和屏坏简易判断及检修
\"
>液晶屏逻辑板和屏坏简易判断及检修</a></li><li><a href=
\"
/shifu/2017-04-10/9.html
\"
title=
\"
自学成才不是梦 家电维修趣味七大口诀
\"
>自学成才不是梦 家电维修趣味七大</a></li>"
);
document
.
write
(
"<li><a href=
\"
/changshang/2017-06-27/89.html
\"
title=
\"
测试
\"
>测试</a></li><li><a href=
\"
/hangye/76.html
\"
title=
\"
家电回收条例有望年内出台 厂商只卖拒收罚10万
\"
>家电回收条例有望年内出台 厂商只</a></li><li><a href=
\"
/pinlei/bingxiang/guzhangdaima/1.html
\"
title=
\"
科龙BCD-191W电冰箱故障代码表
\"
>科龙BCD-191W电冰箱故障代码表</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/2.html
\"
title=
\"
美的洗衣机MB55-3006G按启动键后就进入洗衣(干洗)状态维修全过程
\"
>美的洗衣机MB55-3006G按启动键后就</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/3.html
\"
title=
\"
自制拆装波轮洗衣机离合器中心螺帽配套工具
\"
>自制拆装波轮洗衣机离合器中心螺帽</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/4.html
\"
title=
\"
自制拆洗衣机排水阀(水堵)工具
\"
>自制拆洗衣机排水阀(水堵)工具</a></li><li><a href=
\"
/shifu/5.html
\"
title=
\"
科龙BCD-242/HC电冰箱故障代码表
\"
>科龙BCD-242/HC电冰箱故障代码表</a></li><li><a href=
\"
/shifu/6.html
\"
title=
\"
小天鹅全自动洗衣机故障可控硅之“元凶”
\"
>小天鹅全自动洗衣机故障可控硅之“</a></li><li><a href=
\"
/pinlei/xiyiji/jingyanjiqiao/7.html
\"
title=
\"
洗衣机故障速修心得
\"
>洗衣机故障速修心得</a></li><li><a href=
\"
/pinlei/dianshiji/jingyanjiqiao/8.html
\"
title=
\"
液晶屏逻辑板和屏坏简易判断及检修
\"
>液晶屏逻辑板和屏坏简易判断及检修</a></li>"
);
\ No newline at end of file
\ No newline at end of file
d/js/js/newnews.js
View file @
b1045e62
document
.
write
(
"<li><a href=
\"
/changshang/88.html
\"
title=
\"
美的空调全智能工厂:200台机器人有条不紊地工作
\"
>美的空调全智能工厂:200台机器人有</a></li><li><a href=
\"
http://code.ibanshou.cn
\"
title=
\"
首页幻灯[扳手快查]
\"
>首页幻灯[扳手快查]</a></li><li><a href=
\"
/changshang/2017-06-20/84.html
\"
title=
\"
让台湾观众坠入了美的旋涡
\"
>让台湾观众坠入了美的旋涡</a></li><li><a href=
\"
/hangye/83.html
\"
title=
\"
格力起诉美的“制冷王”空调侵权 索赔5000万元
\"
>格力起诉美的“制冷王”空调侵权 </a></li><li><a href=
\"
/hangye/82.html
\"
title=
\"
公牛全线产品完成新国标升级:未来加大自动化投入
\"
>公牛全线产品完成新国标升级:未来加</a></li><li><a href=
\"
/hangye/81.html
\"
title=
\"
姑娘别怕 我只是把钳子别在了腰上
\"
>姑娘别怕 我只是把钳子别在了腰上</a></li><li><a href=
\"
/hangye/80.html
\"
title=
\"
插座国家标准又升级了 你还在用老的万能孔吗?
\"
>插座国家标准又升级了 你还在用老</a></li><li><a href=
\"
/hangye/76.html
\"
title=
\"
家电回收条例有望年内出台 厂商只卖拒收罚10万
\"
>家电回收条例有望年内出台 厂商只</a></li><li><a href=
\"
/hangye/75.html
\"
title=
\"
智能家电售后问题凸显 掘金未来需要新思路
\"
>智能家电售后问题凸显 掘金未来需</a></li><li><a href=
\"
/hangye/74.html
\"
title=
\"
中国制造加速走向全球 GMCC向世界展示中国“芯”
\"
>中国制造加速走向全球 GMCC向世界</a></li>"
);
document
.
write
(
"<li><a href=
\"
/changshang/2017-06-27/89.html
\"
title=
\"
测试
\"
>测试</a></li><li><a href=
\"
/changshang/88.html
\"
title=
\"
美的空调全智能工厂:200台机器人有条不紊地工作
\"
>美的空调全智能工厂:200台机器人有</a></li><li><a href=
\"
http://code.ibanshou.cn
\"
title=
\"
首页幻灯[扳手快查]
\"
>首页幻灯[扳手快查]</a></li><li><a href=
\"
/changshang/2017-06-20/84.html
\"
title=
\"
让台湾观众坠入了美的旋涡
\"
>让台湾观众坠入了美的旋涡</a></li><li><a href=
\"
/hangye/83.html
\"
title=
\"
格力起诉美的“制冷王”空调侵权 索赔5000万元
\"
>格力起诉美的“制冷王”空调侵权 </a></li><li><a href=
\"
/hangye/82.html
\"
title=
\"
公牛全线产品完成新国标升级:未来加大自动化投入
\"
>公牛全线产品完成新国标升级:未来加</a></li><li><a href=
\"
/hangye/81.html
\"
title=
\"
姑娘别怕 我只是把钳子别在了腰上
\"
>姑娘别怕 我只是把钳子别在了腰上</a></li><li><a href=
\"
/hangye/80.html
\"
title=
\"
插座国家标准又升级了 你还在用老的万能孔吗?
\"
>插座国家标准又升级了 你还在用老</a></li><li><a href=
\"
/hangye/76.html
\"
title=
\"
家电回收条例有望年内出台 厂商只卖拒收罚10万
\"
>家电回收条例有望年内出台 厂商只</a></li><li><a href=
\"
/hangye/75.html
\"
title=
\"
智能家电售后问题凸显 掘金未来需要新思路
\"
>智能家电售后问题凸显 掘金未来需</a></li>"
);
\ No newline at end of file
\ No newline at end of file
e/back_conf/dev/config_ibanshou.php
View file @
b1045e62
...
@@ -20,4 +20,33 @@ $config = [
...
@@ -20,4 +20,33 @@ $config = [
'logs'
=>
'e/data/phpcas.log'
,
'logs'
=>
'e/data/phpcas.log'
,
'uc_base_url'
=>
'http://u.yunya.com/'
,
'uc_base_url'
=>
'http://u.yunya.com/'
,
],
],
//wxh_internal_api
'wxh.internal'
=>
[
'server'
=>
[
'secret'
=>
'U2FsdGVkX19ZiutUoO6F'
,
],
'client'
=>
[
'ucenter'
=>
[
'apiUrl'
=>
'http://u.yunya.com/api/server'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'Kuy2dVHKRWKAFRXX2l6k'
],
'xue'
=>
[
'apiUrl'
=>
'http://ct.yunya.com/api'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'Z2oKgZYYc8mznesYMf1o'
],
'code'
=>
[
'apiUrl'
=>
'http://dev.wxherr.com/site/api-server'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'1BO1WQwnpjc2GfjzrOuq'
],
'bbs'
=>
[
'apiUrl'
=>
'http://bbs.yunya.com/api/server.php'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'U2FsdGVkX19ZiutUoO6F'
],
],
],
];
];
\ No newline at end of file
e/back_conf/test/config_ibanshou.php
View file @
b1045e62
...
@@ -5,19 +5,48 @@ $config = [
...
@@ -5,19 +5,48 @@ $config = [
'isUseUcenter'
=>
true
,
'isUseUcenter'
=>
true
,
//sso api config
//sso api config
'sso.apiurl'
=>
'http://
testsso.yunyamooc.com
/api/'
,
'sso.apiurl'
=>
'http://
pre.u.ibanshou.cn
/api/'
,
'sso.appid'
=>
'10001'
,
'sso.appid'
=>
'10001'
,
'sso.appkey'
=>
'oY4@1f0#Io1u!Cd4@NJ#9YJFj1s@EGfDI@VA#vvRbqO'
,
'sso.appkey'
=>
'oY4@1f0#Io1u!Cd4@NJ#9YJFj1s@EGfDI@VA#vvRbqO'
,
//cas configs
//cas configs
'cas.configs'
=>
[
'cas.configs'
=>
[
'host'
=>
'sso.
test.weixiuhui.tech
'
,
'host'
=>
'sso.
weixiuhui.cn
'
,
'context'
=>
'/cas'
,
'context'
=>
'/cas'
,
'port'
=>
443
,
'port'
=>
443
,
'server_ca_cert_path'
=>
''
,
'server_ca_cert_path'
=>
''
,
'debug'
=>
true
,
'debug'
=>
false
,
'server_ip'
=>
[
'114.55.56.29'
],
'server_ip'
=>
[
'54.222.158.174'
],
'logs'
=>
'e/data/phpcas.log'
,
'logs'
=>
'./data/log/phpcas.log'
,
'uc_base_url'
=>
'http://testsso.yunyamooc.com/'
,
'uc_base_url'
=>
'http://pre.u.ibanshou.cn/'
,
],
//wxh_internal_api
'wxh.internal'
=>
[
'server'
=>
[
'secret'
=>
'AJmfi4ORZURS0JwSkdiq3r'
,
],
'client'
=>
[
'ucenter'
=>
[
'apiUrl'
=>
'http://testsso.yunyamooc.com/api/server'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'z1z7AZCWpbEkfWpak0dx'
],
'xue'
=>
[
'apiUrl'
=>
'http://test.yunyamooc.com/api'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'AwT3YKykIwkREb48C1w3'
],
'code'
=>
[
'apiUrl'
=>
'http://testserv.pp.cc/wxherr/site/api-server'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'VBz7nU9qIeKUCjY89poG'
],
'bbs'
=>
[
'apiUrl'
=>
'http://bbs.test.yunyamooc.com/api/server.php'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'AJmfi4ORZURS0JwSkdiq3r'
],
],
],
],
];
];
\ No newline at end of file
e/class/connect.php
View file @
b1045e62
...
@@ -54,6 +54,7 @@ $ecms_config['sets']['pagemustdt']=0;
...
@@ -54,6 +54,7 @@ $ecms_config['sets']['pagemustdt']=0;
$emoreport_r
[
1
][
'ppath'
]
=
''
;
$emoreport_r
[
1
][
'ppath'
]
=
''
;
require_once
ECMS_PATH
.
'e/config/config.php'
;
require_once
ECMS_PATH
.
'e/config/config.php'
;
require_once
ECMS_PATH
.
'e/extend/phpcas/CAS.php'
;
require_once
ECMS_PATH
.
'e/extend/ibanshou/ClientCas.php'
;
require_once
ECMS_PATH
.
'e/extend/ibanshou/ClientCas.php'
;
if
(
!
defined
(
'EmpireCMSConfig'
))
if
(
!
defined
(
'EmpireCMSConfig'
))
...
...
e/class/userfun.php
View file @
b1045e62
<?php
<?php
//---------------------------用户自定义标签函数文件
//---------------------------用户自定义标签函数文件
use
internalApi\bbs\Thread
;
use
internalApi\xue\CourseList
;
function
user_ibanshou
(
$num
)
{
require
__DIR__
.
'/../extend/internalApi/autoload.php'
;
require
__DIR__
.
'/../config/config_ibanshou.php'
;
\internalApi\base\Client
::
config
(
$config
[
'wxh.internal'
][
'client'
]);
$thread
=
Thread
::
getHotThreads
(
$num
);
$list
=
CourseList
::
getRecommendList
(
$num
);
$str
=
'<div class="learnning-course newest">
<div class="tit">最新课程<span></span><a href="http://xue.ibanshou.cn/home/all-course">全部课程</a></div>
<div class="newest-list clearfix">'
;
foreach
(
$list
as
$val
)
{
$str
.=
"<div class=
\"
learn-course-box
\"
>
<div class=
\"
lc-img
\"
><a href=
\"
{
$val
[
'url'
]
}
\"
><img
src=
\"
{
$val
[
'preview_pic'
]
}
-ym.preview
\"
></a></div>
<h3><a href=
\"
{
$val
[
'url'
]
}
\"
>
{
$val
[
'name'
]
}
</a></h3>
<p><span>
{
$val
[
'favorite_count'
]
}
人已学</span><span>
{
$val
[
'comment_count'
]
}
人评论</span></p>
</div>"
;
}
$str
.=
'</div></div><div class="latest-news">
<div class="common-tit-index">热门互动</div>
<ul class="news-list">'
;
foreach
(
$thread
as
$val
)
{
$str
.=
"<li>
<a href=
\"
{
$val
[
'url'
]
}
\"
>
<h3>
{
$val
[
'subject'
]
}
</h3>
<p>
{
$val
[
'views'
]
}
人已参与</p>
<img src=
\"
{
$val
[
'image'
]
}
\"
>
</a>
</li>"
;
}
echo
$str
.
'</ul></div>'
;
}
?>
?>
\ No newline at end of file
e/config/config.php
View file @
b1045e62
...
@@ -304,7 +304,7 @@ $public_r=array('sitename'=>'扳手 - 征集slogan',
...
@@ -304,7 +304,7 @@ $public_r=array('sitename'=>'扳手 - 征集slogan',
'pldatatbs'
=>
',1,'
,
'pldatatbs'
=>
',1,'
,
'defpltempid'
=>
1
,
'defpltempid'
=>
1
,
'pl_num'
=>
12
,
'pl_num'
=>
12
,
'plgroupid'
=>
0
,
'plgroupid'
=>
1
,
'closelisttemp'
=>
''
,
'closelisttemp'
=>
''
,
'chclasscolor'
=>
'#99C4E3'
,
'chclasscolor'
=>
'#99C4E3'
,
'timeclose'
=>
''
,
'timeclose'
=>
''
,
...
...
e/config/config_ibanshou.php
View file @
b1045e62
...
@@ -20,4 +20,41 @@ $config = [
...
@@ -20,4 +20,41 @@ $config = [
'logs'
=>
'e/data/phpcas.log'
,
'logs'
=>
'e/data/phpcas.log'
,
'uc_base_url'
=>
'http://u.yunya.com/'
,
'uc_base_url'
=>
'http://u.yunya.com/'
,
],
],
//api host
'api.host'
=>
[
'ucenter'
=>
'http://u.yunya.com'
,
'xue'
=>
'http://ct.yunya.com'
,
's'
=>
'http://s.yunya.com'
,
'bbs'
=>
'http://bbs.yunya.com'
,
],
//wxh_internal_api
'wxh.internal'
=>
[
'server'
=>
[
'secret'
=>
'U2FsdGVkX19ZiutUoO6F'
,
],
'client'
=>
[
'ucenter'
=>
[
'apiUrl'
=>
'http://u.yunya.com/api/server'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'Kuy2dVHKRWKAFRXX2l6k'
],
'xue'
=>
[
'apiUrl'
=>
'http://ct.yunya.com/api'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'Z2oKgZYYc8mznesYMf1o'
],
'code'
=>
[
'apiUrl'
=>
'http://dev.wxherr.com/site/api-server'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'1BO1WQwnpjc2GfjzrOuq'
],
'bbs'
=>
[
'apiUrl'
=>
'http://bbs.yunya.com/api/server.php'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'U2FsdGVkX19ZiutUoO6F'
],
],
],
];
];
\ No newline at end of file
e/extend/ibanshou/ClientCas.php
View file @
b1045e62
...
@@ -30,7 +30,6 @@ class ClientCas
...
@@ -30,7 +30,6 @@ class ClientCas
if
(
empty
(
$config
))
{
if
(
empty
(
$config
))
{
printerrortourl
(
'/'
,
"config_ibanshou not found"
,
3
);
printerrortourl
(
'/'
,
"config_ibanshou not found"
,
3
);
}
}
require_once
ECMS_PATH
.
"e/extend/phpcas/CAS.php"
;
$this
->
config
=
$config
[
'cas.configs'
];
$this
->
config
=
$config
[
'cas.configs'
];
$this
->
debug
=
$config
[
'cas.configs'
][
'debug'
];
$this
->
debug
=
$config
[
'cas.configs'
][
'debug'
];
...
...
e/extend/internalApi/autoload.php
0 → 100644
View file @
b1045e62
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/27
* Time: 17:59
*/
function
internalApiAutoloader
(
$className
)
{
if
(
substr
(
$className
,
0
,
12
)
==
'internalApi\\'
)
{
$file
=
__DIR__
.
DIRECTORY_SEPARATOR
.
substr
(
str_replace
(
'\\'
,
DIRECTORY_SEPARATOR
,
$className
),
12
)
.
'.php'
;
if
(
is_file
(
$file
))
{
include
$file
;
}
}
}
spl_autoload_register
(
'internalApiAutoloader'
);
e/extend/internalApi/base/Client.php
0 → 100644
View file @
b1045e62
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/27
* Time: 10:06
*/
namespace
internalApi\base
;
/**
* 客户端基类
*
* 提供客户端调用实现
* 本类分静态方法与动态类的区别,动态类最终内部每个接口集会有一个实例用于请求,而静态则提供全局协调和接口调用方法
*
* @package internalApi\base
*/
class
Client
{
public
$debug
=
false
;
public
$name
;
protected
$clientId
;
protected
$clientSecret
;
protected
$apiUrl
;
protected
$remoteIp
;
protected
static
$instance
=
[];
protected
static
$config
=
[];
/**
* 获取 API 集的客户端实例
* 每个 API 集有一个实例用于签名和请求处理
*
* @return static
*/
protected
static
function
getInstance
()
{
$name
=
self
::
name
();
if
(
!
isset
(
self
::
$instance
[
$name
]))
{
self
::
$instance
[
$name
]
=
new
self
(
$name
);
}
return
self
::
$instance
[
$name
];
}
/**
* 获取 API 集的名称
*
* 如 internalApi\ucenter\Member 则名称为 ucenter
*
* @return bool|string
*/
public
static
function
name
()
{
$className
=
static
::
class
;
$subName
=
strstr
(
$className
,
'\\'
);
return
substr
(
$subName
,
1
,
strpos
(
$subName
,
'\\'
,
1
)
-
1
);
}
public
function
__construct
(
$name
)
{
if
(
isset
(
static
::
$config
[
$name
]))
{
foreach
(
static
::
$config
[
$name
]
as
$k
=>
$v
)
{
if
(
$this
->
$k
===
null
)
{
$this
->
$k
=
$v
;
}
}
}
foreach
([
'clientId'
,
'clientSecret'
,
'apiUrl'
]
as
$prop
)
{
if
(
$this
->
$prop
===
null
)
{
throw
new
ClientException
(
"InternalApi
$name
initialize failed,
\$
{
$prop
}
not set!"
);
}
}
$this
->
name
=
$name
;
}
public
static
function
setDebug
(
$debug
=
true
)
{
$instance
=
self
::
getInstance
();
$instance
->
debug
=
$debug
;
}
public
static
function
config
(
$config
)
{
self
::
$config
=
$config
;
}
/**
* 调用请求,获取数据
*
* @param string $api
* @param array $params
* @return mixed
* @throws ClientException API 请求失败时,会抛出此异常
*/
protected
static
function
call
(
$api
,
$params
=
[])
{
$instance
=
self
::
getInstance
();
$url
=
$instance
->
apiUrl
.
(
strpos
(
$instance
->
apiUrl
,
'?'
)
!==
false
?
'&'
:
'?'
)
.
'api='
.
urlencode
(
$api
);
list
(
$sign
,
$timestamp
,
$nonce
)
=
$instance
->
signature
(
$api
,
$params
);
$url
.=
"&client_id=
{
$instance
->
clientId
}
&sign=
{
$sign
}
×tamp=
{
$timestamp
}
&nonce=
{
$nonce
}
"
;
list
(
$httpCode
,
$response
)
=
$instance
->
request
(
$url
,
$params
);
if
(
$httpCode
==
403
&&
substr
(
$response
,
0
,
6
)
===
'error:'
)
{
$message
=
substr
(
$response
,
6
);
throw
new
ClientException
(
"接口
$api
调用失败: "
.
$message
);
}
elseif
(
$httpCode
===
0
)
{
throw
new
ClientException
(
'接口请求异常: '
.
$response
,
$httpCode
);
}
elseif
(
$httpCode
!=
200
||
$response
===
false
)
{
throw
new
ClientException
(
'接口响应异常: '
.
$response
,
$httpCode
);
}
$data
=
@
json_decode
(
$response
,
true
);
if
(
json_last_error
()
!==
JSON_ERROR_NONE
)
{
throw
new
ClientException
(
'接口返回数据异常: '
.
$response
);
}
return
$data
;
}
/**
* 对请求进程签名
*
* @param string $api
* @param array $params
* @return array
*/
protected
function
signature
(
$api
,
$params
)
{
$timestamp
=
time
();
$nonce
=
uniqid
();
ksort
(
$params
);
$str
=
$api
.
http_build_query
(
$params
)
.
$this
->
clientId
.
$this
->
clientSecret
.
$timestamp
.
$nonce
;
$sign
=
md5
(
$str
);
return
[
$sign
,
$timestamp
,
$nonce
];
}
protected
function
request
(
$url
,
$post
=
''
,
$headers
=
[])
{
//如果设置了远程IP,则直接用IP连接,省去解析
if
(
$this
->
remoteIp
)
{
$host
=
parse_url
(
$url
,
PHP_URL_HOST
);
$url
=
substr_replace
(
$url
,
$this
->
remoteIp
,
strpos
(
$url
,
$host
),
strlen
(
$host
));
//$url = preg_replace('/^(https?:\/\/)[^\/]+/i', '${1}'.$this->remoteIp, $url, 1);
$headers
[]
=
"Host:
$host
"
;
}
$ci
=
curl_init
(
$url
);
//添加客户端信息以辨服务端识别和调试
$userAgent
=
'PHP/'
.
PHP_VERSION
.
' ('
.
PHP_OS
.
') Client/'
.
$this
->
clientId
;
if
(
isset
(
$_SERVER
[
'HTTP_HOST'
]))
{
$userAgent
.=
' ('
.
$_SERVER
[
'HTTP_HOST'
]
.
')'
;
}
$curl
=
curl_version
();
$userAgent
.=
" cURL/
{
$curl
[
'version'
]
}
(
{
$curl
[
'ssl_version'
]
}
)"
;
//基础设置
curl_setopt_array
(
$ci
,
[
CURLOPT_CONNECTTIMEOUT
=>
5
,
CURLOPT_TIMEOUT
=>
8
,
CURLOPT_RETURNTRANSFER
=>
true
,
CURLOPT_SSL_VERIFYPEER
=>
false
,
CURLOPT_HEADER
=>
false
,
CURLOPT_USERAGENT
=>
$userAgent
]);
//POST 请求
if
(
$post
)
{
$body
=
is_array
(
$post
)
?
http_build_query
(
$post
)
:
$post
;
curl_setopt_array
(
$ci
,
[
CURLOPT_POST
=>
true
,
CURLOPT_POSTFIELDS
=>
$body
]);
}
//优化
$headers
[]
=
'Expect:'
;
curl_setopt_array
(
$ci
,
[
CURLOPT_HTTPHEADER
=>
$headers
,
CURLOPT_HTTP_VERSION
=>
CURL_HTTP_VERSION_1_0
,
CURLOPT_IPRESOLVE
=>
CURL_IPRESOLVE_V4
,
//CURLOPT_DNS_USE_GLOBAL_CACHE => false
]);
//调试
if
(
$this
->
debug
)
{
curl_setopt
(
$ci
,
CURLINFO_HEADER_OUT
,
true
);
$responseHeaders
=
''
;
curl_setopt
(
$ci
,
CURLOPT_HEADERFUNCTION
,
function
(
$ci
,
$header
)
use
(
&
$responseHeaders
)
{
$responseHeaders
.=
$header
;
return
strlen
(
$header
);
});
}
$response
=
curl_exec
(
$ci
);
$httpCode
=
curl_getinfo
(
$ci
,
CURLINFO_HTTP_CODE
);
if
(
$response
===
false
)
{
$errno
=
curl_errno
(
$ci
);
$errmsg
=
curl_error
(
$ci
);
$response
=
"[
$errno
]
$errmsg
"
;
}
//获取调试信息
if
(
$this
->
debug
)
{
$httpInfo
=
curl_getinfo
(
$ci
);
}
curl_close
(
$ci
);
if
(
$this
->
debug
)
{
echo
"<pre>
\r\n
=====INFO=====
\r\n
"
;
echo
"Request URL:
$url
\r\n
"
,
"Remote Address:
{
$httpInfo
[
'primary_ip'
]
}
:
{
$httpInfo
[
'primary_port'
]
}
\r\n
"
,
"Local Address:
{
$httpInfo
[
'local_ip'
]
}
:
{
$httpInfo
[
'local_port'
]
}
\r\n
"
,
"Namelookup Time:
{
$httpInfo
[
'namelookup_time'
]
}
\r\n
"
,
"Connect Time:
{
$httpInfo
[
'connect_time'
]
}
\r\n
"
,
"Pre Transfer Time:
{
$httpInfo
[
'pretransfer_time'
]
}
\r\n
"
,
"Start Transfer Time:
{
$httpInfo
[
'starttransfer_time'
]
}
\r\n
"
,
"File Time:
{
$httpInfo
[
'filetime'
]
}
\r\n
"
,
"Total Time:
{
$httpInfo
[
'total_time'
]
}
\r\n
"
;
if
(
isset
(
$errno
))
{
echo
"
\r\n
=====ERROR=====
\r\n
ErrorNo:
$errno
\r\n
ErrorMsg:
$errmsg
\r\n
"
;
}
echo
"
\r\n
=====REQUEST=====
\r\n
"
,
$httpInfo
[
'request_header'
];
if
(
isset
(
$body
))
{
echo
$body
.
"
\r\n
"
;
}
echo
"
\r\n
=====RESPONSE=====
\r\n
"
,
$responseHeaders
,
$response
;
echo
"
\r\n
</pre>"
;
}
return
[
$httpCode
,
$response
];
}
}
\ No newline at end of file
e/extend/internalApi/base/ClientException.php
0 → 100644
View file @
b1045e62
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/27
* Time: 15:37
*/
namespace
internalApi\base
;
class
ClientException
extends
\ErrorException
{
}
\ No newline at end of file
e/extend/internalApi/base/Server.php
0 → 100644
View file @
b1045e62
<?php
namespace
internalApi\base
;
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/27
* Time: 10:06
*/
class
Server
{
protected
$apiMap
=
[];
protected
$secret
;
public
function
__construct
(
$secret
)
{
$this
->
secret
=
$secret
;
}
public
function
setApiMap
(
$map
)
{
$this
->
apiMap
=
$map
;
}
public
function
addApiMap
(
$map
)
{
foreach
(
$map
as
$key
=>
$list
)
{
if
(
!
isset
(
$this
->
apiMap
[
$key
]))
{
$this
->
apiMap
[
$key
]
=
[];
}
foreach
(
$list
as
$name
=>
$callable
)
{
if
(
isset
(
$this
->
apiMap
[
$key
][
$name
]))
{
continue
;
}
$this
->
apiMap
[
$key
][
$name
]
=
$callable
;
}
}
}
/**
* Invoke API and get data
*
* @param bool $return
* @return array
* @throws
*/
public
function
invoke
(
$return
=
false
)
{
$api
=
$this
->
checkSign
();
if
(
!
$api
)
{
$this
->
responseError
(
'鉴权失败'
);
}
$arr
=
explode
(
'.'
,
$api
);
if
(
count
(
$arr
)
!=
2
)
{
$this
->
responseError
(
'错误的 API 名称'
);
}
list
(
$group
,
$name
)
=
$arr
;
if
(
!
isset
(
$this
->
apiMap
[
$group
])
||
!
isset
(
$this
->
apiMap
[
$group
][
$name
]))
{
$this
->
responseError
(
'API 不存在'
);
}
$callable
=
$this
->
apiMap
[
$group
][
$name
][
0
];
if
(
!
is_callable
(
$callable
))
{
$this
->
responseError
(
'API 无法调用'
);
}
$paramsList
=
array_slice
(
$this
->
apiMap
[
$group
][
$name
],
1
);
$params
=
[];
foreach
(
$paramsList
as
$k
=>
$v
)
{
if
(
is_int
(
$k
))
{
$k
=
$v
;
$hasDefault
=
false
;
}
else
{
$hasDefault
=
true
;
}
if
(
isset
(
$_POST
[
$k
]))
{
$params
[]
=
$_POST
[
$k
];
}
elseif
(
$hasDefault
)
{
$params
[]
=
$v
;
}
else
{
$this
->
responseError
(
'缺少参数 '
.
$k
);
}
}
$data
=
call_user_func_array
(
$callable
,
$params
);
if
(
$return
)
{
return
$data
;
}
else
{
header
(
'Content-Type: application/json; charset=utf-8'
);
echo
json_encode
(
$data
,
JSON_UNESCAPED_UNICODE
);
}
}
public
function
responseError
(
$message
)
{
header
(
'HTTP/1.0 403 Forbidden'
);
echo
'error:'
.
$message
;
exit
;
}
protected
function
checkSign
()
{
$api
=
isset
(
$_GET
[
'api'
])
?
$_GET
[
'api'
]
:
''
;
$clientId
=
isset
(
$_GET
[
'client_id'
])
?
$_GET
[
'client_id'
]
:
null
;
$sign
=
isset
(
$_GET
[
'sign'
])
?
$_GET
[
'sign'
]
:
''
;
$timestamp
=
isset
(
$_GET
[
'timestamp'
])
?
$_GET
[
'timestamp'
]
:
0
;
$nonce
=
isset
(
$_GET
[
'nonce'
])
?
$_GET
[
'nonce'
]
:
''
;
$servTime
=
time
();
$params
=
$_POST
;
ksort
(
$params
);
$str
=
$api
.
http_build_query
(
$params
)
.
$clientId
.
$this
->
secret
.
$timestamp
.
$nonce
;
$servSign
=
md5
(
$str
);
if
(
$servSign
!==
$sign
)
{
return
false
;
}
if
(
$servTime
-
$timestamp
>
300
)
{
return
false
;
}
return
$api
;
}
}
\ No newline at end of file
e/extend/internalApi/base/ServerException.php
0 → 100644
View file @
b1045e62
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/27
* Time: 16:44
*/
namespace
internalApi\base
;
class
ServerException
extends
\Exception
{
}
\ No newline at end of file
e/extend/internalApi/bbs/Thread.php
0 → 100644
View file @
b1045e62
<?php
/**
* Created by PhpStorm.
* User: LinJiangL
* Date: 17/6/28
* Time: 下午5:43
*/
namespace
internalApi\bbs
;
use
internalApi\base\Client
;
class
Thread
extends
Client
{
public
static
function
getHotThreads
(
$num
=
1
)
{
return
self
::
call
(
'thread.getHotThreads'
,
compact
(
'num'
));
}
public
static
function
countThreads
(
$uid
)
{
return
self
::
call
(
'thread.countThreads'
,
compact
(
'uid'
));
}
}
\ No newline at end of file
e/extend/internalApi/client_config.exmaple.php
0 → 100644
View file @
b1045e62
<?php
/**
* 内部 API 客户端调用演示
*/
use
internalApi\ucenter\Member
;
//首先需要初始化客户端,传入配置
//配置的保存位置根据项目决定,只需最终调用 Client::config() 传入即可
$internalApiClientConfig
=
[
'ucenter'
=>
[
'apiUrl'
=>
'http://u.yunya.com/api/server'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'Kuy2dVHKRWKAFRXX2l6k'
],
'xue'
=>
[
'apiUrl'
=>
'http://u.yunya.com/test/api-server'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'Kuy2dVHKRWKAFRXX2l6k'
]
];
\internalApi\base\Client
::
config
(
$internalApiClientConfig
);
//调用API
$user
=
Member
::
getMemberInfo
(
12
);
var_dump
(
$user
);
\ No newline at end of file
e/extend/internalApi/client_config_dev.php
0 → 100644
View file @
b1045e62
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/28
* Time: 10:23
*/
return
[
'ucenter'
=>
[
'apiUrl'
=>
'http://u.yunya.com/api/server'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'Kuy2dVHKRWKAFRXX2l6k'
],
'xue'
=>
[
'apiUrl'
=>
'http://ct.yunya.com/api'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'Z2oKgZYYc8mznesYMf1o'
],
'code'
=>
[
'apiUrl'
=>
'http://dev.wxherr.com/site/api-server'
,
'clientId'
=>
'common'
,
'clientSecret'
=>
'1BO1WQwnpjc2GfjzrOuq'
]
];
\ No newline at end of file
e/extend/internalApi/code/Medal.php
0 → 100644
View file @
b1045e62
<?php
namespace
internalApi\code
;
use
internalApi\base\Client
;
/**
* 扳手快查勋章 API
*/
class
Medal
extends
Client
{
/**
* 获取扳手快查用户拥有的勋章数量
*
* @param $uid
* @return int
*/
public
static
function
countUserMedals
(
$uid
)
{
return
self
::
call
(
'medal.countUserMedals'
,
compact
(
'uid'
));
}
}
\ No newline at end of file
e/extend/internalApi/server.example.php
0 → 100644
View file @
b1045e62
<?php
/**
* 内部 API 服务端使用演示
*/
//初始化API
$internalApiServerSecret
=
'Kuy2dVHKRWKAFRXX2l6k'
;
$server
=
new
\internalApi\base\Server
(
$internalApiServerSecret
);
/**
* 设置 API 列表,setApiMap 会覆盖所有已有的 API 设置
*
* API 以此形式定义
* [
* '组' => [
* '名称' => [Callable, 第一个参数名, 第二个参数名, 第三个参数名=>参数默认值],
* '名称' => [Callable, 第一个参数名, 第二个参数名, 第三个参数名=>参数默认值]
* ]
* ]
*
* 其中 Callable 为一个可调用名称,参见 php 的 Callable 和闭包
* 参数必须严格按照 Callable 的参数顺序写好,如果定义键名,则键名为参数名称,键值为默认值,有默认值的参数在客户端调用时可不传
*/
$server
->
setApiMap
([
'courseList'
=>
[
'recommendList'
=>
[
'\common\course::fetchCommendList'
,
'page'
,
'num'
=>
20
],
'newCourseList'
=>
[
'\common\course::fetchNewList'
,
'page'
=>
1
,
'num'
=>
20
]
],
'otherApi'
=>
[
'getLink'
=>
[
'\other\Api\Common::getLink'
]
]
]);
//添加 API 列表,addApiMap 只会对已有 API 列表新增,但性能较差,建议 setApiMap 一次性设置好
$server
->
addApiMap
([
'member'
=>
[
'getInfo'
=>
[
'\common\models\Member::findByUid'
,
'uid'
]
]
]);
//启动调用
$server
->
invoke
();
//如果想获得返回数据自己做些处理,使用 $data = $server->invoke(true) 即可
\ No newline at end of file
e/extend/internalApi/ucenter/Member.php
0 → 100644
View file @
b1045e62
<?php
namespace
internalApi\ucenter
;
use
internalApi\base\Client
;
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/27
* Time: 15:57
*/
class
Member
extends
Client
{
public
static
function
getMemberInfo
(
$uid
)
{
return
self
::
call
(
'member.getInfo'
,
compact
(
'uid'
));
}
}
\ No newline at end of file
e/extend/internalApi/xue/Comment.php
0 → 100644
View file @
b1045e62
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/28
* Time: 15:47
*/
namespace
internalApi\xue
;
use
internalApi\base\Client
;
/**
* 学院评论API
*
* @package internalApi\xue
*/
class
Comment
extends
Client
{
/**
* 获取学院赞我的评论数量
*
* @param int $uid
* @return int
*/
public
static
function
getLikeMsgCount
(
$uid
)
{
return
self
::
call
(
'comment.getLikeMsgCount'
,
compact
(
'uid'
));
}
/**
* 获取学院回复我的评论数量
*
* @param int $uid
* @return int
*/
public
static
function
getReplyMsgCount
(
$uid
)
{
return
self
::
call
(
'comment.getReplyMsgCount'
,
compact
(
'uid'
));
}
}
\ No newline at end of file
e/extend/internalApi/xue/CourseList.php
0 → 100644
View file @
b1045e62
<?php
namespace
internalApi\xue
;
use
internalApi\base\Client
;
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/27
* Time: 14:49
*/
class
CourseList
extends
Client
{
/**
* 获取推荐课程列表
*
* @param int $num
* @return array
*/
public
static
function
getRecommendList
(
$num
=
10
)
{
return
self
::
call
(
'course.getRecommendList'
,
compact
(
'num'
));
}
}
\ No newline at end of file
e/extend/internalApi/xue/Favorite.php
0 → 100644
View file @
b1045e62
<?php
/**
* Created by PhpStorm.
* User: pader
* Date: 2017/6/28
* Time: 15:24
*/
namespace
internalApi\xue
;
use
internalApi\base\Client
;
class
Favorite
extends
Client
{
/**
* 获取用户学院收藏数量
*
* @param $uid
* @return int
*/
public
static
function
countUserFavorites
(
$uid
)
{
return
self
::
call
(
'favorite.countUserFavorite'
,
compact
(
'uid'
));
}
}
\ No newline at end of file
e/extend/test/index.php
0 → 100644
View file @
b1045e62
<?php
use
internalApi\bbs\Thread
;
use
internalApi\xue\CourseList
;
require
__DIR__
.
'/../internalApi/autoload.php'
;
require
__DIR__
.
'/../../config/config_ibanshou.php'
;
\internalApi\base\Client
::
config
(
$config
[
'wxh.internal'
][
'client'
]);
//$thread = Thread::getHotThreads($num);
//echo json_encode($thread);
$list
=
CourseList
::
getRecommendList
(
4
);
print_r
(
$list
);
\ No newline at end of file
index.html
View file @
b1045e62
...
@@ -76,416 +76,55 @@
...
@@ -76,416 +76,55 @@
<a
href=
"/shifu/24.html"
><span>
师傅
</span>
年轻时遇到了一些艳遇 回想起来依然记忆犹新
</a>
<a
href=
"/shifu/24.html"
><span>
师傅
</span>
年轻时遇到了一些艳遇 回想起来依然记忆犹新
</a>
</li>
<li>
</li>
<li>
<a
href=
"/hangye/83.html"
><span>
行业
</span>
格力起诉美的“制冷王”空调侵权 索赔5000万元
</a>
<a
href=
"/hangye/83.html"
><span>
行业
</span>
格力起诉美的“制冷王”空调侵权 索赔5000万元
</a>
</li>
</ul>
</li>
<li>
</div>
<a
href=
"/changshang/2017-06-27/89.html"
><span>
厂商
</span>
测试
</a>
</li>
</ul>
<div
class=
"latest-news"
>
<div
class=
"common-tit-index"
>
最新资讯
</div>
<ul
class=
"news-list"
>
<li>
<a
href=
"/hangye/83.html"
>
<h3>
格力起诉美的“制冷王”空调侵权 索赔5000万元
</h3>
<p>
2017-06-20
<span>
点击:3
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"格力起诉美的“制冷王”空调侵权 索赔5000万元"
/>
</a>
</li>
<li>
<a
href=
"/changshang/2017-06-20/84.html"
>
<h3>
让台湾观众坠入了美的旋涡
</h3>
<p>
2017-06-20
<span>
点击:0
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"让台湾观众坠入了美的旋涡"
/>
</a>
</li>
<li>
<a
href=
"/hangye/82.html"
>
<h3>
公牛全线产品完成新国标升级:未来加大自动化投入
</h3>
<p>
2017-04-17
<span>
点击:2
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"公牛全线产品完成新国标升级:未来加大自动化投入"
/>
</a>
</li>
<li>
<a
href=
"/hangye/80.html"
>
<h3>
插座国家标准又升级了 你还在用老的万能孔吗?
</h3>
<p>
2017-04-14
<span>
点击:0
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"插座国家标准又升级了 你还在用老的万能孔吗?"
/>
</a>
</li>
<li>
<a
href=
"/hangye/76.html"
>
<h3>
家电回收条例有望年内出台 厂商只卖拒收罚10万
</h3>
<p>
2017-04-13
<span>
点击:5
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"家电回收条例有望年内出台 厂商只卖拒收罚10万"
/>
</a>
</li>
<li>
<a
href=
"/hangye/75.html"
>
<h3>
智能家电售后问题凸显 掘金未来需要新思路
</h3>
<p>
2017-04-13
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"智能家电售后问题凸显 掘金未来需要新思路"
/>
</a>
</li>
<li>
<a
href=
"/hangye/74.html"
>
<h3>
中国制造加速走向全球 GMCC向世界展示中国“芯”
</h3>
<p>
2017-04-13
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"中国制造加速走向全球 GMCC向世界展示中国“芯”"
/>
</a>
</li>
<li>
<a
href=
"/hangye/73.html"
>
<h3>
长虹制造云平台获国家“互联网+”重大工程支持项目
</h3>
<p>
2017-04-13
<span>
点击:0
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"长虹制造云平台获国家“互联网+”重大工程支持项目"
/>
</a>
</li>
<li>
<a
href=
"/hangye/71.html"
>
<h3>
网约家电维修 不想却遇“山寨”维修
</h3>
<p>
2017-04-13
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"网约家电维修 不想却遇“山寨”维修"
/>
</a>
</li>
<li>
<a
href=
"/shifu/68.html"
>
<h3>
我和好朋友互送礼物
</h3>
<p>
2017-04-13
<span>
点击:0
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"我和好朋友互送礼物"
/>
</a>
</li>
<li>
<a
href=
"/hangye/70.html"
>
<h3>
这张“壁纸”卖10W!创维OLED新品Wallpaper发布
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"这张“壁纸”卖10W!创维OLED新品Wallpaper发布"
/>
</a>
</li>
<li>
<a
href=
"/hangye/67.html"
>
<h3>
闪耀AWE2016 格兰仕再现黑科技
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"闪耀AWE2016 格兰仕再现黑科技"
/>
</a>
</li>
<li>
<a
href=
"/hangye/64.html"
>
<h3>
年轻就玩出新花young 格兰仕情侣微波炉热恋问世
</h3>
<p>
2017-04-12
<span>
点击:0
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"年轻就玩出新花young 格兰仕情侣微波炉热恋问世"
/>
</a>
</li>
<li>
<a
href=
"/hangye/65.html"
>
<h3>
历史珍品离奇消失!百年西屋重金悬赏
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"历史珍品离奇消失!百年西屋重金悬赏"
/>
</a>
</li>
<li>
<a
href=
"/hangye/59.html"
>
<h3>
彩电圈上演“奢华秀” 这几款电视与别墅最配
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"彩电圈上演“奢华秀” 这几款电视与别墅最配"
/>
</a>
</li>
<li>
<a
href=
"/hangye/78.html"
>
<h3>
家电业转动创新供给“魔方”迈向新高度
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"家电业转动创新供给“魔方”迈向新高度"
/>
</a>
</li>
<li>
<a
href=
"/hangye/77.html"
>
<h3>
两人合伙套取家电下乡补贴款 金额达数百万
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"两人合伙套取家电下乡补贴款 金额达数百万"
/>
</a>
</li>
<li>
<a
href=
"/hangye/60.html"
>
<h3>
2017品牌广东创新中国”在穗举行 李兴浩等当选“十大人物”
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"2017品牌广东创新中国”在穗举行 李兴浩等当选“十大人物”"
/>
</a>
</li>
<li>
<a
href=
"/hangye/57.html"
>
<h3>
宁波抽查洗衣机 可意电器上榜不合格名单
</h3>
<p>
2017-04-12
<span>
点击:0
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"宁波抽查洗衣机 可意电器上榜不合格名单"
/>
</a>
</li>
<li>
<a
href=
"/hangye/55.html"
>
<h3>
线上竞争力凸显 2017家电网购关注榜出炉
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"线上竞争力凸显 2017家电网购关注榜出炉"
/>
</a>
</li>
<li>
<a
href=
"/hangye/53.html"
>
<h3>
人民的名义热播 你看到哪些家电在做背景板?
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"人民的名义热播 你看到哪些家电在做背景板?"
/>
</a>
</li>
<li>
<a
href=
"/hangye/50.html"
>
<h3>
谷歌居然要做空调了?而且还没有制冷剂
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"谷歌居然要做空调了?而且还没有制冷剂"
/>
</a>
</li>
<li>
<a
href=
"/hangye/47.html"
>
<h3>
小家电将迎来黄金期 质量问题仍堪忧
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"小家电将迎来黄金期 质量问题仍堪忧"
/>
</a>
</li>
<li>
<a
href=
"/hangye/46.html"
>
<h3>
下半场:中国家电行业从竞争走向竞合
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"下半场:中国家电行业从竞争走向竞合"
/>
</a>
</li>
<li>
<a
href=
"/hangye/44.html"
>
<h3>
进化售后环节 家电企业要有互联网思维
</h3>
<p>
2017-04-12
<span>
点击:0
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"进化售后环节 家电企业要有互联网思维"
/>
</a>
</li>
<li>
<a
href=
"/hangye/42.html"
>
<h3>
2017年量子点无疑是高端电视热捧的对象
</h3>
<p>
2017-04-12
<span>
点击:0
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"2017年量子点无疑是高端电视热捧的对象"
/>
</a>
</li>
<li>
<a
href=
"/hangye/40.html"
>
<h3>
东芝拟出售电视业务 海信Vestel欲争
</h3>
<p>
2017-04-12
<span>
点击:0
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"东芝拟出售电视业务 海信Vestel欲争"
/>
</a>
</li>
<li>
<a
href=
"/hangye/38.html"
>
<h3>
从暗战到明斗!互联网电视厂商“撕破脸”
</h3>
<p>
2017-04-12
<span>
点击:0
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"从暗战到明斗!互联网电视厂商“撕破脸”"
/>
</a>
</li>
<li>
<a
href=
"/hangye/35.html"
>
<h3>
海尔洗衣机向家电行业发起倡议:30天无条件退货
</h3>
<p>
2017-04-12
<span>
点击:0
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"海尔洗衣机向家电行业发起倡议:30天无条件退货"
/>
</a>
</li>
<li>
<a
href=
"/hangye/33.html"
>
<h3>
空调除霾功能是如何实现的 原理其实很简单
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"空调除霾功能是如何实现的 原理其实很简单"
/>
</a>
</li>
<li>
<a
href=
"/hangye/32.html"
>
<h3>
老旧空调对家人有哪些危害?内部环境恶化、维修成本升高
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"老旧空调对家人有哪些危害?内部环境恶化、维修成本升高"
/>
</a>
</li>
<li>
<a
href=
"/hangye/30.html"
>
<h3>
液晶电视超龄期最多7年 空调使用年限大揭秘
</h3>
<p>
2017-04-12
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"液晶电视超龄期最多7年 空调使用年限大揭秘"
/>
</a>
</li>
<li>
<a
href=
"/shifu/29.html"
>
<h3>
第一次修彩电
</h3>
<p>
2017-04-11
<span>
点击:2
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"第一次修彩电"
/>
</a>
</li>
<li>
<a
href=
"/shifu/28.html"
>
<h3>
整理几则搞笑小故事
</h3>
<p>
2017-04-11
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"整理几则搞笑小故事"
/>
</a>
</li>
<li>
<a
href=
"/shifu/27.html"
>
<h3>
一起维修康佳彩电 我的哥被高压击中
</h3>
<p>
2017-04-11
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"一起维修康佳彩电 我的哥被高压击中"
/>
</a>
</li>
<li>
<a
href=
"/shifu/26.html"
>
<h3>
危险动作 非专业维修人员切勿模仿
</h3>
<p>
2017-04-11
<span>
点击:2
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"危险动作 非专业维修人员切勿模仿"
/>
</a>
</li>
<li>
<a
href=
"/shifu/25.html"
>
<h3>
协助警察捉偷车贼
</h3>
<p>
2017-04-11
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"协助警察捉偷车贼"
/>
</a>
</li>
<li>
<a
href=
"/shifu/24.html"
>
<h3>
年轻时遇到了一些艳遇 回想起来依然记忆犹新
</h3>
<p>
2017-04-11
<span>
点击:4
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"年轻时遇到了一些艳遇 回想起来依然记忆犹新"
/>
</a>
</li>
<li>
<a
href=
"/shifu/23.html"
>
<h3>
女儿 爸爸真不丢人
</h3>
<p>
2017-04-11
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"女儿 爸爸真不丢人"
/>
</a>
</li>
<li>
<a
href=
"/shifu/22.html"
>
<h3>
常被人忽视的维修习惯
</h3>
<p>
2017-04-11
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"常被人忽视的维修习惯"
/>
</a>
</li>
<li>
<a
href=
"/shifu/21.html"
>
<h3>
给旧情人家安装空调
</h3>
<p>
2017-04-11
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"给旧情人家安装空调"
/>
</a>
</li>
<li>
<a
href=
"/pinlei/dianshiji/jingyanjiqiao/20.html"
>
<h3>
彩电怕热病实例与维修提示
</h3>
<p>
2017-04-11
<span>
点击:2
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"彩电怕热病实例与维修提示"
/>
</a>
</li>
<li>
<a
href=
"/shifu/19.html"
>
<h3>
切莫五十步笑百步
</h3>
<p>
2017-04-11
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"切莫五十步笑百步"
/>
</a>
</li>
<li>
<a
href=
"/shifu/18.html"
>
<h3>
维修中遇到的一些奇葩事 真是不吐不快
</h3>
<p>
2017-04-11
<span>
点击:2
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"维修中遇到的一些奇葩事 真是不吐不快"
/>
</a>
</li>
<li>
<a
href=
"/shifu/17.html"
>
<h3>
谈谈家电维修中用的各种胶,你知道吗?
</h3>
<p>
2017-04-11
<span>
点击:2
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"谈谈家电维修中用的各种胶,你知道吗?"
/>
</a>
</li>
<li>
<a
href=
"/shifu/16.html"
>
<h3>
第一次开背修冰箱 简直痛不欲生
</h3>
<p>
2017-04-11
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"第一次开背修冰箱 简直痛不欲生"
/>
</a>
</li>
<li>
<a
href=
"/shifu/15.html"
>
<h3>
维修师心语:义务维修也会获得“回报”
</h3>
<p>
2017-04-11
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"维修师心语:义务维修也会获得“回报”"
/>
</a>
</li>
<li>
<a
href=
"/shifu/14.html"
>
<h3>
维修店主精心总结的工作经验
</h3>
<p>
2017-04-11
<span>
点击:4
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"维修店主精心总结的工作经验"
/>
</a>
</li>
<li>
<a
href=
"/pinlei/dianshiji/jingyanjiqiao/13.html"
>
<h3>
三十年维修生涯未见过的电视显像问题
</h3>
<p>
2017-04-11
<span>
点击:1
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"三十年维修生涯未见过的电视显像问题"
/>
</a>
</li>
<li>
<a
href=
"/shifu/11.html"
>
<h3>
一次不忍心收费的维修经历
</h3>
<p>
2017-04-10
<span>
点击:6
</span></p>
<img
src=
"/e/data/images/notimg.gif"
alt=
"一次不忍心收费的维修经历"
/>
</a>
</li>
</ul>
</div>
</div>
<div
class=
"learnning-course newest"
>
<div
class=
"tit"
>
最新课程
<span></span><a
href=
"http://xue.ibanshou.cn/home/all-course"
>
全部课程
</a></div>
<div
class=
"newest-list clearfix"
><div
class=
"learn-course-box"
>
<div
class=
"lc-img"
><a
href=
"http://ct.yunya.com/home/course-detail?courseId=37"
><img
src=
"http://deimg.c.xixia.cc/preview/14/af/53/vhc0QjF8zCEDRVLD5135.jpg-ym.preview"
></a></div>
<h3><a
href=
"http://ct.yunya.com/home/course-detail?courseId=37"
>
我来发个系列课程试试看
</a></h3>
<p><span>
3人已学
</span><span>
6人评论
</span></p>
</div><div
class=
"learn-course-box"
>
<div
class=
"lc-img"
><a
href=
"http://ct.yunya.com/home/course-detail?courseId=5"
><img
src=
"http://deimg.c.xixia.cc/preview/27/8f/26/mOuzx8G2eAYefYOL2159.jpg-ym.preview"
></a></div>
<h3><a
href=
"http://ct.yunya.com/home/course-detail?courseId=5"
>
皮皮动力产品介绍
</a></h3>
<p><span>
1人已学
</span><span>
6人评论
</span></p>
</div><div
class=
"learn-course-box"
>
<div
class=
"lc-img"
><a
href=
"http://ct.yunya.com/home/course-detail?courseId=2"
><img
src=
"http://deimg.c.xixia.cc/preview/e0/b9/73/ipp4X6nwQp8ob8Kt2436.jpg-ym.preview"
></a></div>
<h3><a
href=
"http://ct.yunya.com/home/course-detail?courseId=2"
>
指掌时代公司介绍
</a></h3>
<p><span>
4人已学
</span><span>
35人评论
</span></p>
</div></div></div><div
class=
"latest-news"
>
<div
class=
"common-tit-index"
>
热门互动
</div>
<ul
class=
"news-list"
><li>
<a
href=
"http://bbs.yunya.com/forum.php?mod=viewthread&tid=150"
>
<h3>
空调清洗
</h3>
<p>
9人已参与
</p>
<img
src=
"http://bbs.yunya.com/data/attachment/block/73/73fc0c6ae7fd405fa541110459114b06.jpg"
>
</a>
</li><li>
<a
href=
"http://bbs.yunya.com/forum.php?mod=viewthread&tid=146"
>
<h3>
教学篇:空调制冷系工作原理
</h3>
<p>
17人已参与
</p>
<img
src=
"http://bbs.yunya.com/data/attachment/block/05/0573c30327d38b798577e1ad9f9f055b.jpg"
>
</a>
</li><li>
<a
href=
"http://bbs.yunya.com/forum.php?mod=viewthread&tid=142"
>
<h3>
解析压缩机结霜原因与处理
</h3>
<p>
12人已参与
</p>
<img
src=
"http://bbs.yunya.com/data/attachment/block/a5/a5b5748b56045493ee996cc6b1586998.jpg"
>
</a>
</li><li>
<a
href=
"http://bbs.yunya.com/forum.php?mod=viewthread&tid=33"
>
<h3>
分享:LG滚筒洗衣机(WD-A12115D)拆解全过程
</h3>
<p>
20人已参与
</p>
<img
src=
"http://bbs.yunya.com/data/attachment/block/4c/4ce0f4d5d11a085828a9b4f4eecd5441.jpg"
>
</a>
</li></ul></div>
<div
class=
"foot-nav"
>
<div
class=
"foot-nav"
>
<ul
class=
"nav-list"
>
<ul
class=
"nav-list"
>
<li>
<li>
...
@@ -522,6 +161,22 @@
...
@@ -522,6 +161,22 @@
autoplay
:
5000
,
autoplay
:
5000
,
pagination
:
'.swiper-pagination'
,
pagination
:
'.swiper-pagination'
,
})
})
$
(
function
()
{
setWidth
();
$
(
window
).
resize
(
function
()
{
setWidth
();
});
function
setWidth
()
{
if
(
$
(
window
).
width
()
>=
900
){
$
(
'.newest-list'
).
find
(
'.learn-course-box'
).
width
(
427
);
}
else
{
$
(
'.newest-list'
).
find
(
'.learn-course-box'
).
width
((
$
(
window
).
width
()
-
45
)
/
2
);
}
}
})
</script>
</script>
</body>
</body>
...
...
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