Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
______--______
ShopXO
提交
1609c488
ShopXO
项目概览
______--______
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1609c488
编写于
2月 18, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
应用优化
上级
51f26f6b
变更
24
隐藏空白更改
内联
并排
Showing
24 changed file
with
270 addition
and
373 deletion
+270
-373
application/admin/controller/Plugins.php
application/admin/controller/Plugins.php
+1
-23
application/index/controller/Plugins.php
application/index/controller/Plugins.php
+1
-23
application/plugins/commongobacktop/Admin.php
application/plugins/commongobacktop/Admin.php
+9
-14
application/plugins/commongobacktop/Hook.php
application/plugins/commongobacktop/Hook.php
+5
-13
application/plugins/commononlineservice/Admin.php
application/plugins/commononlineservice/Admin.php
+9
-14
application/plugins/commononlineservice/Hook.php
application/plugins/commononlineservice/Hook.php
+11
-47
application/plugins/commonrightnavigation/Admin.php
application/plugins/commonrightnavigation/Admin.php
+9
-14
application/plugins/commonrightnavigation/Hook.php
application/plugins/commonrightnavigation/Hook.php
+15
-101
application/plugins/commontopmaxpicture/Admin.php
application/plugins/commontopmaxpicture/Admin.php
+9
-14
application/plugins/commontopmaxpicture/Hook.php
application/plugins/commontopmaxpicture/Hook.php
+5
-20
application/plugins/commontopnotice/Admin.php
application/plugins/commontopnotice/Admin.php
+9
-14
application/plugins/commontopnotice/Hook.php
application/plugins/commontopnotice/Hook.php
+5
-11
application/plugins/usercentertopnotice/Admin.php
application/plugins/usercentertopnotice/Admin.php
+8
-13
application/plugins/usercentertopnotice/Hook.php
application/plugins/usercentertopnotice/Hook.php
+5
-16
application/plugins/userloginrewardintegral/Admin.php
application/plugins/userloginrewardintegral/Admin.php
+9
-14
application/plugins/view/commongobacktop/index/content.html
application/plugins/view/commongobacktop/index/content.html
+5
-0
application/plugins/view/commononlineservice/index/content.html
...ation/plugins/view/commononlineservice/index/content.html
+30
-0
application/plugins/view/commonrightnavigation/index/content.html
...ion/plugins/view/commonrightnavigation/index/content.html
+87
-0
application/plugins/view/commontopmaxpicture/index/content.html
...ation/plugins/view/commontopmaxpicture/index/content.html
+5
-0
application/plugins/view/commontopnotice/index/content.html
application/plugins/view/commontopnotice/index/content.html
+3
-0
application/plugins/view/usercentertopnotice/index/content.html
...ation/plugins/view/usercentertopnotice/index/content.html
+3
-0
application/service/PluginsAdminService.php
application/service/PluginsAdminService.php
+12
-16
application/tags.php
application/tags.php
+14
-5
config/shopxo.php
config/shopxo.php
+1
-1
未找到文件。
application/admin/controller/Plugins.php
浏览文件 @
1609c488
...
...
@@ -106,29 +106,7 @@ class Plugins extends Common
$this
->
assign
(
'msg'
,
ucfirst
(
$pluginsaction
)
.
' 应用方法未定义'
);
return
$this
->
fetch
(
'public/error'
);
}
$ret
=
$obj
->
$pluginsaction
(
$params
);
// 是否ajax
if
(
IS_AJAX
)
{
return
$ret
;
}
else
{
// 调用应用模板
if
(
isset
(
$ret
[
'code'
]))
{
if
(
$ret
[
'code'
]
==
0
)
{
$this
->
assign
(
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/'
.
$pluginsname
.
'/'
.
$pluginscontrol
.
'/'
.
$pluginsaction
);
}
else
{
$this
->
assign
(
'msg'
,
$ret
[
'msg'
]);
return
$this
->
fetch
(
'public/error'
);
}
}
else
{
$this
->
assign
(
'msg'
,
'应用返回数据格式有误'
);
return
$this
->
fetch
(
'public/error'
);
}
}
return
$obj
->
$pluginsaction
(
$params
);
}
/**
...
...
application/index/controller/Plugins.php
浏览文件 @
1609c488
...
...
@@ -100,29 +100,7 @@ class Plugins extends Common
$this
->
assign
(
'msg'
,
ucfirst
(
$pluginsaction
)
.
' 应用方法未定义'
);
return
$this
->
fetch
(
'public/error'
);
}
$ret
=
$obj
->
$pluginsaction
(
$params
);
// 是否ajax
if
(
IS_AJAX
)
{
return
$ret
;
}
else
{
// 调用应用模板
if
(
isset
(
$ret
[
'code'
]))
{
if
(
$ret
[
'code'
]
==
0
)
{
$this
->
assign
(
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/'
.
$pluginsname
.
'/'
.
$pluginscontrol
.
'/'
.
$pluginsaction
);
}
else
{
$this
->
assign
(
'msg'
,
$ret
[
'msg'
]);
return
$this
->
fetch
(
'public/error'
);
}
}
else
{
$this
->
assign
(
'msg'
,
'应用返回数据格式有误'
);
return
$this
->
fetch
(
'public/error'
);
}
}
return
$obj
->
$pluginsaction
(
$params
);
}
/**
...
...
application/plugins/commongobacktop/Admin.php
浏览文件 @
1609c488
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\plugins\commongobacktop
;
use
think\Controller
;
use
app\service\PluginsService
;
/**
...
...
@@ -19,7 +20,7 @@ use app\service\PluginsService;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Admin
class
Admin
extends
Controller
{
/**
* 首页
...
...
@@ -34,13 +35,10 @@ class Admin
$ret
=
PluginsService
::
PluginsData
(
'commongobacktop'
,
[
'images'
]);
if
(
$ret
[
'code'
]
==
0
)
{
// 数组组装
$data
=
[
'data'
=>
$ret
[
'data'
],
];
return
DataReturn
(
'处理成功'
,
0
,
$data
);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commongobacktop/admin/index'
);
}
else
{
return
$ret
;
return
$ret
[
'msg'
]
;
}
}
...
...
@@ -63,14 +61,11 @@ class Admin
1
=>
array
(
'id'
=>
1
,
'name'
=>
'是'
,
'checked'
=>
true
),
];
// 数组组装
$data
=
[
'is_whether_list'
=>
$is_whether_list
,
'data'
=>
$ret
[
'data'
],
];
return
DataReturn
(
'处理成功'
,
0
,
$data
);
$this
->
assign
(
'is_whether_list'
,
$is_whether_list
);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commongobacktop/admin/saveinfo'
);
}
else
{
return
$ret
;
return
$ret
[
'msg'
]
;
}
}
...
...
application/plugins/commongobacktop/Hook.php
浏览文件 @
1609c488
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\plugins\commongobacktop
;
use
think\Controller
;
use
app\service\PluginsService
;
/**
...
...
@@ -19,7 +20,7 @@ use app\service\PluginsService;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Hook
class
Hook
extends
Controller
{
/**
* 应用响应入口
...
...
@@ -132,10 +133,6 @@ class Hook
// 获取应用数据
$ret
=
PluginsService
::
PluginsData
(
'commongobacktop'
,
[
'images'
]);
// html拼接
$html
=
'<div data-am-smooth-scroll class="am-hide-sm-only">'
;
$content
=
''
;
if
(
$ret
[
'code'
]
==
0
)
{
// 图片是否为空
...
...
@@ -154,16 +151,11 @@ class Hook
}
}
$content
=
'<div id="plugins-commongobacktop" title="回到顶部">'
;
$content
.
=
'<img src="'
.
$ret
[
'data'
][
'images'
]
.
'" />'
;
$content
.
=
'</div>'
;
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commongobacktop/index/content'
);
}
else
{
$content
=
$ret
[
'msg'
];
return
$ret
[
'msg'
];
}
$html
.
=
$content
;
$html
.
=
'</div>'
;
return
$html
;
}
}
?>
\ No newline at end of file
application/plugins/commononlineservice/Admin.php
浏览文件 @
1609c488
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\plugins\commononlineservice
;
use
think\Controller
;
use
app\service\PluginsService
;
/**
...
...
@@ -19,7 +20,7 @@ use app\service\PluginsService;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Admin
class
Admin
extends
Controller
{
/**
* 首页
...
...
@@ -37,13 +38,10 @@ class Admin
// 数据处理
$ret
[
'data'
][
'online_service'
]
=
str_replace
(
"
\n
"
,
'<br />'
,
$ret
[
'data'
][
'online_service'
]);
// 数组组装
$data
=
[
'data'
=>
$ret
[
'data'
],
];
return
DataReturn
(
'处理成功'
,
0
,
$data
);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commononlineservice/admin/index'
);
}
else
{
return
$ret
;
return
$ret
[
'msg'
]
;
}
}
...
...
@@ -66,14 +64,11 @@ class Admin
1
=>
array
(
'id'
=>
1
,
'name'
=>
'是'
,
'checked'
=>
true
),
];
// 数组组装
$data
=
[
'is_whether_list'
=>
$is_whether_list
,
'data'
=>
$ret
[
'data'
],
];
return
DataReturn
(
'处理成功'
,
0
,
$data
);
$this
->
assign
(
'is_whether_list'
,
$is_whether_list
);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commononlineservice/admin/saveinfo'
);
}
else
{
return
$ret
;
return
$ret
[
'msg'
]
;
}
}
...
...
application/plugins/commononlineservice/Hook.php
浏览文件 @
1609c488
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\plugins\commononlineservice
;
use
think\Controller
;
use
app\service\PluginsService
;
/**
...
...
@@ -19,7 +20,7 @@ use app\service\PluginsService;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Hook
class
Hook
extends
Controller
{
/**
* 应用响应入口
...
...
@@ -86,10 +87,6 @@ class Hook
// 获取应用数据
$ret
=
PluginsService
::
PluginsData
(
'commononlineservice'
,
[
'images'
]);
// html拼接
$html
=
'<div class="commononlineservice"'
;
$content
=
''
;
if
(
$ret
[
'code'
]
==
0
)
{
// 非全局
...
...
@@ -102,75 +99,42 @@ class Hook
}
}
// 距离顶部距离
if
(
isset
(
$ret
[
'data'
][
'distance_top'
]))
{
$html
.
=
' style="top:'
.
intval
(
$ret
[
'data'
][
'distance_top'
])
.
'%"'
;
}
// li数量
$online_service_li_count
=
0
;
// 客服
$online_service
=
empty
(
$ret
[
'data'
][
'online_service'
])
?
[]
:
explode
(
"
\n
"
,
$ret
[
'data'
][
'online_service'
]);
$online_service_
html
=
''
;
$online_service_
data
=
[]
;
if
(
!
empty
(
$online_service
))
{
foreach
(
$online_service
as
$v
)
{
$items
=
explode
(
'|'
,
$v
);
if
(
!
empty
(
$items
)
&&
count
(
$items
)
==
2
)
if
(
count
(
$items
)
==
2
)
{
$online_service_html
.
=
'<li>
<span>'
.
$items
[
0
]
.
'</span>
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin='
.
$items
[
1
]
.
'&site=qq&menu=yes"><img border="0" src="http://wpa.qq.com/pa?p=2:'
.
$items
[
1
]
.
':51" alt="点击这里给我发消息" title="点击这里给我发消息"/></a>
</li>'
;
$online_service_data
[]
=
$items
;
$online_service_li_count
++
;
}
}
}
$ret
[
'data'
][
'online_service'
]
=
$online_service_data
;
// 电话
$tel_html
=
''
;
if
(
!
empty
(
$ret
[
'data'
][
'tel'
]))
{
$tel_html
.
=
'<li>
<span>电话:'
.
$ret
[
'data'
][
'tel'
]
.
'</span>
</li>'
;
$online_service_li_count
++
;
}
//
背景色
$
bg_color
=
empty
(
$ret
[
'data'
][
'bg_color'
])
?
''
:
'background:'
.
$ret
[
'data'
][
'bg_color'
]
.
';'
;
//
li数量
$
ret
[
'data'
][
'online_service_li_count'
]
=
$online_service_li_count
;
// 内容css
$content_css
=
$bg_color
;
if
(
$online_service_li_count
<=
2
)
{
$content_css
.
=
'border-radius:0;'
;
}
// 组装
$content
=
'<div class="float-left" style="'
.
$bg_color
.
'">
<a class="btn-open" title="查看在线客服" href="javascript:void(0);">展开</a>
<a class="btn-ctn" title="关闭在线客服" href="javascript:void(0);">收缩</a>
</div>
<div class="content" style="'
.
$content_css
.
'">
<div class="cn">
<h3 class="title">'
.
$ret
[
'data'
][
'title'
]
.
'</h3>
<ul>'
.
$online_service_html
.
$tel_html
.
'
</ul>
</div>
</div>'
;
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commononlineservice/index/content'
);
}
else
{
$content
=
$ret
[
'msg'
];
return
$ret
[
'msg'
];
}
$html
.
=
'>'
;
$html
.
=
$content
;
$html
.
=
'</div>'
;
return
$html
;
}
}
?>
\ No newline at end of file
application/plugins/commonrightnavigation/Admin.php
浏览文件 @
1609c488
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\plugins\commonrightnavigation
;
use
think\Controller
;
use
app\service\PluginsService
;
/**
...
...
@@ -19,7 +20,7 @@ use app\service\PluginsService;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Admin
class
Admin
extends
Controller
{
/**
* 首页
...
...
@@ -34,13 +35,10 @@ class Admin
$ret
=
PluginsService
::
PluginsData
(
'commonrightnavigation'
,
[
'alipay_mini_qrcode_images'
,
'alipay_fuwu_qrcode_images'
,
'weixin_mini_qrcode_images'
,
'weixin_fuwu_qrcode_images'
]);
if
(
$ret
[
'code'
]
==
0
)
{
// 数组组装
$data
=
[
'data'
=>
$ret
[
'data'
],
];
return
DataReturn
(
'处理成功'
,
0
,
$data
);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commonrightnavigation/admin/index'
);
}
else
{
return
$ret
;
return
$ret
[
'msg'
]
;
}
}
...
...
@@ -63,14 +61,11 @@ class Admin
1
=>
array
(
'id'
=>
1
,
'name'
=>
'是'
,
'checked'
=>
true
),
];
// 数组组装
$data
=
[
'is_whether_list'
=>
$is_whether_list
,
'data'
=>
$ret
[
'data'
],
];
return
DataReturn
(
'处理成功'
,
0
,
$data
);
$this
->
assign
(
'is_whether_list'
,
$is_whether_list
);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commonrightnavigation/admin/saveinfo'
);
}
else
{
return
$ret
;
return
$ret
[
'msg'
]
;
}
}
...
...
application/plugins/commonrightnavigation/Hook.php
浏览文件 @
1609c488
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\plugins\commonrightnavigation
;
use
think\Controller
;
use
app\service\PluginsService
;
use
app\service\BuyService
;
...
...
@@ -20,7 +21,7 @@ use app\service\BuyService;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Hook
class
Hook
extends
Controller
{
/**
* 应用响应入口
...
...
@@ -103,116 +104,29 @@ class Hook
}
}
// 当前模块/控制器/方法
$this
->
assign
(
'module_controller_action'
,
$module_name
.
$controller_name
.
$action_name
);
// 是否新窗口打开
$is_new_window_open
=
(
isset
(
$ret
[
'data'
][
'is_new_window_open'
])
&&
$ret
[
'data'
][
'is_new_window_open'
]
==
1
)
?
'target="_blank"'
:
''
;
$is_new_window_open_html
=
(
isset
(
$ret
[
'data'
][
'is_new_window_open'
])
&&
$ret
[
'data'
][
'is_new_window_open'
]
==
1
)
?
'target="_blank"'
:
''
;
$this
->
assign
(
'is_new_window_open_html'
,
$is_new_window_open_html
);
// 购物车总数
$cart_total
=
BuyService
::
UserCartTotal
([
'user'
=>
$params
[
'user'
]]);
$this
->
assign
(
'cart_total'
,
$cart_total
);
// 是否需要登录
$login_event
=
empty
(
$params
[
'user'
])
?
'login-event'
:
''
;
// 内容
$content
.
=
'<!-- 用户中心 -->
<a href="'
.
(
empty
(
$params
[
'user'
])
?
'javascript:;'
:
MyUrl
(
'index/user/index'
))
.
'" '
.
$is_new_window_open
.
' class="user-content '
.
$login_event
.
'">
<div class="base-nav user-center">
<img src="'
.
(
!
empty
(
$user
[
'avatar'
])
?
$params
[
'user'
][
'avatar'
]
:
config
(
'shopxo.attachment_host'
)
.
'/static/index/default/images/default-user-avatar.jpg'
)
.
'" class="user-avatar" />
<div class="mui-mbar-tab-tip am-animation-slide-left">
用户中心
<div class="mui-mbar-arr mui-mbar-tab-tip-arr">◆</div>
</div>
</div>
</a>
<!-- 我的足迹 -->
<a href="'
.
(
empty
(
$params
[
'user'
])
?
'javascript:;'
:
MyUrl
(
'index/usergoodsbrowse/index'
))
.
'" '
.
$is_new_window_open
.
' class="browse-content '
.
$login_event
.
'">
<div class="base-nav browse">
<i class="am-icon-lastfm"></i>
<div class="mui-mbar-tab-tip am-animation-slide-left">
我的足迹
<div class="mui-mbar-arr mui-mbar-tab-tip-arr">◆</div>
</div>
</div>
</a>
$login_event_class
=
empty
(
$params
[
'user'
])
?
'login-event'
:
''
;
$this
->
assign
(
'login_event_class'
,
$login_event_class
);
<!-- 我的收藏 -->
<a href="'
.
(
empty
(
$params
[
'user'
])
?
'javascript:;'
:
MyUrl
(
'index/userfavor/goods'
))
.
'" '
.
$is_new_window_open
.
' class="favor-content '
.
$login_event
.
'">
<div class="base-nav favor">
<i class="am-icon-star-o"></i>
<div class="mui-mbar-tab-tip am-animation-slide-left">
我的收藏
<div class="mui-mbar-arr mui-mbar-tab-tip-arr">◆</div>
</div>
</div>
</a>
<!-- 购物车 -->
<a href="'
.
(
empty
(
$params
[
'user'
])
?
'javascript:;'
:
MyUrl
(
'index/cart/index'
))
.
'" '
.
$is_new_window_open
.
' class="cart-content '
.
$login_event
.
' '
.
((
$ret
[
'data'
][
'is_goods_page_show_cart'
]
==
1
&&
$module_name
.
$controller_name
.
$action_name
==
'indexgoodsindex'
?
'cart-show'
:
''
))
.
'">
<div class="base-nav cart">
<i class="am-icon-opencart"></i>
<div class="cart-text">
购物车
<div class="cart-count common-cart-total am-badge am-badge-danger">'
.
(
$cart_total
>
9
?
'9+'
:
$cart_total
)
.
'</div>
</div>
</div>
</a>'
;
$qrcode
=
''
;
if
(
!
empty
(
$ret
[
'data'
][
'alipay_mini_qrcode_images'
]))
{
$qrcode
.
=
'<li>
<p>支付宝小程序</p>
<img src="'
.
$ret
[
'data'
][
'alipay_mini_qrcode_images'
]
.
'" alt="支付宝小程序" />
</li>'
;
}
if
(
!
empty
(
$ret
[
'data'
][
'alipay_fuwu_qrcode_images'
]))
{
$qrcode
.
=
'<li>
<p>支付宝生活号</p>
<img src="'
.
$ret
[
'data'
][
'alipay_fuwu_qrcode_images'
]
.
'" alt="支付宝生活号" />
</li>'
;
}
if
(
!
empty
(
$ret
[
'data'
][
'weixin_mini_qrcode_images'
]))
{
$qrcode
.
=
'<li>
<p>微信小程序</p>
<img src="'
.
$ret
[
'data'
][
'weixin_mini_qrcode_images'
]
.
'" alt="微信小程序" />
</li>'
;
}
if
(
!
empty
(
$ret
[
'data'
][
'weixin_fuwu_qrcode_images'
]))
{
$qrcode
.
=
'<li>
<p>微信公众号</p>
<img src="'
.
$ret
[
'data'
][
'weixin_fuwu_qrcode_images'
]
.
'" alt="微信公众号" />
</li>'
;
}
if
(
!
empty
(
$qrcode
))
{
$content
.
=
'<!-- 二维码 -->
<div class="base-nav qrcode-content">
<i class="am-icon-qrcode"></i>
<div class="mui-mbar-popup qrcode-items am-animation-slide-left">
<ul>'
.
$qrcode
.
'</ul>
</div>
</div>'
;
}
$content
.
=
'<!-- 回顶部 -->
<div class="base-nav go-top" data-am-smooth-scroll id="plugins-commonrightnavigation">
<i class="am-icon-arrow-up"></i>
<div class="mui-mbar-tab-tip am-animation-slide-left">
返回顶部
<div class="mui-mbar-arr mui-mbar-tab-tip-arr">◆</div>
</div>
</div>'
;
// 用户信息
$this
->
assign
(
'user'
,
$params
[
'user'
]);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commonrightnavigation/index/content'
);
}
else
{
$content
=
$ret
[
'msg'
];
return
$ret
[
'msg'
];
}
$html
.
=
$content
;
$html
.
=
'</div>'
;
return
$html
;
}
}
?>
\ No newline at end of file
application/plugins/commontopmaxpicture/Admin.php
浏览文件 @
1609c488
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\plugins\commontopmaxpicture
;
use
think\Controller
;
use
app\service\PluginsService
;
/**
...
...
@@ -19,7 +20,7 @@ use app\service\PluginsService;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Admin
class
Admin
extends
Controller
{
/**
* 首页
...
...
@@ -34,13 +35,10 @@ class Admin
$ret
=
PluginsService
::
PluginsData
(
'commontopmaxpicture'
,
[
'images'
]);
if
(
$ret
[
'code'
]
==
0
)
{
// 数组组装
$data
=
[
'data'
=>
$ret
[
'data'
],
];
return
DataReturn
(
'处理成功'
,
0
,
$data
);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commontopmaxpicture/admin/index'
);
}
else
{
return
$ret
;
return
$ret
[
'msg'
]
;
}
}
...
...
@@ -63,14 +61,11 @@ class Admin
1
=>
array
(
'id'
=>
1
,
'name'
=>
'是'
),
];
// 数组组装
$data
=
[
'is_whether_list'
=>
$is_whether_list
,
'data'
=>
$ret
[
'data'
],
];
return
DataReturn
(
'处理成功'
,
0
,
$data
);
$this
->
assign
(
'is_whether_list'
,
$is_whether_list
);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commontopmaxpicture/admin/saveinfo'
);
}
else
{
return
$ret
;
return
$ret
[
'msg'
]
;
}
}
...
...
application/plugins/commontopmaxpicture/Hook.php
浏览文件 @
1609c488
...
...
@@ -10,8 +10,8 @@
// +----------------------------------------------------------------------
namespace
app\plugins\commontopmaxpicture
;
use
think\Controller
;
use
app\service\PluginsService
;
/**
* 顶部大图广告插件 - 钩子入口
* @author Devil
...
...
@@ -19,7 +19,7 @@ use app\service\PluginsService;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Hook
class
Hook
extends
Controller
{
/**
* 应用响应入口
...
...
@@ -59,10 +59,6 @@ class Hook
// 获取应用数据
$ret
=
PluginsService
::
PluginsData
(
'commontopmaxpicture'
,
[
'images'
]);
// html拼接
$html
=
'<div style="text-align: center;'
;
$content
=
''
;
if
(
$ret
[
'code'
]
==
0
)
{
// 图片是否为空
...
...
@@ -99,22 +95,11 @@ class Hook
}
}
// 背景色
if
(
!
empty
(
$ret
[
'data'
][
'bg_color'
]))
{
$html
.
=
'background: '
.
$ret
[
'data'
][
'bg_color'
]
.
';'
;
}
$content
.
=
'<a href="'
.
(
empty
(
$ret
[
'data'
][
'url'
])
?
'javascript:;'
:
$ret
[
'data'
][
'url'
])
.
'" '
.
(
$ret
[
'data'
][
'is_new_window_open'
]
==
1
?
'target="_blank"'
:
''
)
.
'>'
;
$content
.
=
'<img src="'
.
$ret
[
'data'
][
'images'
]
.
'" />'
;
$content
.
=
'</a>'
;
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commontopmaxpicture/index/content'
);
}
else
{
$content
=
$ret
[
'msg'
];
return
$ret
[
'msg'
];
}
$html
.
=
'">'
;
$html
.
=
$content
;
$html
.
=
'</div>'
;
return
$html
;
}
}
?>
\ No newline at end of file
application/plugins/commontopnotice/Admin.php
浏览文件 @
1609c488
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\plugins\commontopnotice
;
use
think\Controller
;
use
app\service\PluginsService
;
/**
...
...
@@ -19,7 +20,7 @@ use app\service\PluginsService;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Admin
class
Admin
extends
Controller
{
/**
* 首页
...
...
@@ -34,13 +35,10 @@ class Admin
$ret
=
PluginsService
::
PluginsData
(
'commontopnotice'
);
if
(
$ret
[
'code'
]
==
0
)
{
// 数组组装
$data
=
[
'data'
=>
$ret
[
'data'
],
];
return
DataReturn
(
'处理成功'
,
0
,
$data
);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commontopnotice/admin/index'
);
}
else
{
return
$ret
;
return
$ret
[
'msg'
]
;
}
}
...
...
@@ -63,14 +61,11 @@ class Admin
1
=>
array
(
'id'
=>
1
,
'name'
=>
'是'
),
];
// 数组组装
$data
=
[
'is_whether_list'
=>
$is_whether_list
,
'data'
=>
$ret
[
'data'
],
];
return
DataReturn
(
'处理成功'
,
0
,
$data
);
$this
->
assign
(
'is_whether_list'
,
$is_whether_list
);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commontopnotice/admin/saveinfo'
);
}
else
{
return
$ret
;
return
$ret
[
'msg'
]
;
}
}
...
...
application/plugins/commontopnotice/Hook.php
浏览文件 @
1609c488
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\plugins\commontopnotice
;
use
think\Controller
;
use
app\service\PluginsService
;
/**
...
...
@@ -19,7 +20,7 @@ use app\service\PluginsService;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Hook
class
Hook
extends
Controller
{
/**
* 应用响应入口
...
...
@@ -59,10 +60,6 @@ class Hook
// 获取应用数据
$ret
=
PluginsService
::
PluginsData
(
'commontopnotice'
);
// html拼接
$html
=
'<div class="am-alert am-alert-warning am-radius" style="margin: 0;">'
;
$content
=
''
;
if
(
$ret
[
'code'
]
==
0
)
{
// 内容是否为空
...
...
@@ -99,14 +96,11 @@ class Hook
}
}
$content
.
=
'<div class="am-container">'
.
$ret
[
'data'
][
'content'
]
.
'</div>'
;
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/commontopnotice/index/content'
);
}
else
{
$content
=
$ret
[
'msg'
];
return
$ret
[
'msg'
];
}
$html
.
=
$content
;
$html
.
=
'</div>'
;
return
$html
;
}
}
?>
\ No newline at end of file
application/plugins/usercentertopnotice/Admin.php
浏览文件 @
1609c488
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\plugins\usercentertopnotice
;
use
think\Controller
;
use
app\service\PluginsService
;
/**
...
...
@@ -19,7 +20,7 @@ use app\service\PluginsService;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Admin
class
Admin
extends
Controller
{
/**
* 首页
...
...
@@ -34,13 +35,10 @@ class Admin
$ret
=
PluginsService
::
PluginsData
(
'usercentertopnotice'
);
if
(
$ret
[
'code'
]
==
0
)
{
// 数组组装
$data
=
[
'data'
=>
$ret
[
'data'
],
];
return
DataReturn
(
'处理成功'
,
0
,
$data
);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/usercentertopnotice/admin/index'
);
}
else
{
return
$ret
;
return
$ret
[
'msg'
]
;
}
}
...
...
@@ -57,13 +55,10 @@ class Admin
$ret
=
PluginsService
::
PluginsData
(
'usercentertopnotice'
);
if
(
$ret
[
'code'
]
==
0
)
{
// 数组组装
$data
=
[
'data'
=>
$ret
[
'data'
],
];
return
DataReturn
(
'处理成功'
,
0
,
$data
);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/usercentertopnotice/admin/saveinfo'
);
}
else
{
return
$ret
;
return
$ret
[
'msg'
]
;
}
}
...
...
application/plugins/usercentertopnotice/Hook.php
浏览文件 @
1609c488
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\plugins\usercentertopnotice
;
use
think\Controller
;
use
app\service\PluginsService
;
/**
...
...
@@ -19,7 +20,7 @@ use app\service\PluginsService;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Hook
class
Hook
extends
Controller
{
/**
* 应用响应入口
...
...
@@ -52,17 +53,8 @@ class Hook
*/
public
function
html
(
$params
=
[])
{
// 当前模块/控制器/方法
$module_name
=
strtolower
(
request
()
->
module
());
$controller_name
=
strtolower
(
request
()
->
controller
());
$action_name
=
strtolower
(
request
()
->
action
());
// 获取应用数据
$ret
=
PluginsService
::
PluginsData
(
'usercentertopnotice'
);
// html拼接
$html
=
'<div class="am-alert am-alert-warning am-radius" style="margin: 0;">'
;
$content
=
''
;
if
(
$ret
[
'code'
]
==
0
)
{
// 内容是否为空
...
...
@@ -89,14 +81,11 @@ class Hook
}
}
$content
.
=
'<div class="am-container">'
.
$ret
[
'data'
][
'content'
]
.
'</div>'
;
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/usercentertopnotice/index/content'
);
}
else
{
$content
=
$ret
[
'msg'
];
return
$ret
[
'msg'
];
}
$html
.
=
$content
;
$html
.
=
'</div>'
;
return
$html
;
}
}
?>
\ No newline at end of file
application/plugins/userloginrewardintegral/Admin.php
浏览文件 @
1609c488
...
...
@@ -10,6 +10,7 @@
// +----------------------------------------------------------------------
namespace
app\plugins\userloginrewardintegral
;
use
think\Controller
;
use
app\service\PluginsService
;
/**
...
...
@@ -19,7 +20,7 @@ use app\service\PluginsService;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Admin
class
Admin
extends
Controller
{
/**
* 首页
...
...
@@ -34,13 +35,10 @@ class Admin
$ret
=
PluginsService
::
PluginsData
(
'userloginrewardintegral'
);
if
(
$ret
[
'code'
]
==
0
)
{
// 数组组装
$data
=
[
'data'
=>
$ret
[
'data'
],
];
return
DataReturn
(
'处理成功'
,
0
,
$data
);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/userloginrewardintegral/admin/index'
);
}
else
{
return
$ret
;
return
$ret
[
'msg'
]
;
}
}
...
...
@@ -63,14 +61,11 @@ class Admin
1
=>
array
(
'id'
=>
1
,
'name'
=>
'是'
,
'checked'
=>
true
),
];
// 数组组装
$data
=
[
'is_whether_list'
=>
$is_whether_list
,
'data'
=>
$ret
[
'data'
],
];
return
DataReturn
(
'处理成功'
,
0
,
$data
);
$this
->
assign
(
'is_whether_list'
,
$is_whether_list
);
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/userloginrewardintegral/admin/saveinfo'
);
}
else
{
return
$ret
;
return
$ret
[
'msg'
]
;
}
}
...
...
application/plugins/view/commongobacktop/index/content.html
0 → 100644
浏览文件 @
1609c488
<div
data-am-smooth-scroll=
""
class=
"am-hide-sm-only"
>
<div
id=
"plugins-commongobacktop"
title=
"回到顶部"
>
<img
src=
"{{$data.images}}"
>
</div>
</div>
\ No newline at end of file
application/plugins/view/commononlineservice/index/content.html
0 → 100644
浏览文件 @
1609c488
<div
class=
"commononlineservice"
{{
if
!
empty
($
data
['
distance_top
'])}}
style=
"top:{{$data.distance_top}}%"
{{/
if
}}
>
<div
class=
"float-left"
style=
"{{if !empty($data['bg_color'])}}background: {{$data.bg_color}};{{/if}}"
>
<a
class=
"btn-open"
title=
"查看在线客服"
href=
"javascript:void(0);"
>
展开
</a>
<a
class=
"btn-ctn"
title=
"关闭在线客服"
href=
"javascript:void(0);"
>
收缩
</a>
</div>
<div
class=
"content"
style=
"{{if isset($data['online_service_li_count']) and $data['online_service_li_count'] ELT 2}}border-radius: 0;{{/if}} {{if !empty($data['bg_color'])}}background: {{$data.bg_color}};{{/if}}"
>
<div
class=
"cn"
>
{{if !empty($data['title'])}}
<h3
class=
"title"
>
{{$data.title}}
</h3>
{{/if}}
{{if !empty($data['online_service'])}}
<ul>
{{foreach name=$data.online_service as $v}}
<li>
<span>
{{$v[0]}}
</span>
<a
target=
"_blank"
href=
"http://wpa.qq.com/msgrd?v=3&uin={{$v[1]}}&site=qq&menu=yes"
>
<img
border=
"0"
src=
"http://wpa.qq.com/pa?p=2:{{$v[1]}}:51"
alt=
"点击这里给我发消息"
title=
"点击这里给我发消息"
>
</a>
</li>
{{/foreach}}
{{if !empty($data['title'])}}
<li>
<span>
电话:{{$data.tel}}
</span>
</li>
{{/if}}
</ul>
{{/if}}
</div>
</div>
</div>
\ No newline at end of file
application/plugins/view/commonrightnavigation/index/content.html
0 → 100644
浏览文件 @
1609c488
<div
class=
"commonrightnavigation-right-nav"
>
<!-- 用户中心 -->
<a
href=
"{{if empty($user)}}javascript:;{{else /}}{{:MyUrl('index/user/index')}}{{/if}}"
class=
"user-content {{$login_event_class}}"
>
<div
class=
"base-nav user-center"
>
<img
src=
"{{if empty($user['avatar'])}}{{:config('shopxo.attachment_host')}}/static/index/default/images/default-user-avatar.jpg{{else /}}{{$user.avatar}}{{/if}}"
class=
"user-avatar"
>
<div
class=
"mui-mbar-tab-tip am-animation-slide-left"
>
用户中心
<div
class=
"mui-mbar-arr mui-mbar-tab-tip-arr"
>
◆
</div>
</div>
</div>
</a>
<!-- 我的足迹 -->
<a
href=
"{{if empty($user)}}javascript:;{{else /}}{{:MyUrl('index/usergoodsbrowse/index')}}{{/if}}"
class=
"browse-content {{$login_event_class}}"
>
<div
class=
"base-nav browse"
>
<i
class=
"am-icon-lastfm"
></i>
<div
class=
"mui-mbar-tab-tip am-animation-slide-left"
>
我的足迹
<div
class=
"mui-mbar-arr mui-mbar-tab-tip-arr"
>
◆
</div>
</div>
</div>
</a>
<!-- 我的收藏 -->
<a
href=
"{{if empty($user)}}javascript:;{{else /}}{{:MyUrl('index/userfavor/goods')}}{{/if}}"
class=
"favor-content {{$login_event_class}}"
>
<div
class=
"base-nav favor"
>
<i
class=
"am-icon-star-o"
></i>
<div
class=
"mui-mbar-tab-tip am-animation-slide-left"
>
我的收藏
<div
class=
"mui-mbar-arr mui-mbar-tab-tip-arr"
>
◆
</div>
</div>
</div>
</a>
<!-- 购物车 -->
<a
href=
"{{if empty($user)}}javascript:;{{else /}}{{:MyUrl('index/cart/index')}}{{/if}}"
class=
"cart-content {{$login_event_class}} {{if isset($data['is_goods_page_show_cart']) and $data['is_goods_page_show_cart'] eq 1 and $module_controller_action eq 'indexgoodsindex'}} cart-show{{/if}}"
>
<div
class=
"base-nav cart"
>
<i
class=
"am-icon-opencart"
></i>
<div
class=
"cart-text"
>
购物车
<div
class=
"cart-count common-cart-total am-badge am-badge-danger"
>
{{if $cart_total > 9}}9+{{else /}}{{$cart_total}}{{/if}}
</div>
</div>
</div>
</a>
<!-- 二维码 -->
<div
class=
"base-nav qrcode-content"
>
<i
class=
"am-icon-qrcode"
></i>
<div
class=
"mui-mbar-popup qrcode-items am-animation-slide-left"
>
<ul>
{{if !empty($data['alipay_mini_qrcode_images'])}}
<li>
<p>
支付宝小程序
</p>
<img
src=
"{{$data.alipay_mini_qrcode_images}}"
alt=
"支付宝小程序"
>
</li>
{{/if}}
{{if !empty($data['alipay_fuwu_qrcode_images'])}}
<li>
<p>
支付宝生活号
</p>
<img
src=
"{{$data.alipay_fuwu_qrcode_images}}"
alt=
"支付宝生活号"
>
</li>
{{/if}}
{{if !empty($data['weixin_mini_qrcode_images'])}}
<li>
<p>
微信小程序
</p>
<img
src=
"{{$data.weixin_mini_qrcode_images}}"
alt=
"微信小程序"
>
</li>
{{/if}}
{{if !empty($data['weixin_fuwu_qrcode_images'])}}
<li>
<p>
微信公众号
</p>
<img
src=
"{{$data.weixin_fuwu_qrcode_images}}"
alt=
"微信公众号"
>
</li>
{{/if}}
</ul>
</div>
</div>
<!-- 回顶部 -->
<div
class=
"base-nav go-top"
data-am-smooth-scroll
id=
"plugins-commonrightnavigation"
>
<i
class=
"am-icon-arrow-up"
></i>
<div
class=
"mui-mbar-tab-tip am-animation-slide-left"
>
返回顶部
<div
class=
"mui-mbar-arr mui-mbar-tab-tip-arr"
>
◆
</div>
</div>
</div>
</div>
\ No newline at end of file
application/plugins/view/commontopmaxpicture/index/content.html
0 → 100644
浏览文件 @
1609c488
<div
style=
"text-align: center; {{if !empty($data['bg_color'])}}background: {{$data.bg_color}};{{/if}}"
>
<a
href=
"{{if !empty($data['url'])}}{{$data.url}}{{else /}}javascript:;{{/if}}"
{{
if
isset
($
data
['
is_new_window_open
'])
and
$
data
['
is_new_window_open
']
eq
1}}
target=
"_blank"
{{/
if
}}
>
<img
src=
"{{$data.images}}"
/>
</a>
</div>
\ No newline at end of file
application/plugins/view/commontopnotice/index/content.html
0 → 100644
浏览文件 @
1609c488
<div
class=
"am-alert am-alert-warning am-radius"
style=
"margin: 0;"
>
<div
class=
"am-container"
>
{{$data.content}}
</div>
</div>
\ No newline at end of file
application/plugins/view/usercentertopnotice/index/content.html
0 → 100644
浏览文件 @
1609c488
<div
class=
"am-alert am-alert-warning am-radius"
style=
"margin: 0;"
>
<div
class=
"am-container"
>
{{$data.content}}
</div>
</div>
\ No newline at end of file
application/service/PluginsAdminService.php
浏览文件 @
1609c488
...
...
@@ -486,7 +486,7 @@ class PluginsAdminService
$admin
=
<<<php
<?php
namespace app\plugins\\$plugins;
use think\Controller;
/**
* {$params['name']} - 后台管理
* @author Devil
...
...
@@ -494,17 +494,15 @@ namespace app\plugins\\$plugins;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Admin
class Admin
extends Controller
{
// 后台管理入口
public function index(\$params = [])
{
// 数组组装
\$data = [
'data' => ['hello', 'world!'],
'msg' => 'hello world! admin',
];
return DataReturn('处理成功', 0, \$data);
\$this->assign('data', ['hello', 'world!']);
\$this->assign('msg', 'hello world! admin');
return \$this->fetch('../../../plugins/view/$plugins/admin/index');
}
}
?>
...
...
@@ -513,7 +511,7 @@ php;
$hook
=
<<<php
<?php
namespace app\plugins\\$plugins;
use think\Controller;
/**
* {$params['name']} - 钩子入口
* @author Devil
...
...
@@ -521,7 +519,7 @@ namespace app\plugins\\$plugins;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Hook
class Hook
extends Controller
{
// 应用响应入口
public function run(\$params = [])
...
...
@@ -548,7 +546,7 @@ php;
$index
=
<<<php
<?php
namespace app\plugins\\$plugins;
use think\Controller;
/**
* {$params['name']} - 前端独立页面入口
* @author Devil
...
...
@@ -556,17 +554,15 @@ namespace app\plugins\\$plugins;
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class Index
class Index
extends Controller
{
// 前端页面入口
public function index(\$params = [])
{
// 数组组装
\$data = [
'data' => ['hello', 'world!'],
'msg' => 'hello world! index',
];
return DataReturn('处理成功', 0, \$data);
\$this->assign('data', ['hello', 'world!']);
\$this->assign('msg', 'hello world! index');
return \$this->fetch('../../../plugins/view/$plugins/index/index');
}
}
?>
...
...
application/tags.php
浏览文件 @
1609c488
...
...
@@ -45,17 +45,26 @@ return array (
array
(
0
=>
'app\\plugins\\userloginrewardintegral\\Hook'
,
),
'plugins_
css
'
=>
'plugins_
view_common_bottom
'
=>
array
(
0
=>
'app\\plugins\\commonrightnavigation\\Hook'
,
1
=>
'app\\plugins\\commononlineservice\\Hook'
,
0
=>
'app\\plugins\\commongobacktop\\Hook'
,
1
=>
'app\\plugins\\commonrightnavigation\\Hook'
,
2
=>
'app\\plugins\\commononlineservice\\Hook'
,
),
'plugins_js'
=>
'plugins_common_page_bottom'
=>
array
(
0
=>
'app\\plugins\\commongobacktop\\Hook'
,
),
'plugins_common_header'
=>
array
(
0
=>
'app\\plugins\\commongobacktop\\Hook'
,
),
'plugins_css'
=>
array
(
0
=>
'app\\plugins\\commonrightnavigation\\Hook'
,
1
=>
'app\\plugins\\commononlineservice\\Hook'
,
),
'plugins_
view_common_bottom
'
=>
'plugins_
js
'
=>
array
(
0
=>
'app\\plugins\\commonrightnavigation\\Hook'
,
1
=>
'app\\plugins\\commononlineservice\\Hook'
,
...
...
config/shopxo.php
浏览文件 @
1609c488
...
...
@@ -15,7 +15,7 @@
return
[
// 开发模式
'is_develop'
=>
fals
e
,
'is_develop'
=>
tru
e
,
// 默认编码
'default_charset'
=>
'utf-8'
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录