Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
______--______
ShopXO
提交
e3df7fff
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,发现更多精彩内容 >>
提交
e3df7fff
编写于
4月 11, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
宠物管理系统应用
上级
fdd1af91
变更
17
展开全部
显示空白变更内容
内联
并排
Showing
17 changed file
with
770 addition
and
131 deletion
+770
-131
application/index/controller/Common.php
application/index/controller/Common.php
+8
-4
application/index/view/default/personal/save_info.html
application/index/view/default/personal/save_info.html
+1
-1
application/index/view/default/public/footer.html
application/index/view/default/public/footer.html
+18
-0
application/index/view/default/public/user_menu.html
application/index/view/default/public/user_menu.html
+4
-4
application/plugins/petscms/Hook.php
application/plugins/petscms/Hook.php
+33
-60
application/plugins/petscms/Pets.php
application/plugins/petscms/Pets.php
+49
-1
application/plugins/petscms/Service.php
application/plugins/petscms/Service.php
+125
-0
application/plugins/petscms/config.json
application/plugins/petscms/config.json
+3
-1
application/plugins/petscms/install.sql
application/plugins/petscms/install.sql
+21
-0
application/plugins/view/petscms/pets/index.html
application/plugins/view/petscms/pets/index.html
+140
-1
application/plugins/view/petscms/pets/saveinfo.html
application/plugins/view/petscms/pets/saveinfo.html
+137
-0
application/service/NavigationService.php
application/service/NavigationService.php
+35
-27
application/service/OrderService.php
application/service/OrderService.php
+39
-1
application/tags.php
application/tags.php
+4
-0
config/shopxo.sql
config/shopxo.sql
+113
-29
public/static/common/lib/ueditor/ueditor.config.js
public/static/common/lib/ueditor/ueditor.config.js
+2
-2
public/static/plugins/css/petscms/pets.css
public/static/plugins/css/petscms/pets.css
+38
-0
未找到文件。
application/index/controller/Common.php
浏览文件 @
e3df7fff
...
...
@@ -198,6 +198,10 @@ class Common extends Controller
*/
public
function
ViewInit
()
{
// 参数
$params
=
input
();
$this
->
assign
(
'params'
,
$params
);
// 商店信息
$this
->
assign
(
'common_customer_store_tel'
,
MyC
(
'common_customer_store_tel'
));
$this
->
assign
(
'common_customer_store_email'
,
MyC
(
'common_customer_store_email'
));
...
...
@@ -208,10 +212,10 @@ class Common extends Controller
$default_theme
=
strtolower
(
MyC
(
'common_default_theme'
,
'default'
,
true
));
$this
->
assign
(
'default_theme'
,
$default_theme
);
// 当前操作名称
$module_name
=
strtolower
(
request
()
->
module
())
;
$controller_name
=
strtolower
(
request
()
->
controller
())
;
$action_name
=
strtolower
(
request
()
->
action
())
;
// 当前操作名称
, 兼容插件模块名称
$module_name
=
empty
(
$params
[
'pluginsname'
])
?
strtolower
(
request
()
->
module
())
:
$params
[
'pluginsname'
]
;
$controller_name
=
empty
(
$params
[
'pluginscontrol'
])
?
strtolower
(
request
()
->
controller
())
:
$params
[
'pluginscontrol'
]
;
$action_name
=
empty
(
$params
[
'pluginsaction'
])
?
strtolower
(
request
()
->
action
())
:
$params
[
'pluginsaction'
]
;
// 当前操作名称
$this
->
assign
(
'module_name'
,
$module_name
);
...
...
application/index/view/default/personal/save_info.html
浏览文件 @
e3df7fff
...
...
@@ -35,7 +35,7 @@
{{include file="lib/gender" /}}
<div
class=
"am-form-group"
>
<label>
生日
</label>
<input
type=
"text"
name=
"birthday"
class=
"am-form-field am-
input-sm am-
radius Wdate"
placeholder=
"生日"
data-validation-message=
"生日格式有误"
{{
if
!
empty
($
data
)}}
value=
"{{$data.birthday_text}}"
onclick=
"WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})"
{{/
if
}}
autocomplete=
"off"
/>
<input
type=
"text"
name=
"birthday"
class=
"am-form-field am-radius Wdate"
placeholder=
"生日"
data-validation-message=
"生日格式有误"
{{
if
!
empty
($
data
)}}
value=
"{{$data.birthday_text}}"
onclick=
"WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})"
{{/
if
}}
autocomplete=
"off"
/>
</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>
...
...
application/index/view/default/public/footer.html
浏览文件 @
e3df7fff
<!-- commom html -->
<textarea
id=
"upload-editor-view"
data-url=
"{{:MyUrl('admin/ueditor/index', ['path_type'=>empty($editor_path_type) ? 'common' : $editor_path_type])}}"
style=
"display: none;"
></textarea>
<!-- footer start -->
{{if !isset($is_footer) or $is_footer eq 1}}
{{include file="public/footer_nav" /}}
...
...
@@ -50,6 +53,21 @@
<!-- 日期组件 -->
<script
type=
'text/javascript'
src=
"{{$Think.__MY_ROOT_PUBLIC__}}static/common/lib/My97DatePicker/WdatePicker.js"
></script>
<!-- 隐藏编辑器初始化 -->
<script
type=
"text/javascript"
>
var
upload_editor
=
UE
.
getEditor
(
"
upload-editor-view
"
,
{
isShow
:
false
,
focus
:
false
,
enableAutoSave
:
false
,
autoSyncData
:
false
,
autoFloatEnabled
:
false
,
wordCount
:
false
,
sourceEditor
:
null
,
scaleEnabled
:
true
,
toolbars
:
[[
"
insertimage
"
,
"
insertvideo
"
,
"
attachment
"
]]
});
</script>
<!-- 项目公共 -->
<script
type=
'text/javascript'
src=
"{{$Think.__MY_ROOT_PUBLIC__}}static/common/js/common.js?v={{:MyC('home_static_cache_version')}}"
></script>
<script
type=
'text/javascript'
src=
"{{$Think.__MY_ROOT_PUBLIC__}}static/index/{{$default_theme}}/js/common.js?v={{:MyC('home_static_cache_version')}}"
></script>
...
...
application/index/view/default/public/user_menu.html
浏览文件 @
e3df7fff
...
...
@@ -6,8 +6,8 @@
{{foreach $user_left_menu as $k=>$v}}
{{if $v.is_show eq 1}}
{{if empty($v['item'])}}
<li
data-value=
"user-left-menu-{{:strtolower($v['control'].'-'.$v['action'])}}"
class=
"user-left-menu-{{:strtolower($v['control'].'-'.$v['action'])}} {{if strtolower($controller_name.$action_name) eq strtolower($v['control'].$v['action']) and strtolower($v['control'].$v['action']) eq 'userindex'
}} am-active{{/if}}"
>
<a
href=
"{{
:MyUrl('index/'.$v['control'].'/'.$v['action'])
}}"
>
{{if !empty($v['icon'])}}
<i
class=
"{{$v.icon}}"
></i>
{{/if}} {{$v.name}}
</a>
<li
class=
"{{if isset($v['contains']) and in_array(strtolower($controller_name.$action_name), $v['contains'])
}} am-active{{/if}}"
>
<a
href=
"{{
$v.url
}}"
>
{{if !empty($v['icon'])}}
<i
class=
"{{$v.icon}}"
></i>
{{/if}} {{$v.name}}
</a>
</li>
{{else /}}
<li>
...
...
@@ -15,8 +15,8 @@
<ul
class=
"am-list am-collapse user-sidebar-sub am-in"
id=
"collapse-nav-{{$k}}"
>
{{foreach $v.item as $vs}}
{{if $vs.is_show eq 1}}
<li
data-value=
"user-left-menu-{{:strtolower($vs['control'].'-'.$vs['action'])}}"
class=
"user-left-menu-{{:strtolower($vs['control'].'-'.$vs['action'])}} {{if strtolower($controller_name) eq strtolower($vs['control']) and strtolower($controller_name) neq 'user'
}} am-active{{/if}}"
>
<a
href=
"{{
:MyUrl('index/'.$vs['control'].'/'.$vs['action'])
}}"
class=
"am-cf"
>
{{if !empty($vs['icon'])}}
<i
class=
"{{$vs.icon}}"
></i>
{{/if}} {{$vs.name}}
</a>
<li
class=
"{{if isset($vs['contains']) and in_array(strtolower($controller_name.$action_name), $vs['contains'])
}} am-active{{/if}}"
>
<a
href=
"{{
$vs.url
}}"
class=
"am-cf"
>
{{if !empty($vs['icon'])}}
<i
class=
"{{$vs.icon}}"
></i>
{{/if}} {{$vs.name}}
</a>
</li>
{{/if}}
{{/foreach}}
...
...
application/plugins/petscms/Hook.php
浏览文件 @
e3df7fff
...
...
@@ -32,75 +32,48 @@ class Hook extends Controller
*/
public
function
run
(
$params
=
[])
{
// 是否后端钩子
if
(
isset
(
$params
[
'is_backend'
])
&&
$params
[
'is_backend'
]
===
true
&&
!
empty
(
$params
[
'hook_name'
]))
if
(
!
empty
(
$params
[
'hook_name'
]))
{
return
DataReturn
(
'无需处理'
,
0
);
switch
(
$params
[
'hook_name'
])
{
// 用户中心左侧导航
case
'plugins_service_users_center_left_menu_handle'
:
$ret
=
$this
->
UserCenterLeftMenuHandle
(
$params
);
break
;
// 默认返回视图
}
else
{
return
$this
->
html
(
$params
);
default
:
$ret
=
''
;
}
return
$ret
;
}
}
/**
*
视图
*
用户中心左侧菜单处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-02-06T16:16:34+0800
* @param [array] $params [输入参数]
* @date 2019-04-11
* @desc description
* @param array $params [description]
*/
public
function
html
(
$params
=
[])
{
// 当前模块/控制器/方法
$module_name
=
strtolower
(
request
()
->
module
());
$controller_name
=
strtolower
(
request
()
->
controller
());
$action_name
=
strtolower
(
request
()
->
action
());
// 获取应用数据
$ret
=
PluginsService
::
PluginsData
(
'petscms'
);
if
(
$ret
[
'code'
]
==
0
)
{
// 内容是否为空
if
(
empty
(
$ret
[
'data'
][
'content'
]))
public
function
UserCenterLeftMenuHandle
(
$params
=
[])
{
return
''
;
}
// 有效时间
if
(
!
empty
(
$ret
[
'data'
][
'time_start'
]))
{
// 是否已开始
if
(
strtotime
(
$ret
[
'data'
][
'time_start'
])
>
time
())
{
return
''
;
}
}
if
(
!
empty
(
$ret
[
'data'
][
'time_end'
]))
{
// 是否已结束
if
(
strtotime
(
$ret
[
'data'
][
'time_end'
])
<
time
())
{
return
''
;
}
}
// 非全局
if
(
$ret
[
'data'
][
'is_overall'
]
!=
1
)
{
// 非首页则空
if
(
$module_name
.
$controller_name
.
$action_name
!=
'indexindexindex'
)
{
return
''
;
}
}
$this
->
assign
(
'data'
,
$ret
[
'data'
]);
return
$this
->
fetch
(
'../../../plugins/view/petscms/index/content'
);
}
else
{
return
$ret
[
'msg'
];
}
$menu
=
[[
'name'
=>
'宠物管理'
,
'is_show'
=>
1
,
'icon'
=>
'am-icon-drupal'
,
'item'
=>
[
[
'name'
=>
'我的宠物'
,
'url'
=>
PluginsHomeUrl
(
'petscms'
,
'pets'
,
'index'
),
'contains'
=>
[
'petsindex'
,
'petssaveinfo'
],
'is_show'
=>
1
,
'icon'
=>
'am-icon-github-alt'
,
],
]
]];
array_splice
(
$params
[
'data'
],
2
,
0
,
$menu
);
}
}
?>
\ No newline at end of file
application/plugins/petscms/Pets.php
浏览文件 @
e3df7fff
...
...
@@ -24,7 +24,20 @@ use app\service\PluginsService;
class
Pets
extends
Controller
{
/**
* 订单查询入口
* 构造方法
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-03-15
* @desc description
*/
public
function
__construct
()
{
parent
::
__construct
();
}
/**
* 我的宠物
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
...
...
@@ -33,7 +46,42 @@ class Pets extends Controller
*/
public
function
index
(
$params
=
[])
{
$this
->
assign
(
'pets_attribute_is_text_list'
,
Service
::
$pets_attribute_is_text_list
);
$this
->
assign
(
'pets_attribute_gender_list'
,
Service
::
$pets_attribute_gender_list
);
$this
->
assign
(
'pets_attribute_type_list'
,
Service
::
$pets_attribute_type_list
);
return
$this
->
fetch
(
'../../../plugins/view/petscms/pets/index'
);
}
/**
* 宠物添加/编辑页面
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public
function
saveinfo
(
$params
=
[])
{
$this
->
assign
(
'data'
,
[]);
$this
->
assign
(
'pets_attribute_is_text_list'
,
Service
::
$pets_attribute_is_text_list
);
$this
->
assign
(
'pets_attribute_gender_list'
,
Service
::
$pets_attribute_gender_list
);
$this
->
assign
(
'pets_attribute_type_list'
,
Service
::
$pets_attribute_type_list
);
return
$this
->
fetch
(
'../../../plugins/view/petscms/pets/saveinfo'
);
}
/**
* 宠物添加/编辑
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @datetime 2019-03-15T23:51:50+0800
* @param [array] $params [输入参数]
*/
public
function
save
(
$params
=
[])
{
$ret
=
Service
::
PestSave
(
$params
);
print_r
(
$ret
);
die
;
}
}
?>
\ No newline at end of file
application/plugins/petscms/Service.php
浏览文件 @
e3df7fff
...
...
@@ -22,6 +22,131 @@ use app\service\ResourcesService;
*/
class
Service
{
// 类型
public
static
$pets_attribute_type_list
=
[
'cat'
=>
[
'value'
=>
'cat'
,
'name'
=>
'猫咪'
],
'dog'
=>
[
'value'
=>
'dog'
,
'name'
=>
'狗狗'
],
'other'
=>
[
'value'
=>
'other'
,
'name'
=>
'其它'
],
];
// 是否
public
static
$pets_attribute_is_text_list
=
[
0
=>
[
'value'
=>
0
,
'name'
=>
'否'
,
'checked'
=>
true
],
1
=>
[
'value'
=>
1
,
'name'
=>
'是'
],
];
// 性别
public
static
$pets_attribute_gender_list
=
[
0
=>
[
'value'
=>
0
,
'name'
=>
'公'
],
1
=>
[
'value'
=>
1
,
'name'
=>
'母'
],
];
/**
* 宠物保存
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-04-11
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
PestSave
(
$params
=
[])
{
// 请求参数
$p
=
[
[
'checked_type'
=>
'length'
,
'key_name'
=>
'title'
,
'checked_data'
=>
'1,60'
,
'is_checked'
=>
2
,
'error_msg'
=>
'标题格式 1~60 个字符之间'
,
],
[
'checked_type'
=>
'length'
,
'key_name'
=>
'name'
,
'checked_data'
=>
'1,30'
,
'is_checked'
=>
2
,
'error_msg'
=>
'宠物名字格式 1~30 个字符之间'
,
],
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'birthday'
,
'is_checked'
=>
2
,
'error_msg'
=>
'请填写出生日期'
,
],
[
'checked_type'
=>
'in'
,
'key_name'
=>
'type'
,
'checked_data'
=>
array_column
(
$pets_attribute_type_list
,
'value'
),
'is_checked'
=>
2
,
'error_msg'
=>
'宠物类型有误'
,
],
[
'checked_type'
=>
'length'
,
'key_name'
=>
'varieties'
,
'checked_data'
=>
'30'
,
'is_checked'
=>
2
,
'error_msg'
=>
'品种格式最多 30 个字符'
,
],
[
'checked_type'
=>
'in'
,
'key_name'
=>
'gender'
,
'checked_data'
=>
array_column
(
$pets_attribute_gender_list
,
'value'
),
'is_checked'
=>
2
,
'error_msg'
=>
'宠物性别有误'
,
],
[
'checked_type'
=>
'in'
,
'key_name'
=>
'sterilization'
,
'checked_data'
=>
array_column
(
$pets_attribute_gender_list
,
'value'
),
'is_checked'
=>
2
,
'error_msg'
=>
'宠物是否绝育有误'
,
],
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'photo'
,
'is_checked'
=>
2
,
'error_msg'
=>
'请上传宠物相册'
,
],
[
'checked_type'
=>
'length'
,
'key_name'
=>
'content'
,
'checked_data'
=>
'105000'
,
'is_checked'
=>
2
,
'error_msg'
=>
'宠物简介内容最多 105000 个字符'
,
],
[
'checked_type'
=>
'length'
,
'key_name'
=>
'person_name'
,
'checked_data'
=>
'1,30'
,
'is_checked'
=>
2
,
'error_msg'
=>
'主人姓名格式 1~30 个字符之间'
,
],
[
'checked_type'
=>
'length'
,
'key_name'
=>
'person_tel'
,
'checked_data'
=>
'1,30'
,
'is_checked'
=>
2
,
'error_msg'
=>
'主人电话格式 1~30 个字符之间'
,
],
[
'checked_type'
=>
'length'
,
'key_name'
=>
'person_weixin'
,
'checked_data'
=>
'1,30'
,
'is_checked'
=>
2
,
'error_msg'
=>
'主人微信格式 1~30 个字符之间'
,
],
];
$ret
=
ParamsChecked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
// 宠物数据
$data
=
[
];
}
}
?>
\ No newline at end of file
application/plugins/petscms/config.json
浏览文件 @
e3df7fff
...
...
@@ -17,6 +17,8 @@
"is_home"
:
false
},
"hook"
:{
"plugins_service_users_center_left_menu_handle"
:[
"app
\\
plugins
\\
petscms
\\
Hook"
]
}
}
\ No newline at end of file
application/plugins/petscms/install.sql
浏览文件 @
e3df7fff
CREATE
TABLE
`s_plugins_petscms_pets`
(
`id`
int
(
11
)
unsigned
NOT
NULL
AUTO_INCREMENT
COMMENT
'自增id'
,
`title`
char
(
60
)
NOT
NULL
DEFAULT
''
COMMENT
'标题'
,
`name`
char
(
30
)
NOT
NULL
DEFAULT
''
COMMENT
'名字'
,
`birthday`
int
(
11
)
unsigned
NOT
NULL
DEFAULT
'0'
COMMENT
'出生日期'
,
`type`
char
(
60
)
NOT
NULL
DEFAULT
''
COMMENT
'类型'
,
`varieties`
char
(
60
)
NOT
NULL
DEFAULT
''
COMMENT
'品种'
,
`gender`
tinyint
(
2
)
unsigned
NOT
NULL
DEFAULT
'0'
COMMENT
'性别(0公, 1母)'
,
`sterilization`
tinyint
(
2
)
unsigned
NOT
NULL
DEFAULT
'0'
COMMENT
'是否绝育(0否, 1是)'
,
`vaccine`
tinyint
(
2
)
unsigned
NOT
NULL
DEFAULT
'0'
COMMENT
'是否疫苗(0否, 1是)'
,
`photo`
mediumtext
NOT
NULL
COMMENT
'相册(json数据)'
,
`content`
mediumtext
NOT
NULL
COMMENT
'宠物简介'
,
`person_name`
char
(
30
)
NOT
NULL
DEFAULT
''
COMMENT
'主人姓名'
,
`person_tel`
char
(
30
)
NOT
NULL
DEFAULT
''
COMMENT
'主人电话'
,
`person_weixin`
char
(
30
)
NOT
NULL
DEFAULT
''
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
`type`
(
`type`
),
KEY
`gender`
(
`gender`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'宠物管理系统宠物 - 应用'
;
\ No newline at end of file
application/plugins/view/petscms/pets/index.html
浏览文件 @
e3df7fff
user - pets
\ No newline at end of file
{{include file="public/header" /}}
<!-- 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" /}}
<!-- content -->
<div
class=
"am-container user-main"
>
<!-- user menu start -->
{{include file="public/user_menu" /}}
<!-- user menu end -->
<!-- content start -->
<div
class=
"user-content"
>
<div
class=
"user-content-body"
>
<form
class=
"am-form form-validation"
method=
"post"
action=
"{{:PluginsHomeUrl('petscms', 'pets', 'index')}}"
request-type=
"form"
>
<div
class=
"thin"
>
<div
class=
"am-input-group am-input-group-sm am-fl so"
>
<input
type=
"text"
autocomplete=
"off"
name=
"keywords"
class=
"am-radius"
placeholder=
"其实搜索很简单 ^_^!"
value=
"{{if !empty($params.keywords)}}{{$params.keywords}}{{/if}}"
/>
<span
class=
"am-input-group-btn"
>
<button
class=
"am-btn am-btn-default am-radius"
type=
"submit"
data-am-loading=
"{spinner:'circle-o-notch', loadingText:'搜索中...'}"
>
搜索
</button>
</span>
</div>
<label
class=
"am-fl thin_sub more-submit"
>
更多筛选条件
<input
type=
"checkbox"
name=
"is_more"
value=
"1"
class=
"none am-field-valid"
{{
if
isset
($
params
['
is_more
'])}}
checked
{{/
if
}}
/>
<i
class=
"am-icon-angle-up"
></i>
</label>
</div>
<table
class=
"so-list more-where {{if !isset($params['is_more'])}}none{{/if}}"
>
<tbody>
<tr>
<td>
<span>
类型:
</span>
<select
name=
"type"
class=
"chosen-select"
data-placeholder=
"宠物类型..."
>
<option
value=
"-1"
>
宠物类型...
</option>
{{if !empty($pets_attribute_type_list)}}
{{foreach $pets_attribute_type_list as $v}}
<option
value=
"{{$v.value}}"
{{
if
isset
($
params
['
type
'])
and
$
params
['
type
']
eq
$
v
['
value
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
{{/if}}
</select>
</td>
<td>
<span>
性别:
</span>
<select
name=
"gender"
class=
"chosen-select"
data-placeholder=
"宠物性别..."
>
<option
value=
"-1"
>
宠物性别...
</option>
{{if !empty($pets_attribute_gender_list)}}
{{foreach $pets_attribute_gender_list as $v}}
<option
value=
"{{$v.value}}"
{{
if
isset
($
params
['
gender
'])
and
$
params
['
gender
']
eq
$
v
['
value
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
{{/if}}
</select>
</td>
</tr>
<tr>
<td>
<span>
绝育:
</span>
<select
name=
"sterilization"
class=
"chosen-select"
data-placeholder=
"是否绝育..."
>
<option
value=
"-1"
>
是否绝育...
</option>
{{if !empty($pets_attribute_is_text_list)}}
{{foreach $pets_attribute_is_text_list as $v}}
<option
value=
"{{$v.value}}"
{{
if
isset
($
params
['
sterilization
'])
and
$
params
['
sterilization
']
eq
$
v
['
value
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
{{/if}}
</select>
</td>
<td>
<button
type=
"submit"
class=
"am-btn am-btn-primary am-radius am-btn-xs btn-loading-example"
data-am-loading=
"{spinner:'circle-o-notch', loadingText:'搜索中...'}"
>
搜索
</button>
<a
href=
"{{:PluginsHomeUrl('petscms', 'pets', 'index')}}"
class=
"am-btn am-btn-warning am-radius am-btn-sm reset-submit"
>
清除条件
</a>
</td>
</tr>
</tbody>
</table>
</form>
<!-- operation start -->
<div
class=
"am-g operation-nav"
>
<a
href=
"{{:PluginsHomeUrl('petscms', 'pets', 'saveinfo')}}"
class=
"am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus"
>
新增
</a>
</div>
<!-- operation end -->
<!-- 列表 -->
<div
class=
"data-list"
>
<table
class=
"am-table"
>
<thead>
<tr>
<th>
标题
</th>
<th
class=
"am-hide-sm-only"
>
类型
</th>
<th
class=
"am-hide-sm-only"
>
业务
</th>
<th>
详情
</th>
<th
class=
"am-hide-sm-only"
>
状态
</th>
<th
class=
"am-hide-sm-only"
>
时间
</th>
</tr>
</thead>
<tbody>
{{if !empty($data_list)}}
{{foreach $data_list as $v}}
<tr>
<td>
{{$v.title}}
</td>
<td
class=
"am-hide-sm-only"
>
{{$v.type_name}}
</td>
<td
class=
"am-hide-sm-only"
>
{{$v.business_type_name}}
</td>
<td>
{{$v.detail}}
</td>
<td
class=
"am-hide-sm-only"
>
{{$v.is_read_name}}
</td>
<td
class=
"am-hide-sm-only"
>
{{$v.add_time_time}}
</td>
</tr>
{{/foreach}}
{{/if}}
{{if empty($data_list)}}
<tr>
<td
colspan=
"5"
>
<div
class=
"table-no"
><i
class=
"am-icon-warning"
></i>
没有相关数据
</div>
</td>
</tr>
{{/if}}
</tbody>
</table>
</div>
<!-- 分页 -->
{{if !empty($data_list)}}
{{$page_html|raw}}
{{/if}}
</div>
</div>
<!-- content end -->
</div>
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
application/plugins/view/petscms/pets/saveinfo.html
0 → 100644
浏览文件 @
e3df7fff
{{include file="public/header" /}}
<!-- 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" /}}
<!-- content -->
<div
class=
"am-container user-main"
>
<!-- user menu start -->
{{include file="public/user_menu" /}}
<!-- user menu end -->
<!-- content start -->
<div
class=
"user-content"
>
<div
class=
"user-content-body"
>
<form
class=
"am-form form-validation view-save"
action=
"{{:PluginsHomeUrl('petscms', 'pets', 'save')}}"
method=
"POST"
request-type=
"ajax-url"
request-value=
"{{:PluginsHomeUrl('petscms', 'pets', 'index', $params)}}"
enctype=
"multipart/form-data"
>
<div
class=
"am-form-group"
>
<label>
标题
<span
class=
"am-form-group-label-tips-must"
>
必填
</span></label>
<input
type=
"text"
name=
"name"
placeholder=
"标题"
minlength=
"1"
maxlength=
"60"
data-validation-message=
"标题格式 1~60 个字符之间"
class=
"am-radius"
required
/>
</div>
<div
class=
"am-form-group"
>
<label>
宠物名字
<span
class=
"am-form-group-label-tips-must"
>
必填
</span></label>
<input
type=
"text"
name=
"name"
placeholder=
"宠物名字"
minlength=
"1"
maxlength=
"30"
data-validation-message=
"宠物名字格式 1~30 个字符之间"
class=
"am-radius"
required
/>
</div>
<div
class=
"am-form-group"
>
<label>
出生日期
<span
class=
"am-form-group-label-tips-must"
>
必填
</span></label>
<input
type=
"text"
name=
"birthday"
class=
"am-form-field am-radius Wdate"
placeholder=
"出生日期"
data-validation-message=
"出生日期格式有误"
{{
if
!
empty
($
data
)}}
value=
"{{$data.birthday_text}}"
onclick=
"WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})"
{{/
if
}}
autocomplete=
"off"
/>
</div>
<div
class=
"am-form-group"
>
<label>
类型
<span
class=
"am-form-group-label-tips-must"
>
必选
</span></label>
<select
name=
"type"
class=
"am-radius chosen-select"
data-placeholder=
"可选择..."
data-validation-message=
"请选择类型"
required
>
<option
value=
""
>
可选择...
</option>
{{foreach $pets_attribute_type_list as $v}}
<option
value=
"{{$v.value}}"
{{
if
isset
($
data
['
type
'])
and
$
data
['
type
']
eq
$
v
['
value
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
</div>
<div
class=
"am-form-group"
>
<label>
品种
<span
class=
"am-form-group-label-tips"
>
选填
</span></label>
<input
type=
"text"
name=
"varieties"
placeholder=
"品种"
maxlength=
"30"
data-validation-message=
"品种格式最多 30 个字符"
class=
"am-radius"
/>
</div>
<div
class=
"am-form-group"
>
<label>
性别
<span
class=
"am-form-group-label-tips-must"
>
必选
</span></label>
<select
name=
"gender"
class=
"am-radius chosen-select"
data-placeholder=
"可选择..."
data-validation-message=
"请选择性别"
required
>
<option
value=
""
>
可选择...
</option>
{{foreach $pets_attribute_gender_list as $v}}
<option
value=
"{{$v.value}}"
{{
if
isset
($
data
['
gender
'])
and
$
data
['
gender
']
eq
$
v
['
value
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
</div>
<div
class=
"am-form-group"
>
<label>
是否绝育
<span
class=
"am-form-group-label-tips-must"
>
必选
</span></label>
<select
name=
"sterilization"
class=
"am-radius chosen-select"
data-placeholder=
"可选择..."
data-validation-message=
"请选择是否绝育"
required
>
<option
value=
""
>
可选择...
</option>
{{foreach $pets_attribute_is_text_list as $v}}
<option
value=
"{{$v.value}}"
{{
if
isset
($
data
['
sterilization
'])
and
$
data
['
sterilization
']
eq
$
v
['
value
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
</div>
<div
class=
"am-form-group"
>
<label>
是否疫苗
<span
class=
"am-form-group-label-tips-must"
>
必选
</span></label>
<select
name=
"vaccine"
class=
"am-radius chosen-select"
data-placeholder=
"可选择..."
data-validation-message=
"请选择是否疫苗"
required
>
<option
value=
""
>
可选择...
</option>
{{foreach $pets_attribute_is_text_list as $v}}
<option
value=
"{{$v.value}}"
{{
if
isset
($
data
['
vaccine
'])
and
$
data
['
vaccine
']
eq
$
v
['
value
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
</div>
<!-- 相册 -->
<div
class=
"am-form-group"
>
<label>
宠物相册
<span
class=
"am-form-group-label-tips"
>
必选,可拖拽图片进行排序,建议图片尺寸一致
</span></label>
<ul
class=
"plug-file-upload-view goods-photo-view"
data-form-name=
"photo[]"
data-max-number=
"5"
data-dialog-type=
"images"
>
{{if !empty($data['photo'])}}
{{foreach $data.photo as $v}}
<li>
<input
type=
"text"
name=
"photo[]"
value=
"{{$v.images_old}}"
/>
<img
src=
"{{$v.images}}"
/>
<i>
×
</i>
</li>
{{/foreach}}
{{/if}}
</ul>
<div
class=
"plug-file-upload-submit"
data-view-tag=
"ul.goods-photo-view"
>
+上传相册
</div>
</div>
<!-- 宠物简介 -->
<div
class=
"am-form-group"
>
<label>
宠物简介
<span
class=
"am-form-group-label-tips-must"
>
必填
</span></label>
<textarea
class=
"am-radius am-validate"
name=
"content"
maxlength=
"105000"
id=
"editor-tag"
data-validation-message=
"宠物简介内容最多 105000 个字符"
required
>
{{if !empty($data)}}{{$data.content}}{{/if}}
</textarea>
</div>
<!-- 主人信息 -->
<div
class=
"am-alert am-alert-secondary person-view"
data-am-alert
>
<div
class=
"am-form-group"
>
<label>
主人姓名
<span
class=
"am-form-group-label-tips-must"
>
必填
</span></label>
<input
type=
"text"
name=
"person_name"
placeholder=
"主人姓名"
minlength=
"1"
maxlength=
"30"
data-validation-message=
"主人姓名格式 1~30 个字符之间"
class=
"am-radius"
required
/>
</div>
<div
class=
"am-form-group"
>
<label>
主人电话
<span
class=
"am-form-group-label-tips-must"
>
必填
</span></label>
<input
type=
"text"
name=
"person_tel"
placeholder=
"主人电话"
minlength=
"1"
maxlength=
"30"
data-validation-message=
"主人电话格式 1~30 个字符之间"
class=
"am-radius"
required
/>
</div>
<div
class=
"am-form-group"
>
<label>
主人微信
<span
class=
"am-form-group-label-tips-must"
>
必填
</span></label>
<input
type=
"text"
name=
"person_weixin"
placeholder=
"主人微信"
minlength=
"1"
maxlength=
"30"
data-validation-message=
"主人微信格式 1~30 个字符之间"
class=
"am-radius"
required
/>
</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 am-btn-block"
data-am-loading=
"{loadingText:'处理中...'}"
>
提交
</button>
</div>
</form>
</div>
</div>
<!-- content end -->
</div>
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
application/service/NavigationService.php
浏览文件 @
e3df7fff
...
...
@@ -682,12 +682,20 @@ class NavigationService
*/
public
static
function
UsersCenterLeftList
(
$params
=
[])
{
// name 名称
// url 页面地址
// is_show 是否显示(0否, 1是)
// contains 包含的子页面(包括自身)
// icon icon类
// item 二级数据
// 菜单列表
$data
=
[
[
'control'
=>
'user'
,
'action'
=>
'index'
,
'name'
=>
'个人中心'
,
'url'
=>
MyUrl
(
'index/user/index'
),
'is_show'
=>
1
,
'contains'
=>
[
'userindex'
],
'icon'
=>
'am-icon-home'
,
],
[
...
...
@@ -696,16 +704,16 @@ class NavigationService
'icon'
=>
'am-icon-cube'
,
'item'
=>
[
[
'control'
=>
'order'
,
'action'
=>
'index'
,
'name'
=>
'订单管理'
,
'url'
=>
MyUrl
(
'index/order/index'
),
'is_show'
=>
1
,
'contains'
=>
[
'orderindex'
,
'orderdetail'
,
'ordercomments'
],
'icon'
=>
'am-icon-th-list'
,
],
[
'control'
=>
'userfavor'
,
'action'
=>
'goods'
,
'name'
=>
'我的收藏'
,
'url'
=>
MyUrl
(
'index/userfavor/goods'
),
'contains'
=>
[
'userfavorgoods'
],
'is_show'
=>
1
,
'icon'
=>
'am-icon-heart-o'
,
],
...
...
@@ -717,63 +725,63 @@ class NavigationService
'icon'
=>
'am-icon-user'
,
'item'
=>
[
[
'control'
=>
'personal'
,
'action'
=>
'index'
,
'name'
=>
'个人资料'
,
'url'
=>
MyUrl
(
'index/personal/index'
),
'contains'
=>
[
'personalindex'
,
'personalsaveinfo'
],
'is_show'
=>
1
,
'icon'
=>
'am-icon-gear'
,
],
[
'control'
=>
'useraddress'
,
'action'
=>
'index'
,
'name'
=>
'我的地址'
,
'url'
=>
MyUrl
(
'index/useraddress/index'
),
'contains'
=>
[
'useraddressindex'
,
'useraddresssaveinfo'
],
'is_show'
=>
1
,
'icon'
=>
'am-icon-street-view'
,
],
[
'control'
=>
'safety'
,
'action'
=>
'index'
,
'name'
=>
'安全设置'
,
'url'
=>
MyUrl
(
'index/safety/index'
),
'contains'
=>
[
'safetyindex'
,
'safetyloginpwdinfo'
,
'safetymobileinfo'
,
'safetynewmobileinfo'
,
'safetyemailinfo'
,
'safetynewemailinfo'
],
'is_show'
=>
1
,
'icon'
=>
'am-icon-user-secret'
,
],
[
'control'
=>
'message'
,
'action'
=>
'index'
,
'name'
=>
'我的消息'
,
'url'
=>
MyUrl
(
'index/message/index'
),
'contains'
=>
[
'messageindex'
],
'is_show'
=>
1
,
'icon'
=>
'am-icon-bell-o'
,
],
[
'control'
=>
'userintegral'
,
'action'
=>
'index'
,
'name'
=>
'我的积分'
,
'url'
=>
MyUrl
(
'index/userintegral/index'
),
'contains'
=>
[
'userintegralindex'
],
'is_show'
=>
1
,
'icon'
=>
'am-icon-fire'
,
],
[
'control'
=>
'usergoodsbrowse'
,
'action'
=>
'index'
,
'name'
=>
'我的足迹'
,
'url'
=>
MyUrl
(
'index/usergoodsbrowse/index'
),
'contains'
=>
[
'usergoodsbrowseindex'
],
'is_show'
=>
1
,
'icon'
=>
'am-icon-lastfm'
,
],
[
'control'
=>
'answer'
,
'action'
=>
'index'
,
'name'
=>
'问答/留言'
,
'url'
=>
MyUrl
(
'index/answer/index'
),
'contains'
=>
[
'answerindex'
],
'is_show'
=>
1
,
'icon'
=>
'am-icon-question'
,
],
]
],
[
'control'
=>
'user'
,
'action'
=>
'logout'
,
'name'
=>
'安全退出'
,
'url'
=>
MyUrl
(
'index/user/logout'
),
'contains'
=>
[
'userlogout'
],
'is_show'
=>
1
,
'icon'
=>
'am-icon-power-off'
,
],
]
],
];
// 用户中心左侧菜单钩子
...
...
application/service/OrderService.php
浏览文件 @
e3df7fff
...
...
@@ -375,6 +375,19 @@ class OrderService
return
DataReturn
(
'支付方式有误'
,
-
1
);
}
// 订单支付成功处理前钩子
$hook_name
=
'plugins_service_order_pay_handle_begin'
;
$ret
=
Hook
::
listen
(
$hook_name
,
[
'hook_name'
=>
$hook_name
,
'is_backend'
=>
true
,
'params'
=>
&
$params
,
'order_id'
=>
$params
[
'order'
][
'id'
]
]);
if
(
isset
(
$ret
[
'code'
])
&&
$ret
[
'code'
]
!=
0
)
{
return
$ret
;
}
// 支付参数
$pay_price
=
isset
(
$params
[
'pay'
][
'pay_price'
])
?
$params
[
'pay'
][
'pay_price'
]
:
0
;
...
...
@@ -426,6 +439,16 @@ class OrderService
// 提交事务
Db
::
commit
();
// 订单支付成功处理完毕钩子
$hook_name
=
'plugins_service_order_pay_success_handle_end'
;
$ret
=
Hook
::
listen
(
$hook_name
,
[
'hook_name'
=>
$hook_name
,
'is_backend'
=>
true
,
'params'
=>
$params
,
'order_id'
=>
$params
[
'order'
][
'id'
]
]);
return
DataReturn
(
'支付成功'
,
0
);
}
}
...
...
@@ -764,7 +787,22 @@ class OrderService
'creator_name'
=>
htmlentities
(
$creator_name
),
'add_time'
=>
time
(),
];
return
Db
::
name
(
'OrderStatusHistory'
)
->
insertGetId
(
$data
)
>
0
;
// 日志添加
if
(
Db
::
name
(
'OrderStatusHistory'
)
->
insertGetId
(
$data
)
>
0
)
{
// 订单状态改变添加日志钩子
$hook_name
=
'plugins_service_order_status_change_history_success_handle'
;
$ret
=
Hook
::
listen
(
$hook_name
,
[
'hook_name'
=>
$hook_name
,
'is_backend'
=>
true
,
'data'
=>
$data
,
'order_id'
=>
$data
[
'order_id'
]
]);
return
true
;
}
return
false
;
}
/**
...
...
application/tags.php
浏览文件 @
e3df7fff
...
...
@@ -117,5 +117,9 @@ return array (
0
=>
'app\\plugins\\freightfee\\Hook'
,
1
=>
'app\\plugins\\newuserreduction\\Hook'
,
),
'plugins_service_users_center_left_menu_handle'
=>
array
(
0
=>
'app\\plugins\\petscms\\Hook'
,
),
);
?>
\ No newline at end of file
config/shopxo.sql
浏览文件 @
e3df7fff
此差异已折叠。
点击以展开。
public/static/common/lib/ueditor/ueditor.config.js
浏览文件 @
e3df7fff
...
...
@@ -94,7 +94,7 @@
//,indentValue:'2em'
//,initialFrameWidth:1000 //初始化编辑器宽度,默认1000
,
initialFrameHeight
:
50
0
//初始化编辑器高度,默认320
,
initialFrameHeight
:
35
0
//初始化编辑器高度,默认320
//,readonly : false //编辑器初始化结束后,编辑区域是否是只读的,默认是false
...
...
@@ -291,7 +291,7 @@
//autoFloatEnabled
//是否保持toolbar的位置不动,默认true
//,autoFloatEnabled:tru
e
,
autoFloatEnabled
:
fals
e
//浮动时工具栏距离浏览器顶部的高度,用于某些具有固定头部的页面
//,topOffset:30
//编辑器底部距离工具栏高度(如果参数大于等于编辑器高度,则设置无效)
...
...
public/static/plugins/css/petscms/pets.css
0 → 100644
浏览文件 @
e3df7fff
/* 筛选 */
.thin
,
.pay-list
{
overflow
:
hidden
;
}
.thin
.so
{
width
:
66%
;
}
.thin_sub
{
font-weight
:
100
;
margin
:
10px
0px
0px
10px
;
cursor
:
pointer
;
}
.so-list
{
width
:
100%
;
margin-top
:
20px
;
}
.so-list
*
{
font-size
:
1.2rem
!important
;
}
.so-list
input
{
height
:
28px
;
display
:
inline
!important
;
}
.time
input
,
.so-list
.chosen-container
{
background
:
#FFF
!important
;
}
.time
input
{
width
:
100px
!important
;
}
.time
i
{
position
:
absolute
;
margin
:
4px
0px
0px
-15px
;
}
.price
input
{
width
:
101px
!important
;
}
.time
,
.time
{
width
:
50%
;
}
.so-list
tr
+
tr
>
td
:first-child
{
padding-top
:
10px
;
}
.so-list
.chosen-container
{
border-radius
:
2px
;
}
.text-grey
{
color
:
#999
;
}
.chosen-container-single
.chosen-single
,
.so-list
select
{
height
:
28px
;
line-height
:
28px
;
width
:
100%
;
}
.reset-submit
{
margin-left
:
20px
;
}
.so-list
select
{
padding
:
0
0
0
8px
;
}
.operation-nav
{
margin-top
:
15px
;
}
@media
only
screen
and
(
min-width
:
641px
){
.so-list
.chosen-container
,
.so-list
select
{
width
:
217px
!important
;
display
:
-webkit-inline-box
;
}
.thin_sub
:hover
{
color
:
#F60
;
}
}
@media
only
screen
and
(
max-width
:
641px
){
.so-list
input
{
width
:
40%
!important
;
}
.so-list
td
{
width
:
100%
;
display
:
block
;
}
.so-list
tr
td
:last-child
{
margin-top
:
10px
;
}
.so-list
.chosen-container
{
width
:
85%
;
}
.so-list
.chosen-container
{
width
:
100%
;
}
.so-list
tr
td
:last-child
{
padding-top
:
0px
!important
;
}
.chosen-container-single
.chosen-search
input
[
type
=
"text"
]
{
width
:
100%
!important
;
}
.so-list
select
{
width
:
calc
(
100%
-
44px
);
display
:
-webkit-inline-box
;
}
}
/**
* 添加/编辑页面
*/
.person-view
.am-form-group
:last-child
{
border-bottom
:
0
;
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录