Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
4c932eab
ShopXO
项目概览
jcy2004x
/
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,发现更多精彩内容 >>
提交
4c932eab
编写于
3月 18, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
运费设置应用
上级
dbab7d32
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
324 addition
and
15 deletion
+324
-15
application/plugins/freightfee/Admin.php
application/plugins/freightfee/Admin.php
+85
-0
application/plugins/freightfee/Hook.php
application/plugins/freightfee/Hook.php
+34
-0
application/plugins/freightfee/config.json
application/plugins/freightfee/config.json
+26
-0
application/plugins/view/freightfee/admin/index.html
application/plugins/view/freightfee/admin/index.html
+79
-0
application/plugins/view/freightfee/admin/saveinfo.html
application/plugins/view/freightfee/admin/saveinfo.html
+72
-0
config/shopxo.sql
config/shopxo.sql
+17
-15
public/static/plugins/css/freightfee/admin.css
public/static/plugins/css/freightfee/admin.css
+11
-0
public/static/upload/images/plugins_freightfee/2019/03/18/1552894366387964.jpg
...images/plugins_freightfee/2019/03/18/1552894366387964.jpg
+0
-0
未找到文件。
application/plugins/freightfee/Admin.php
0 → 100644
浏览文件 @
4c932eab
<?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\freightfee
;
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
(
'freightfee'
);
if
(
$ret
[
'code'
]
==
0
)
{
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/freightfee/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
(
'freightfee'
);
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/freightfee/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'
=>
'freightfee'
,
'data'
=>
$params
]);
}
}
?>
\ No newline at end of file
application/plugins/freightfee/Hook.php
0 → 100644
浏览文件 @
4c932eab
<?php
namespace
app\plugins\freightfee
;
use
think\Controller
;
/**
* 运费设置 - 钩子入口
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
Hook
extends
Controller
{
// 应用响应入口
public
function
run
(
$params
=
[])
{
// 是否控制器钩子
// is_backend 当前为后端业务处理
// hook_name 钩子名称
if
(
isset
(
$params
[
'is_backend'
])
&&
$params
[
'is_backend'
]
===
true
&&
!
empty
(
$params
[
'hook_name'
]))
{
// 参数一 描述
// 参数二 0 为处理成功, 负数为失败
// 参数三 返回数据
return
DataReturn
(
'返回描述'
,
0
);
// 默认返回视图
}
else
{
return
'hello world!'
;
}
}
}
?>
\ No newline at end of file
application/plugins/freightfee/config.json
0 → 100644
浏览文件 @
4c932eab
{
"base"
:{
"plugins"
:
"freightfee"
,
"name"
:
"运费设置"
,
"logo"
:
"
\/
static
\/
upload
\/
images
\/
plugins_freightfee
\/
2019
\/
03
\/
18
\/
1552894366387964.jpg"
,
"author"
:
"Devil"
,
"author_url"
:
"https:
\/\/
shopxo.net
\/
"
,
"version"
:
"1.0.0"
,
"desc"
:
"快递运费设置"
,
"apply_terminal"
:[
"pc"
,
"h5"
,
"app"
,
"alipay"
,
"weixin"
,
"baidu"
],
"apply_version"
:[
"1.4.0"
],
"is_home"
:
false
},
"hook"
:{
}
}
\ No newline at end of file
application/plugins/view/freightfee/admin/index.html
0 → 100644
浏览文件 @
4c932eab
{{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=
"freightfee-content"
>
<div
class=
"items"
>
<label>
应用导航名称
</label>
<div>
{{if !empty($data['application_name'])}}
{{$data.application_name}}
{{else /}}
无
{{/if}}
</div>
</div>
<div
class=
"items"
>
<label>
登录入口名称
</label>
<div>
{{if !empty($data['login_name'])}}
{{$data.login_name}}
{{else /}}
游客登录
{{/if}}
</div>
</div>
<div
class=
"items"
>
<label>
游客用户名
</label>
<div>
{{if !empty($data['nickname'])}}
{{$data.nickname}}
{{else /}}
游客
{{/if}}
</div>
</div>
<div
class=
"items"
>
<label>
订单查询提示
</label>
<div>
{{if !empty($data['query_tips'])}}
{{$data.query_tips}}
{{else /}}
无
{{/if}}
</div>
</div>
<div
class=
"items"
>
<label>
默认游客登录
</label>
<div>
{{if isset($data['is_default_tourist']) and $data['is_default_tourist'] eq 1}}
是
{{else /}}
否
{{/if}}
</div>
</div>
<div
class=
"items"
>
<label>
订单查询地址
</label>
<div>
<a
href=
"{{:PluginsHomeUrl('freightfee', 'index', 'index')}}"
target=
"_blank"
>
{{:PluginsHomeUrl('freightfee', 'index', 'index')}}
</a>
</div>
</div>
<a
href=
"{{:PluginsAdminUrl('freightfee', '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 -->
\ No newline at end of file
application/plugins/view/freightfee/admin/saveinfo.html
0 → 100644
浏览文件 @
4c932eab
{{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('freightfee', 'admin', 'save')}}"
method=
"POST"
request-type=
"ajax-url"
request-value=
"{{:PluginsAdminUrl('freightfee', 'admin', 'index')}}"
enctype=
"multipart/form-data"
>
<legend>
<span
class=
"fs-16"
>
运费设置
</span>
<a
href=
"{{:PluginsAdminUrl('freightfee', 'admin', 'index')}}"
class=
"fr fs-14 m-t-5 am-icon-mail-reply"
>
返回
</a>
</legend>
<div
class=
"am-form-group"
>
<label>
计价方式
</label>
<div>
{{foreach $is_whether_list as $v}}
<label
class=
"am-radio-inline m-r-10"
>
<input
type=
"radio"
name=
"valuation"
value=
"{{$v.id}}"
{{
if
isset
($
data
['
valuation
'])
and
$
data
['
valuation
']
eq
$
v
['
id
']}}
checked=
"checked"
{{
else
/}}{{
if
!
isset
($
data
['
valuation
'])
and
isset
($
v
['
checked
'])
and
$
v
['
checked
']
eq
true
}}
checked=
"checked"
{{/
if
}}{{/
if
}}
data-am-ucheck
/>
{{$v.name}}
</label>
{{/foreach}}
</div>
</div>
<div
class=
"freightfee-rules"
>
<table
class=
"am-table am-table-striped am-table-hover"
>
<thead>
<tr>
<th>
运送到
</th>
<th>
首件数(件)
</th>
<th>
首费(元)
</th>
<th>
续件数(件)
</th>
<th>
续费(元)
</th>
<th>
操作
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Amaze UI
</td>
<td>
http://amazeui.org
</td>
<td>
2012-10-01
</td></tr>
<tr>
<td>
Amaze UI
</td>
<td>
http://amazeui.org
</td>
<td>
2012-10-01
</td></tr>
<tr>
<td>
Amaze UI
</td>
<td>
http://amazeui.org
</td>
<td>
2012-10-01
</td></tr>
<tr>
<td>
Amaze UI
</td>
<td>
http://amazeui.org
</td>
<td>
2012-10-01
</td></tr>
<tr>
<td>
Amaze UI
</td>
<td>
http://amazeui.org
</td>
<td>
2012-10-01
</td></tr>
</tbody>
</table>
</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 -->
\ No newline at end of file
config/shopxo.sql
浏览文件 @
4c932eab
此差异已折叠。
点击以展开。
public/static/plugins/css/freightfee/admin.css
0 → 100755
浏览文件 @
4c932eab
/**
* 首页
*/
.freightfee-content
.items
{
margin
:
10px
0
20px
0
;
border-bottom
:
1px
dashed
#f1f1f1
;
padding-bottom
:
20px
;
}
.freightfee-content
.edit-submit
{
margin-bottom
:
20px
;
}
\ No newline at end of file
public/static/upload/images/plugins_freightfee/2019/03/18/1552894366387964.jpg
0 → 100644
浏览文件 @
4c932eab
3.3 KB
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录