123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?php
- // +----------------------------------------------------------------------
- // | Niucloud-admin 企业快速开发的多应用管理平台
- // +----------------------------------------------------------------------
- // | 官方网址:https://www.niucloud.com
- // +----------------------------------------------------------------------
- // | niucloud团队 版权所有 开源版本可自由商用
- // +----------------------------------------------------------------------
- // | Author: Niucloud Team
- // +----------------------------------------------------------------------
- namespace app\adminapi\controller\shop\site;
- use app\dict\shop\ShopAccountDict;
- use app\service\admin\shop\site\ShopAccountLogService;
- use app\service\admin\shop\site\ShopAccountService;
- use core\base\BaseAdminController;
- use think\Response;
- class ShopAccount extends BaseAdminController
- {
- /**
- * 账户信息
- * @return Response
- */
- public function info():Response
- {
- return success((new ShopAccountService())->getInfo());
- }
- public function lists()
- {
- $data = $this->request->params([
- ['from_type', ''],
- ['related_id', ''],
- ['create_time', []],
- ]);
- return success((new ShopAccountLogService())->getPage($data));
- }
- /**
- * 店铺申请状态
- * @return Response
- */
- public function getAccountType()
- {
- return success(ShopAccountDict::getType());
- }
- /**
- * 店铺收款方式编辑
- */
- public function setShopAccount()
- {
- $data = $this->request->params([
- ['bank_type', ''],
- ['bank_account_name', ''],
- ['bank_account_no', ''],
- ['bank_name', ''],
- ['bank_address', ''],
- ['alipay_name', ''],
- ['alipay_account_no', '']
- ]);
- ( new ShopAccountService() )->edit($data);
- return success('EDIT_SUCCESS');
- }
- /**
- * 检查店铺配置信息是否完善
- */
- public function checkAccountPayInfo()
- {
- $data = [];
- if (( new ShopAccountService() )->check()) {
- $data['is_fill'] = 1;
- } else {
- $data['is_fill'] = 0;
- }
- return success($data);
- }
- }
|