Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jamesyang1999
ShopXO
提交
620fbc1e
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,发现更多精彩内容 >>
提交
620fbc1e
编写于
10月 31, 2018
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
批量上下架
上级
81838eb5
变更
20
展开全部
隐藏空白更改
内联
并排
Showing
20 changed file
with
1273 addition
and
114 deletion
+1273
-114
service/Application/Admin/Controller/AlipayLifeMenuController.class.php
...ation/Admin/Controller/AlipayLifeMenuController.class.php
+5
-6
service/Application/Admin/Controller/AlipayLifeStatusController.class.php
...ion/Admin/Controller/AlipayLifeStatusController.class.php
+313
-0
service/Application/Admin/Lang/zh-cn/alipaylifemenu.php
service/Application/Admin/Lang/zh-cn/alipaylifemenu.php
+2
-1
service/Application/Admin/Lang/zh-cn/alipaylifemessage.php
service/Application/Admin/Lang/zh-cn/alipaylifemessage.php
+1
-1
service/Application/Admin/Lang/zh-cn/alipaylifestatus.php
service/Application/Admin/Lang/zh-cn/alipaylifestatus.php
+37
-0
service/Application/Admin/View/Default/AlipayLife/Index.html
service/Application/Admin/View/Default/AlipayLife/Index.html
+1
-7
service/Application/Admin/View/Default/AlipayLifeMenu/ContentIndex.html
...ation/Admin/View/Default/AlipayLifeMenu/ContentIndex.html
+13
-9
service/Application/Admin/View/Default/AlipayLifeMenu/Index.html
.../Application/Admin/View/Default/AlipayLifeMenu/Index.html
+4
-4
service/Application/Admin/View/Default/AlipayLifeMenu/SaveInfo.html
...plication/Admin/View/Default/AlipayLifeMenu/SaveInfo.html
+1
-1
service/Application/Admin/View/Default/AlipayLifeMessage/ContentIndex.html
...on/Admin/View/Default/AlipayLifeMessage/ContentIndex.html
+1
-1
service/Application/Admin/View/Default/AlipayLifeMessage/Index.html
...plication/Admin/View/Default/AlipayLifeMessage/Index.html
+4
-4
service/Application/Admin/View/Default/AlipayLifeStatus/Detail.html
...plication/Admin/View/Default/AlipayLifeStatus/Detail.html
+78
-0
service/Application/Admin/View/Default/AlipayLifeStatus/Index.html
...pplication/Admin/View/Default/AlipayLifeStatus/Index.html
+139
-0
service/Application/Admin/View/Default/AlipayLifeStatus/SaveInfo.html
...ication/Admin/View/Default/AlipayLifeStatus/SaveInfo.html
+78
-0
service/Application/Api/Controller/AlipayLifeController.class.php
...Application/Api/Controller/AlipayLifeController.class.php
+13
-0
service/Application/Common/Lang/zh-cn.php
service/Application/Common/Lang/zh-cn.php
+15
-0
service/Application/Library/AlipayLife.class.php
service/Application/Library/AlipayLife.class.php
+7
-0
service/Application/Service/AlipayLifeService.class.php
service/Application/Service/AlipayLifeService.class.php
+361
-80
service/Public/Admin/Default/Css/AlipayLifeStatus.css
service/Public/Admin/Default/Css/AlipayLifeStatus.css
+93
-0
service/Public/Admin/Default/Js/AlipayLifeStatus.js
service/Public/Admin/Default/Js/AlipayLifeStatus.js
+107
-0
未找到文件。
service/Application/Admin/Controller/AlipayLifeMenuController.class.php
浏览文件 @
620fbc1e
...
...
@@ -199,13 +199,12 @@ class AlipayLifeMenuController extends CommonController
// 参数
$this
->
assign
(
'params'
,
array_merge
(
$_POST
,
$_GET
));
$this
->
assign
(
'msg_type'
,
I
(
'msg_type'
,
0
));
$this
->
display
(
'SaveInfo'
);
}
/**
* [Index
消息
内容列表]
* [Index 内容列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
...
...
@@ -230,8 +229,8 @@ class AlipayLifeMenuController extends CommonController
}
// 主数据
$
menu
=
empty
(
$_REQUEST
[
'menu_id'
])
?
array
()
:
M
(
'AlipayLifeMenu'
)
->
find
(
I
(
'menu_id'
));
$this
->
assign
(
'
menu'
,
$menu
);
$
data
=
empty
(
$_REQUEST
[
'menu_id'
])
?
array
()
:
M
(
'AlipayLifeMenu'
)
->
find
(
I
(
'menu_id'
));
$this
->
assign
(
'
data'
,
$data
);
// 参数
$this
->
assign
(
'params'
,
$params
);
...
...
@@ -243,7 +242,7 @@ class AlipayLifeMenuController extends CommonController
}
/**
*
消息
内容处理
* 内容处理
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
...
...
@@ -303,7 +302,7 @@ class AlipayLifeMenuController extends CommonController
}
/**
*
消息
详情
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
...
...
service/Application/Admin/Controller/AlipayLifeStatusController.class.php
0 → 100755
浏览文件 @
620fbc1e
<?php
namespace
Admin\Controller
;
use
Service\AlipayLifeService
;
/**
* 生活号批量上下架管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class
AlipayLifeStatusController
extends
CommonController
{
/**
* [_initialize 前置操作-继承公共前置方法]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-03T12:39:08+0800
*/
public
function
_initialize
()
{
// 调用父类前置方法
parent
::
_initialize
();
// 登录校验
$this
->
Is_Login
();
// 权限校验
$this
->
Is_Power
();
}
/**
* [Index 生活号批量上下架列表]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-06T21:31:53+0800
*/
public
function
Index
()
{
// 参数
$params
=
array_merge
(
$_POST
,
$_GET
);
// 模型对象
$m
=
M
(
'AlipayLifeStatus'
);
// 条件
$where
=
$this
->
GetIndexWhere
();
// 分页
$number
=
MyC
(
'admin_page_number'
);
$page_param
=
array
(
'number'
=>
$number
,
'total'
=>
$m
->
where
(
$where
)
->
count
(),
'where'
=>
$params
,
'url'
=>
U
(
'Admin/AlipayLifeStatus/Index'
),
);
$page
=
new
\
Library\Page
(
$page_param
);
// 获取列表
$list
=
$m
->
where
(
$where
)
->
limit
(
$page
->
GetPageStarNumber
(),
$number
)
->
order
(
'id desc'
)
->
select
();
$list
=
$this
->
SetDataHandle
(
$list
);
// 参数
$this
->
assign
(
'params'
,
$params
);
// 分页
$this
->
assign
(
'page_html'
,
$page
->
GetPageHtml
());
// 处理状态
$this
->
assign
(
'common_handle_status_list'
,
L
(
'common_handle_status_list'
));
// 上下架
$this
->
assign
(
'common_shelves_select_list'
,
L
(
'common_shelves_select_list'
));
// 数据列表
$this
->
assign
(
'list'
,
$list
);
$this
->
display
(
'Index'
);
}
/**
* [SetDataHandle 数据处理]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-29T21:27:15+0800
* @param [array] $data [轮播图片数据]
* @return [array] [处理好的数据]
*/
private
function
SetDataHandle
(
$data
)
{
if
(
!
empty
(
$data
))
{
$common_handle_status_list
=
L
(
'common_handle_status_list'
);
$common_shelves_select_list
=
L
(
'common_shelves_select_list'
);
foreach
(
$data
as
&
$v
)
{
// 状态
$v
[
'status_name'
]
=
$common_handle_status_list
[
$v
[
'status'
]][
'name'
];
// 上下架
$v
[
'is_shelves_name'
]
=
$common_shelves_select_list
[
$v
[
'is_shelves'
]][
'name'
];
// 生活号
$v
[
'alipay_life_all'
]
=
empty
(
$v
[
'alipay_life_ids'
])
?
''
:
M
(
'AlipayLife'
)
->
where
([
'id'
=>
[
'in'
,
json_decode
(
$v
[
'alipay_life_ids'
],
true
)]])
->
getField
(
'name'
,
true
);
// 时间
$v
[
'startup_time'
]
=
empty
(
$v
[
'startup_time'
])
?
''
:
date
(
'Y-m-d H:i:s'
,
$v
[
'startup_time'
]);
$v
[
'success_time'
]
=
empty
(
$v
[
'success_time'
])
?
''
:
date
(
'Y-m-d H:i:s'
,
$v
[
'success_time'
]);
$v
[
'add_time'
]
=
date
(
'Y-m-d H:i:s'
,
$v
[
'add_time'
]);
$v
[
'upd_time'
]
=
empty
(
$v
[
'upd_time'
])
?
''
:
date
(
'Y-m-d H:i:s'
,
$v
[
'upd_time'
]);
}
}
return
$data
;
}
/**
* [GetIndexWhere 列表条件]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-10T22:16:29+0800
*/
private
function
GetIndexWhere
()
{
$where
=
array
();
// 模糊
if
(
!
empty
(
$_REQUEST
[
'keyword'
]))
{
$where
[
'name'
]
=
array
(
'like'
,
'%'
.
I
(
'keyword'
)
.
'%'
);
}
// 是否更多条件
if
(
I
(
'is_more'
,
0
)
==
1
)
{
if
(
I
(
'status'
,
-
1
)
>
-
1
)
{
$where
[
'status'
]
=
intval
(
I
(
'status'
,
0
));
}
if
(
I
(
'is_shelves'
,
-
1
)
>
-
1
)
{
$where
[
'is_shelves'
]
=
intval
(
I
(
'is_shelves'
,
0
));
}
// 表达式
if
(
!
empty
(
$_REQUEST
[
'time_start'
]))
{
$where
[
'add_time'
][]
=
array
(
'gt'
,
strtotime
(
I
(
'time_start'
)));
}
if
(
!
empty
(
$_REQUEST
[
'time_end'
]))
{
$where
[
'add_time'
][]
=
array
(
'lt'
,
strtotime
(
I
(
'time_end'
)));
}
}
return
$where
;
}
/**
* [SaveInfo 添加/编辑页面]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public
function
SaveInfo
()
{
// 数据
$data
=
empty
(
$_REQUEST
[
'id'
])
?
array
()
:
M
(
'AlipayLifeStatus'
)
->
find
(
I
(
'id'
));
$this
->
assign
(
'data'
,
$data
);
// 生活号
$alipay_life_list
=
[];
$alipay_life_ids_all
=
[];
if
(
!
empty
(
$_GET
[
'alipay_life_id'
]))
{
$alipay_life_ids_all
=
[
intval
(
I
(
'alipay_life_id'
))];
}
if
(
!
empty
(
$data
[
'alipay_life_ids'
]))
{
$alipay_life_ids_all
=
json_decode
(
$data
[
'alipay_life_ids'
],
true
);
}
if
(
!
empty
(
$alipay_life_ids_all
))
{
$alipay_life_list
=
M
(
'AlipayLife'
)
->
field
(
'id,name'
)
->
where
([
'id'
=>
[
'in'
,
$alipay_life_ids_all
]])
->
select
();
}
$this
->
assign
(
'alipay_life_ids_all'
,
$alipay_life_ids_all
);
$this
->
assign
(
'alipay_life_list'
,
$alipay_life_list
);
// 生活号分类
$alipay_life_category
=
M
(
'AlipayLifeCategory'
)
->
where
([
'is_enable'
=>
1
])
->
field
(
'id,name'
)
->
select
();
$this
->
assign
(
'alipay_life_category'
,
$alipay_life_category
);
// 上下架
$this
->
assign
(
'common_shelves_select_list'
,
L
(
'common_shelves_select_list'
));
// 参数
$this
->
assign
(
'params'
,
array_merge
(
$_POST
,
$_GET
));
$this
->
display
(
'SaveInfo'
);
}
/**
* 详情
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-10-30
* @desc description
*/
public
function
Detail
()
{
// 参数
$params
=
array_merge
(
$_POST
,
$_GET
);
// 获取列表
$list
=
AlipayLifeService
::
StatusDetailList
(
$params
);
// 参数
$this
->
assign
(
'params'
,
$params
);
// 数据列表
$this
->
assign
(
'list'
,
$list
);
$this
->
display
(
'Detail'
);
}
/**
* [Save 生活号批量上下架保存]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public
function
Save
()
{
// 是否ajax请求
if
(
!
IS_AJAX
)
{
$this
->
error
(
L
(
'common_unauthorized_access'
));
}
$ret
=
AlipayLifeService
::
LifeStatusSave
(
$_POST
);
$this
->
ajaxReturn
(
$ret
[
'msg'
],
$ret
[
'code'
],
$ret
[
'data'
]);
}
/**
* [Delete 生活号批量上下架删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public
function
Delete
()
{
// 是否ajax请求
if
(
!
IS_AJAX
)
{
$this
->
error
(
L
(
'common_unauthorized_access'
));
}
// 删除
if
(
M
(
'AlipayLifeStatus'
)
->
delete
(
intval
(
I
(
'id'
))))
{
$this
->
ajaxReturn
(
L
(
'common_operation_delete_success'
));
}
$this
->
ajaxReturn
(
L
(
'common_operation_delete_error'
),
-
100
);
}
/**
* 提交
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-10-24
* @desc description
*/
public
function
Submit
()
{
// 是否ajax请求
if
(
!
IS_AJAX
)
{
$this
->
error
(
L
(
'common_unauthorized_access'
));
}
$ret
=
AlipayLifeService
::
LifeStatusSubmit
(
$_POST
);
$this
->
ajaxReturn
(
$ret
[
'msg'
],
$ret
[
'code'
],
$ret
[
'data'
]);
}
/**
* 生活号搜索
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-10-29
* @desc description
*/
public
function
Search
()
{
// 是否ajax请求
if
(
!
IS_AJAX
)
{
$this
->
error
(
L
(
'common_unauthorized_access'
));
}
$params
=
$_POST
;
$params
[
'is_all'
]
=
1
;
$ret
=
AlipayLifeService
::
AlipayLifeSearch
(
$params
);
$this
->
ajaxReturn
(
$ret
[
'msg'
],
$ret
[
'code'
],
$ret
[
'data'
]);
}
}
?>
\ No newline at end of file
service/Application/Admin/Lang/zh-cn/alipaylifemenu.php
浏览文件 @
620fbc1e
...
...
@@ -9,7 +9,7 @@
*/
return
array
(
// 添加/编辑
'alipay_life_menu_add_name'
=>
'生活号菜单创建'
,
'alipay_life_menu_add_name'
=>
'生活号菜单创建
/编辑
'
,
'alipay_life_menu_content_title'
=>
'生活号菜单内容'
,
'alipay_life_menu_life_text'
=>
'生活号'
,
...
...
@@ -19,6 +19,7 @@ return array(
'alipay_life_menu_pid_format'
=>
'请选择父级'
,
'alipay_life_menu_name_text'
=>
'名称'
,
'alipay_life_menu_main_name_format'
=>
'名称格式 1~30 个字符'
,
'alipay_life_menu_name_format'
=>
'名称格式 1~5 个字符'
,
'alipay_life_menu_type_text'
=>
'菜单类型'
,
...
...
service/Application/Admin/Lang/zh-cn/alipaylifemessage.php
浏览文件 @
620fbc1e
...
...
@@ -9,7 +9,7 @@
*/
return
array
(
// 添加/编辑
'alipay_life_message_add_name'
=>
'生活号消息创建'
,
'alipay_life_message_add_name'
=>
'生活号消息创建
/编辑
'
,
'alipay_life_message_content_title'
=>
'生活号消息内容'
,
'alipay_life_message_life_text'
=>
'生活号'
,
...
...
service/Application/Admin/Lang/zh-cn/alipaylifestatus.php
0 → 100755
浏览文件 @
620fbc1e
<?php
/**
* 模块语言包-生活号批量上下架
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
return
array
(
// 添加/编辑
'alipay_life_status_add_name'
=>
'生活号批量上下架创建/编辑'
,
'alipay_life_status_life_text'
=>
'生活号'
,
'alipay_life_status_life_format'
=>
'请选择生活号'
,
'alipay_life_status_pid_text'
=>
'父级'
,
'alipay_life_status_pid_format'
=>
'请选择父级'
,
'alipay_life_status_name_text'
=>
'名称'
,
'alipay_life_status_name_format'
=>
'名称格式 1~30 个字符'
,
'alipay_life_status_startup_time_text'
=>
'处理启动时间'
,
'alipay_life_status_success_time_text'
=>
'处理完成时间'
,
'alipay_life_status_is_shelves_text'
=>
'上下架'
,
'alipay_life_status_is_shelves_format'
=>
'请选择上下架'
,
'alipay_life_status_optional_text'
=>
'可选'
,
'alipay_life_status_selected_text'
=>
'已选'
,
'alipay_life_status_selected_all_text'
=>
'全选'
,
'alipay_life_status_detail_text'
=>
'详情'
,
'alipay_life_status_send_time_text'
=>
'处理时间'
,
'alipay_life_status_return_msg_text'
=>
'处理描述'
,
);
?>
\ No newline at end of file
service/Application/Admin/View/Default/AlipayLife/Index.html
浏览文件 @
620fbc1e
...
...
@@ -87,13 +87,7 @@
<a
href=
"{{:U('Admin/AlipayLife/SaveInfo', array('id'=>$v['id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-edit"
>
{{:L('common_operation_edit')}}
</button>
</a>
<if
condition=
"$v['is_shelves'] eq 0"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete"
data-url=
"{{:U('Admin/AlipayLife/Delete')}}"
data-id=
"{{$v.id}}"
>
{{:L('common_operation_delete')}}
</button>
<else
/>
<a
href=
"{{:U('Admin/AlipayLifeMessage/SaveInfo', ['alipay_life_id'=>$v['id']])}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-send-o"
>
{{:L('alipay_life_user_send_text')}}
</button>
</a>
</if>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete"
data-url=
"{{:U('Admin/AlipayLife/Delete')}}"
data-id=
"{{$v.id}}"
>
{{:L('common_operation_delete')}}
</button>
</td>
</tr>
</foreach>
...
...
service/Application/Admin/View/Default/AlipayLifeMenu/ContentIndex.html
浏览文件 @
620fbc1e
...
...
@@ -97,11 +97,13 @@
</td>
<td
class=
"view-operation"
>
<if
condition=
"$v['status'] eq 0"
>
<a
href=
"{{:U('Admin/AlipayLifeMenu/ContentSaveInfo', array('id'=>$v['id'], 'menu_id'=>$params['menu_id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-edit"
>
{{:L('common_operation_edit')}}
</button>
</a>
<if
condition=
"in_array($data['status'], [0,4])"
>
<a
href=
"{{:U('Admin/AlipayLifeMenu/ContentSaveInfo', array('id'=>$v['id'], 'menu_id'=>$params['menu_id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-edit"
>
{{:L('common_operation_edit')}}
</button>
</a>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete"
data-url=
"{{:U('Admin/AlipayLifeMenu/ContentDelete')}}"
data-id=
"{{$v.id}}"
>
{{:L('common_operation_delete')}}
</button>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete"
data-url=
"{{:U('Admin/AlipayLifeMenu/ContentDelete')}}"
data-id=
"{{$v.id}}"
>
{{:L('common_operation_delete')}}
</button>
</if>
</if>
</td>
</tr>
...
...
@@ -166,11 +168,13 @@
</td>
<td
class=
"view-operation"
>
<if
condition=
"$v['status'] eq 0"
>
<a
href=
"{{:U('Admin/AlipayLifeMenu/ContentSaveInfo', array('id'=>$vs['id'], 'menu_id'=>$params['menu_id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-edit"
>
{{:L('common_operation_edit')}}
</button>
</a>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete"
data-url=
"{{:U('Admin/AlipayLifeMenu/ContentDelete')}}"
data-id=
"{{$vs.id}}"
>
{{:L('common_operation_delete')}}
</button>
<if
condition=
"in_array($data['status'], [0,4])"
>
<a
href=
"{{:U('Admin/AlipayLifeMenu/ContentSaveInfo', array('id'=>$vs['id'], 'menu_id'=>$params['menu_id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-edit"
>
{{:L('common_operation_edit')}}
</button>
</a>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete"
data-url=
"{{:U('Admin/AlipayLifeMenu/ContentDelete')}}"
data-id=
"{{$vs.id}}"
>
{{:L('common_operation_delete')}}
</button>
</if>
</if>
</td>
</tr>
...
...
service/Application/Admin/View/Default/AlipayLifeMenu/Index.html
浏览文件 @
620fbc1e
...
...
@@ -105,10 +105,6 @@
<if
condition=
"in_array($v['status'], [0,4])"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-send-o submit-ajax"
data-url=
"{{:U('Admin/AlipayLifeMenu/Release')}}"
data-id=
"{{$v.id}}"
data-view=
"reload"
>
{{:L('common_operation_release')}}
</button>
<a
href=
"{{:U('Admin/AlipayLifeMenu/ContentIndex', array('menu_id'=>$v['id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-cubes"
>
{{:L('alipay_life_menu_content_text')}}
</button>
</a>
<a
href=
"{{:U('Admin/AlipayLifeMenu/SaveInfo', array('id'=>$v['id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-edit"
>
{{:L('common_operation_edit')}}
</button>
</a>
...
...
@@ -116,6 +112,10 @@
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete"
data-url=
"{{:U('Admin/AlipayLifeMenu/Delete')}}"
data-id=
"{{$v.id}}"
>
{{:L('common_operation_delete')}}
</button>
</if>
<a
href=
"{{:U('Admin/AlipayLifeMenu/ContentIndex', array('menu_id'=>$v['id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-cubes"
>
{{:L('alipay_life_menu_content_text')}}
</button>
</a>
<a
href=
"{{:U('Admin/AlipayLifeMenu/Detail', array('message_id'=>$v['id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-align-left"
>
{{:L('alipay_life_menu_detail_text')}}
</button>
</a>
...
...
service/Application/Admin/View/Default/AlipayLifeMenu/SaveInfo.html
浏览文件 @
620fbc1e
...
...
@@ -13,7 +13,7 @@
<div
class=
"am-form-group"
>
<label>
{{:L('alipay_life_menu_name_text')}}
</label>
<input
type=
"text"
name=
"name"
placeholder=
"{{:L('alipay_life_menu_name_text')}}"
data-validation-message=
"{{:L('alipay_life_menu_
name_format')}}"
class=
"am-radius"
maxlength=
"255
"
value=
"<notempty name="
data.name
"
>
{{$data.name}}
</notempty>
" required />
<input
type=
"text"
name=
"name"
placeholder=
"{{:L('alipay_life_menu_name_text')}}"
data-validation-message=
"{{:L('alipay_life_menu_
main_name_format')}}"
class=
"am-radius"
maxlength=
"30
"
value=
"<notempty name="
data.name
"
>
{{$data.name}}
</notempty>
" required />
</div>
<div
class=
"am-form-group"
>
...
...
service/Application/Admin/View/Default/AlipayLifeMessage/ContentIndex.html
浏览文件 @
620fbc1e
...
...
@@ -98,7 +98,7 @@
</div>
</td>
<td
class=
"view-operation"
>
<if
condition=
"
$v['status'] eq 0
"
>
<if
condition=
"
in_array($data['status'], [0,4])
"
>
<a
href=
"{{:U('Admin/AlipayLifeMessage/ContentSaveInfo', array('id'=>$v['id'], 'message_id'=>$params['message_id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-edit"
>
{{:L('common_operation_edit')}}
</button>
</a>
...
...
service/Application/Admin/View/Default/AlipayLifeMessage/Index.html
浏览文件 @
620fbc1e
...
...
@@ -112,10 +112,6 @@
<if
condition=
"in_array($v['status'], [0,4])"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-send-o submit-ajax"
data-url=
"{{:U('Admin/AlipayLifeMessage/Send')}}"
data-id=
"{{$v.id}}"
data-view=
"reload"
>
{{:L('common_send_text')}}
</button>
<a
href=
"{{:U('Admin/AlipayLifeMessage/ContentIndex', array('message_id'=>$v['id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-cubes"
>
{{:L('alipay_life_message_content_text')}}
</button>
</a>
<a
href=
"{{:U('Admin/AlipayLifeMessage/SaveInfo', array('id'=>$v['id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-edit"
>
{{:L('common_operation_edit')}}
</button>
</a>
...
...
@@ -123,6 +119,10 @@
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete"
data-url=
"{{:U('Admin/AlipayLifeMessage/Delete')}}"
data-id=
"{{$v.id}}"
>
{{:L('common_operation_delete')}}
</button>
</if>
<a
href=
"{{:U('Admin/AlipayLifeMessage/ContentIndex', array('message_id'=>$v['id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-cubes"
>
{{:L('alipay_life_message_content_text')}}
</button>
</a>
<a
href=
"{{:U('Admin/AlipayLifeMessage/Detail', array('message_id'=>$v['id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-align-left"
>
{{:L('alipay_life_message_detail_text')}}
</button>
</a>
...
...
service/Application/Admin/View/Default/AlipayLifeStatus/Detail.html
0 → 100755
浏览文件 @
620fbc1e
<include
file=
"Public/Header"
/>
<!-- right content start -->
<div
class=
"content-right"
>
<div
class=
"content"
>
<!-- back nav start -->
<legend>
<span
class=
"fs-16"
>
{{:L('alipay_life_status_detail_text')}}
</span>
<a
href=
"{{:U('Admin/AlipayLifeStatus/Index')}}"
class=
"fr fs-14 m-t-5 am-icon-mail-reply"
>
{{:L('common_operation_back')}}
</a>
</legend>
<!-- back nav end -->
<!-- list start -->
<table
class=
"am-table am-table-striped am-table-hover am-text-middle m-t-10"
>
<thead>
<tr>
<th>
{{:L('alipay_life_status_life_text')}}
</th>
<th>
{{:L('common_view_status_title')}}
</th>
<th>
{{:L('alipay_life_status_send_time_text')}}
</th>
<th>
{{:L('alipay_life_status_return_msg_text')}}
</th>
<th>
{{:L('common_more_name')}}
</th>
</tr>
</thead>
<tbody>
<if
condition=
"!empty($list)"
>
<foreach
name=
"list"
item=
"v"
>
<tr
id=
"data-list-{{$v.id}}"
>
<td>
{{$v.alipay_life_name}}
</td>
<td>
{{$v.status_name}}
</td>
<td>
{{$v.send_time}}
</td>
<td>
{{$v.return_msg}}
</td>
<td>
<span
class=
"am-icon-caret-down c-p"
data-am-modal=
"{target: '#my-popup{{$v.id}}'}"
>
{{:L('common_see_more_name')}}
</span>
<div
class=
"am-popup am-radius"
id=
"my-popup{{$v.id}}"
>
<div
class=
"am-popup-inner"
>
<div
class=
"am-popup-hd"
>
<h4
class=
"am-popup-title"
>
{{:L('common_detail_content')}}
</h4>
<span
data-am-modal-close
class=
"am-close"
>
×
</span>
</div>
<div
class=
"am-popup-bd"
>
<dl
class=
"dl-content"
>
<dt>
{{:L('alipay_life_status_life_text')}}
</dt>
<dd><if
condition=
"empty($v['alipay_life_name'])"
><span
class=
"cr-ddd"
>
{{:L('common_on_fill_in_the_text')}}
</span><else
/>
{{$v.alipay_life_name}}
</if></dd>
<dt>
{{:L('common_view_status_title')}}
</dt>
<dd><if
condition=
"empty($v['status_name'])"
><span
class=
"cr-ddd"
>
{{:L('common_on_fill_in_the_text')}}
</span><else
/>
{{$v.status_name}}
</if></dd>
<dt>
{{:L('alipay_life_status_send_time_text')}}
</dt>
<dd>
{{$v.send_time}}
</dd>
<dt>
{{:L('alipay_life_status_return_msg_text')}}
</dt>
<dd>
{{$v.return_msg}}
</dd>
<dt>
{{:L('common_create_time_name')}}
</dt>
<dd>
{{$v.add_time}}
</dd>
<dt>
{{:L('common_upd_time_name')}}
</dt>
<dd>
{{$v.upd_time}}
</dd>
</dl>
</div>
</div>
</div>
</td>
</tr>
</foreach>
<else
/>
<tr><td
colspan=
"20"
class=
"table-no"
>
{{:L('common_not_data_tips')}}
</td></tr>
</if>
</tbody>
</table>
<!-- list end -->
</div>
</div>
<!-- right content end -->
<!-- footer start -->
<include
file=
"Public/Footer"
/>
<!-- footer end -->
\ No newline at end of file
service/Application/Admin/View/Default/AlipayLifeStatus/Index.html
0 → 100755
浏览文件 @
620fbc1e
<include
file=
"Public/Header"
/>
<!-- right content start -->
<div
class=
"content-right"
>
<div
class=
"content"
>
<!-- form start -->
<form
class=
"am-form view-list"
action=
"{{:U('Admin/AlipayLifeStatus/Index')}}"
method=
"POST"
>
<div
class=
"am-g"
>
<input
type=
"text"
class=
"am-radius form-keyword"
placeholder=
"{{:L('alipay_life_status_name_text')}}"
name=
"keyword"
<
present
name=
"params['keyword']"
>
value="{{$params.keyword}}"
</present>
/>
<button
type=
"submit"
class=
"am-btn am-btn-secondary am-btn-sm am-radius form-submit"
>
{{:L('common_operation_query')}}
</button>
<label
class=
"fs-12 m-l-5 c-p fw-100 more-submit"
>
{{:L('common_more_screening')}}
<input
type=
"checkbox"
name=
"is_more"
value=
"1"
id=
"is_more"
<
if
condition=
"isset($params['is_more']) and $params['is_more'] eq 1"
>
checked
</if>
/>
<i
class=
"am-icon-angle-down"
></i>
</label>
<div
class=
"more-where <if condition="
!
isset
($
params
['
is_more
'])
or
$
params
['
is_more
']
neq
1"
>
none
</if>
">
<select
name=
"status"
class=
"am-radius c-p m-t-10 m-l-5 param-where"
>
<option
value=
"-1"
>
{{:L('common_view_status_title')}}
</option>
<foreach
name=
"common_handle_status_list"
item=
"v"
>
<option
value=
"{{$v.value}}"
<
if
condition=
"isset($params['status']) and $params['status'] eq $v['value']"
>
selected
</if>
>{{$v.name}}
</option>
</foreach>
</select>
<select
name=
"is_shelves"
class=
"am-radius c-p m-t-10 m-l-5 param-where"
>
<option
value=
"-1"
>
{{:L('alipay_life_status_is_shelves_text')}}
</option>
<foreach
name=
"common_shelves_select_list"
item=
"v"
>
<option
value=
"{{$v.value}}"
<
if
condition=
"isset($params['is_shelves']) and $params['is_shelves'] eq $v['value']"
>
selected
</if>
>{{$v.name}}
</option>
</foreach>
</select>
<div
class=
"param-date param-where m-l-5"
>
<input
type=
"text"
name=
"time_start"
class=
"Wdate am-radius m-t-10"
placeholder=
"{{:L('common_time_start_name')}}"
onclick=
"WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})"
<
if
condition=
"isset($params['time_start'])"
>
value="{{$params.time_start}}"
</if>
/>
<span>
~
</span>
<input
type=
"text"
class=
"Wdate am-radius m-t-10"
placeholder=
"{{:L('common_time_end_name')}}"
name=
"time_end"
onclick=
"WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})"
<
if
condition=
"isset($params['time_end'])"
>
value="{{$params.time_end}}"
</if>
/>
</div>
</div>
</div>
</form>
<!-- form end -->
<!-- operation start -->
<div
class=
"am-g m-t-15"
>
<a
href=
"{{:U('Admin/AlipayLifeStatus/SaveInfo')}}"
class=
"am-btn am-btn-secondary am-radius am-btn-xs am-icon-plus"
>
{{:L('common_operation_add')}}
</a>
</div>
<!-- operation end -->
<!-- list start -->
<table
class=
"am-table am-table-striped am-table-hover am-text-middle m-t-10"
>
<thead>
<tr>
<th>
{{:L('alipay_life_status_name_text')}}
</th>
<th>
{{:L('alipay_life_status_is_shelves_text')}}
</th>
<th
class=
"am-hide-sm-only alipay-life-row"
>
{{:L('alipay_life_status_life_text')}}
</th>
<th>
{{:L('common_view_status_title')}}
</th>
<th>
{{:L('common_more_name')}}
</th>
<th>
{{:L('common_operation_name')}}
</th>
</tr>
</thead>
<tbody>
<if
condition=
"!empty($list)"
>
<foreach
name=
"list"
item=
"v"
>
<tr
id=
"data-list-{{$v.id}}"
>
<td>
{{$v.name}}
</td>
<td>
{{$v.is_shelves_name}}
</td>
<td
class=
"am-hide-sm-only"
>
{{:implode(',', $v['alipay_life_all'])}}
</td>
<td>
{{$v.status_name}}
</td>
<td>
<span
class=
"am-icon-caret-down c-p"
data-am-modal=
"{target: '#my-popup{{$v.id}}'}"
>
{{:L('common_see_more_name')}}
</span>
<div
class=
"am-popup am-radius"
id=
"my-popup{{$v.id}}"
>
<div
class=
"am-popup-inner"
>
<div
class=
"am-popup-hd"
>
<h4
class=
"am-popup-title"
>
{{:L('common_detail_content')}}
</h4>
<span
data-am-modal-close
class=
"am-close"
>
×
</span>
</div>
<div
class=
"am-popup-bd"
>
<dl
class=
"dl-content"
>
<dt>
{{:L('alipay_life_status_name_text')}}
</dt>
<dd><if
condition=
"empty($v['name'])"
><span
class=
"cr-ddd"
>
{{:L('common_on_fill_in_the_text')}}
</span><else
/>
{{$v.name}}
</if></dd>
<dt>
{{:L('alipay_life_status_is_shelves_text')}}
</dt>
<dd><if
condition=
"empty($v['is_shelves_name'])"
><span
class=
"cr-ddd"
>
{{:L('common_on_fill_in_the_text')}}
</span><else
/>
{{$v.is_shelves_name}}
</if></dd>
<dt>
{{:L('alipay_life_status_life_text')}}
</dt>
<dd><if
condition=
"empty($v['alipay_life_all'])"
><span
class=
"cr-ddd"
>
{{:L('common_on_fill_in_the_text')}}
</span><else
/>
{{:implode(',', $v['alipay_life_all'])}}
</if></dd>
<dt>
{{:L('common_view_status_title')}}
</dt>
<dd><if
condition=
"empty($v['status_name'])"
><span
class=
"cr-ddd"
>
{{:L('common_on_fill_in_the_text')}}
</span><else
/>
{{$v.status_name}}
</if></dd>
<dt>
{{:L('alipay_life_status_startup_time_text')}}
</dt>
<dd>
{{$v.startup_time}}
</dd>
<dt>
{{:L('alipay_life_status_success_time_text')}}
</dt>
<dd>
{{$v.success_time}}
</dd>
<dt>
{{:L('common_create_time_name')}}
</dt>
<dd>
{{$v.add_time}}
</dd>
<dt>
{{:L('common_upd_time_name')}}
</dt>
<dd>
{{$v.upd_time}}
</dd>
</dl>
</div>
</div>
</div>
</td>
<td
class=
"view-operation"
>
<if
condition=
"in_array($v['status'], [0,4])"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-send-o submit-ajax"
data-url=
"{{:U('Admin/AlipayLifeStatus/Submit')}}"
data-id=
"{{$v.id}}"
data-view=
"reload"
>
{{:L('common_operation_submit')}}
</button>
<a
href=
"{{:U('Admin/AlipayLifeStatus/SaveInfo', array('id'=>$v['id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-edit"
>
{{:L('common_operation_edit')}}
</button>
</a>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-trash-o submit-delete"
data-url=
"{{:U('Admin/AlipayLifeStatus/Delete')}}"
data-id=
"{{$v.id}}"
>
{{:L('common_operation_delete')}}
</button>
</if>
<a
href=
"{{:U('Admin/AlipayLifeStatus/Detail', array('status_id'=>$v['id']))}}"
>
<button
class=
"am-btn am-btn-default am-btn-xs am-radius am-icon-align-left"
>
{{:L('alipay_life_status_detail_text')}}
</button>
</a>
</td>
</tr>
</foreach>
<else
/>
<tr><td
colspan=
"20"
class=
"table-no"
>
{{:L('common_not_data_tips')}}
</td></tr>
</if>
</tbody>
</table>
<!-- list end -->
<!-- page start -->
<if
condition=
"!empty($list)"
>
{{$page_html}}
</if>
<!-- page end -->
</div>
</div>
<!-- right content end -->
<!-- footer start -->
<include
file=
"Public/Footer"
/>
<!-- footer end -->
\ No newline at end of file
service/Application/Admin/View/Default/AlipayLifeStatus/SaveInfo.html
0 → 100755
浏览文件 @
620fbc1e
<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=
"{{:U('Admin/AlipayLifeStatus/Save')}}"
method=
"POST"
request-type=
"ajax-url"
request-value=
"{{:U('Admin/AlipayLifeStatus/Index')}}"
enctype=
"multipart/form-data"
>
<input
type=
"hidden"
name=
"max_file_size"
value=
"{{:MyC('home_max_limit_image', 2048000)}}"
/>
<legend>
<span
class=
"fs-16"
>
{{:L('alipay_life_status_add_name')}}
</span>
<a
href=
"{{:U('Admin/AlipayLifeStatus/Index')}}"
class=
"fr fs-14 m-t-5 am-icon-mail-reply"
>
{{:L('common_operation_back')}}
</a>
</legend>
<div
class=
"am-form-group"
>
<label>
{{:L('alipay_life_status_name_text')}}
</label>
<input
type=
"text"
name=
"name"
placeholder=
"{{:L('alipay_life_status_name_text')}}"
data-validation-message=
"{{:L('alipay_life_status_name_format')}}"
class=
"am-radius"
maxlength=
"30"
value=
"<notempty name="
data.name
"
>
{{$data.name}}
</notempty>
" required />
</div>
<div
class=
"am-form-group"
>
<label
class=
"block"
>
{{:L('alipay_life_status_is_shelves_text')}}
</label>
<select
name=
"is_shelves"
class=
"am-radius c-p chosen-select"
data-placeholder=
"{{:L('common_select_can_choose')}}"
data-validation-message=
"{{:L('alipay_life_status_is_shelves_format')}}"
<
if
condition=
"isset($data['status']) and $data['status'] neq 0"
>
disabled
</if>
required>
<option
value=
""
>
{{:L('common_select_can_choose')}}
</option>
<foreach
name=
"common_shelves_select_list"
item=
"v"
>
<option
value=
"{{$v.value}}"
<
if
condition=
"isset($data['is_shelves']) and $v['value'] eq $data['is_shelves']"
>
selected
</if>
>{{$v.name}}
</option>
</foreach>
</select>
</div>
<!-- 生活号容器 -->
<div
class=
"life-container"
>
<label
class=
"block"
>
{{:L('alipay_life_status_life_text')}}
</label>
<div
class=
"life-form"
data-search-url=
"{{:U('Admin/AlipayLifeStatus/Search')}}"
>
<select
class=
"am-radius c-p chosen-select life-form-category"
data-placeholder=
"{{:L('common_select_can_choose')}}"
data-validation-message=
"{{:L('alipay_life_status_category_format')}}"
>
<option
value=
""
>
{{:L('common_select_can_choose')}}
</option>
<foreach
name=
"alipay_life_category"
item=
"v"
>
<option
value=
"{{$v.id}}"
>
{{$v.name}}
</option>
</foreach>
</select>
<input
type=
"text"
placeholder=
"{{:L('alipay_life_status_name_text')}}"
class=
"am-radius life-form-keywords"
/>
<button
type=
"button"
class=
"am-btn am-btn-secondary am-radius am-btn-sm search-submit"
>
{{:L('common_so_text')}}
</button>
</div>
<div
class=
"am-form-group life-list"
>
<input
type=
"text"
name=
"alipay_life_ids"
value=
"<notempty name="
data.alipay_life_ids
"
>
{{:implode(',', json_decode($data['alipay_life_ids'], true))}}
</notempty>
" data-validation-message="{{:L('alipay_life_status_life_format')}}" required />
<div
class=
"life-items am-fl"
>
<div
class=
"title"
>
{{:L('alipay_life_status_optional_text')}}
</div>
<ul
class=
"life-content am-list ul-left"
>
<div
class=
"table-no"
>
{{:L('common_not_data_tips')}}
</div>
</ul>
</div>
<button
type=
"button"
class=
"am-btn am-btn-default am-btn-xs selected-all"
>
{{:L('alipay_life_status_selected_all_text')}}
<i
class=
"am-icon-angle-double-right"
></i></button>
<div
class=
"life-items am-fr"
>
<div
class=
"title"
>
{{:L('alipay_life_status_selected_text')}}
</div>
<ul
class=
"life-content am-list ul-right"
>
<div
class=
"table-no <notempty name="
data
"
>
none
</notempty>
">{{:L('common_not_data_tips')}}
</div>
<foreach
name=
"alipay_life_list"
item=
"v"
>
<li
class=
"am-animation-slide-bottom items-li-{{$v.id}}"
>
<span
class=
"name"
data-value=
"{{$v.id}}"
>
{{$v.name}}
</span>
<i
class=
"am-icon-trash-o am-fr"
></i>
</li>
</foreach>
</ul>
</div>
</div>
</div>
<div
class=
"am-form-group"
>
<input
type=
"hidden"
name=
"id"
value=
"<notempty name="
params.id
"
>
{{$params.id}}
</notempty>
" />
<button
type=
"submit"
class=
"am-btn am-btn-primary am-radius btn-loading-example am-btn-sm w100"
data-am-loading=
"{loadingText:'{{:L('common_form_loading_tips')}}'}"
>
{{:L('common_operation_save')}}
</button>
</div>
</form>
<!-- form end -->
</div>
</div>
<!-- right content end -->
<!-- footer start -->
<include
file=
"Public/Footer"
/>
<!-- footer end -->
\ No newline at end of file
service/Application/Api/Controller/AlipayLifeController.class.php
浏览文件 @
620fbc1e
...
...
@@ -90,5 +90,18 @@ class AlipayLifeController extends CommonController
{
AlipayLifeService
::
MenuRelease
(
$_REQUEST
);
}
/**
* 生活号批量上下架
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2018-10-24
* @desc description
*/
public
function
StatusHandle
()
{
AlipayLifeService
::
StatusHandle
(
$_REQUEST
);
}
}
?>
\ No newline at end of file
service/Application/Common/Lang/zh-cn.php
浏览文件 @
620fbc1e
...
...
@@ -541,6 +541,15 @@ return array(
4
=>
array
(
'value'
=>
4
,
'name'
=>
'发布失败'
),
),
// 处理状态
'common_handle_status_list'
=>
array
(
0
=>
array
(
'value'
=>
0
,
'name'
=>
'未处理'
),
1
=>
array
(
'value'
=>
1
,
'name'
=>
'处理中'
),
2
=>
array
(
'value'
=>
2
,
'name'
=>
'已处理'
),
3
=>
array
(
'value'
=>
3
,
'name'
=>
'部分成功'
),
4
=>
array
(
'value'
=>
4
,
'name'
=>
'处理失败'
),
),
// 支付宝生活号菜单事件类型
'common_alipay_life_menu_action_type_list'
=>
array
(
0
=>
array
(
'value'
=>
0
,
'out_value'
=>
'out'
,
'name'
=>
'事件型菜单'
),
...
...
@@ -556,6 +565,12 @@ return array(
1
=>
array
(
'value'
=>
1
,
'name'
=>
'文字+图标'
),
),
// 上下架选择
'common_shelves_select_list'
=>
array
(
0
=>
array
(
'value'
=>
0
,
'name'
=>
'下架'
),
1
=>
array
(
'value'
=>
1
,
'name'
=>
'上架'
,
'checked'
=>
true
),
),
// 色彩值
'common_color_list'
=>
array
(
...
...
service/Application/Library/AlipayLife.class.php
浏览文件 @
620fbc1e
...
...
@@ -534,6 +534,13 @@ class AlipayLife
{
return
[
'status'
=>
0
,
'msg'
=>
'操作成功'
];
}
// 是否相同状态下操作
if
(
stripos
(
$result
[
$key
][
'sub_code'
],
'LIFE_ALREADY_DEBARK'
)
!==
false
||
stripos
(
$result
[
$key
][
'sub_code'
],
'LIFE_ALREADY_ON_PLATFORM'
)
!==
false
)
{
return
[
'status'
=>
0
,
'msg'
=>
$result
[
$key
][
'sub_msg'
]
.
'['
.
$result
[
$key
][
'code'
]
.
']'
];
}
return
[
'status'
=>-
100
,
'msg'
=>
$result
[
$key
][
'sub_msg'
]
.
'['
.
$result
[
$key
][
'code'
]
.
']'
];
}
...
...
service/Application/Service/AlipayLifeService.class.php
浏览文件 @
620fbc1e
此差异已折叠。
点击以展开。
service/Public/Admin/Default/Css/AlipayLifeStatus.css
0 → 100755
浏览文件 @
620fbc1e
/**
* 列表
*/
.form-keyword
{
width
:
55%
!important
;
display
:
initial
!important
;
}
.more-submit
input
{
display
:
none
;
}
.param-where
,
.param-date
input
{
display
:
initial
!important
;
}
.alipay-life-row
{
width
:
30%
;
}
@media
only
screen
and
(
max-width
:
641px
)
{
.param-where
{
width
:
100%
!important
;
margin-left
:
0px
!important
;
}
.param-date
input
{
width
:
47%
!important
;
}
}
@media
only
screen
and
(
min-width
:
641px
)
{
.param-where
{
width
:
32%
!important
;
float
:
left
;
}
.param-date
input
{
width
:
45%
!important
;
}
.param-where
:nth-child
(
1
),
.param-where
:nth-child
(
4
)
{
margin-left
:
0px
!important
;
}
}
@media
only
screen
and
(
max-width
:
321px
)
{
.view-operation
button
{
margin
:
2px
0px
;
}
}
/**
* 详情
*/
.life-container
.life-form-category
,
.life-container
.chosen-container
,
.life-container
.life-form-keywords
{
width
:
30%
!important
;
}
.life-container
.chosen-container
,
.life-container
.life-form-keywords
{
display
:
-webkit-inline-box
!important
;
}
.life-container
.chosen-single
{
width
:
100%
;
}
.life-container
.life-form
{
margin-bottom
:
2px
;
}
.life-list
{
overflow
:
hidden
;
margin-bottom
:
20px
;
position
:
relative
;
}
.life-list
.life-items
{
width
:
calc
(
50%
-
50px
);
height
:
300px
;
}
.life-list
.life-items
.title
{
text-align
:
center
;
}
.life-list
.life-items
.life-content
{
border
:
1px
solid
#eee
;
height
:
calc
(
100%
-
25px
);
overflow-y
:
scroll
;
overflow-x
:
hidden
;
border-radius
:
2px
;
}
.life-list
.life-items
.life-content
li
{
padding
:
5px
;
border-style
:
dotted
;
border-color
:
#eaeaea
;
border-width
:
1px
0
;
}
.life-list
.life-items
.life-content
li
:nth-child
(
2
)
{
border-top
:
0
;
}
.life-list
.life-items
.life-content
li
i
{
cursor
:
pointer
;
padding
:
0
10px
0
5px
;
}
.life-list
.selected-all
{
position
:
absolute
;
top
:
50%
;
left
:
calc
(
50%
-
30px
);
}
.life-container
input
[
name
=
"alipay_life_ids"
]
{
position
:
absolute
;
left
:
-1000000px
;
top
:
-1000000px
;
}
.life-list
i
{
color
:
#888
!important
;
}
.am-form-error
.life-items
.life-content
{
border-color
:
#dd514c
;
}
@media
only
screen
and
(
max-width
:
641px
)
{
.life-container
.life-form-category
,
.life-container
.life-form-keywords
{
width
:
calc
(
55%
-
60px
)
!important
;
display
:
-webkit-inline-box
!important
;
}
.life-container
.chosen-container
{
display
:
none
!important
;
}
}
\ No newline at end of file
service/Public/Admin/Default/Js/AlipayLifeStatus.js
0 → 100755
浏览文件 @
620fbc1e
$
(
function
()
{
// 添加元素到右侧
function
RightElementAdd
(
value
,
name
)
{
if
(
$
(
'
ul.ul-right
'
).
find
(
'
.items-li-
'
+
value
).
length
==
0
)
{
var
html
=
'
<li class="am-animation-slide-bottom items-li-
'
+
value
+
'
"><span class="name" data-value="
'
+
value
+
'
">
'
+
name
+
'
</span><i class="am-icon-trash-o am-fr"></i></li>
'
;
$
(
'
ul.ul-right
'
).
append
(
html
);
}
// 右侧数据同步
RightElementAlipayLife
();
// 左侧是否还有内容
if
(
$
(
'
ul.ul-left li
'
).
length
==
0
)
{
$
(
'
ul.ul-left .table-no
'
).
removeClass
(
'
none
'
);
}
else
{
$
(
'
ul.ul-left .table-no
'
).
addClass
(
'
none
'
);
}
}
// 批量-生活号id同步
function
RightElementAlipayLife
()
{
var
value_all
=
[];
$
(
'
ul.ul-right li
'
).
each
(
function
(
k
,
v
)
{
value_all
[
k
]
=
$
(
this
).
find
(
'
span.name
'
).
data
(
'
value
'
);
});
$
(
'
.life-container input[name="alipay_life_ids"]
'
).
val
(
value_all
.
join
(
'
,
'
)).
blur
();
// 右侧是否还有数据
if
(
$
(
'
ul.ul-right li
'
).
length
==
0
)
{
$
(
'
ul.ul-right .table-no
'
).
removeClass
(
'
none
'
);
}
else
{
$
(
'
ul.ul-right .table-no
'
).
addClass
(
'
none
'
);
}
}
// 左侧点击到右侧
$
(
'
ul.ul-left
'
).
on
(
'
click
'
,
'
i.am-icon-angle-right
'
,
function
()
{
var
value
=
$
(
this
).
prev
().
data
(
'
value
'
);
var
name
=
$
(
this
).
prev
().
text
();
$
(
this
).
parent
().
remove
();
RightElementAdd
(
value
,
name
);
});
// 左侧全部移动到右侧
$
(
'
.selected-all
'
).
on
(
'
click
'
,
function
()
{
$
(
'
ul.ul-left li
'
).
each
(
function
(
k
,
v
)
{
var
value
=
$
(
this
).
find
(
'
span.name
'
).
data
(
'
value
'
);
var
name
=
$
(
this
).
find
(
'
span.name
'
).
text
();
$
(
this
).
remove
();
RightElementAdd
(
value
,
name
);
});
});
// 右侧删除
$
(
'
ul.ul-right
'
).
on
(
'
click
'
,
'
i.am-icon-trash-o
'
,
function
()
{
$
(
this
).
parent
().
remove
();
RightElementAlipayLife
();
});
// 生活号搜索
$
(
'
.life-form .search-submit
'
).
on
(
'
click
'
,
function
()
{
var
category_id
=
$
(
'
.life-form .life-form-category
'
).
val
();
var
keywords
=
$
(
'
.life-form .life-form-keywords
'
).
val
();
console
.
log
(
category_id
,
keywords
)
// ajax请求
$
.
ajax
({
url
:
$
(
'
.life-form
'
).
data
(
'
search-url
'
),
type
:
'
POST
'
,
dataType
:
"
json
"
,
timeout
:
10000
,
data
:{
"
category_id
"
:
category_id
,
"
keywords
"
:
keywords
},
success
:
function
(
result
)
{
if
(
result
.
code
==
0
)
{
var
html
=
''
;
for
(
var
i
in
result
.
data
)
{
html
+=
'
<li class="am-animation-slide-bottom"><span class="name" data-value="
'
+
result
[
'
data
'
][
i
][
'
id
'
]
+
'
">
'
+
result
[
'
data
'
][
i
][
'
name
'
]
+
'
</span><i class="am-icon-angle-right am-fr"></i></li>
'
;
}
$
(
'
ul.ul-left .table-no
'
).
addClass
(
'
none
'
);
$
(
'
ul.ul-left li
'
).
remove
();
$
(
'
ul.ul-left
'
).
append
(
html
);
}
else
{
Prompt
(
result
.
msg
);
}
},
error
:
function
()
{
Prompt
(
'
网络异常错误
'
);
}
});
});
});
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录