Authored by hf

code review by hf: do format user.php code

@@ -297,7 +297,7 @@ class UserModel @@ -297,7 +297,7 @@ class UserModel
297 $records = UserData::browseRecord($uid, $udid, $page, $limit); 297 $records = UserData::browseRecord($uid, $udid, $page, $limit);
298 298
299 if (!$records) { 299 if (!$records) {
300 - $result['walkwayUrl'] = '/product/new'; 300 + $result['walkwayUrl'] = Helpers::url('/product/new');
301 $result['noRecord'] = true; 301 $result['noRecord'] = true;
302 302
303 return $result; 303 return $result;
@@ -308,7 +308,7 @@ class UserModel @@ -308,7 +308,7 @@ class UserModel
308 308
309 // 不能再查到结果了 309 // 不能再查到结果了
310 if ($page == 1 && $records['data']['total'] === 0) { 310 if ($page == 1 && $records['data']['total'] === 0) {
311 - $result['walkwayUrl'] = '/product/new'; 311 + $result['walkwayUrl'] = Helpers::url('/product/new');
312 $result['noRecord'] = true; 312 $result['noRecord'] = true;
313 } else { 313 } else {
314 $data = $records['data']['product_list']; 314 $data = $records['data']['product_list'];
@@ -781,15 +781,12 @@ class UserModel @@ -781,15 +781,12 @@ class UserModel
781 $result = array(); 781 $result = array();
782 782
783 $helpListData = UserData::helpListData(); 783 $helpListData = UserData::helpListData();
784 -  
785 if (isset($helpListData['data']) && !empty($helpListData['data'])) { 784 if (isset($helpListData['data']) && !empty($helpListData['data'])) {
786 - $help = $helpListData['data'];  
787 -  
788 $one = array(); 785 $one = array();
789 - foreach ($help as $val) { 786 + foreach ($helpListData['data'] as $val) {
790 $one = array(); 787 $one = array();
791 $one['name'] = $val['caption']; 788 $one['name'] = $val['caption'];
792 - $one['url'] = Helpers::url('/home/helpdetail/', array('code' => $val['code'])); 789 + $one['url'] = Helpers::url('/home/helpdetail', array('code' => $val['code']));
793 790
794 $result['iHelp'][] = $one; 791 $result['iHelp'][] = $one;
795 } 792 }
@@ -806,7 +803,13 @@ class UserModel @@ -806,7 +803,13 @@ class UserModel
806 */ 803 */
807 public static function getHelpDetailData($code) 804 public static function getHelpDetailData($code)
808 { 805 {
809 - return UserData::helpDetailData($code); 806 + $result = array();
  807 +
  808 + if (isset($code)) {
  809 + $result = UserData::helpDetailData($code);
  810 + }
  811 +
  812 + return $result;
810 } 813 }
811 814
812 } 815 }