提交 ac736d82 编写于 作者: W wangchunsheng

2022

上级
svn/*
\ No newline at end of file
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2021-04-27 03:10:53
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-05-08 17:33:26
*/
namespace addons\diandi_ai;
use common\components\addons\AddonsAsset;
class AutocompleteAsset extends AddonsAsset
{
}
# 欢迎使用店滴 AI
店滴AI,人脸数据的维护与挖掘,可以快速搭建基于人脸数据,软硬件交互场景业务的免费开源框架。封装了常用的表单组件、权限控制、集团化SAAS模式, 实现了模块化开发,人脸库维护、人脸智能识别、百度壁虎硬件智能控制、大数据采集的AI开源框架。
## 官方地址
##### 官方网址:[http://www.wayfirer.com/](http://www.wayfirer.com/ "http://www.wayfirer.com/")
##### 接口地址:[http://www.wayfirer.com//index.php?r=doc](http://www.wayfirer.com//index.php?r=doc "http://www.wayfirer.com//index.php?r=doc")
##### 后台代码 GIT:[https://gitee.com/wayfiretech_admin/diandi](https://gitee.com/wayfiretech_admin/diandi "https://gitee.com/wayfiretech_admin/diandi")
##### 前台uniapp框架 (https://gitee.com/wayfiretech_admin/diandi_vue)
#### 官方媒介
- 点击链接加入群聊【店滴AI应用开源系统】:https://jq.qq.com/?_wv=1027&k=4d2Rl2lc
| qq群 ![enter image description here](https://images.gitee.com/uploads/images/2021/0324/215601_1a43562c_866769.png "qq_code.png") | 微信公众号 ![enter image description here](https://images.gitee.com/uploads/images/2021/0324/215919_0429f2fb_866769.jpeg "wechat_code.jpg") |
|---|---|
|抖音 ![enter image description here](https://images.gitee.com/uploads/images/2021/0324/220613_f34d5210_866769.jpeg "dou_code.jpg") | 企业微信![enter image description here](https://images.gitee.com/uploads/images/2021/0324/220531_f42a8098_866769.jpeg "qiye_code.jpg") |
# 特性
- 使用稳定的 YII 框架,优化处理开发过程,开发体验如 tp 一样顺滑。
- 支持多层权限管控,路由权限,数据权限,菜单权限,集团权限,商户权限,扩展功能权限随意搭配调度
- 基于 swoole 协程化,定时任务调度,im 聊天环境支持,系统接口支持协程,应对高并发
- 开源百度 ai 接口对接,完成人脸库维护,人脸库创建,人脸库在线识别,人脸会员建立
- 多模块可安装,便于迅速扩展业务,支持横向纵向双向扩展业务需求
- 后台支持多种开发模式,php 混合开发,element-ui 的 vue 开发模式,纯 html 的传统开发都支持
- 表单多样,除 yii 自身的表单组件,系统还对表单做了丰富,支持一句话配置万能表单
# 环境准备:
php>=7.2
redis
git 工具下载:https://git-scm.com/downloads
composer https://www.phpcomposer.com/
composer建议使用阿里镜像 https://developer.aliyun.com/composer
# 第一步:git 下载代码
```
git clone https://gitee.com/wayfiretech_admin/diandi.git
```
# 第二步:更新 composer 扩展
```
cd 你的文件路径
composer update
```
# 第三步:建立数据库并完成配置
```
cd common\config
vim common\config\main-local.php
```
```
<?php
/**
* @Author: Wang Chunsheng 2192138785@qq.com
* @Date: 2020-03-12 20:12:31
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-04-09 18:25:50
*/
return [
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=netos',
'username' => 'root',
'password' => 'root',
'charset' => 'utf8',
'attributes' => [
PDO::ATTR_STRINGIFY_FETCHES => false,
PDO::ATTR_EMULATE_PREPARES => false,
],
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'viewPath' => '@common/mail',
// send all mails to a file by default. You have to set
// 'useFileTransport' to false and configure a transport
// for the mailer to send real emails.
'useFileTransport' => true,
],
],
'language' => 'zh-CN',
];
```
# Nginx 部署配置
首先解析网站到 frontend\web,然后配置 nginx 如下:
```
server {
listen 80;
server_name www.ai.com;
root "D:/www/firetech/frontend/web";
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
add_header Access-Control-Allow-Headers X-Requested-With;
location / {
index index.php index.html error/index.html;
error_page 400 /error/400.html;
error_page 403 /error/403.html;
error_page 404 /error/404.html;
error_page 500 /error/500.html;
error_page 501 /error/501.html;
error_page 502 /error/502.html;
error_page 503 /error/503.html;
error_page 504 /error/504.html;
error_page 505 /error/505.html;
error_page 506 /error/506.html;
error_page 507 /error/507.html;
error_page 509 /error/509.html;
error_page 510 /error/510.html;
include D:/www/firetech/frontend/web/nginx.htaccess;
autoindex off;
}
location ~ \.php(.*)$ {
fastcgi_pass 127.0.0.1:9001;
fastcgi_index index.php;
fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
include fastcgi_params;
}
location /backend {
index index.php index.html;
if (!-e $request_filename)
{
rewrite ^/backend/(.*)$ /backend/index.php last;
}
}
location /api {
index index.php index.html;
if (!-e $request_filename)
{
rewrite ^/api/(.*)$ /api/index.php last;
}
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
}
}
```
# 特别鸣谢
感谢以下的项目,排名不分先后
- Yii:http://www.yiiframework.com
- EasyWechat:https://www.easywechat.com
- Bootstrap:http://getbootstrap.com
- AdminLTE:https://adminlte.io
- Vue: https://vuejs.org/
- vue-ele-form: https://github.com/dream2023/vue-ele-form
- element-ui: https://element.eleme.cn/
- 百度ai:https://ai.baidu.com/
\ No newline at end of file
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2021-09-16 14:45:22
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-09-22 12:20:02
*/
namespace addons\diandi_ai;
use common\components\addons\AddonsModule;
/**
* diandi_dingzuo module definition class.
*/
class admin extends AddonsModule
{
/**
* {@inheritdoc}
*/
public $controllerNamespace = "addons\diandi_ai\admin";
/**
* {@inheritdoc}
*/
public function init()
{
parent::init();
}
}
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2021-01-20 22:06:32
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2022-02-08 17:13:09
*/
namespace addons\diandi_ai\admin;
use admin\controllers\AController;
/**
* Default controller for the `diandi_task` module.
*/
class DefaultController extends AController
{
public $modelClass = '';
/**
* Renders the index view for the module.
*
* @return string
*/
public function actionIndex()
{
global $_GPC;
}
}
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2020-12-23 01:01:43
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2020-12-23 01:01:43
*/
namespace addons\diandi_ai;
use common\components\addons\AddonsModule;
/**
* diandi_dingzuo module definition class.
*/
class api extends AddonsModule
{
/**
* {@inheritdoc}
*/
public $controllerNamespace = "addons\diandi_ai\api";
/**
* {@inheritdoc}
*/
public function init()
{
parent::init();
}
}
此差异已折叠。
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2021-01-23 15:07:06
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-01-25 19:36:24
*/
namespace addons\diandi_ai\api;
use api\controllers\AController;
class SpeechController extends AController
{
public $modelClass = '';
public function actionIndex()
{
}
}
?>
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2020-09-19 08:47:26
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-01-01 13:57:36
*/
namespace addons\diandi_ai\backend;
use backend\controllers\BaseController;
use addons\diandi_ai\models\DdAiApplications;
use addons\diandi_ai\models\searchs\DdAiApplicationsSearch;
use Yii;
use yii\filters\VerbFilter;
use yii\web\NotFoundHttpException;
/**
* DdAiApplicationsController implements the CRUD actions for DdAiApplications model.
*/
class ApplicationsController extends BaseController
{
/**
* {@inheritdoc}
*/
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
/**
* Lists all DdAiApplications models.
*
* @return mixed
*/
public function actionIndex()
{
$searchModel = new DdAiApplicationsSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single DdAiApplications model.
*
* @param int $id
*
* @return mixed
*
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}
/**
* Creates a new DdAiApplications model.
* If creation is successful, the browser will be redirected to the 'view' page.
*
* @return mixed
*/
public function actionCreate()
{
$model = new DdAiApplications();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
}
return $this->render('create', [
'model' => $model,
]);
}
/**
* Updates an existing DdAiApplications model.
* If update is successful, the browser will be redirected to the 'view' page.
*
* @param int $id
*
* @return mixed
*
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
}
return $this->render('update', [
'model' => $model,
]);
}
/**
* Deletes an existing DdAiApplications model.
* If deletion is successful, the browser will be redirected to the 'index' page.
*
* @param int $id
*
* @return mixed
*
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['index']);
}
/**
* Finds the DdAiApplications model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
*
* @param int $id
*
* @return DdAiApplications the loaded model
*
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = DdAiApplications::findOne($id)) !== null) {
return $model;
}
throw new NotFoundHttpException('The requested page does not exist.');
}
}
<?php
/**
* @Author: Wang Chunsheng 2192138785@qq.com
* @Date: 2020-03-28 23:43:29
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-01-23 11:19:20
*/
namespace addons\diandi_ai\backend;
use backend\controllers\BaseController;
use addons\diandi_ai\models\forms\Baidu;
use diandi\addons\models\Bloc;
use Yii;
/**
* Class SiteController.
*/
class ConfigController extends BaseController
{
public $modelSearchName = "";
public function actions()
{
global $_GPC;
$bloc_id = Yii::$app->params['bloc_id'];
$bloc = Bloc::findOne($bloc_id);
}
public function actionBaidu()
{
global $_GPC;
$model = new Baidu();
$bloc_id = Yii::$app->params['bloc_id'];
if (Yii::$app->request->isPost) {
$model->load($_GPC);
$Res = $model->saveConf($bloc_id);
if ($Res['code'] == 200) {
Yii::$app->session->setFlash('success', $Res['message']);
} else {
Yii::$app->session->setFlash('error', $Res['message']);
}
} else {
$model->getConf($bloc_id);
}
return $this->render('baidu', [
'model' => $model,
]);
}
}
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2020-09-19 08:47:51
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-03-24 21:16:43
*/
namespace addons\diandi_ai\backend;
use backend\controllers\BaseController;
use common\services\common\AddonsService;
use Yii;
/**
* Default controller for the `diandi_ai` module.
*/
class DefaultController extends BaseController
{
/**
* Renders the index view for the module.
*
* @return string
*/
public function actionIndex()
{
global $_GPC;
$info = AddonsService::getAddonsInfo('diandi_ai');
return $this->render('index', [
'info' => $info,
]);
}
}
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2020-09-19 08:47:37
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2020-09-19 09:37:54
*/
namespace addons\diandi_ai\backend;
use backend\controllers\BaseController;
use addons\diandi_ai\models\DdAiFaces;
use addons\diandi_ai\models\searchs\DdAiFacesSearch;
use addons\diandi_ai\models\searchs\DdAiMemberSearch;
use Yii;
use yii\filters\VerbFilter;
use yii\web\BadRequestHttpException;
use yii\web\NotFoundHttpException;
/**
* DdAiFacesController implements the CRUD actions for DdAiFaces model.
*/
class FacesController extends BaseController
{
/**
* {@inheritdoc}
*/
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
/**
* Lists all DdAiFaces models.
*
* @return mixed
*/
public function actionIndex()
{
$searchModel = new DdAiFacesSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single DdAiFaces model.
*
* @param int $id
*
* @return mixed
*
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}
/**
* Creates a new DdAiFaces model.
* If creation is successful, the browser will be redirected to the 'view' page.
*
* @return mixed
*/
public function actionCreate()
{
$model = new DdAiFaces();
if (Yii::$app->request->isPost) {
$data = Yii::$app->request->post();
if ($model->load($data) && $model->save()) {
$model->addUser($data['DdAiFaces']['face_image'], $data['DdAiFaces']['ai_group_id'], $data['DdAiFaces']['ai_user_id']);
return $this->redirect(['view', 'id' => $model->id]);
} else {
$message = $model->getErrors();
throw new BadRequestHttpException($message);
}
}
return $this->render('create', [
'model' => $model,
]);
}
public function actionUsers()
{
$searchModel = new DdAiMemberSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->renderAjax('users', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Updates an existing DdAiFaces model.
* If update is successful, the browser will be redirected to the 'view' page.
*
* @param int $id
*
* @return mixed
*
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if (Yii::$app->request->isPost) {
$data = Yii::$app->request->post();
if ($model->load($data) && $model->save()) {
$model->updateUser($data['DdAiFaces']['face_image'], $data['DdAiFaces']['ai_group_id'], $data['DdAiFaces']['ai_user_id']);
return $this->redirect(['view', 'id' => $model->id]);
} else {
$message = $model->getErrors();
throw new BadRequestHttpException($message);
}
}
return $this->render('update', [
'model' => $model,
]);
}
/**
* Deletes an existing DdAiFaces model.
* If deletion is successful, the browser will be redirected to the 'index' page.
*
* @param int $id
*
* @return mixed
*
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionDelete($id)
{
$model = $this->findModel($id);
$group_id = $model->ai_group_id;
$faceToken = $model->face_token;
$ai_user_id = $model->ai_user_id;
$res = $model->faceDelete($ai_user_id, $group_id, $faceToken);
if ($res['error_code'] == 0) {
$this->findModel($id)->delete();
} else {
$message = Yii::$app->params['aierror'][$res['error_code']];
throw new BadRequestHttpException($message);
}
return $this->redirect(['index']);
}
/**
* Finds the DdAiFaces model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
*
* @param int $id
*
* @return DdAiFaces the loaded model
*
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = DdAiFaces::findOne($id)) !== null) {
return $model;
}
throw new NotFoundHttpException('The requested page does not exist.');
}
}
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2020-09-19 08:47:40
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2020-09-19 09:38:10
*/
namespace addons\diandi_ai\backend;
use backend\controllers\BaseController;
use addons\diandi_ai\models\DdAiGroups;
use addons\diandi_ai\models\searchs\DdAiGroupsSearch;
use Yii;
use yii\filters\VerbFilter;
use yii\web\BadRequestHttpException;
use yii\web\NotFoundHttpException;
/**
* DdAiGroupsController implements the CRUD actions for DdAiGroups model.
*/
class GroupsController extends BaseController
{
/**
* {@inheritdoc}
*/
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
/**
* Lists all DdAiGroups models.
*
* @return mixed
*/
public function actionIndex()
{
$searchModel = new DdAiGroupsSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single DdAiGroups model.
*
* @param int $id
*
* @return mixed
*
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}
/**
* Creates a new DdAiGroups model.
* If creation is successful, the browser will be redirected to the 'view' page.
*
* @return mixed
*/
public function actionCreate()
{
$model = new DdAiGroups();
if (Yii::$app->request->isPost) {
if ($model->load(Yii::$app->request->post()) && $model->save()) {
$model->groupAdd($model->id);
return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->error($model, 'index');
}
}
return $this->render('create', [
'model' => $model,
]);
}
/**
* Updates an existing DdAiGroups model.
* If update is successful, the browser will be redirected to the 'view' page.
*
* @param int $id
*
* @return mixed
*
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
}
return $this->render('update', [
'model' => $model,
]);
}
/**
* Deletes an existing DdAiGroups model.
* If deletion is successful, the browser will be redirected to the 'index' page.
*
* @param int $id
*
* @return mixed
*
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionDelete($id)
{
$model = new DdAiGroups();
$list = $model->getGroupUsers($id);
$user_id_list = $list['result']['user_id_list'];
if (!empty($user_id_list)) {
$message = '该用户组有用户,不能删除';
throw new BadRequestHttpException($message);
}
$model->groupDelete($id);
$this->findModel($id)->delete();
return $this->redirect(['index']);
}
/**
* Finds the DdAiGroups model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
*
* @param int $id
*
* @return DdAiGroups the loaded model
*
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = DdAiGroups::findOne($id)) !== null) {
return $model;
}
throw new NotFoundHttpException('The requested page does not exist.');
}
}
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2020-09-19 08:47:49
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2020-09-19 09:38:33
*/
namespace addons\diandi_ai\backend;
use backend\controllers\BaseController;
use addons\diandi_ai\models\DdAiGroups;
use addons\diandi_ai\models\DdAiMember;
use addons\diandi_ai\models\searchs\DdAiMemberSearch;
use Yii;
use yii\filters\VerbFilter;
use yii\web\NotFoundHttpException;
/**
* DdAiMemberController implements the CRUD actions for DdAiMember model.
*/
class MemberController extends BaseController
{
/**
* {@inheritdoc}
*/
public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['POST'],
],
],
];
}
/**
* Lists all DdAiMember models.
*
* @return mixed
*/
public function actionIndex()
{
$searchModel = new DdAiMemberSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single DdAiMember model.
*
* @param int $id
*
* @return mixed
*
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}
/**
* Creates a new DdAiMember model.
* If creation is successful, the browser will be redirected to the 'view' page.
*
* @return mixed
*/
public function actionCreate()
{
$model = new DdAiMember();
$ai_groups = DdAiGroups::find()->asArray()->all();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->user_id]);
}
return $this->render('create', [
'model' => $model,
'ai_groups' => $ai_groups,
]);
}
/**
* Updates an existing DdAiMember model.
* If update is successful, the browser will be redirected to the 'view' page.
*
* @param int $id
*
* @return mixed
*
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->user_id]);
}
return $this->render('update', [
'model' => $model,
]);
}
/**
* Deletes an existing DdAiMember model.
* If deletion is successful, the browser will be redirected to the 'index' page.
*
* @param int $id
*
* @return mixed
*
* @throws NotFoundHttpException if the model cannot be found
*/
public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['index']);
}
/**
* Finds the DdAiMember model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
*
* @param int $id
*
* @return DdAiMember the loaded model
*
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($id)
{
if (($model = DdAiMember::findOne($id)) !== null) {
return $model;
}
throw new NotFoundHttpException('The requested page does not exist.');
}
}
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2021-01-22 16:28:10
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-01-22 16:47:11
*/
/*
* Copyright (c) 2017 Baidu.com, Inc. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* Http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace addons\diandi_ai\components\baidu;
use addons\diandi_ai\components\lib\AipBase;
class AipBodyAnalysis extends AipBase
{
/**
* 人体关键点识别 body_analysis api url
* @var string
*/
private $bodyAnalysisUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v1/body_analysis';
/**
* 人体检测与属性识别 body_attr api url
* @var string
*/
private $bodyAttrUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v1/body_attr';
/**
* 人流量统计 body_num api url
* @var string
*/
private $bodyNumUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v1/body_num';
/**
* 手势识别 gesture api url
* @var string
*/
private $gestureUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v1/gesture';
/**
* 人像分割 body_seg api url
* @var string
*/
private $bodySegUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v1/body_seg';
/**
* 驾驶行为分析 driver_behavior api url
* @var string
*/
private $driverBehaviorUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v1/driver_behavior';
/**
* 人流量统计-动态版 body_tracking api url
* @var string
*/
private $bodyTrackingUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v1/body_tracking';
/**
* 人体关键点识别接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function bodyAnalysis($image, $options=array())
{
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->bodyAnalysisUrl, $data);
}
/**
* 人体检测与属性识别接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* type gender,<br>age,<br>lower_wear,<br>upper_wear,<br>headwear,<br>glasses,<br>upper_color,<br>lower_color,<br>cellphone,<br>upper_wear_fg,<br>upper_wear_texture,<br>lower_wear_texture,<br>orientation,<br>umbrella,<br>bag,<br>smoke,<br>vehicle,<br>carrying_item,<br>upper_cut,<br>lower_cut,<br>occlusion &#124; 1)可选值说明:<br>gender-性别,<br>age-年龄阶段,<br>lower_wear-下身服饰,<br>upper_wear-上身服饰,<br>headwear-是否戴帽子,<br>glasses-是否戴眼镜,<br>upper_color-上身服饰颜色,<br>lower_color-下身服饰颜色,<br>cellphone-是否使用手机,<br>upper_wear_fg-上身服饰细分类,<br>upper_wear_texture-上身服饰纹理,<br>orientation-身体朝向,<br>umbrella-是否撑伞;<br>bag-背包,<br>smoke-是否吸烟,<br>vehicle-交通工具,<br>carrying_item-是否有手提物,<br>upper_cut-上方截断,<br>lower_cut-下方截断,<br>occlusion-遮挡<br>2)type 参数值可以是可选值的组合,用逗号分隔;**如果无此参数默认输出全部20个属性**
* @return array
*/
public function bodyAttr($image, $options=array())
{
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->bodyAttrUrl, $data);
}
/**
* 人流量统计接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* area 特定框选区域坐标,逗号分隔,如‘x1,y1,x2,y2,x3,y3...xn,yn',默认尾点和首点相连做闭合,**此参数为空或无此参数默认识别整个图片的人数**
* show 是否输出渲染的图片,默认不返回,**选true时返回渲染后的图片(base64)**,其它无效值或为空则默认false
* @return array
*/
public function bodyNum($image, $options=array())
{
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->bodyNumUrl, $data);
}
/**
* 手势识别接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function gesture($image, $options=array())
{
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->gestureUrl, $data);
}
/**
* 人像分割接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* type 可以通过设置type参数,自主设置返回哪些结果图,避免造成带宽的浪费<br>1)可选值说明:<br>labelmap - 二值图像,需二次处理方能查看分割效果<br>scoremap - 人像前景灰度图<br>foreground - 人像前景抠图,透明背景<br>2)type 参数值可以是可选值的组合,用逗号分隔;如果无此参数默认输出全部3类结果图
* @return array
*/
public function bodySeg($image, $options=array())
{
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->bodySegUrl, $data);
}
/**
* 驾驶行为分析接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* type smoke,cellphone,<br>not_buckling_up,<br>both_hands_leaving_wheel,<br>not_facing_front |识别的属性行为类别,英文逗号分隔,默认所有属性都识别;<br>smoke //吸烟,<br>cellphone //打手机 ,<br>not_buckling_up // 未系安全带,<br>both_hands_leaving_wheel // 双手离开方向盘,<br>not_facing_front // 视角未看前方
* @return array
*/
public function driverBehavior($image, $options=array())
{
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->driverBehaviorUrl, $data);
}
/**
* 人流量统计-动态版接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param string $dynamic - true:动态人流量统计,返回总人数、跟踪ID、区域进出人数;<br>false:静态人数统计,返回总人数
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* case_id 任务ID(通过case_id区分不同视频流,自拟,不同序列间不可重复即可)
* case_init 每个case的初始化信号,为true时对该case下的跟踪算法进行初始化,为false时重载该case的跟踪状态。当为false且读取不到相应case的信息时,直接重新初始化
* show 否返回结果图(含统计值和跟踪框渲染),默认不返回,选true时返回渲染后的图片(base64),其它无效值或为空则默认false
* area 静态人数统计时,只统计区域内的人,缺省时为全图统计。<br>动态人流量统计时,进出区域的人流会被统计。<br>逗号分隔,如‘x1,y1,x2,y2,x3,y3...xn,yn',按顺序依次给出每个顶点的xy坐标(默认尾点和首点相连),形成闭合多边形区域。<br>服务会做范围(顶点左边需在图像范围内)及个数校验(数组长度必须为偶数,且大于3个顶点)。只支持单个多边形区域,建议设置矩形框,即4个顶点。**坐标取值不能超过图像宽度和高度,比如1280的宽度,坐标值最小建议从1开始,最大到1279**。
* @return array
*/
public function bodyTracking($image, $dynamic, $options=array())
{
$data = array();
$data['image'] = base64_encode($image);
$data['dynamic'] = $dynamic;
$data = array_merge($data, $options);
return $this->request($this->bodyTrackingUrl, $data);
}
}
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2021-01-22 16:28:22
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-01-22 16:47:17
*/
/*
* Copyright (c) 2017 Baidu.com, Inc. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* Http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace addons\diandi_ai\components\baidu;
use addons\diandi_ai\components\baidu\AipImageCensor;
/**
* 内容审核
*/
class AipContentCensor extends AipImageCensor
{
}
此差异已折叠。
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2021-01-22 16:29:28
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-01-22 16:47:36
*/
/*
* Copyright (c) 2017 Baidu.com, Inc. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* Http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace addons\diandi_ai\components\baidu;
use addons\diandi_ai\components\lib\AipBase;
/**
* 黄反识别
*/
class AipImageCensor extends AipBase
{
/**
* antiporn api url
* @var string
*/
private $antiPornUrl = 'https://aip.baidubce.com/rest/2.0/antiporn/v1/detect';
/**
* antiporn gif api url
* @var string
*/
private $antiPornGifUrl = 'https://aip.baidubce.com/rest/2.0/antiporn/v1/detect_gif';
/**
* antiterror api url
* @var string
*/
private $antiTerrorUrl = 'https://aip.baidubce.com/rest/2.0/antiterror/v1/detect';
/**
* @var string
*/
private $faceAuditUrl = 'https://aip.baidubce.com/rest/2.0/solution/v1/face_audit';
/**
* @var string
*/
private $imageCensorCombUrl = 'https://aip.baidubce.com/api/v1/solution/direct/img_censor';
/**
* @var string
*/
private $imageCensorUserDefinedUrl = 'https://aip.baidubce.com/rest/2.0/solution/v1/img_censor/v2/user_defined';
/**
* @var string
*/
private $antiSpamUrl = 'https://aip.baidubce.com/rest/2.0/antispam/v2/spam';
/**
* @var string
*/
private $textCensorUserDefinedUrl = 'https://aip.baidubce.com/rest/2.0/solution/v1/text_censor/v2/user_defined';
/**
* @param string $image 图像读取
* @return array
*/
public function antiPorn($image)
{
$data = array();
$data['image'] = base64_encode($image);
return $this->request($this->antiPornUrl, $data);
}
/**
* @param string $image 图像读取
* @return array
*/
public function multi_antiporn($images)
{
$data = array();
foreach ($images as $image) {
$data[] = array(
'image' => base64_encode($image),
);
}
return $this->multi_request($this->antiPornUrl, $data);
}
/**
* @param string $image 图像读取
* @return array
*/
public function antiPornGif($image)
{
$data = array();
$data['image'] = base64_encode($image);
return $this->request($this->antiPornGifUrl, $data);
}
/**
* @param string $image 图像读取
* @return array
*/
public function antiTerror($image)
{
$data = array();
$data['image'] = base64_encode($image);
return $this->request($this->antiTerrorUrl, $data);
}
/**
* @param string $images 图像读取
* @return array
*/
public function faceAudit($images, $configId='')
{
// 非数组则处理为数组
if (!is_array($images)) {
$images = array(
$images,
);
}
$data = array(
'configId' => $configId,
);
$isUrl = substr(trim($images[0]), 0, 4) === 'http';
if (!$isUrl) {
$arr = array();
foreach ($images as $image) {
$arr[] = base64_encode($image);
}
$data['images'] = implode(',', $arr);
} else {
$urls = array();
foreach ($images as $url) {
$urls[] = urlencode($url);
}
$data['imgUrls'] = implode(',', $urls);
}
return $this->request($this->faceAuditUrl, $data);
}
/**
* @param string $image 图像读取
* @return array
*/
public function imageCensorComb($image, $scenes='antiporn', $options=array())
{
$scenes = !is_array($scenes) ? explode(',', $scenes) : $scenes;
$data = array(
'scenes' => $scenes,
);
$isUrl = substr(trim($image), 0, 4) === 'http';
if (!$isUrl) {
$data['image'] = base64_encode($image);
} else {
$data['imgUrl'] = $image;
}
$data = array_merge($data, $options);
return $this->request($this->imageCensorCombUrl, json_encode($data), array(
'Content-Type' => 'application/json',
));
}
/**
* @param string $image 图像
* @return array
*/
public function imageCensorUserDefined($image)
{
$data = array();
$isUrl = substr(trim($image), 0, 4) === 'http';
if (!$isUrl) {
$data['image'] = base64_encode($image);
} else {
$data['imgUrl'] = $image;
}
return $this->request($this->imageCensorUserDefinedUrl, $data);
}
/**
* @param string $text
* @return array
*/
public function textCensorUserDefined($text)
{
$data = array();
$data['text'] = $text;
return $this->request($this->textCensorUserDefinedUrl, $data);
}
/**
* @param string $content
* @return array
*/
public function antiSpam($content, $options=array())
{
$data = array();
$data['content'] = $content;
$data = array_merge($data, $options);
return $this->request($this->antiSpamUrl, $data);
}
}
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2021-01-22 16:29:33
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-01-22 16:47:39
*/
/*
* Copyright (c) 2017 Baidu.com, Inc. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* Http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace addons\diandi_ai\components\baidu;
use addons\diandi_ai\components\lib\AipBase;
class AipImageClassify extends AipBase {
/**
* 通用物体识别 advanced_general api url
* @var string
*/
private $advancedGeneralUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v2/advanced_general';
/**
* 菜品识别 dish_detect api url
* @var string
*/
private $dishDetectUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v2/dish';
/**
* 车辆识别 car_detect api url
* @var string
*/
private $carDetectUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v1/car';
/**
* logo商标识别 logo_search api url
* @var string
*/
private $logoSearchUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v2/logo';
/**
* logo商标识别—添加 logo_add api url
* @var string
*/
private $logoAddUrl = 'https://aip.baidubce.com/rest/2.0/realtime_search/v1/logo/add';
/**
* logo商标识别—删除 logo_delete api url
* @var string
*/
private $logoDeleteUrl = 'https://aip.baidubce.com/rest/2.0/realtime_search/v1/logo/delete';
/**
* 动物识别 animal_detect api url
* @var string
*/
private $animalDetectUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v1/animal';
/**
* 植物识别 plant_detect api url
* @var string
*/
private $plantDetectUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v1/plant';
/**
* 图像主体检测 object_detect api url
* @var string
*/
private $objectDetectUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v1/object_detect';
/**
* 地标识别 landmark api url
* @var string
*/
private $landmarkUrl = 'https://aip.baidubce.com/rest/2.0/image-classify/v1/landmark';
/**
* 通用物体识别接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* baike_num 返回百科信息的结果数,默认不返回
* @return array
*/
public function advancedGeneral($image, $options=array()){
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->advancedGeneralUrl, $data);
}
/**
* 菜品识别接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* top_num 返回预测得分top结果数,默认为5
* filter_threshold 默认0.95,可以通过该参数调节识别效果,降低非菜识别率.
* baike_num 返回百科信息的结果数,默认不返回
* @return array
*/
public function dishDetect($image, $options=array()){
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->dishDetectUrl, $data);
}
/**
* 车辆识别接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* top_num 返回预测得分top结果数,默认为5
* baike_num 返回百科信息的结果数,默认不返回
* @return array
*/
public function carDetect($image, $options=array()){
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->carDetectUrl, $data);
}
/**
* logo商标识别接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* custom_lib 是否只使用自定义logo库的结果,默认false:返回自定义库+默认库的识别结果
* @return array
*/
public function logoSearch($image, $options=array()){
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->logoSearchUrl, $data);
}
/**
* logo商标识别—添加接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param string $brief - brief,检索时带回。此处要传对应的name与code字段,name长度小于100B,code长度小于150B
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function logoAdd($image, $brief, $options=array()){
$data = array();
$data['image'] = base64_encode($image);
$data['brief'] = $brief;
$data = array_merge($data, $options);
return $this->request($this->logoAddUrl, $data);
}
/**
* logo商标识别—删除接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function logoDeleteByImage($image, $options=array()){
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->logoDeleteUrl, $data);
}
/**
* logo商标识别—删除接口
*
* @param string $contSign - 图片签名(和image二选一,image优先级更高)
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function logoDeleteBySign($contSign, $options=array()){
$data = array();
$data['cont_sign'] = $contSign;
$data = array_merge($data, $options);
return $this->request($this->logoDeleteUrl, $data);
}
/**
* 动物识别接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* top_num 返回预测得分top结果数,默认为6
* baike_num 返回百科信息的结果数,默认不返回
* @return array
*/
public function animalDetect($image, $options=array()){
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->animalDetectUrl, $data);
}
/**
* 植物识别接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* baike_num 返回百科信息的结果数,默认不返回
* @return array
*/
public function plantDetect($image, $options=array()){
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->plantDetectUrl, $data);
}
/**
* 图像主体检测接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* with_face 如果检测主体是人,主体区域是否带上人脸部分,0-不带人脸区域,其他-带人脸区域,裁剪类需求推荐带人脸,检索/识别类需求推荐不带人脸。默认取1,带人脸。
* @return array
*/
public function objectDetect($image, $options=array()){
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->objectDetectUrl, $data);
}
/**
* 地标识别接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function landmark($image, $options=array()){
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->landmarkUrl, $data);
}
}
\ No newline at end of file
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2021-01-22 16:29:38
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-01-22 16:47:43
*/
/*
* Copyright (c) 2017 Baidu.com, Inc. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* Http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace addons\diandi_ai\components\baidu;
use addons\diandi_ai\components\lib\AipBase;
class AipImageProcess extends AipBase
{
/**
* 图像无损放大 image_quality_enhance api url
* @var string
*/
private $imageQualityEnhanceUrl = 'https://aip.baidubce.com/rest/2.0/image-process/v1/image_quality_enhance';
/**
* 图像去雾 dehaze api url
* @var string
*/
private $dehazeUrl = 'https://aip.baidubce.com/rest/2.0/image-process/v1/dehaze';
/**
* 图像对比度增强 contrast_enhance api url
* @var string
*/
private $contrastEnhanceUrl = 'https://aip.baidubce.com/rest/2.0/image-process/v1/contrast_enhance';
/**
* 图像无损放大接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function imageQualityEnhance($image, $options=array())
{
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->imageQualityEnhanceUrl, $data);
}
/**
* 图像去雾接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function dehaze($image, $options=array())
{
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->dehazeUrl, $data);
}
/**
* 图像对比度增强接口
*
* @param string $image - 图像数据,base64编码,要求base64编码后大小不超过4M,最短边至少15px,最长边最大4096px,支持jpg/png/bmp格式
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function contrastEnhance($image, $options=array())
{
$data = array();
$data['image'] = base64_encode($image);
$data = array_merge($data, $options);
return $this->request($this->contrastEnhanceUrl, $data);
}
}
此差异已折叠。
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2021-01-22 16:30:47
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-01-22 16:47:51
*/
/*
* Copyright (c) 2017 Baidu.com, Inc. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* Http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace addons\diandi_ai\components\baidu;
use addons\diandi_ai\components\lib\AipBase;
class AipKg extends AipBase {
/**
* 创建任务 create_task api url
* @var string
*/
private $createTaskUrl = 'https://aip.baidubce.com/rest/2.0/kg/v1/pie/task_create';
/**
* 更新任务 update_task api url
* @var string
*/
private $updateTaskUrl = 'https://aip.baidubce.com/rest/2.0/kg/v1/pie/task_update';
/**
* 获取任务详情 task_info api url
* @var string
*/
private $taskInfoUrl = 'https://aip.baidubce.com/rest/2.0/kg/v1/pie/task_info';
/**
* 以分页的方式查询当前用户所有的任务信息 task_query api url
* @var string
*/
private $taskQueryUrl = 'https://aip.baidubce.com/rest/2.0/kg/v1/pie/task_query';
/**
* 启动任务 task_start api url
* @var string
*/
private $taskStartUrl = 'https://aip.baidubce.com/rest/2.0/kg/v1/pie/task_start';
/**
* 查询任务状态 task_status api url
* @var string
*/
private $taskStatusUrl = 'https://aip.baidubce.com/rest/2.0/kg/v1/pie/task_status';
/**
* 创建任务接口
*
* @param string $name - 任务名字
* @param string $templateContent - json string 解析模板内容
* @param string $inputMappingFile - 抓取结果映射文件的路径
* @param string $outputFile - 输出文件名字
* @param string $urlPattern - url pattern
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* limit_count 限制解析数量limit_count为0时进行全量任务,limit_count&gt;0时只解析limit_count数量的页面
* @return array
*/
public function createTask($name, $templateContent, $inputMappingFile, $outputFile, $urlPattern, $options=array()){
$data = array();
$data['name'] = $name;
$data['template_content'] = $templateContent;
$data['input_mapping_file'] = $inputMappingFile;
$data['output_file'] = $outputFile;
$data['url_pattern'] = $urlPattern;
$data = array_merge($data, $options);
return $this->request($this->createTaskUrl, $data);
}
/**
* 更新任务接口
*
* @param integer $id - 任务ID
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* name 任务名字
* template_content json string 解析模板内容
* input_mapping_file 抓取结果映射文件的路径
* url_pattern url pattern
* output_file 输出文件名字
* @return array
*/
public function updateTask($id, $options=array()){
$data = array();
$data['id'] = $id;
$data = array_merge($data, $options);
return $this->request($this->updateTaskUrl, $data);
}
/**
* 获取任务详情接口
*
* @param integer $id - 任务ID
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function getTaskInfo($id, $options=array()){
$data = array();
$data['id'] = $id;
$data = array_merge($data, $options);
return $this->request($this->taskInfoUrl, $data);
}
/**
* 以分页的方式查询当前用户所有的任务信息接口
*
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* id 任务ID,精确匹配
* name 中缀模糊匹配,abc可以匹配abc,aaabc,abcde等
* status 要筛选的任务状态
* page 页码
* per_page 页码
* @return array
*/
public function getUserTasks($options=array()){
$data = array();
$data = array_merge($data, $options);
return $this->request($this->taskQueryUrl, $data);
}
/**
* 启动任务接口
*
* @param integer $id - 任务ID
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function startTask($id, $options=array()){
$data = array();
$data['id'] = $id;
$data = array_merge($data, $options);
return $this->request($this->taskStartUrl, $data);
}
/**
* 查询任务状态接口
*
* @param integer $id - 任务ID
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function getTaskStatus($id, $options=array()){
$data = array();
$data['id'] = $id;
$data = array_merge($data, $options);
return $this->request($this->taskStatusUrl, $data);
}
}
\ No newline at end of file
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2021-01-22 16:30:55
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-01-22 16:47:54
*/
/*
* Copyright (c) 2017 Baidu.com, Inc. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* Http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
namespace addons\diandi_ai\components\baidu;
use addons\diandi_ai\components\lib\AipBase;
class AipNlp extends AipBase {
/**
* 词法分析 lexer api url
* @var string
*/
private $lexerUrl = 'https://aip.baidubce.com/rpc/2.0/nlp/v1/lexer';
/**
* 词法分析(定制版) lexer_custom api url
* @var string
*/
private $lexerCustomUrl = 'https://aip.baidubce.com/rpc/2.0/nlp/v1/lexer_custom';
/**
* 依存句法分析 dep_parser api url
* @var string
*/
private $depParserUrl = 'https://aip.baidubce.com/rpc/2.0/nlp/v1/depparser';
/**
* 词向量表示 word_embedding api url
* @var string
*/
private $wordEmbeddingUrl = 'https://aip.baidubce.com/rpc/2.0/nlp/v2/word_emb_vec';
/**
* DNN语言模型 dnnlm_cn api url
* @var string
*/
private $dnnlmCnUrl = 'https://aip.baidubce.com/rpc/2.0/nlp/v2/dnnlm_cn';
/**
* 词义相似度 word_sim_embedding api url
* @var string
*/
private $wordSimEmbeddingUrl = 'https://aip.baidubce.com/rpc/2.0/nlp/v2/word_emb_sim';
/**
* 短文本相似度 simnet api url
* @var string
*/
private $simnetUrl = 'https://aip.baidubce.com/rpc/2.0/nlp/v2/simnet';
/**
* 评论观点抽取 comment_tag api url
* @var string
*/
private $commentTagUrl = 'https://aip.baidubce.com/rpc/2.0/nlp/v2/comment_tag';
/**
* 情感倾向分析 sentiment_classify api url
* @var string
*/
private $sentimentClassifyUrl = 'https://aip.baidubce.com/rpc/2.0/nlp/v1/sentiment_classify';
/**
* 文章标签 keyword api url
* @var string
*/
private $keywordUrl = 'https://aip.baidubce.com/rpc/2.0/nlp/v1/keyword';
/**
* 文章分类 topic api url
* @var string
*/
private $topicUrl = 'https://aip.baidubce.com/rpc/2.0/nlp/v1/topic';
/**
* 文本纠错 ecnet api url
* @var string
*/
private $ecnetUrl = 'https://aip.baidubce.com/rpc/2.0/nlp/v1/ecnet';
/**
* 对话情绪识别接口 emotion api url
* @var string
*/
private $emotionUrl = 'https://aip.baidubce.com/rpc/2.0/nlp/v1/emotion';
/**
* 新闻摘要接口 news_summary api url
* @var string
*/
private $newsSummaryUrl = 'https://aip.baidubce.com/rpc/2.0/nlp/v1/news_summary';
/**
* 格式化结果
* @param $content string
* @return mixed
*/
protected function proccessResult($content){
return json_decode(mb_convert_encoding($content, 'UTF8', 'GBK'), true, 512, JSON_BIGINT_AS_STRING);
}
/**
* 词法分析接口
*
* @param string $text - 待分析文本(目前仅支持GBK编码),长度不超过65536字节
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function lexer($text, $options=array()){
$data = array();
$data['text'] = $text;
$data = array_merge($data, $options);
$data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');
return $this->request($this->lexerUrl, $data);
}
/**
* 词法分析(定制版)接口
*
* @param string $text - 待分析文本(目前仅支持GBK编码),长度不超过65536字节
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function lexerCustom($text, $options=array()){
$data = array();
$data['text'] = $text;
$data = array_merge($data, $options);
$data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');
return $this->request($this->lexerCustomUrl, $data);
}
/**
* 依存句法分析接口
*
* @param string $text - 待分析文本(目前仅支持GBK编码),长度不超过256字节
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* mode 模型选择。默认值为0,可选值mode=0(对应web模型);mode=1(对应query模型)
* @return array
*/
public function depParser($text, $options=array()){
$data = array();
$data['text'] = $text;
$data = array_merge($data, $options);
$data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');
return $this->request($this->depParserUrl, $data);
}
/**
* 词向量表示接口
*
* @param string $word - 文本内容(GBK编码),最大64字节
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function wordEmbedding($word, $options=array()){
$data = array();
$data['word'] = $word;
$data = array_merge($data, $options);
$data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');
return $this->request($this->wordEmbeddingUrl, $data);
}
/**
* DNN语言模型接口
*
* @param string $text - 文本内容(GBK编码),最大512字节,不需要切词
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function dnnlm($text, $options=array()){
$data = array();
$data['text'] = $text;
$data = array_merge($data, $options);
$data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');
return $this->request($this->dnnlmCnUrl, $data);
}
/**
* 词义相似度接口
*
* @param string $word1 - 词1(GBK编码),最大64字节
* @param string $word2 - 词1(GBK编码),最大64字节
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* mode 预留字段,可选择不同的词义相似度模型。默认值为0,目前仅支持mode=0
* @return array
*/
public function wordSimEmbedding($word1, $word2, $options=array()){
$data = array();
$data['word_1'] = $word1;
$data['word_2'] = $word2;
$data = array_merge($data, $options);
$data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');
return $this->request($this->wordSimEmbeddingUrl, $data);
}
/**
* 短文本相似度接口
*
* @param string $text1 - 待比较文本1(GBK编码),最大512字节
* @param string $text2 - 待比较文本2(GBK编码),最大512字节
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* model 默认为"BOW",可选"BOW"、"CNN"与"GRNN"
* @return array
*/
public function simnet($text1, $text2, $options=array()){
$data = array();
$data['text_1'] = $text1;
$data['text_2'] = $text2;
$data = array_merge($data, $options);
$data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');
return $this->request($this->simnetUrl, $data);
}
/**
* 评论观点抽取接口
*
* @param string $text - 评论内容(GBK编码),最大10240字节
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* type 评论行业类型,默认为4(餐饮美食)
* @return array
*/
public function commentTag($text, $options=array()){
$data = array();
$data['text'] = $text;
$data = array_merge($data, $options);
$data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');
return $this->request($this->commentTagUrl, $data);
}
/**
* 情感倾向分析接口
*
* @param string $text - 文本内容(GBK编码),最大102400字节
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function sentimentClassify($text, $options=array()){
$data = array();
$data['text'] = $text;
$data = array_merge($data, $options);
$data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');
return $this->request($this->sentimentClassifyUrl, $data);
}
/**
* 文章标签接口
*
* @param string $title - 篇章的标题,最大80字节
* @param string $content - 篇章的正文,最大65535字节
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function keyword($title, $content, $options=array()){
$data = array();
$data['title'] = $title;
$data['content'] = $content;
$data = array_merge($data, $options);
$data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');
return $this->request($this->keywordUrl, $data);
}
/**
* 文章分类接口
*
* @param string $title - 篇章的标题,最大80字节
* @param string $content - 篇章的正文,最大65535字节
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function topic($title, $content, $options=array()){
$data = array();
$data['title'] = $title;
$data['content'] = $content;
$data = array_merge($data, $options);
$data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');
return $this->request($this->topicUrl, $data);
}
/**
* 文本纠错接口
*
* @param string $text - 待纠错文本,输入限制511字节
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* @return array
*/
public function ecnet($text, $options=array()){
$data = array();
$data['text'] = $text;
$data = array_merge($data, $options);
$data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');
return $this->request($this->ecnetUrl, $data);
}
/**
* 对话情绪识别接口接口
*
* @param string $text - 待识别情感文本,输入限制512字节
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* scene default(默认项-不区分场景),talk(闲聊对话-如度秘聊天等),task(任务型对话-如导航对话等),customer_service(客服对话-如电信/银行客服等)
* @return array
*/
public function emotion($text, $options=array()){
$data = array();
$data['text'] = $text;
$data = array_merge($data, $options);
$data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');
return $this->request($this->emotionUrl, $data);
}
/**
* 新闻摘要接口接口
*
* @param string $content - 字符串(限3000字符数以内)字符串仅支持GBK编码,长度需小于3000字符数(即6000字节),请输入前确认字符数没有超限,若字符数超长会返回错误。正文中如果包含段落信息,请使用"\n"分隔,段落信息算法中有重要的作用,请尽量保留
* @param integer $maxSummaryLen - 此数值将作为摘要结果的最大长度。例如:原文长度1000字,本参数设置为150,则摘要结果的最大长度是150字;推荐最优区间:200-500字
* @param array $options - 可选参数对象,key: value都为string类型
* @description options列表:
* title 字符串(限200字符数)字符串仅支持GBK编码,长度需小于200字符数(即400字节),请输入前确认字符数没有超限,若字符数超长会返回错误。标题在算法中具有重要的作用,若文章确无标题,输入参数的“标题”字段为空即可
* @return array
*/
public function newsSummary($content, $maxSummaryLen, $options=array()){
$data = array();
$data['content'] = $content;
$data['max_summary_len'] = $maxSummaryLen;
$data = array_merge($data, $options);
$data = mb_convert_encoding(json_encode($data), 'GBK', 'UTF8');
return $this->request($this->newsSummaryUrl, $data);
}
}
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2021-01-23 00:04:50
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-01-23 00:05:08
*/
namespace addons\diandi_ai\components\lib;
class AipSignOption
{
const EXPIRATION_IN_SECONDS = 'expirationInSeconds';
const HEADERS_TO_SIGN = 'headersToSign';
const TIMESTAMP = 'timestamp';
const DEFAULT_EXPIRATION_IN_SECONDS = 1800;
const MIN_EXPIRATION_IN_SECONDS = 300;
const MAX_EXPIRATION_IN_SECONDS = 129600;
}
\ No newline at end of file
此差异已折叠。
<?php
/**
* @Author: Wang Chunsheng 2192138785@qq.com
* @Date: 2020-04-05 12:09:17
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2020-09-19 11:30:19
*/
return [
// 人脸识别api
[
'class' => 'yii\rest\UrlRule',
'controller' => ['diandi_ai/face'],
'pluralize' => false,
'extraPatterns' => [
'POST detect' => 'detect',
'POST faceverify' => 'faceverify',
'POST searchs' => 'searchs',
'POST multiSearch' => 'multiSearch',
'POST match' => 'match',
'POST addUser' => 'addUser',
'POST faceDelete' => 'faceDelete',
'POST getUser' => 'getUser',
'POST userCopy' => 'userCopy',
'POST groupAdd' => 'groupAdd',
'POST groupDelete' => 'groupDelete',
'POST getGroupList' => 'getGroupList',
'POST personVerify' => 'personVerify',
'POST updateUser' => 'updateUser',
'POST faceGetlist' => 'faceGetlist',
'POST getGroupUsers' => 'getGroupUsers',
'POST deleteUser' => 'deleteUser',
'POST getVersion' => 'getVersion',
'POST setConnectionTimeoutInMillis' => 'setConnectionTimeoutInMillis',
'POST setSocketTimeoutInMillis' => 'setSocketTimeoutInMillis',
'POST setProxies' => 'setProxies',
'POST report' => 'report',
'POST Npost' => 'Npost',
'POST videoSessioncode' => 'videoSessioncode',
],
],
];
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2020-08-01 11:45:12
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2020-08-01 11:45:21
*/
return [];
\ No newline at end of file
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2020-08-01 11:45:29
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2020-08-01 11:45:37
*/
return [];
此差异已折叠。
<?php
/**
* @Author: Wang chunsheng email:2192138785@qq.com
* @Date: 2021-02-28 19:47:35
* @Last Modified by: Wang chunsheng email:2192138785@qq.com
* @Last Modified time: 2021-09-03 14:10:09
*/
namespace addons\diandi_ai;
use common\components\addons\AddonsModule;
use common\helpers\loggingHelper;
use Yii;
/**
* diandi_dingzuo module definition class.
*/
class console extends AddonsModule
{
/**
* {@inheritdoc}
*/
public $controllerNamespace = "addons\diandi_ai\console";
/**
* {@inheritdoc}
*/
public function init()
{
parent::init();
}
}
此差异已折叠。
此差异已折叠。
此差异已折叠。
<manifest xmlns="http://www.wayfirer.com/" versionCode="1.0">
<application>
<title><![CDATA[店滴AI]]></title>
<identifie><![CDATA[diandi_ai]]></identifie>
<version><![CDATA[1.0]]></version>
<type><![CDATA[base]]></type>
<ability><![CDATA[店滴ai]]></ability>
<description><![CDATA[人脸识别,OCR认证,人脸会员等]]></description>
<author><![CDATA[王春生]]></author>
<url><![CDATA[http://bbs.wayfirer.com/]]></url>
</application>
</manifest>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册