Commit c461ec25 authored by luhongguang's avatar luhongguang

update:composer update

parent 63ee061e
...@@ -6,8 +6,8 @@ use Api\PhpUtils\Http\Request; ...@@ -6,8 +6,8 @@ use Api\PhpUtils\Http\Request;
class IdCertification class IdCertification
{ {
private const key = '32f9XIsReV4S15Ck_Sa3ky43XgAHUB9v'; private const key = '_v7QkFPgzb887YD6BuBqzHPJMJalJ6Zt';
private const secret = 'usZbQYdI4PQeXhMftsRfHK2msj0DmSIl'; private const secret = 'mDenoicZs2U_wd2jVmQQpCOPeM8jaFRu';
private const kuangshi_ocr_url = 'https://api.megvii.com/faceid/v3/ocridcard'; private const kuangshi_ocr_url = 'https://api.megvii.com/faceid/v3/ocridcard';
private const kuangshi_get_token = 'https://api.megvii.com/faceid/v3/sdk/get_biz_token'; private const kuangshi_get_token = 'https://api.megvii.com/faceid/v3/sdk/get_biz_token';
private const kuangshi_face_compare = 'https://api.megvii.com/faceid/v3/sdk/verify'; private const kuangshi_face_compare = 'https://api.megvii.com/faceid/v3/sdk/verify';
......
...@@ -17,11 +17,6 @@ class SocialCreditCertification ...@@ -17,11 +17,6 @@ class SocialCreditCertification
*/ */
public static function checkSocialCredit(string $social_creadit_code) :bool public static function checkSocialCredit(string $social_creadit_code) :bool
{ {
// todo 长度判断
// if (strlen($social_creadit_code) !== 18) {
// return false;
// }
$one = '159Y';//第一位可以出现的字符 $one = '159Y';//第一位可以出现的字符
$two = '12391';//第二位可以出现的字符 $two = '12391';//第二位可以出现的字符
$str = strtoupper($social_creadit_code); $str = strtoupper($social_creadit_code);
......
...@@ -8,7 +8,9 @@ class Ksyun ...@@ -8,7 +8,9 @@ class Ksyun
private const jinshan_ak = 'AKLTnATdoXUnR72IDSGgN2WSOQ'; //AccessKey private const jinshan_ak = 'AKLTnATdoXUnR72IDSGgN2WSOQ'; //AccessKey
private const jinshan_sk = 'OMw7UAOkrLVsRevuP44ctAlfzriDzUm9+JvOFoYuiSoLgaLJWi+kjUa+4G3EWXFakQ=='; //SecretKey private const jinshan_sk = 'OMw7UAOkrLVsRevuP44ctAlfzriDzUm9+JvOFoYuiSoLgaLJWi+kjUa+4G3EWXFakQ=='; //SecretKey
private const bp_bucket = 'bp-yidian'; private const bp_bucket = 'bp-yidian';
private const bp_image_yidian = 'bp-image_yidian';
private const get_down_from_ksyun = 'http://video-stream-service.int.yidian-inc.com/auth/url-get'; private const get_down_from_ksyun = 'http://video-stream-service.int.yidian-inc.com/auth/url-get';
private const get_down_from_pic_service = 'https://ibp.go2yd.com/imagebp.php'; //来自图片服务
/** /**
* 支持批量 * 支持批量
...@@ -111,6 +113,9 @@ class Ksyun ...@@ -111,6 +113,9 @@ class Ksyun
public static function getBucket($appid,$scenario) :string public static function getBucket($appid,$scenario) :string
{ {
if ($appid === 'merchant-b' || $appid === 'merchant-c') { if ($appid === 'merchant-b' || $appid === 'merchant-c') {
if ($scenario === 'goods') {
return self::bp_image_yidian;
}
return self::bp_bucket; return self::bp_bucket;
} }
return ''; return '';
...@@ -126,4 +131,23 @@ class Ksyun ...@@ -126,4 +131,23 @@ class Ksyun
{ {
return ['bucket' => self::getBucket($appid,$scenario),'objectId' => md5(uniqid(mt_rand(), true))]; return ['bucket' => self::getBucket($appid,$scenario),'objectId' => md5(uniqid(mt_rand(), true))];
} }
/**
* 获取可支持裁剪的图片url
* @param $bucket
* @param $objectid
* @param $wideSize
* @param $highSize
* @param string $type 目前只支持 png webp jpeg
* @wiki http://ydwiki.yidian-inc.com/pages/viewpage.action?pageId=41584585
* @return string
*/
public static function getCutPicUtl($bucket,$objectid,$wideSize,$highSize,$type='jepg')
{
if ($bucket !== self::bp_image_yidian || !in_array($type,['png','webp','jpeg'])) {
//目前只有当bucket == bp-image_yidian 才支持可裁剪
return '';
}
return sprintf(self::get_down_from_pic_service.'?'.'url=%s&%s_%sx%s',$objectid,$type,$wideSize,$highSize);
}
} }
\ No newline at end of file
...@@ -32,7 +32,7 @@ private static $installed = array ( ...@@ -32,7 +32,7 @@ private static $installed = array (
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => '0d55d1b988fb0ef7b715037568463cf4b8fa5e88', 'reference' => '63ee061ebc9d20745b003c183f10caefb377bed6',
'name' => 'yidian/yaf_demo', 'name' => 'yidian/yaf_demo',
), ),
'versions' => 'versions' =>
...@@ -45,7 +45,7 @@ private static $installed = array ( ...@@ -45,7 +45,7 @@ private static $installed = array (
array ( array (
0 => '9999999-dev', 0 => '9999999-dev',
), ),
'reference' => 'd12158b756ba1aee7d019a8d25ca79f49bbe1d8c', 'reference' => '9a1982a7a382d51a8b58e121a63248c258d2ca9f',
), ),
'api/php_utils' => 'api/php_utils' =>
array ( array (
...@@ -335,7 +335,7 @@ private static $installed = array ( ...@@ -335,7 +335,7 @@ private static $installed = array (
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => '0d55d1b988fb0ef7b715037568463cf4b8fa5e88', 'reference' => '63ee061ebc9d20745b003c183f10caefb377bed6',
), ),
), ),
); );
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_services.git", "url": "https://git.yidian-inc.com:8021/bp/php_services.git",
"reference": "d12158b756ba1aee7d019a8d25ca79f49bbe1d8c" "reference": "9a1982a7a382d51a8b58e121a63248c258d2ca9f"
}, },
"require": { "require": {
"api/php_utils": "dev-master", "api/php_utils": "dev-master",
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
"perftools/php-profiler": "^0.18.0", "perftools/php-profiler": "^0.18.0",
"php": "7.2.*" "php": "7.2.*"
}, },
"time": "2021-06-28T03:58:57+00:00", "time": "2021-06-29T03:09:21+00:00",
"default-branch": true, "default-branch": true,
"type": "library", "type": "library",
"installation-source": "source", "installation-source": "source",
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => '0d55d1b988fb0ef7b715037568463cf4b8fa5e88', 'reference' => '63ee061ebc9d20745b003c183f10caefb377bed6',
'name' => 'yidian/yaf_demo', 'name' => 'yidian/yaf_demo',
), ),
'versions' => 'versions' =>
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
array ( array (
0 => '9999999-dev', 0 => '9999999-dev',
), ),
'reference' => 'd12158b756ba1aee7d019a8d25ca79f49bbe1d8c', 'reference' => '9a1982a7a382d51a8b58e121a63248c258d2ca9f',
), ),
'api/php_utils' => 'api/php_utils' =>
array ( array (
...@@ -309,7 +309,7 @@ ...@@ -309,7 +309,7 @@
'aliases' => 'aliases' =>
array ( array (
), ),
'reference' => '0d55d1b988fb0ef7b715037568463cf4b8fa5e88', 'reference' => '63ee061ebc9d20745b003c183f10caefb377bed6',
), ),
), ),
); );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment