|
@@ -2,6 +2,9 @@
|
|
|
namespace app\workerapi\controller;
|
|
namespace app\workerapi\controller;
|
|
|
|
|
|
|
|
use app\workerapi\lists\GoodsCategoryLists;
|
|
use app\workerapi\lists\GoodsCategoryLists;
|
|
|
|
|
+use app\workerapi\logic\GoodsCategoryLogic;
|
|
|
|
|
+use app\workerapi\validate\GoodsCategoryValidate;
|
|
|
|
|
+use app\workerapi\validate\IssueWorkValidate;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 用户控制器
|
|
* 用户控制器
|
|
@@ -10,10 +13,21 @@ use app\workerapi\lists\GoodsCategoryLists;
|
|
|
*/
|
|
*/
|
|
|
class GoodsCategoryController extends BaseApiController
|
|
class GoodsCategoryController extends BaseApiController
|
|
|
{
|
|
{
|
|
|
- public array $notNeedLogin = ['lists'];
|
|
|
|
|
-
|
|
|
|
|
public function lists()
|
|
public function lists()
|
|
|
{
|
|
{
|
|
|
return $this->dataLists(new GoodsCategoryLists());
|
|
return $this->dataLists(new GoodsCategoryLists());
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ public function getQrCode()
|
|
|
|
|
+ {
|
|
|
|
|
+ $params = (new GoodsCategoryValidate())->post()->goCheck('qrcode', [
|
|
|
|
|
+ 'user_id' => $this->userId,
|
|
|
|
|
+ 'user_info' => $this->userInfo
|
|
|
|
|
+ ]);
|
|
|
|
|
+ $result = GoodsCategoryLogic::getQRCode($params);
|
|
|
|
|
+ if (false === $result) {
|
|
|
|
|
+ return $this->fail(GoodsCategoryLogic::getError());
|
|
|
|
|
+ }
|
|
|
|
|
+ return $this->success('生成二维码', ['qrcode'=>$this->request->domain().'/'.$result], 1, 1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|