|
|
@ -350,6 +350,35 @@ class User extends Controller |
|
|
|
UserModel::where('user_id', $user_id)->update($params); |
|
|
|
UserModel::where('user_id', $user_id)->update($params); |
|
|
|
return $this->renderSuccess('ok'); |
|
|
|
return $this->renderSuccess('ok'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 生成会员码 |
|
|
|
|
|
|
|
* [getMembershipInviteQrcode description] |
|
|
|
|
|
|
|
* @return [type] [description] |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function getMembershipInviteQrcode(){ |
|
|
|
|
|
|
|
$user_id = $userInfo = UserService::getCurrentLoginUserId(true); |
|
|
|
|
|
|
|
$obj = new \app\common\service\qrcode\BaseQRcode(); |
|
|
|
|
|
|
|
// 小程序码参数 |
|
|
|
|
|
|
|
$scene = "refereeId:" . $user_id; |
|
|
|
|
|
|
|
$storeId = request()->header()['storeid']; |
|
|
|
|
|
|
|
// 下载小程序码 |
|
|
|
|
|
|
|
$page = 'pages/login/index'; |
|
|
|
|
|
|
|
$qrcode = $obj->getQrcode((int)$storeId, $scene, $page, 'MP-WEIXIN'); |
|
|
|
|
|
|
|
return $this->renderSuccess(str_replace(root_path()."public/", base_url(), $qrcode)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 生成分销商码 |
|
|
|
|
|
|
|
* [getDealerInviteQrcode description] |
|
|
|
|
|
|
|
* @return [type] [description] |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public function getDealerInviteQrcode(){ |
|
|
|
|
|
|
|
$storeId = request()->header()['storeid']; |
|
|
|
|
|
|
|
$user_id = $userInfo = UserService::getCurrentLoginUserId(true); |
|
|
|
|
|
|
|
$obj = new \app\common\service\qrcode\BaseQRcode(); |
|
|
|
|
|
|
|
$scene = 'uid:' . $user_id; |
|
|
|
|
|
|
|
$qrcode = $obj->getQrcode((int)$storeId, $scene, null, 'MP-WEIXIN'); |
|
|
|
|
|
|
|
return $this->renderSuccess(str_replace(root_path()."public/", base_url(), $qrcode)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|