xialei пре 1 година
родитељ
комит
8bb1f66f55
2 измењених фајлова са 7 додато и 4 уклоњено
  1. 1 0
      app/controller/api/Auth.php
  2. 6 4
      app/controller/api/user/UserMp.php

+ 1 - 0
app/controller/api/Auth.php

@@ -1762,6 +1762,7 @@ class Auth extends BaseController
1762 1762
             if($this->source=='yhc'){
1763 1763
                 $appid = 'wx82986c4471ce7efc';
1764 1764
             }
1765
+            $appid = 'wx7b4d857deb0447f3';
1765 1766
             $sessionKey =str_replace(' ','+', $sessionKey['sessionKey']);
1766 1767
 
1767 1768
             $encryptedData=str_replace(' ','+',$encryptedData['encryptedData']);

+ 6 - 4
app/controller/api/user/UserMp.php

@@ -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){