瀏覽代碼

完善查询信息

15954078560 2 年之前
父節點
當前提交
b65b209957
共有 1 個文件被更改,包括 4 次插入6 次删除
  1. 4 6
      application/api/controller/User.php

+ 4 - 6
application/api/controller/User.php

@@ -2049,7 +2049,7 @@ class User extends Api
         //查询vip是否到期
         $url = 'http://10.12.5.61:8070/HDC/bizauth/phone/auth';
         $post_data = [
-            'phoneNumber' => '13811112261',
+            'phoneNumber' => $this->auth->mobile,
             'productCodes' => [config('product_code')],
             'channel' => '01'
         ];
@@ -2061,12 +2061,10 @@ class User extends Api
         $hdc_token = hash_hmac('sha256', $sign_bytes, base64_decode(config('pay_appkey')), false);
         $header = [
             'Host:10.12.5.61:8070',
-            'HDC-Service:2',
-            'HDC-APPID:' . config('pay_appid'),
-            'HDC-Token:' . $hdc_token,
-            'Content-Type:application/json'
+            'Content-Type:application/json',
+            'Authorization: HDCAUTH appid="' . config('pay_appid') . '",token="' . $hdc_token . '"'
         ];
-        $rs = httpRequest($url, 'POST', $post_data, $header);//p($sign_bytes);p($post_data);p($header);var_dump($rs);die;
+        $rs = httpRequest($url, 'POST', $post_data, $header);
         if (!$rs) {
             $data['is_vip'] = 0;
         } else {