Selaa lähdekoodia

'修改文档'

lh 3 vuotta sitten
vanhempi
commit
ab340aba1e

+ 25 - 1
src/Controllers/CompanyAuth/AInfoController.php

@@ -21,7 +21,31 @@ class AInfoController extends Controller
      */
 
     /**
-     * @api 签名参考
+     * @api 1.签名参考
+     * public static function sign($params, $key)
+     *  {
+     *  $data = $params;
+     *  //签名步骤一:按字典序排序参数
+     *  ksort($data);
+     *  $buff = "";
+     *  foreach ($data as $k => $v) {
+     *      if ($v != null && $k !== "sign" && $v !== "" && !is_array($v)) {
+     *          $buff .= $k . "=" . $v . "&";
+     *      }
+     *  }
+     *  $buff = trim($buff, "&");
+     *  //签名步骤二:在string后加入KEY
+     *  $string = $buff . "&key=" . $key;
+     *  //签名步骤三:MD5加密
+     *  $string = md5($string);
+     *  //签名步骤四:所有字符转为大写
+     *  $result = strtoupper($string);
+     *  return $result;
+     *  }
+     */
+
+    /**
+     * @api 2.签名参考
      * public static function sign($params, $key)
      *  {
      *  $data = $params;

+ 1 - 0
src/Services/Channel/ChannelService.php

@@ -15,6 +15,7 @@ class ChannelService
 {
     public function getChannelsByChannelUserIds(array $channel_user_ids, $is_enabled)
     {
+        \Log::info("channel_user_ids: ".json_encode($channel_user_ids, 256));
         if ($is_enabled || $is_enabled !== '') return Channel::whereIn('channel_user_id', $channel_user_ids)->where('is_enabled', $is_enabled)->get();
         return Channel::whereIn('channel_user_id', $channel_user_ids)->get();
     }