1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- <?php
- /**
- * 基本设置
- * Created by PhpStorm.
- * User: XiaoMing
- * Date: 2019/12/6
- * Time: 11:48
- */
- namespace JinDouYun\Controller\System;
- use JinDouYun\Controller\BaseController;
- use JinDouYun\Model\System\MAppVersion;
- use JinDouYun\Model\System\MBasicSetup;
- use Mall\Framework\Core\ErrorCode;
- class ApiBasicSetup extends BaseController
- {
- /**
- * @var MBasicSetup
- */
- private $objMBasicSetup;
- /**
- * @var MAppVersion
- */
- private $objMAppVersion;
- /**
- * TemplateModule constructor.
- * @param bool $isCheckAcl
- * @param bool $isMustLogin
- */
- public function __construct($isCheckAcl = false, $isMustLogin = false)
- {
- parent::__construct($isCheckAcl, $isMustLogin);
- $this->objMBasicSetup = new MBasicSetup($this->onlineEnterpriseId);
- $this->objMAppVersion = new MAppVersion($this->onlineEnterpriseId);
- }
- /**
- * 获取基本设置配置项
- */
- public function getBasicField()
- {
- $field = $this->request->param('field');
- if (empty($field)){
- $this->sendOutput('参数错误', ErrorCode::$paramError );
- }
- $result = $this->objMBasicSetup->getBasicField($field);
- if ($result->isSuccess()) {
- parent::sendOutput($result->getData());
- }
- parent::sendOutput($result->getData(), $result->getErrorCode());
- }
- /**
- * 获取app版本及地址
- */
- public function getVersion()
- {
- $oldVersion = $this->request->param('oldVersion');
- $result = $this->objMAppVersion->getVersion($oldVersion);
- if ($result->isSuccess()) {
- parent::sendOutput($result->getData());
- }
- parent::sendOutput($result->getData(), $result->getErrorCode());
- }
- public function over_examination()
- {
- parent::sendOutput(0);
- }
- }
|