|
|
@@ -34,8 +34,10 @@ class UserMp extends BaseController
|
|
34
|
34
|
parent::__construct($app);
|
|
35
|
35
|
$this->repository = $repository;
|
|
36
|
36
|
//点餐小程序
|
|
37
|
|
- $this->appid = 'wx10669a2eca032216';
|
|
38
|
|
- $this->secret = '0e71d5c636fdb9bf1c79c403db70f739';
|
|
|
37
|
+ // $this->appid = 'wx10669a2eca032216';
|
|
|
38
|
+ // $this->secret = '0e71d5c636fdb9bf1c79c403db70f739';
|
|
|
39
|
+ $this->appid = 'wx7b4d857deb0447f3';
|
|
|
40
|
+ $this->secret = '643efbd7f3cd6398df1e7adb441afceb';
|
|
39
|
41
|
}
|
|
40
|
42
|
|
|
41
|
43
|
public function getUserUnionid(){
|
|
|
@@ -44,8 +46,8 @@ class UserMp extends BaseController
|
|
44
|
46
|
if(!$data['code'] || $data['code'] == '' || $data['code'] =='undefined') {
|
|
45
|
47
|
return app('json')->fail("异常操作");
|
|
46
|
48
|
}
|
|
47
|
|
- $appid = 'wx82986c4471ce7efc';
|
|
48
|
|
- $secret = '4ae3f790d8c5503a22579338504cdb61';
|
|
|
49
|
+ $appid = 'wx7b4d857deb0447f3';
|
|
|
50
|
+ $secret = '643efbd7f3cd6398df1e7adb441afceb';
|
|
49
|
51
|
$url = "https://api.weixin.qq.com/sns/jscode2session?appid=".$appid."&secret=".$secret."&js_code=".$data['code']."&grant_type=authorization_code";
|
|
50
|
52
|
$get = curlGet($url);
|
|
51
|
53
|
if(!$get){
|