• laravel 框架接入环信遇到的坑(-)


    在脚本中执行判断user表中是否注册环信时,报错: “请求错误:service_resource_not_found Service resource not found  ”

      // 判断环信是否已经注册该用户
                $personal = Easemob::getUser($user->id);
                dd($personal);

    追踪到composer包中link1stlaravel-easemobsrcappHttp.php 文件,添加一行 return false;即可;

    public function index()
        {
            $userList = User::where('remarks', 'like', '%0417%')->get();
    
            $registers = array();
            $num = 0;
    
            foreach ($userList as $key => $user) {
                // 判断环信是否已经注册该用户
                $personal = Easemob::getUser($user->id);
    //            dd($personal);
                if (!$personal) {
                    $registers[] = array('username' => $user->id, 'password' => $user->id . 'laizheer');
                    $num++;
                }
                // 够50条的时候发起注册
                if (!empty($registers) and (count($registers) == 50)) {
                    Easemob::authorizationRegistrations($registers);
                    $registers = array();
                    $this->info('user注册已完成' . $num . '个');
                }
    
                // 循环到最后一条的时候,直接注册
                if (!empty($registers) and ($userList->count() - $key) < 50) {
                    Easemob::authorizationRegistrations($registers);
                    $registers = array();
                    $this->info('user注册最后已完成' . $num . '个');
                }
    
    //            dd('停止一下');
            }
            dd('总人数:' . count($userList));
    
        }
  • 相关阅读:
    UEFI和GPT
    EFI/UEFI BIOS 入门
    UEFI+GPT模式下的Windows系统中分区结构和默认分区大小及硬盘整数分区研究
    UEFI和Legacy及UEFI+Legacy启动的区别
    UEFI与MBR区别
    UI基础字典转模型
    UI基础九宫格
    UI基础UIView常见属性及方法
    UI基础控件UIButton
    OC中NSFileManager类 和 copy一些用法
  • 原文地址:https://www.cnblogs.com/lxwphp/p/10874221.html
Copyright © 2020-2023  润新知