用户积分获取优化
parent
adf8e415b0
commit
8edc70eb32
|
|
@ -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_order_status = OrderService::OrderStatusStepTotal(['user_type'=>'user', 'user'=>$this->user, 'is_comments'=>1, 'is_aftersale'=>1]);
|
||||||
|
|
||||||
// 用户积分
|
// 用户积分
|
||||||
$user_integral_data = IntegralService::UserIntegral($params['user']['id']);
|
$integral = IntegralService::UserIntegral($params['user']['id']);
|
||||||
$user_integral = (isset($user_integral_data['data']) && isset($user_integral_data['data']['integral'])) ? $user_integral_data['data']['integral'] : 0;
|
$user_integral = (!empty($integral) && !empty($integral['integral'])) ? $integral['integral'] : 0;
|
||||||
|
|
||||||
// 初始化数据
|
// 初始化数据
|
||||||
$result = array(
|
$result = array(
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,8 @@ class UserIntegral extends Common
|
||||||
$ret = IntegralService::IntegralLogList($data_params);
|
$ret = IntegralService::IntegralLogList($data_params);
|
||||||
|
|
||||||
// 用户积分
|
// 用户积分
|
||||||
$user_integral_data = IntegralService::UserIntegral($this->user['id']);
|
$integral = IntegralService::UserIntegral($this->user['id']);
|
||||||
$this->assign('user_integral_data', $user_integral_data['data']);
|
$this->assign('user_integral_data', $integral);
|
||||||
|
|
||||||
// 浏览器名称
|
// 浏览器名称
|
||||||
$this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('我的积分', 1));
|
$this->assign('home_seo_site_title', SeoService::BrowserSeoTitle('我的积分', 1));
|
||||||
|
|
|
||||||
|
|
@ -327,8 +327,7 @@ class IntegralService
|
||||||
*/
|
*/
|
||||||
public static function UserIntegral($user_id)
|
public static function UserIntegral($user_id)
|
||||||
{
|
{
|
||||||
$data = Db::name('User')->where(['id'=>$user_id])->field('integral,locking_integral')->find();
|
return Db::name('User')->where(['id'=>$user_id])->field('integral,locking_integral')->find();
|
||||||
return DataReturn('success', 0, $data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
@ -1041,8 +1041,8 @@ class NavigationService
|
||||||
$user_goods_browse_count = GoodsBrowseService::GoodsBrowseTotal($where);
|
$user_goods_browse_count = GoodsBrowseService::GoodsBrowseTotal($where);
|
||||||
|
|
||||||
// 用户积分
|
// 用户积分
|
||||||
$user_integral_data = IntegralService::UserIntegral($params['user']['id']);
|
$integral = IntegralService::UserIntegral($params['user']['id']);
|
||||||
$user_integral = (isset($user_integral_data['data']) && isset($user_integral_data['data']['integral'])) ? $user_integral_data['data']['integral'] : 0;
|
$user_integral = (!empty($integral) && !empty($integral['integral'])) ? $integral['integral'] : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 列表
|
// 列表
|
||||||
|
|
|
||||||
|
|
@ -40,15 +40,18 @@ return array (
|
||||||
array (
|
array (
|
||||||
0 => 'app\\plugins\\store\\Hook',
|
0 => 'app\\plugins\\store\\Hook',
|
||||||
1 => 'app\\plugins\\share\\Hook',
|
1 => 'app\\plugins\\share\\Hook',
|
||||||
|
2 => 'app\\plugins\\points\\Hook',
|
||||||
),
|
),
|
||||||
'plugins_js' =>
|
'plugins_js' =>
|
||||||
array (
|
array (
|
||||||
0 => 'app\\plugins\\store\\Hook',
|
0 => 'app\\plugins\\store\\Hook',
|
||||||
1 => 'app\\plugins\\share\\Hook',
|
1 => 'app\\plugins\\share\\Hook',
|
||||||
|
2 => 'app\\plugins\\points\\Hook',
|
||||||
),
|
),
|
||||||
'plugins_service_navigation_header_handle' =>
|
'plugins_service_navigation_header_handle' =>
|
||||||
array (
|
array (
|
||||||
0 => 'app\\plugins\\store\\Hook',
|
0 => 'app\\plugins\\store\\Hook',
|
||||||
|
1 => 'app\\plugins\\points\\Hook',
|
||||||
),
|
),
|
||||||
'plugins_service_users_center_left_menu_handle' =>
|
'plugins_service_users_center_left_menu_handle' =>
|
||||||
array (
|
array (
|
||||||
|
|
@ -109,6 +112,7 @@ return array (
|
||||||
'plugins_service_buy_order_insert_end' =>
|
'plugins_service_buy_order_insert_end' =>
|
||||||
array (
|
array (
|
||||||
0 => 'app\\plugins\\store\\Hook',
|
0 => 'app\\plugins\\store\\Hook',
|
||||||
|
1 => 'app\\plugins\\points\\Hook',
|
||||||
),
|
),
|
||||||
'plugins_service_system_begin' =>
|
'plugins_service_system_begin' =>
|
||||||
array (
|
array (
|
||||||
|
|
@ -117,10 +121,12 @@ return array (
|
||||||
'plugins_view_buy_form_inside' =>
|
'plugins_view_buy_form_inside' =>
|
||||||
array (
|
array (
|
||||||
0 => 'app\\plugins\\store\\Hook',
|
0 => 'app\\plugins\\store\\Hook',
|
||||||
|
1 => 'app\\plugins\\points\\Hook',
|
||||||
),
|
),
|
||||||
'plugins_view_buy_base_confirm_top' =>
|
'plugins_view_buy_base_confirm_top' =>
|
||||||
array (
|
array (
|
||||||
0 => 'app\\plugins\\store\\Hook',
|
0 => 'app\\plugins\\store\\Hook',
|
||||||
|
1 => 'app\\plugins\\points\\Hook',
|
||||||
),
|
),
|
||||||
'plugins_view_admin_order_list_operate' =>
|
'plugins_view_admin_order_list_operate' =>
|
||||||
array (
|
array (
|
||||||
|
|
@ -129,6 +135,7 @@ return array (
|
||||||
'plugins_service_order_status_change_history_success_handle' =>
|
'plugins_service_order_status_change_history_success_handle' =>
|
||||||
array (
|
array (
|
||||||
0 => 'app\\plugins\\store\\Hook',
|
0 => 'app\\plugins\\store\\Hook',
|
||||||
|
1 => 'app\\plugins\\points\\Hook',
|
||||||
),
|
),
|
||||||
'plugins_service_order_aftersale_audit_handle_end' =>
|
'plugins_service_order_aftersale_audit_handle_end' =>
|
||||||
array (
|
array (
|
||||||
|
|
@ -151,5 +158,45 @@ return array (
|
||||||
array (
|
array (
|
||||||
0 => 'app\\plugins\\share\\Hook',
|
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',
|
||||||
|
),
|
||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
Loading…
Reference in New Issue