53 lines
1.3 KiB
PHP
53 lines
1.3 KiB
PHP
<?php
|
|
/**
|
|
* ThinkShop商城系统 - 团队十年电商经验汇集巨献!
|
|
* =========================================================
|
|
* Copy right 2019-2029 成都云之牛科技有限公司, 保留所有权利。
|
|
* ----------------------------------------------
|
|
* 官方网址: https://www.cdcloudshop.com
|
|
* =========================================================
|
|
*/
|
|
|
|
namespace app\shopapi\controller;
|
|
|
|
use app\model\system\Addon as AddonModel;
|
|
|
|
/**
|
|
* 插件管理
|
|
* @author Administrator
|
|
*
|
|
*/
|
|
class Addon extends BaseApi
|
|
{
|
|
|
|
/**
|
|
* 列表信息
|
|
*/
|
|
public function lists()
|
|
{
|
|
$addon = new AddonModel();
|
|
$list = $addon->getAddonList();
|
|
return $this->response($list);
|
|
}
|
|
|
|
public function addonisexit()
|
|
{
|
|
$res = [];
|
|
$res[ 'virtualcard' ] = addon_is_exit('virtualcard', $this->site_id);// 卡密商品
|
|
$res[ 'form' ] = addon_is_exit('form', $this->site_id);// 卡密商
|
|
|
|
return $this->response($this->success($res));
|
|
}
|
|
|
|
/**
|
|
* 插件是否存在
|
|
*/
|
|
public function isexit()
|
|
{
|
|
$name = $this->params[ 'name' ] ?? '';
|
|
$res = 0;
|
|
if (!empty($name)) $res = addon_is_exit($name, $this->site_id);
|
|
return $this->response($this->success($res));
|
|
}
|
|
|
|
} |