|
...
|
...
|
@@ -10,6 +10,7 @@ |
|
|
|
namespace App\Http\Controllers\Bside;
|
|
|
|
|
|
|
|
use App\Enums\Common\Code;
|
|
|
|
use App\Helper\Common;
|
|
|
|
use App\Helper\Translate;
|
|
|
|
use App\Helper\Wechat;
|
|
|
|
use App\Http\Logic\Bside\User\UserLoginLogic;
|
|
...
|
...
|
@@ -144,4 +145,35 @@ class LoginController extends BaseController |
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), $message . PHP_EOL, FILE_APPEND);
|
|
|
|
$this->response('success');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :生成token
|
|
|
|
* @name :generateToken
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/8/24 17:27
|
|
|
|
*/
|
|
|
|
public function generateToken(){
|
|
|
|
$data = [
|
|
|
|
'phone' => $this->param['phone'],
|
|
|
|
'from_order_id' => $this->param['from_order_id'], // 提单系统 同步到个项目的唯一凭证(数字或者字符串)
|
|
|
|
'timestamp' => time(), // 接收到字符串解密出来以后需要 验证时间不超过30秒 超过时间视为无效授权
|
|
|
|
];
|
|
|
|
$common = new Common();
|
|
|
|
$str = $common->encrypt($data);
|
|
|
|
$this->response('success',Code::SUCCESS,['str'=>$str]);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :解token
|
|
|
|
* @name :globalSo_v6_login
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2023/8/24 17:37
|
|
|
|
*/
|
|
|
|
public function globalSo_v6_login(){
|
|
|
|
$common = new Common();
|
|
|
|
$arr = $common->decrypt($this->param['token']);
|
|
|
|
$this->response('success',Code::SUCCESS,$arr);
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|