应用优化
parent
5d5eb2fbd4
commit
d7c2e32717
|
|
@ -216,5 +216,26 @@ class Pluginsadmin extends Common
|
|||
// 开始处理
|
||||
return PluginsAdminService::PluginsUpload(input());
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用打包
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2019-03-22
|
||||
* @desc description
|
||||
*/
|
||||
public function Download()
|
||||
{
|
||||
// 开始处理
|
||||
$ret = PluginsAdminService::PluginsDownload(input());
|
||||
if(isset($ret['code']) && $ret['code'] != 0)
|
||||
{
|
||||
$this->assign('msg', $ret['msg']);
|
||||
return $this->fetch('public/error');
|
||||
} else {
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -31,6 +31,7 @@
|
|||
<div class="operation">
|
||||
{{if isset($shopxo_is_develop) and $shopxo_is_develop eq true}}
|
||||
<a href="{{:MyUrl('admin/pluginsadmin/saveinfo', array('id'=>$v['id']))}}" class="am-btn am-btn-default am-btn-xs am-radius am-icon-edit" title="编辑"></a>
|
||||
<a href="{{:MyUrl('admin/pluginsadmin/download', array('id'=>$v['id']))}}" class="am-btn am-btn-default am-btn-xs am-radius am-icon-download" title="打包"></a>
|
||||
{{/if}}
|
||||
|
||||
<a href="{{:PluginsAdminUrl($v['plugins'], 'admin', 'index')}}" class="am-btn am-btn-default am-btn-xs am-radius am-icon-gear" title="设置"></a>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
# 问答系统商品 - 应用
|
||||
CREATE TABLE `s_plugins_answers_goods` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||
`goods_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商品id',
|
||||
`add_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `goods_id` (`goods_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='问答系统商品 - 应用';
|
||||
|
||||
# 问答系统轮播图 - 应用
|
||||
CREATE TABLE `s_plugins_answers_slide` (
|
||||
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||
`name` char(60) NOT NULL DEFAULT '' COMMENT '别名',
|
||||
`images_url` char(255) NOT NULL DEFAULT '' COMMENT '图片地址',
|
||||
`url` char(255) NOT NULL DEFAULT '' COMMENT 'url地址',
|
||||
`is_enable` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否启用(0否,1是)',
|
||||
`sort` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
|
||||
`add_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
|
||||
`upd_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `is_enable` (`is_enable`),
|
||||
KEY `sort` (`sort`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC COMMENT='问答系统轮播图 - 应用';
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
# 问答系统商品 - 应用
|
||||
DROP TABLE `s_plugins_answers_goods`;
|
||||
|
||||
# 问答系统轮播图 - 应用
|
||||
DROP TABLE `s_plugins_answers_slide`;
|
||||
|
|
@ -984,5 +984,42 @@ php;
|
|||
|
||||
return DataReturn('安装成功');
|
||||
}
|
||||
|
||||
/**
|
||||
* 应用打包
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2019-03-22
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function PluginsDownload($params = [])
|
||||
{
|
||||
// 请求参数
|
||||
$p = [
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'id',
|
||||
'error_msg' => '操作id有误',
|
||||
],
|
||||
];
|
||||
$ret = ParamsChecked($params, $p);
|
||||
if($ret !== true)
|
||||
{
|
||||
return DataReturn($ret, -1);
|
||||
}
|
||||
|
||||
// 获取应用标记
|
||||
$where = ['id'=>intval($params['id'])];
|
||||
$plugins = Db::name('Plugins')->where($where)->value('plugins');
|
||||
if(empty($plugins))
|
||||
{
|
||||
return DataReturn('应用不存在', -10);
|
||||
}
|
||||
|
||||
// 开始打包
|
||||
return DataReturn('开发中', -10);
|
||||
}
|
||||
}
|
||||
?>
|
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue