...
|
...
|
@@ -1149,31 +1149,19 @@ class Helpers |
|
|
|
|
|
/**
|
|
|
* 获得文章 url
|
|
|
* @param type string url 后台返回的url
|
|
|
* @param type $productSkn 产品编号
|
|
|
* @param type $productName 产品名称
|
|
|
* @param type $cnAlphaBet
|
|
|
* @return type url
|
|
|
* @param string url 后台返回的url
|
|
|
* @param int $id 文章id
|
|
|
* @return string $rurl
|
|
|
*/
|
|
|
public static function getArticleUrl($url, $id, $isApp = false)
|
|
|
public static function getArticleUrl($url, $id)
|
|
|
{
|
|
|
$rurl;
|
|
|
|
|
|
if(!empty($url)) {
|
|
|
|
|
|
try {
|
|
|
$jurl = json_decode($url);
|
|
|
|
|
|
if(!empty($jurl) && !empty($jurl->url)) {
|
|
|
$rurl = $jurl->url;
|
|
|
}
|
|
|
} catch(Exception $e){}
|
|
|
}
|
|
|
|
|
|
if(empty($rurl)) {
|
|
|
$rurl = $isApp ? $url : self::url('/'.$id.'.html', array(), 'guang');
|
|
|
$jurl = json_decode($url);
|
|
|
if(!empty($jurl) && isset($jurl['url']) && !empty($jurl['url'])) {
|
|
|
$rurl = $jurl['url'];
|
|
|
} else {
|
|
|
$rurl = self::url('/'.$id.'.html', array(), 'guang');
|
|
|
}
|
|
|
|
|
|
|
|
|
return $rurl;
|
|
|
}
|
|
|
} |
...
|
...
|
|