jsconfig
This commit is contained in:
@@ -29,6 +29,24 @@ class Wechat
|
||||
$this->app = Factory::officialAccount(Config::get('wechat'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes : 获取jssdk配置
|
||||
*
|
||||
* @Date : 2022/9/20 13:32
|
||||
* @Author : <Jason.C>
|
||||
*/
|
||||
public function jsSdk(): Json
|
||||
{
|
||||
$this->initWechat();
|
||||
$APIs = [];
|
||||
|
||||
$url = $GLOBALS['data']['data']['url'];
|
||||
$this->app->jssdk->setUrl($url);
|
||||
$config = $this->app->jssdk->buildConfig($APIs);
|
||||
|
||||
return show(SUCCESS_MESSAGE, SUCCESS_CODE, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Notes : 获取微信授权的地址并跳转
|
||||
*
|
||||
@@ -78,7 +96,7 @@ class Wechat
|
||||
'openid' => $wechatUser->getId(),
|
||||
]);
|
||||
|
||||
Db::name("app_users")->where("id",$parent_id)->inc("share_count",1)->update();
|
||||
Db::name("app_users")->where("id", $parent_id)->inc("share_count", 1)->update();
|
||||
|
||||
AppUserRelation::create([
|
||||
'parent_id' => $parent_id,
|
||||
|
||||
Reference in New Issue
Block a user