|
@@ -0,0 +1,25 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+namespace app\admin\api;
|
|
|
+
|
|
|
+use OneSm\Sm4;
|
|
|
+
|
|
|
+class DataApi{
|
|
|
+
|
|
|
+ public function __construct($userid,$password)
|
|
|
+ {
|
|
|
+ $redis = \app\common\Redis::instance(\think\facade\Config::get("cache.stores.redis.select"));
|
|
|
+ $guid= $redis->get("jjdata_guid");
|
|
|
+ if(!$guid || empty($guid)) {
|
|
|
+ $client = new \SoapClient("http://110.88.153.177:802/ConvergenceServiceBoot/webservice/Authentication?wsdl");
|
|
|
+ $param = [
|
|
|
+ 'userid' => $userid,
|
|
|
+ 'password' => $password
|
|
|
+ ];
|
|
|
+ $rst = $client->loginByAccount($param);
|
|
|
+ $rst = json_decode($rst, true);
|
|
|
+
|
|
|
+ return $rst;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|