DataApi.php 680 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace app\admin\api;
  3. use OneSm\Sm4;
  4. class DataApi{
  5. public function __construct($userid,$password)
  6. {
  7. $redis = \app\common\Redis::instance(\think\facade\Config::get("cache.stores.redis.select"));
  8. $guid= $redis->get("jjdata_guid");
  9. if(!$guid || empty($guid)) {
  10. $client = new \SoapClient("http://110.88.153.177:802/ConvergenceServiceBoot/webservice/Authentication?wsdl");
  11. $param = [
  12. 'userid' => $userid,
  13. 'password' => $password
  14. ];
  15. $rst = $client->loginByAccount($param);
  16. $rst = json_decode($rst, true);
  17. return $rst;
  18. }
  19. }
  20. }