|
|
@@ -6,6 +6,7 @@
|
|
|
namespace app\weixin\service;
|
|
|
|
|
|
use app\weixin\model\AccountLog;
|
|
|
+use app\weixin\model\UserBalanceLog;
|
|
|
use app\weixin\model\UserProfile;
|
|
|
use app\weixin\model\Member as MemberModel;
|
|
|
use app\weixin\model\Wechat;
|
|
|
@@ -163,6 +164,17 @@ class Member
|
|
|
Wechat::sendTplMsg($openid, $params);
|
|
|
}
|
|
|
|
|
|
+ // 认证分销收益结算
|
|
|
+ $inviteInfo = MemberModel::getInviteInfo($userId);
|
|
|
+ $inviteId = isset($inviteInfo['invite_id'])? $inviteInfo['invite_id'] : 0;
|
|
|
+ if($inviteInfo && $inviteId>0){
|
|
|
+ $types = ['idcard'=> 5, 'education'=> 6, 'position'=> 7];
|
|
|
+ $type = isset($types[$scene])? $types[$scene] : 0;
|
|
|
+ if($type && !UserBalanceLog::checkHasMarket($inviteId, $userId, $type)){
|
|
|
+ Award::marketAward($inviteId, $userId, $type);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
return ['id'=> $userId];
|
|
|
} catch (\Exception $exception){
|
|
|
// var_dump($exception);
|