Explorar el Código

更换小程序appid和secret

sunxbiao hace 1 año
padre
commit
26a1904979
Se han modificado 2 ficheros con 15 adiciones y 9 borrados
  1. 6 5
      app/controller/api/Auth.php
  2. 9 4
      app/controller/api/user/UserMp.php

+ 6 - 5
app/controller/api/Auth.php

@@ -1899,11 +1899,12 @@ class Auth extends BaseController
1899 1899
             if(empty($sessionKey['sessionKey'])||empty($encryptedData['encryptedData'])||empty($iv['iv'])){
1900 1900
                 return app('json')->fail('参数不正确');
1901 1901
             }
1902
-            $appid = 'wx82986c4471ce7efc';
1903
-            if($this->source=='yhc'){
1904
-                $appid = 'wx82986c4471ce7efc';
1905
-            }
1906
-            $appid = 'wx7b4d857deb0447f3';
1902
+//            $appid = 'wx82986c4471ce7efc';
1903
+//            if($this->source=='yhc'){
1904
+//                $appid = 'wx82986c4471ce7efc';
1905
+//            }
1906
+//            $appid = 'wx7b4d857deb0447f3';
1907
+            $appid = 'wx9082e5ac2fdb513f';
1907 1908
             $sessionKey =str_replace(' ','+', $sessionKey['sessionKey']);
1908 1909
 
1909 1910
             $encryptedData=str_replace(' ','+',$encryptedData['encryptedData']);

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

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