diff --git a/application/api/controller/User.php b/application/api/controller/User.php index 924629ec9..fd9d8c160 100755 --- a/application/api/controller/User.php +++ b/application/api/controller/User.php @@ -618,8 +618,8 @@ class User extends Common $user_order_status = OrderService::OrderStatusStepTotal(['user_type'=>'user', 'user'=>$this->user, 'is_comments'=>1, 'is_aftersale'=>1]); // 用户积分 - $user_integral_data = IntegralService::UserIntegral($params['user']['id']); - $user_integral = (isset($user_integral_data['data']) && isset($user_integral_data['data']['integral'])) ? $user_integral_data['data']['integral'] : 0; + $integral = IntegralService::UserIntegral($params['user']['id']); + $user_integral = (!empty($integral) && !empty($integral['integral'])) ? $integral['integral'] : 0; // 初始化数据 $result = array( diff --git a/application/index/controller/Userintegral.php b/application/index/controller/Userintegral.php index 621ed5f64..7064a139c 100755 --- a/application/index/controller/Userintegral.php +++ b/application/index/controller/Userintegral.php @@ -72,8 +72,8 @@ class UserIntegral extends Common $ret = IntegralService::IntegralLogList($data_params); // 用户积分 - $user_integral_data = IntegralService::UserIntegral($this->user['id']); - $this->assign('user_integral_data', $user_integral_data['data']); + $integral = IntegralService::UserIntegral($this->user['id']); + $this->assign('user_integral_data', $integral); // 浏览器名称 $this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('我的积分', 1)); diff --git a/application/service/IntegralService.php b/application/service/IntegralService.php index 05bc11dda..1eb0a9fa9 100755 --- a/application/service/IntegralService.php +++ b/application/service/IntegralService.php @@ -327,8 +327,7 @@ class IntegralService */ public static function UserIntegral($user_id) { - $data = Db::name('User')->where(['id'=>$user_id])->field('integral,locking_integral')->find(); - return DataReturn('success', 0, $data); + return Db::name('User')->where(['id'=>$user_id])->field('integral,locking_integral')->find(); } } ?> \ No newline at end of file diff --git a/application/service/NavigationService.php b/application/service/NavigationService.php index fa43a8c6e..2c49bcf72 100755 --- a/application/service/NavigationService.php +++ b/application/service/NavigationService.php @@ -1041,8 +1041,8 @@ class NavigationService $user_goods_browse_count = GoodsBrowseService::GoodsBrowseTotal($where); // 用户积分 - $user_integral_data = IntegralService::UserIntegral($params['user']['id']); - $user_integral = (isset($user_integral_data['data']) && isset($user_integral_data['data']['integral'])) ? $user_integral_data['data']['integral'] : 0; + $integral = IntegralService::UserIntegral($params['user']['id']); + $user_integral = (!empty($integral) && !empty($integral['integral'])) ? $integral['integral'] : 0; } // 列表 diff --git a/application/tags.php b/application/tags.php index cddcd0dff..22fa9ecf0 100755 --- a/application/tags.php +++ b/application/tags.php @@ -40,15 +40,18 @@ return array ( array ( 0 => 'app\\plugins\\store\\Hook', 1 => 'app\\plugins\\share\\Hook', + 2 => 'app\\plugins\\points\\Hook', ), 'plugins_js' => array ( 0 => 'app\\plugins\\store\\Hook', 1 => 'app\\plugins\\share\\Hook', + 2 => 'app\\plugins\\points\\Hook', ), 'plugins_service_navigation_header_handle' => array ( 0 => 'app\\plugins\\store\\Hook', + 1 => 'app\\plugins\\points\\Hook', ), 'plugins_service_users_center_left_menu_handle' => array ( @@ -109,6 +112,7 @@ return array ( 'plugins_service_buy_order_insert_end' => array ( 0 => 'app\\plugins\\store\\Hook', + 1 => 'app\\plugins\\points\\Hook', ), 'plugins_service_system_begin' => array ( @@ -117,10 +121,12 @@ return array ( 'plugins_view_buy_form_inside' => array ( 0 => 'app\\plugins\\store\\Hook', + 1 => 'app\\plugins\\points\\Hook', ), 'plugins_view_buy_base_confirm_top' => array ( 0 => 'app\\plugins\\store\\Hook', + 1 => 'app\\plugins\\points\\Hook', ), 'plugins_view_admin_order_list_operate' => array ( @@ -129,6 +135,7 @@ return array ( 'plugins_service_order_status_change_history_success_handle' => array ( 0 => 'app\\plugins\\store\\Hook', + 1 => 'app\\plugins\\points\\Hook', ), 'plugins_service_order_aftersale_audit_handle_end' => array ( @@ -151,5 +158,45 @@ return array ( array ( 0 => 'app\\plugins\\share\\Hook', ), + 'plugins_service_quick_navigation_pc' => + array ( + 0 => 'app\\plugins\\points\\Hook', + ), + 'plugins_service_quick_navigation_h5' => + array ( + 0 => 'app\\plugins\\points\\Hook', + ), + 'plugins_service_quick_navigation_weixin' => + array ( + 0 => 'app\\plugins\\points\\Hook', + ), + 'plugins_service_quick_navigation_alipay' => + array ( + 0 => 'app\\plugins\\points\\Hook', + ), + 'plugins_service_quick_navigation_baidu' => + array ( + 0 => 'app\\plugins\\points\\Hook', + ), + 'plugins_service_quick_navigation_qq' => + array ( + 0 => 'app\\plugins\\points\\Hook', + ), + 'plugins_service_quick_navigation_toutiao' => + array ( + 0 => 'app\\plugins\\points\\Hook', + ), + 'plugins_service_goods_handle_end' => + array ( + 0 => 'app\\plugins\\points\\Hook', + ), + 'plugins_service_buy_group_goods_handle' => + array ( + 0 => 'app\\plugins\\points\\Hook', + ), + 'plugins_service_base_data_return_api_buy_index' => + array ( + 0 => 'app\\plugins\\points\\Hook', + ), ); ?> \ No newline at end of file