|
|
@@ -895,15 +895,23 @@ class Auth extends BaseController
|
|
895
|
895
|
$isSharedProsperity = false;
|
|
896
|
896
|
$SharedProsperityLevel = 0;
|
|
897
|
897
|
$SharedProsperityUserPv = 0;
|
|
|
898
|
+ $SharedProsperityTeamPv = 0;
|
|
898
|
899
|
$SharedProsperityUser = Db::name('shared_prosperity_user')->where('user_id', $user['uid'])->value('id,partner_level,pv');
|
|
899
|
900
|
if ($SharedProsperityUser) {
|
|
900
|
901
|
$isSharedProsperity = true;
|
|
901
|
902
|
$SharedProsperityLevel = $SharedProsperityUser['partner_level'];
|
|
902
|
903
|
$SharedProsperityUserPv = $SharedProsperityUser['pv'];
|
|
|
904
|
+
|
|
|
905
|
+ // 团队pv
|
|
|
906
|
+ /**@var $SharedProsperityUserRepository SharedProsperityUserRepository*/
|
|
|
907
|
+ $SharedProsperityUserRepository = app()->make(SharedProsperityUserRepository::class);
|
|
|
908
|
+ $SharedProsperityTeamPv = array_sum($SharedProsperityUserRepository->calculateTeamPv($user['uid']));
|
|
|
909
|
+
|
|
903
|
910
|
}
|
|
904
|
911
|
$data['isSharedProsperity'] = $isSharedProsperity;
|
|
905
|
912
|
$data['SharedProsperityLevel'] = $SharedProsperityLevel;
|
|
906
|
913
|
$data['SharedProsperityUserPv'] = $SharedProsperityUserPv;
|
|
|
914
|
+ $data['SharedProsperityTeamPv'] = $SharedProsperityTeamPv;
|
|
907
|
915
|
|
|
908
|
916
|
|
|
909
|
917
|
return app('json')->success($data );
|