45 lines
1.7 KiB
PHP
45 lines
1.7 KiB
PHP
<?php
|
|
/**
|
|
* SAAS应用系统 --- 十年开发经验汇集巨献!
|
|
* ==========================================================
|
|
* Copy right 2020-2050 成都众联思索科技有限公司,保留所有权利。
|
|
* ----------------------------------------------------------
|
|
* 官方网址: https://www.zoomtk.com
|
|
* 这不是自由软件!未经允许不得用于商业目或程序代码摘取及修改。
|
|
* 任何企业和个人未经允许对程序代码以任何形式任何目的再发布传播。
|
|
* 唯一发布渠道www.zoomtk.com;非官方渠道统一视为侵权行为。
|
|
* ==========================================================
|
|
*/
|
|
|
|
namespace addon\saas\shop\controller;
|
|
|
|
use app\model\web\WebSite as WebsiteModel;
|
|
use app\shop\controller\BaseShop;
|
|
|
|
class SaasBase extends BaseShop
|
|
{
|
|
public $AgentInfo = [];
|
|
|
|
public function __construct()
|
|
{//执行父类构造函数
|
|
parent::__construct();
|
|
$website_model = new WebsiteModel();
|
|
$this->AgentInfo = $website_model->getWebSite(['site_id' => $this->site_id, 'is_agent' => 1], '*', false)['data'];
|
|
if (empty($this->AgentInfo)) {
|
|
if (request()->parseUrl() != "saas://shop/Agent/apply") {
|
|
$this->error('您还不是服务商', addon_url('saas/shop/agent/apply'));
|
|
}
|
|
} else if ($this->AgentInfo['status'] != 1 && request()->parseUrl() != "saas://shop/Agent/apply") {
|
|
$this->redirect(addon_url('saas/shop/agent/apply'));
|
|
}
|
|
$this->assign('AgentInfo', $this->AgentInfo);
|
|
}
|
|
|
|
protected $mime = [
|
|
'image/jpeg' => '.jpg',
|
|
'image/png' => '.png',
|
|
'image/gif' => '.gif',
|
|
'image/bmp' => '.bmp',
|
|
'image/webp' => '.webp',
|
|
];
|
|
} |