Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
98976ed5
ShopXO
项目概览
jamesyang1999
/
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,发现更多精彩内容 >>
提交
98976ed5
编写于
5月 27, 2019
作者:
G
gongfuxiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提示页面优化
上级
74bd90c1
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
172 addition
and
100 deletion
+172
-100
application/admin/controller/Plugins.php
application/admin/controller/Plugins.php
+42
-3
application/admin/controller/Pluginsadmin.php
application/admin/controller/Pluginsadmin.php
+1
-1
application/index/controller/Common.php
application/index/controller/Common.php
+1
-1
application/index/controller/Error.php
application/index/controller/Error.php
+1
-1
application/index/controller/Order.php
application/index/controller/Order.php
+2
-2
application/index/controller/Plugins.php
application/index/controller/Plugins.php
+42
-3
application/index/view/default/public/error.html
application/index/view/default/public/error.html
+0
-31
application/index/view/default/public/pay_success.html
application/index/view/default/public/pay_success.html
+0
-38
application/index/view/default/public/tips_error.html
application/index/view/default/public/tips_error.html
+13
-6
application/index/view/default/public/tips_success.html
application/index/view/default/public/tips_success.html
+36
-0
application/install/controller/Common.php
application/install/controller/Common.php
+1
-1
application/install/controller/Error.php
application/install/controller/Error.php
+1
-1
application/plugins/touristbuy/index/Index.php
application/plugins/touristbuy/index/Index.php
+1
-1
application/plugins/view/weixinwebauthorization/admin/admin/index.html
...lugins/view/weixinwebauthorization/admin/admin/index.html
+1
-1
application/plugins/view/weixinwebauthorization/admin/admin/saveinfo.html
...ins/view/weixinwebauthorization/admin/admin/saveinfo.html
+1
-1
application/plugins/wallet/index/Recharge.php
application/plugins/wallet/index/Recharge.php
+2
-2
application/plugins/weixinwebauthorization/index/Auth.php
application/plugins/weixinwebauthorization/index/Auth.php
+3
-3
application/service/PluginsService.php
application/service/PluginsService.php
+22
-1
public/static/index/default/css/common.css
public/static/index/default/css/common.css
+2
-3
未找到文件。
application/admin/controller/Plugins.php
浏览文件 @
98976ed5
...
...
@@ -10,6 +10,8 @@
// +----------------------------------------------------------------------
namespace
app\admin\controller
;
use
app\service\PluginsService
;
/**
* 应用调用入口
* @author Devil
...
...
@@ -76,7 +78,7 @@ class Plugins extends Common
return
DataReturn
(
$ret
,
-
5000
);
}
else
{
$this
->
assign
(
'msg'
,
$ret
);
return
$this
->
fetch
(
'public/error'
);
return
$this
->
fetch
(
'public/
tips_
error'
);
}
}
...
...
@@ -85,6 +87,19 @@ class Plugins extends Common
$pluginscontrol
=
strtolower
(
$params
[
'pluginscontrol'
]);
$pluginsaction
=
strtolower
(
$params
[
'pluginsaction'
]);
// 应用校验
$ret
=
$this
->
PluginsCheck
(
$pluginsname
,
$pluginscontrol
,
$pluginsaction
);
if
(
$ret
[
'code'
]
!=
0
)
{
if
(
IS_AJAX
)
{
return
$ret
;
}
else
{
$this
->
assign
(
'msg'
,
$ret
[
'msg'
]);
return
$this
->
fetch
(
'public/tips_error'
);
}
}
// 视图初始化
$this
->
PluginsViewInit
(
$pluginsname
,
$pluginscontrol
,
$pluginsaction
);
...
...
@@ -96,7 +111,7 @@ class Plugins extends Common
if
(
!
class_exists
(
$plugins
))
{
$this
->
assign
(
'msg'
,
ucfirst
(
$pluginscontrol
)
.
' 应用控制器未定义'
);
return
$this
->
fetch
(
'public/error'
);
return
$this
->
fetch
(
'public/
tips_
error'
);
}
// 调用方法
...
...
@@ -104,11 +119,35 @@ class Plugins extends Common
if
(
!
method_exists
(
$obj
,
$pluginsaction
))
{
$this
->
assign
(
'msg'
,
ucfirst
(
$pluginsaction
)
.
' 应用方法未定义'
);
return
$this
->
fetch
(
'public/error'
);
return
$this
->
fetch
(
'public/
tips_
error'
);
}
return
$obj
->
$pluginsaction
(
$params
);
}
/**
* 应用校验
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-05-27T00:13:50+0800
* @param [string] $plugins_name [应用名称]
* @param [string] $plugins_control [控制器名称]
* @param [string] $plugins_action [方法]
*/
private
function
PluginsCheck
(
$pluginsname
,
$pluginscontrol
,
$pluginsaction
)
{
$ret
=
PluginsService
::
PluginsData
(
$pluginsname
);
if
(
$ret
[
'code'
]
==
0
)
{
$is_enable
=
PluginsService
::
PluginsField
(
$pluginsname
,
'is_enable'
);
if
(
$is_enable
[
'data'
]
!=
1
)
{
return
DataReturn
(
'应用异常或未启用'
,
-
10
);
}
}
return
$ret
;
}
/**
* 视图初始化
* @author Devil
...
...
application/admin/controller/Pluginsadmin.php
浏览文件 @
98976ed5
...
...
@@ -243,7 +243,7 @@ class Pluginsadmin extends Common
if
(
isset
(
$ret
[
'code'
])
&&
$ret
[
'code'
]
!=
0
)
{
$this
->
assign
(
'msg'
,
$ret
[
'msg'
]);
return
$this
->
fetch
(
'public/error'
);
return
$this
->
fetch
(
'public/
tips_
error'
);
}
else
{
return
$ret
;
}
...
...
application/index/controller/Common.php
浏览文件 @
98976ed5
...
...
@@ -317,7 +317,7 @@ class Common extends Controller
exit
(
json_encode
(
DataReturn
(
$name
.
' 非法访问'
,
-
1000
)));
}
else
{
$this
->
assign
(
'msg'
,
$name
.
' 非法访问'
);
return
$this
->
fetch
(
'public/error'
);
return
$this
->
fetch
(
'public/
tips_
error'
);
}
}
...
...
application/index/controller/Error.php
浏览文件 @
98976ed5
...
...
@@ -38,7 +38,7 @@ class Error extends Common
exit
(
json_encode
(
DataReturn
(
$request
->
controller
()
.
' 控制器不存在'
,
-
1000
)));
}
else
{
$this
->
assign
(
'msg'
,
$request
->
controller
()
.
' 控制器不存在'
);
return
$this
->
fetch
(
'public/error'
);
return
$this
->
fetch
(
'public/
tips_
error'
);
}
}
}
...
...
application/index/controller/Order.php
浏览文件 @
98976ed5
...
...
@@ -244,10 +244,10 @@ class Order extends Common
if
(
$ret
[
'code'
]
==
0
)
{
$this
->
assign
(
'msg'
,
'支付成功'
);
return
$this
->
fetch
(
'public/
pay
_success'
);
return
$this
->
fetch
(
'public/
tips
_success'
);
}
else
{
$this
->
assign
(
'msg'
,
$ret
[
'msg'
]);
return
$this
->
fetch
(
'public/
pay
_error'
);
return
$this
->
fetch
(
'public/
tips
_error'
);
}
}
...
...
application/index/controller/Plugins.php
浏览文件 @
98976ed5
...
...
@@ -10,6 +10,8 @@
// +----------------------------------------------------------------------
namespace
app\index\controller
;
use
app\service\PluginsService
;
/**
* 应用调用入口
* @author Devil
...
...
@@ -70,7 +72,7 @@ class Plugins extends Common
return
DataReturn
(
$ret
,
-
5000
);
}
else
{
$this
->
assign
(
'msg'
,
$ret
);
return
$this
->
fetch
(
'public/error'
);
return
$this
->
fetch
(
'public/
tips_
error'
);
}
}
...
...
@@ -79,6 +81,19 @@ class Plugins extends Common
$pluginscontrol
=
strtolower
(
$params
[
'pluginscontrol'
]);
$pluginsaction
=
strtolower
(
$params
[
'pluginsaction'
]);
// 应用校验
$ret
=
$this
->
PluginsCheck
(
$pluginsname
,
$pluginscontrol
,
$pluginsaction
);
if
(
$ret
[
'code'
]
!=
0
)
{
if
(
IS_AJAX
)
{
return
$ret
;
}
else
{
$this
->
assign
(
'msg'
,
$ret
[
'msg'
]);
return
$this
->
fetch
(
'public/tips_error'
);
}
}
// 视图初始化
$this
->
PluginsViewInit
(
$pluginsname
,
$pluginscontrol
,
$pluginsaction
);
...
...
@@ -90,7 +105,7 @@ class Plugins extends Common
if
(
!
class_exists
(
$plugins
))
{
$this
->
assign
(
'msg'
,
ucfirst
(
$pluginscontrol
)
.
' 应用控制器未定义'
);
return
$this
->
fetch
(
'public/error'
);
return
$this
->
fetch
(
'public/
tips_
error'
);
}
// 调用方法
...
...
@@ -98,11 +113,35 @@ class Plugins extends Common
if
(
!
method_exists
(
$obj
,
$pluginsaction
))
{
$this
->
assign
(
'msg'
,
ucfirst
(
$pluginsaction
)
.
' 应用方法未定义'
);
return
$this
->
fetch
(
'public/error'
);
return
$this
->
fetch
(
'public/
tips_
error'
);
}
return
$obj
->
$pluginsaction
(
$params
);
}
/**
* 应用校验
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-05-27T00:13:50+0800
* @param [string] $plugins_name [应用名称]
* @param [string] $plugins_control [控制器名称]
* @param [string] $plugins_action [方法]
*/
private
function
PluginsCheck
(
$pluginsname
,
$pluginscontrol
,
$pluginsaction
)
{
$ret
=
PluginsService
::
PluginsData
(
$pluginsname
);
if
(
$ret
[
'code'
]
==
0
)
{
$is_enable
=
PluginsService
::
PluginsField
(
$pluginsname
,
'is_enable'
);
if
(
$is_enable
[
'data'
]
!=
1
)
{
return
DataReturn
(
'应用异常或未启用'
,
-
10
);
}
}
return
$ret
;
}
/**
* 视图初始化
* @author Devil
...
...
application/index/view/default/public/error.html
已删除
100755 → 0
浏览文件 @
74bd90c1
{{include file="public/header" /}}
<!-- header nav start -->
{{if isset($is_header) and $is_header eq 1}}
<!-- header top nav -->
{{include file="public/header_top_nav" /}}
<!-- search -->
{{include file="public/nav_search" /}}
<!-- header nav -->
{{include file="public/header_nav" /}}
<!-- goods category -->
{{include file="public/goods_category" /}}
{{/if}}
<!-- header nav end -->
<!-- content start -->
<div
class=
"am-g my-content"
>
<div
class=
"am-u-md-6 am-u-sm-centered"
>
<div
class=
"am-panel am-panel-danger am-radius tips-error"
>
<div
class=
"am-panel-bd"
>
{{$msg}}
</div>
</div>
</div>
</div>
<!-- content end -->
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
application/index/view/default/public/pay_success.html
已删除
100755 → 0
浏览文件 @
74bd90c1
{{include file="public/header" /}}
<!-- header nav start -->
{{if isset($is_header) and $is_header eq 1}}
<!-- header top nav -->
{{include file="public/header_top_nav" /}}
<!-- search -->
{{include file="public/nav_search" /}}
<!-- header nav -->
{{include file="public/header_nav" /}}
<!-- goods category -->
{{include file="public/goods_category" /}}
{{/if}}
<!-- header nav end -->
<!-- conntent start -->
<div
class=
"am-g my-content"
>
<div
class=
"am-u-md-6 am-u-sm-centered"
>
<div
class=
"am-panel am-radius tips-success tips-pay-success"
>
<div
class=
"am-panel-bd"
>
<i
class=
"am-icon-check-circle am-icon-lg"
></i>
<span
class=
"msg"
>
{{$msg}}
</span>
<div
class=
"tips-nav"
>
<a
href=
"{{$Think.__MY_URL__}}"
class=
"am-btn am-btn-secondary am-radius"
>
回到首页
</a>
{{if !empty($to_url) and !empty($to_title)}}
<a
href=
"{{$to_url}}"
class=
"am-btn am-btn-primary am-radius"
>
{{$to_title}}
</a>
{{/if}}
</div>
</div>
</div>
</div>
</div>
<!-- conntent end -->
{{include file="public/footer" /}}
\ No newline at end of file
application/index/view/default/public/tips_error.html
浏览文件 @
98976ed5
...
...
@@ -17,12 +17,19 @@
<!-- header nav end -->
<!-- conntent start -->
<div
class=
"am-g my-content"
>
<div
class=
"am-u-md-6 am-u-sm-centered"
>
<div
class=
"am-panel am-panel-default am-radius tips-error"
>
<div
class=
"am-panel-bd"
>
{{$msg}}
</div>
</div>
</div>
<div
class=
"am-g my-content tips-error"
>
<div
class=
"am-u-md-6 am-u-sm-centered"
>
<div
class=
"am-radius am-text-center"
>
<i
class=
"am-icon-times-circle am-icon-lg"
></i>
<span
class=
"msg"
>
{{$msg}}
</span>
<div
class=
"tips-nav"
>
<a
href=
"{{$Think.__MY_URL__}}"
class=
"am-btn am-btn-secondary am-radius"
>
回到首页
</a>
{{if !empty($to_url) and !empty($to_title)}}
<a
href=
"{{$to_url}}"
class=
"am-btn am-btn-primary am-radius"
>
{{$to_title}}
</a>
{{/if}}
</div>
</div>
</div>
</div>
<!-- conntent end -->
...
...
application/index/view/default/public/
pay_error
.html
→
application/index/view/default/public/
tips_success
.html
浏览文件 @
98976ed5
...
...
@@ -17,18 +17,16 @@
<!-- header nav end -->
<!-- conntent start -->
<div
class=
"am-g my-content"
>
<div
class=
"am-g my-content
tips-success
"
>
<div
class=
"am-u-md-6 am-u-sm-centered"
>
<div
class=
"am-panel am-radius tips-error tips-pay-error"
>
<div
class=
"am-panel-bd"
>
<i
class=
"am-icon-times-circle am-icon-lg"
></i>
<span
class=
"msg"
>
{{$msg}}
</span>
<div
class=
"tips-nav"
>
<a
href=
"{{$Think.__MY_URL__}}"
class=
"am-btn am-btn-secondary am-radius"
>
回到首页
</a>
{{if !empty($to_url) and !empty($to_title)}}
<a
href=
"{{$to_url}}"
class=
"am-btn am-btn-primary am-radius"
>
{{$to_title}}
</a>
{{/if}}
</div>
<div
class=
"am-radius am-text-center"
>
<i
class=
"am-icon-check-circle am-icon-lg"
></i>
<span
class=
"msg"
>
{{$msg}}
</span>
<div
class=
"tips-nav"
>
<a
href=
"{{$Think.__MY_URL__}}"
class=
"am-btn am-btn-secondary am-radius"
>
回到首页
</a>
{{if !empty($to_url) and !empty($to_title)}}
<a
href=
"{{$to_url}}"
class=
"am-btn am-btn-primary am-radius"
>
{{$to_title}}
</a>
{{/if}}
</div>
</div>
</div>
...
...
application/install/controller/Common.php
浏览文件 @
98976ed5
...
...
@@ -52,7 +52,7 @@ class Common extends Controller
public
function
_empty
(
$name
)
{
$this
->
assign
(
'msg'
,
$name
.
' 非法访问'
);
return
$this
->
fetch
(
'public/error'
);
return
$this
->
fetch
(
'public/
tips_
error'
);
}
}
?>
\ No newline at end of file
application/install/controller/Error.php
浏览文件 @
98976ed5
...
...
@@ -34,7 +34,7 @@ class Error extends Common
public
function
Index
(
Request
$request
)
{
$this
->
assign
(
'msg'
,
$request
->
controller
()
.
' 控制器不存在'
);
return
$this
->
fetch
(
'public/error'
);
return
$this
->
fetch
(
'public/
tips_
error'
);
}
}
?>
\ No newline at end of file
application/plugins/touristbuy/index/Index.php
浏览文件 @
98976ed5
...
...
@@ -130,7 +130,7 @@ class Index extends Controller
return
$this
->
fetch
(
'../../../plugins/view/touristbuy/index/index/success'
);
}
else
{
$this
->
assign
(
'msg'
,
$ret
[
'msg'
]);
return
$this
->
fetch
(
'public/error'
);
return
$this
->
fetch
(
'public/
tips_
error'
);
}
}
}
...
...
application/plugins/view/weixinwebauthorization/admin/admin/index.html
浏览文件 @
98976ed5
...
...
@@ -4,7 +4,7 @@
<div
class=
"content-right"
>
<div
class=
"content"
>
<legend>
<span
class=
"fs-16"
>
微信
登录
</span>
<span
class=
"fs-16"
>
微信
网页授权
</span>
<a
href=
"{{:MyUrl('admin/pluginsadmin/index')}}"
class=
"fr fs-14 m-t-5 am-icon-mail-reply"
>
返回
</a>
</legend>
...
...
application/plugins/view/weixinwebauthorization/admin/admin/saveinfo.html
浏览文件 @
98976ed5
...
...
@@ -6,7 +6,7 @@
<!-- form start -->
<form
class=
"am-form form-validation view-save"
action=
"{{:PluginsAdminUrl('weixinwebauthorization', 'admin', 'save')}}"
method=
"POST"
request-type=
"ajax-url"
request-value=
"{{:PluginsAdminUrl('weixinwebauthorization', 'admin', 'index')}}"
enctype=
"multipart/form-data"
>
<legend>
<span
class=
"fs-16"
>
微信
登录
</span>
<span
class=
"fs-16"
>
微信
网页授权
</span>
<a
href=
"{{:PluginsAdminUrl('weixinwebauthorization', 'admin', 'index')}}"
class=
"fr fs-14 m-t-5 am-icon-mail-reply"
>
返回
</a>
</legend>
...
...
application/plugins/wallet/index/Recharge.php
浏览文件 @
98976ed5
...
...
@@ -177,10 +177,10 @@ class Recharge extends Common
if
(
$ret
[
'code'
]
==
0
)
{
$this
->
assign
(
'msg'
,
'支付成功'
);
return
$this
->
fetch
(
'public/
pay
_success'
);
return
$this
->
fetch
(
'public/
tips
_success'
);
}
else
{
$this
->
assign
(
'msg'
,
$ret
[
'msg'
]);
return
$this
->
fetch
(
'public/
pay
_error'
);
return
$this
->
fetch
(
'public/
tips
_error'
);
}
}
...
...
application/plugins/weixinwebauthorization/index/Auth.php
浏览文件 @
98976ed5
...
...
@@ -53,10 +53,10 @@ class Auth extends Controller
if
(
isset
(
$params
[
'status'
])
&&
$params
[
'status'
]
==
0
)
{
$this
->
assign
(
'msg'
,
'支付成功'
);
return
$this
->
fetch
(
'public/
pay
_success'
);
return
$this
->
fetch
(
'public/
tips
_success'
);
}
else
{
$this
->
assign
(
'msg'
,
'支付失败'
);
return
$this
->
fetch
(
'public/
pay
_error'
);
return
$this
->
fetch
(
'public/
tips
_error'
);
}
}
...
...
@@ -167,7 +167,7 @@ class Auth extends Controller
return
$this
->
fetch
(
'../../../plugins/view/weixinwebauthorization/index/public/success'
);
}
else
{
$this
->
assign
(
'msg'
,
$ret
[
'msg'
]);
return
$this
->
fetch
(
'public/error'
);
return
$this
->
fetch
(
'public/
tips_
error'
);
}
}
...
...
application/service/PluginsService.php
浏览文件 @
98976ed5
...
...
@@ -66,7 +66,12 @@ class PluginsService
cache
(
$key
,
$data
);
}
}
return
DataReturn
(
'处理成功'
,
0
,
empty
(
$data
)
?
[]
:
$data
);
if
(
empty
(
$data
))
{
return
DataReturn
(
'应用不存在[ '
.
$plugins
.
' ]'
,
-
100
,
[]);
}
return
DataReturn
(
'处理成功'
,
0
,
$data
);
}
/**
...
...
@@ -124,5 +129,21 @@ class PluginsService
}
return
DataReturn
(
'操作失败'
,
-
100
);
}
/**
* 根据应用标记获取指定字段数据
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-09-29
* @desc description
* @param [string] $plugins [应用标记]
* @param [string] $field [字段名称]
*/
public
static
function
PluginsField
(
$plugins
,
$field
)
{
$data
=
Db
::
name
(
'Plugins'
)
->
where
([
'plugins'
=>
$plugins
])
->
value
(
$field
);
return
DataReturn
(
'操作成功'
,
0
,
$data
);
}
}
?>
\ No newline at end of file
public/static/index/default/css/common.css
浏览文件 @
98976ed5
...
...
@@ -256,9 +256,8 @@ color: #F5F5F2;font-size: 12px;cursor:pointer;border-radius:0px 0px; position: a
.price
strong
{
color
:
#E4393C
;
font-weight
:
600
;
}
/* 公共错误提示页面 */
.tips-error
,
.tips-success
{
margin
:
10%
0
;
}
.tips-pay-success
,
.tips-pay-error
,
.tips-error
,
.tips-success
{
box-shadow
:
none
;
text-align
:
center
;
}
.tips-error
i
.am-icon-times-circle
,
.tips-success
i
.am-icon-check-circle
{
font-size
:
26px
;
}
.tips-error
,
.tips-success
{
margin
:
10%
0
;
background
:
#fff
;
}
.tips-error
i
.am-icon-times-circle
,
.tips-success
i
.am-icon-check-circle
{
font-size
:
20px
;
}
.tips-error
i
.am-icon-times-circle
{
color
:
#F44336
;
}
.tips-success
i
.am-icon-check-circle
{
color
:
#4CAF50
;
}
.tips-error
span
.msg
,
.tips-success
span
.msg
{
font-size
:
22px
;
margin-left
:
10px
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录