Authored by cailing

帮助中心

... ... @@ -24,7 +24,17 @@ class HelpData
return Yohobuy::post(Yohobuy::API_URL, $param, $param);
}
public static function serviceDetail($code)
{
//获取帮助详情
$param = Yohobuy::param();
$param['method'] = 'app.help.detail';
$param['code'] = $code;
$param['return_type'] = 'html';
$param['client_secret'] = Sign::getSign($param);
return Yohobuy::post(Yohobuy::API_URL, $param,$param );
}
}
... ...
... ... @@ -874,30 +874,28 @@ class HomeController extends AbstractAction
/**
* 帮助列表页
*/
public function helpAction()
{
$this->setTitle('帮助中心');
$this->setNavHeader('帮助中心');
$data = array(
'iHelp' => array(
array('caption' => '新用户注册'),
)
);
$this->_view->display('i-help', $data);
}
public function helpAction()
{
$service = Home\HelpModel::serviceInfo();
$this->setTitle('帮助中心');
$this->setNavHeader('帮助中心');
$data = array(
'iHelp' =>$service,
);
$this->_view->display('i-help', $data);
}
/**
* 帮助列表页
*/
public function helpDetailAction()
{
$this->setTitle('帮助中心');
$this->setNavHeader('帮助中心');
{
$code = $this->get('code', 0);
$service = Home\HelpModel::serviceDetail($code);
$data = array(
'iHelp' => array(
array('name' => '新用户注册'),
)
'iHelp' => $service,
);
print_r($service);
$this->_view->display('helpDetail', $data);
}
}
... ...
... ... @@ -20,16 +20,26 @@ class HelpModel
$res = json_decode(HelpData::serviceInfo(), TRUE);
$cateInfo = $res['data'];
$iHelp = array();
$list = array();
if ($cateInfo) {
foreach ($cateInfo as $key => $value) {
$iHelp[$key]['name'] = $value['caption'];
$iHelp[$key]['caption'] = $value['caption'];
$iHelp[$key]['code'] = $value['code'];
}
}
return $iHelp;
}
/*
* 获取帮助中心详细内容
*/
public static function serviceDetail($code)
{
$res = HelpData::serviceDetail($code);
return $res;
}
}
... ...