Pārlūkot izejas kodu

更换小程序密钥

xialei 1 gadu atpakaļ
vecāks
revīzija
8bb1f66f55
2 mainītis faili ar 7 papildinājumiem un 4 dzēšanām
  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
             if($this->source=='yhc'){
1762
             if($this->source=='yhc'){
1763
                 $appid = 'wx82986c4471ce7efc';
1763
                 $appid = 'wx82986c4471ce7efc';
1764
             }
1764
             }
1765
+            $appid = 'wx7b4d857deb0447f3';
1765
             $sessionKey =str_replace(' ','+', $sessionKey['sessionKey']);
1766
             $sessionKey =str_replace(' ','+', $sessionKey['sessionKey']);
1766
 
1767
 
1767
             $encryptedData=str_replace(' ','+',$encryptedData['encryptedData']);
1768
             $encryptedData=str_replace(' ','+',$encryptedData['encryptedData']);

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

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