公众平台代小程序实现业务,怎么判断用户属于那个小程序?
小程序登录的时候怎么传递小程序appid给后台?
小程序登录的时候怎么传递小程序appid给后台?
在代码管理的时候加入即可,给你上个代码示例,具体请查看文档
//为授权的小程序帐号上传小程序代码 文档https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1489140610_Uavc4&token=&lang=zh_CN $authorizer_access_token = $this->getAccessToken($info); $url = "https://api.weixin.qq.com/wxa/commit?access_token={$authorizer_access_token}"; $ext = array( "extEnable" => true, 'ext'=>array( "host" => "", 'appid'=>$info['appid'], ), 'window'=>array( 'navigationBarTitleText'=>$info['nick_name'] ) ); $ext_json = json_encode($ext, JSON_UNESCAPED_UNICODE); $post_data = array( "template_id"=>$template_id, "ext_json"=>$ext_json, "user_version"=>'1.01', "user_desc"=>$user_desc); $json = json_encode($post_data, JSON_UNESCAPED_UNICODE); $res = $this->ihttp_post($url, $json); $td = json_decode($res, true); |