mirror of
https://gitee.com/zongzhige/shopxo.git
synced 2024-12-02 20:10:30 +08:00
应用
This commit is contained in:
parent
1eb0457719
commit
20c4ca905b
85
application/plugins/share/Admin.php
Executable file
85
application/plugins/share/Admin.php
Executable file
@ -0,0 +1,85 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\plugins\share;
|
||||
|
||||
use think\Controller;
|
||||
use app\service\PluginsService;
|
||||
|
||||
/**
|
||||
* 分享 - 管理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class Admin extends Controller
|
||||
{
|
||||
/**
|
||||
* 首页
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2019-02-07T08:21:54+0800
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function index($params = [])
|
||||
{
|
||||
$ret = PluginsService::PluginsData('share');
|
||||
if($ret['code'] == 0)
|
||||
{
|
||||
$this->assign('data', $ret['data']);
|
||||
return $this->fetch('../../../plugins/view/share/admin/index');
|
||||
} else {
|
||||
return $ret['msg'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑页面
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2019-02-07T08:21:54+0800
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function saveinfo($params = [])
|
||||
{
|
||||
$ret = PluginsService::PluginsData('share');
|
||||
if($ret['code'] == 0)
|
||||
{
|
||||
// 是否
|
||||
$is_whether_list = [
|
||||
0 => array('id' => 0, 'name' => '否', 'checked' => true),
|
||||
1 => array('id' => 1, 'name' => '是'),
|
||||
];
|
||||
|
||||
$this->assign('is_whether_list', $is_whether_list);
|
||||
$this->assign('data', $ret['data']);
|
||||
return $this->fetch('../../../plugins/view/share/admin/saveinfo');
|
||||
} else {
|
||||
return $ret['msg'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据保存
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2019-02-07T08:21:54+0800
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function save($params = [])
|
||||
{
|
||||
return PluginsService::PluginsDataSave(['plugins'=>'share', 'data'=>$params]);
|
||||
}
|
||||
}
|
||||
?>
|
80
application/plugins/share/Hook.php
Executable file
80
application/plugins/share/Hook.php
Executable file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ShopXO 国内领先企业级B2C免费开源电商系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2011~2019 http://shopxo.net All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: Devil
|
||||
// +----------------------------------------------------------------------
|
||||
namespace app\plugins\share;
|
||||
|
||||
use think\Controller;
|
||||
use app\service\PluginsService;
|
||||
|
||||
/**
|
||||
* 分享 - 钩子入口
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
class Hook extends Controller
|
||||
{
|
||||
/**
|
||||
* 应用响应入口
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2019-02-09T14:25:44+0800
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function run($params = [])
|
||||
{
|
||||
$ret = '';
|
||||
if(!empty($params['hook_name']))
|
||||
{
|
||||
switch($params['hook_name'])
|
||||
{
|
||||
case 'plugins_css' :
|
||||
$ret = [
|
||||
__MY_ROOT_PUBLIC__.'static/plugins/css/share/iconfont.css',
|
||||
__MY_ROOT_PUBLIC__.'static/plugins/css/share/style.css',
|
||||
];
|
||||
break;
|
||||
|
||||
case 'plugins_js' :
|
||||
$ret = __MY_ROOT_PUBLIC__.'static/plugins/js/share/style.js';
|
||||
break;
|
||||
|
||||
case 'plugins_view_common_bottom' :
|
||||
$ret = $this->html($params);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* 视图
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @datetime 2019-02-06T16:16:34+0800
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public function html($params = [])
|
||||
{
|
||||
// 获取应用数据
|
||||
$ret = PluginsService::PluginsData('share');
|
||||
if($ret['code'] == 0)
|
||||
{
|
||||
$this->assign('data', $ret['data']);
|
||||
return $this->fetch('../../../plugins/view/share/index/content');
|
||||
} else {
|
||||
return $ret['msg'];
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
30
application/plugins/share/config.json
Normal file
30
application/plugins/share/config.json
Normal file
@ -0,0 +1,30 @@
|
||||
{
|
||||
"base":{
|
||||
"plugins":"share",
|
||||
"name":"分享",
|
||||
"logo":"\/static\/upload\/images\/plugins_share\/2019\/04\/19\/1555667271928933.jpg",
|
||||
"author":"Devil",
|
||||
"author_url":"https:\/\/shopxo.net\/",
|
||||
"version":"1.0.0",
|
||||
"desc":"分享组件",
|
||||
"apply_terminal":[
|
||||
"pc",
|
||||
"h5"
|
||||
],
|
||||
"apply_version":[
|
||||
"1.5.0"
|
||||
],
|
||||
"is_home":false
|
||||
},
|
||||
"hook":{
|
||||
"plugins_css":[
|
||||
"app\\plugins\\share\\Hook"
|
||||
],
|
||||
"plugins_js":[
|
||||
"app\\plugins\\share\\Hook"
|
||||
],
|
||||
"plugins_view_common_bottom":[
|
||||
"app\\plugins\\share\\Hook"
|
||||
]
|
||||
}
|
||||
}
|
41
application/plugins/view/share/admin/index.html
Executable file
41
application/plugins/view/share/admin/index.html
Executable file
@ -0,0 +1,41 @@
|
||||
{{include file="public/header" /}}
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<legend>
|
||||
<span class="fs-16">分享</span>
|
||||
<a href="{{:MyUrl('admin/pluginsadmin/index')}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> 返回</a>
|
||||
</legend>
|
||||
|
||||
<div class="share-content">
|
||||
<div class="items">
|
||||
<label>公告内容</label>
|
||||
<div>
|
||||
{{if !empty($data['content'])}}
|
||||
{{$data.content}}
|
||||
{{else /}}
|
||||
无
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="items">
|
||||
<label>是否全局</label>
|
||||
<div>
|
||||
{{if isset($data['is_overall']) and $data['is_overall'] eq 1}}
|
||||
是
|
||||
{{else /}}
|
||||
否
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="{{:PluginsAdminUrl('share', 'admin', 'saveinfo')}}" class="am-btn am-btn-secondary am-radius btn-loading-example am-btn-sm am-btn-block edit-submit">编辑</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
{{include file="public/footer" /}}
|
||||
<!-- footer end -->
|
40
application/plugins/view/share/admin/saveinfo.html
Executable file
40
application/plugins/view/share/admin/saveinfo.html
Executable file
@ -0,0 +1,40 @@
|
||||
{{include file="public/header" /}}
|
||||
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- form start -->
|
||||
<form class="am-form form-validation view-save" action="{{:PluginsAdminUrl('share', 'admin', 'save')}}" method="POST" request-type="ajax-url" request-value="{{:PluginsAdminUrl('share', 'admin', 'index')}}" enctype="multipart/form-data">
|
||||
<legend>
|
||||
<span class="fs-16">分享</span>
|
||||
<a href="{{:PluginsAdminUrl('share', 'admin', 'index')}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> 返回</a>
|
||||
</legend>
|
||||
|
||||
<div class="am-form-group am-form-file">
|
||||
<label class="block">公告内容<span class="am-form-group-label-tips">空则不显示</span></label>
|
||||
<textarea rows="3" name="content" class="am-radius am-field-valid" placeholder="公告内容" data-validation-message="请填写公告内容">{{if !empty($data['content'])}}{{$data.content}}{{/if}}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>是否全局<span class="am-form-group-label-tips">默认首页</span></label>
|
||||
<div>
|
||||
{{foreach $is_whether_list as $v}}
|
||||
<label class="am-radio-inline m-r-10">
|
||||
<input type="radio" name="is_overall" value="{{$v.id}}" {{if isset($data['is_overall']) and $data['is_overall'] eq $v['id']}}checked="checked"{{else /}}{{if !isset($data['is_overall']) and isset($v['checked']) and $v['checked'] eq true}}checked="checked"{{/if}}{{/if}} data-am-ucheck /> {{$v.name}}
|
||||
</label>
|
||||
{{/foreach}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group am-form-group-refreshing">
|
||||
<button type="submit" class="am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100" data-am-loading="{loadingText:'处理中...'}">保存</button>
|
||||
</div>
|
||||
</form>
|
||||
<!-- form end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
<!-- footer start -->
|
||||
{{include file="public/footer" /}}
|
||||
<!-- footer end -->
|
19
application/plugins/view/share/index/content.html
Executable file
19
application/plugins/view/share/index/content.html
Executable file
@ -0,0 +1,19 @@
|
||||
<div class="plugins-share">
|
||||
<ul>
|
||||
<li class="share-sian">
|
||||
<span class="icon iconfont icon-sina"></span>
|
||||
</li>
|
||||
<li class="share-qq">
|
||||
<span class="icon iconfont icon-qq"></span>
|
||||
</li>
|
||||
<li class="share-url">
|
||||
<span class="icon iconfont icon-url"></span>
|
||||
</li>
|
||||
<li class="share-qq-space">
|
||||
<span class="icon iconfont icon-qq-space"></span>
|
||||
</li>
|
||||
<li class="share-weixin">
|
||||
<span class="icon iconfont icon-weixin"></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
@ -50,17 +50,20 @@ return array (
|
||||
array (
|
||||
0 => 'app\\plugins\\commonrightnavigation\\Hook',
|
||||
1 => 'app\\plugins\\commononlineservice\\Hook',
|
||||
2 => 'app\\plugins\\share\\Hook',
|
||||
),
|
||||
'plugins_js' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\commonrightnavigation\\Hook',
|
||||
1 => 'app\\plugins\\commononlineservice\\Hook',
|
||||
2 => 'app\\plugins\\share\\Hook',
|
||||
),
|
||||
'plugins_view_common_bottom' =>
|
||||
array (
|
||||
0 => 'app\\plugins\\commonrightnavigation\\Hook',
|
||||
1 => 'app\\plugins\\commononlineservice\\Hook',
|
||||
2 => 'app\\plugins\\expressforkdn\\Hook',
|
||||
3 => 'app\\plugins\\share\\Hook',
|
||||
),
|
||||
'plugins_service_navigation_header_handle' =>
|
||||
array (
|
||||
|
File diff suppressed because one or more lines are too long
27
public/static/plugins/css/share/admin.css
Executable file
27
public/static/plugins/css/share/admin.css
Executable file
@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 首页
|
||||
*/
|
||||
.share-content .items {
|
||||
margin: 10px 0 20px 0;
|
||||
border-bottom: 1px dashed #f1f1f1;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.share-content .edit-submit {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑页面
|
||||
*/
|
||||
ul.plugins-images-view li {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.form-date input {
|
||||
width: 30% !important;
|
||||
display: -webkit-inline-box !important;
|
||||
}
|
||||
|
||||
.form-date span {
|
||||
vertical-align: middle;
|
||||
}
|
41
public/static/plugins/css/share/iconfont.css
Normal file
41
public/static/plugins/css/share/iconfont.css
Normal file
@ -0,0 +1,41 @@
|
||||
@font-face {font-family: "iconfont";
|
||||
src: url('iconfont.eot?t=1555666682427'); /* IE9 */
|
||||
src: url('iconfont.eot?t=1555666682427#iefix') format('embedded-opentype'), /* IE6-IE8 */
|
||||
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAjAAAsAAAAADzQAAAhzAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDXgqRDI1HATYCJAMcCxAABCAFhG0HVRuUDKOinNL1yf55kLlpfFlae1EURRMC+eutF49ljykryv2Ba3Efwff7ve459z4IoUsUoCQZ9oBCRcVlolNA1boaW1tVXeEqFBvxh6eb/y54Qr5JrcnlwWHi5e3quj5EtG9O6rRoLLBlPRLYLvL6HZ+SNVklK4R1iUAw/30P/N+OnTiW+h1AVfYu0WGROaqgAQ8oqqjORzvfbKIDpSlvGZturwKzsfs3Exi2KB50oirVApqKqAOKHszGNkCzWNQAYuj1rceJdSg+I+vzY14AfFK+P/5LDhqpKciBZ/fKTiD5BV5fNWQwRKMEIE3PhetmFGwB6lX3ztP4AoAm3mSi4Y1JrgDjeqmFH3THubPc5T3811cLaztZHsbpP3ikqmiFhmiBZvQEvYu3/AICn+RXHJ/Kryw+hV/lfFp+811CH0tB0qseOjxhHMtAfgPKawSzLdYblSPtCS1epzLTmKwgCJpSPQXptNB9+7PTqILzF1LpdDMSicHwSaIH/bQzRDjFS4GhMlfKh+MaJgQh6Zq+gjGBMDE8bQsjKoTGmB7hPPjFDaDtYu9WhJQv5/kVoPUFB/raAsOD+4GcmiZWMCQUAeM0v4LjjV4USth4A6vb+dAifwq0ifHIHi+Pb+bE9SDrJID6M6ZhnIzdil3+2BjuPTPFDnqI1YootZH2vZDYFCXeZnNDSIZvJhal6yWX5yf3mdTboqrnqQ/t30uaIQkd9nlVrzhnmsgXVE3vPiGMRqETz97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ff'),
|
||||
url('iconfont.ttf?t=1555666682427') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
|
||||
url('iconfont.svg?t=1555666682427#iconfont') format('svg'); /* iOS 4.1- */
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-sina:before {
|
||||
content: "\e71d";
|
||||
}
|
||||
|
||||
.icon-qq:before {
|
||||
content: "\e600";
|
||||
}
|
||||
|
||||
.icon-url:before {
|
||||
content: "\e639";
|
||||
}
|
||||
|
||||
.icon-qq-space:before {
|
||||
content: "\e62b";
|
||||
}
|
||||
|
||||
.icon-share:before {
|
||||
content: "\e9d1";
|
||||
}
|
||||
|
||||
.icon-weixin:before {
|
||||
content: "\e64e";
|
||||
}
|
||||
|
15
public/static/plugins/css/share/style.css
Normal file
15
public/static/plugins/css/share/style.css
Normal file
@ -0,0 +1,15 @@
|
||||
.plugins-share {
|
||||
|
||||
}
|
||||
.plugins-share ul {
|
||||
padding: 10px;
|
||||
background: #333;
|
||||
overflow: hidden;
|
||||
}
|
||||
.plugins-share ul li {
|
||||
float: left;
|
||||
}
|
||||
.plugins-share ul li .iconfont {
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
}
|
0
public/static/plugins/js/share/style.js
Normal file
0
public/static/plugins/js/share/style.js
Normal file
Binary file not shown.
After Width: | Height: | Size: 18 KiB |
Loading…
Reference in New Issue
Block a user