菜单
23
service/Application/Admin/Controller/AlipayLifeController.class.php
Normal file → Executable file
@ -2,6 +2,8 @@
|
||||
|
||||
namespace Admin\Controller;
|
||||
|
||||
use Service\AlipayLifeService;
|
||||
|
||||
/**
|
||||
* 生活号管理
|
||||
* @author Devil
|
||||
@ -205,9 +207,6 @@ class AlipayLifeController extends CommonController
|
||||
// id为空则表示是新增
|
||||
$m = D('AlipayLife');
|
||||
|
||||
// 公共额外数据处理
|
||||
$_POST['is_shelves'] = intval(I('is_shelves', 0));
|
||||
|
||||
// 开启事务
|
||||
$m->startTrans();
|
||||
|
||||
@ -330,19 +329,21 @@ class AlipayLifeController extends CommonController
|
||||
*/
|
||||
public function StatusUpdate()
|
||||
{
|
||||
// 参数
|
||||
if(empty($_POST['id']) || !isset($_POST['state']))
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->ajaxReturn(L('common_param_error'), -1);
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// 数据更新
|
||||
if(M('AlipayLife')->where(array('id'=>I('id')))->save(array('is_shelves'=>I('state'))))
|
||||
// 开始处理
|
||||
$params = $_POST;
|
||||
$params['alipay_life_id'] = isset($params['id']) ? $params['id'] : 0;
|
||||
if(isset($params['state']))
|
||||
{
|
||||
$this->ajaxReturn(L('common_operation_edit_success'));
|
||||
} else {
|
||||
$this->ajaxReturn(L('common_operation_edit_error'), -100);
|
||||
$params['status'] = $params['state'];
|
||||
}
|
||||
$ret = AlipayLifeService::LifeStatus($params);
|
||||
$this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
458
service/Application/Admin/Controller/AlipayLifeMenuController.class.php
Executable file
@ -0,0 +1,458 @@
|
||||
<?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 AlipayLifeMenuController 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('AlipayLifeMenu');
|
||||
|
||||
// 条件
|
||||
$where = $this->GetIndexWhere();
|
||||
|
||||
// 分页
|
||||
$number = MyC('admin_page_number');
|
||||
$page_param = array(
|
||||
'number' => $number,
|
||||
'total' => $m->where($where)->count(),
|
||||
'where' => $params,
|
||||
'url' => U('Admin/AlipayLifeMenu/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_release_status_list', L('common_release_status_list'));
|
||||
|
||||
// 菜单类型
|
||||
$this->assign('common_alipay_life_menu_type_list', L('common_alipay_life_menu_type_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_release_status_list = L('common_release_status_list');
|
||||
$common_alipay_life_menu_type_list = L('common_alipay_life_menu_type_list');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 状态
|
||||
$v['status_name'] = $common_release_status_list[$v['status']]['name'];
|
||||
|
||||
// 类型
|
||||
$v['type_name'] = $common_alipay_life_menu_type_list[$v['type']]['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('type', -1) > -1)
|
||||
{
|
||||
$where['type'] = intval(I('type', 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('AlipayLifeMenu')->find(I('id'));
|
||||
$this->assign('data', $data);
|
||||
|
||||
// 菜单类型
|
||||
$this->assign('common_alipay_life_menu_type_list', L('common_alipay_life_menu_type_list'));
|
||||
|
||||
// 生活号
|
||||
$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('params', array_merge($_POST, $_GET));
|
||||
$this->assign('msg_type', I('msg_type', 0));
|
||||
$this->display('SaveInfo');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* [Index 消息内容列表]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-06T21:31:53+0800
|
||||
*/
|
||||
public function ContentIndex()
|
||||
{
|
||||
// 参数
|
||||
$params = array_merge($_POST, $_GET);
|
||||
|
||||
// 条件
|
||||
$where = ['alipay_life_menu_id' => intval($params['menu_id']), 'pid'=>0];
|
||||
|
||||
// 获取列表
|
||||
$list = $this->SetDataHandleContent(M('AlipayLifeMenuContent')->where($where)->order('sort asc')->select());
|
||||
if(!empty($list))
|
||||
{
|
||||
foreach($list as &$v)
|
||||
{
|
||||
$v['items'] = $this->SetDataHandleContent(M('AlipayLifeMenuContent')->where(['pid'=>$v['id']])->order('sort asc')->select());
|
||||
}
|
||||
}
|
||||
|
||||
// 主数据
|
||||
$menu = empty($_REQUEST['menu_id']) ? array() : M('AlipayLifeMenu')->find(I('menu_id'));
|
||||
$this->assign('menu', $menu);
|
||||
|
||||
// 参数
|
||||
$this->assign('params', $params);
|
||||
|
||||
// 数据列表
|
||||
$this->assign('list', $list);
|
||||
$this->assign('list_count', count($list));
|
||||
$this->display('ContentIndex');
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息内容处理
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-29
|
||||
* @desc description
|
||||
* @param [array] $data [数据]
|
||||
* @return [array] [处理好的数据]
|
||||
*/
|
||||
private function SetDataHandleContent($data)
|
||||
{
|
||||
if(!empty($data))
|
||||
{
|
||||
$common_alipay_life_menu_action_type_list = L('common_alipay_life_menu_action_type_list');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 事件类型
|
||||
$v['action_type_name'] = $common_alipay_life_menu_action_type_list[$v['action_type']]['name'];
|
||||
|
||||
// 图标
|
||||
$v['icon'] = empty($v['icon']) ? '' : C('IMAGE_HOST').$v['icon'];
|
||||
|
||||
// 时间
|
||||
$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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 内容添加/编辑页面
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-29
|
||||
* @desc description
|
||||
*/
|
||||
public function ContentSaveInfo()
|
||||
{
|
||||
// 主数据
|
||||
$menu = empty($_REQUEST['menu_id']) ? array() : M('AlipayLifeMenu')->find(I('menu_id'));
|
||||
$this->assign('menu', $menu);
|
||||
|
||||
// 数据
|
||||
$data = empty($_REQUEST['id']) ? array() : M('AlipayLifeMenuContent')->find(I('id'));
|
||||
$this->assign('data', $data);
|
||||
|
||||
// 事件类型
|
||||
$this->assign('common_alipay_life_menu_action_type_list', L('common_alipay_life_menu_action_type_list'));
|
||||
|
||||
// 获取父级分类
|
||||
$this->assign('alipay_life_menu_list', M('AlipayLifeMenuContent')->field('id,name')->where(['pid'=>0, 'alipay_life_menu_id'=>$menu['id']])->select());
|
||||
|
||||
// 参数
|
||||
$this->assign('params', array_merge($_POST, $_GET));
|
||||
$this->display('ContentSaveInfo');
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息详情
|
||||
* @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::MenuDetailList($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::MenuSave($_POST);
|
||||
$this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']);
|
||||
}
|
||||
|
||||
/**
|
||||
* [ContentSave 生活号菜单内容保存]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-25T22:36:12+0800
|
||||
*/
|
||||
public function ContentSave()
|
||||
{
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
$ret = AlipayLifeService::MenuContentSave($_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'));
|
||||
}
|
||||
|
||||
// 删除
|
||||
$id = intval(I('id'));
|
||||
$m = M('AlipayLifeMenu');
|
||||
$m->startTrans();
|
||||
if($m->delete($id) && M('AlipayLifeMenuContent')->where(['alipay_life_message_id'=>$id])->delete())
|
||||
{
|
||||
$m->commit();
|
||||
$this->ajaxReturn(L('common_operation_delete_success'));
|
||||
}
|
||||
$m->rollback();
|
||||
$this->ajaxReturn(L('common_operation_delete_error'), -100);
|
||||
}
|
||||
|
||||
/**
|
||||
* [Delete 生活号菜单内容删除]
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-25T22:36:12+0800
|
||||
*/
|
||||
public function ContentDelete()
|
||||
{
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
// 删除
|
||||
if(M('AlipayLifeMenuContent')->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 Release()
|
||||
{
|
||||
// 是否ajax请求
|
||||
if(!IS_AJAX)
|
||||
{
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
$ret = AlipayLifeService::MenuSubmit($_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'));
|
||||
}
|
||||
|
||||
$ret = AlipayLifeService::AlipayLifeSearch($_POST);
|
||||
$this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']);
|
||||
}
|
||||
}
|
||||
?>
|
||||
34
service/Application/Admin/Controller/AlipayLifeMessageController.class.php
Normal file → Executable file
@ -108,7 +108,7 @@ class AlipayLifeMessageController extends CommonController
|
||||
// 消息类型
|
||||
$v['type_name'] = $alipay_life_message_msg_type_list[$v['msg_type']]['name'];
|
||||
|
||||
// 发送状态
|
||||
// 发送类型
|
||||
$v['send_type_name'] = $alipay_life_message_send_type_list[$v['send_type']]['name'];
|
||||
|
||||
// 生活号
|
||||
@ -118,8 +118,8 @@ class AlipayLifeMessageController extends CommonController
|
||||
$v['alipay_openid'] = empty($v['user_id']) ? '' : M('User')->where(['id'=>$v['user_id']])->getField('alipay_openid');
|
||||
|
||||
// 时间
|
||||
$v['send_startup_time'] = empty($v['send_startup_time']) ? '' : date('Y-m-d H:i:s', $v['send_startup_time']);
|
||||
$v['send_success_time'] = empty($v['send_success_time']) ? '' : date('Y-m-d H:i:s', $v['send_success_time']);
|
||||
$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']);
|
||||
}
|
||||
@ -339,6 +339,30 @@ class AlipayLifeMessageController extends CommonController
|
||||
$this->display('ContentSaveInfo');
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息详情
|
||||
* @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::MessageDetailList($params);
|
||||
|
||||
// 参数
|
||||
$this->assign('params', $params);
|
||||
|
||||
// 数据列表
|
||||
$this->assign('list', $list);
|
||||
$this->display('Detail');
|
||||
}
|
||||
|
||||
/**
|
||||
* [Save 生活号消息保存]
|
||||
* @author Devil
|
||||
@ -354,7 +378,7 @@ class AlipayLifeMessageController extends CommonController
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
$ret = AlipayLifeService::MessageAdd($_POST);
|
||||
$ret = AlipayLifeService::MessageSave($_POST);
|
||||
$this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']);
|
||||
}
|
||||
|
||||
@ -373,7 +397,7 @@ class AlipayLifeMessageController extends CommonController
|
||||
$this->error(L('common_unauthorized_access'));
|
||||
}
|
||||
|
||||
$ret = AlipayLifeService::MessageContentAdd($_POST);
|
||||
$ret = AlipayLifeService::MessageContentSave($_POST);
|
||||
$this->ajaxReturn($ret['msg'], $ret['code'], $ret['data']);
|
||||
}
|
||||
|
||||
|
||||
48
service/Application/Admin/Lang/zh-cn/alipaylifemenu.php
Executable file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* 模块语言包-生活号菜单
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 0.0.1
|
||||
* @datetime 2016-12-01T21:51:08+0800
|
||||
*/
|
||||
return array(
|
||||
// 添加/编辑
|
||||
'alipay_life_menu_add_name' => '生活号菜单创建',
|
||||
'alipay_life_menu_content_title' => '生活号菜单内容',
|
||||
|
||||
'alipay_life_menu_life_text' => '生活号',
|
||||
'alipay_life_menu_life_format' => '请选择生活号',
|
||||
|
||||
'alipay_life_menu_pid_text' => '父级',
|
||||
'alipay_life_menu_pid_format' => '请选择父级',
|
||||
|
||||
'alipay_life_menu_name_text' => '名称',
|
||||
'alipay_life_menu_name_format' => '名称格式 1~5 个字符',
|
||||
|
||||
'alipay_life_menu_type_text' => '菜单类型',
|
||||
'alipay_life_menu_type_format' => '请选择菜单类型',
|
||||
|
||||
'alipay_life_menu_action_type_text' => '事件类型',
|
||||
'alipay_life_menu_action_type_format'=> '请选择事件类型',
|
||||
|
||||
'alipay_life_menu_action_value_text' => '事件值',
|
||||
'alipay_life_menu_action_value_format'=> '事件值格式最多 250 个字符',
|
||||
|
||||
'alipay_life_menu_icon_text' => '图标',
|
||||
'alipay_life_menu_icon_format' => '请上传图标',
|
||||
|
||||
'alipay_life_menu_startup_time_text' => '发布启动时间',
|
||||
'alipay_life_menu_success_time_text' => '发布完成时间',
|
||||
|
||||
'alipay_life_menu_optional_text' => '可选',
|
||||
'alipay_life_menu_selected_text' => '已选',
|
||||
'alipay_life_menu_selected_all_text' => '全选',
|
||||
'alipay_life_menu_content_text' => '内容',
|
||||
'alipay_life_menu_detail_text' => '详情',
|
||||
|
||||
'alipay_life_menu_send_time_text' => '发布时间',
|
||||
'alipay_life_menu_return_msg_text' => '发布描述',
|
||||
);
|
||||
?>
|
||||
@ -58,5 +58,8 @@ return array(
|
||||
'alipay_life_message_selected_all_text' => '全选',
|
||||
'alipay_life_message_content_text' => '内容',
|
||||
'alipay_life_message_detail_text' => '详情',
|
||||
|
||||
'alipay_life_message_send_time_text' => '发送时间',
|
||||
'alipay_life_message_return_msg_text' => '发送描述',
|
||||
);
|
||||
?>
|
||||
@ -47,20 +47,15 @@
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_rsa_public_text')}}</label>
|
||||
<textarea rows="3" name="rsa_public" class="am-radius" placeholder="{{:L('alipay_life_rsa_public_text')}}" data-validation-message="{{:L('alipay_life_rsa_public_format')}}" required><present name="data">{{$data.rsa_public}}</present></textarea>
|
||||
<textarea rows="5" name="rsa_public" class="am-radius" placeholder="{{:L('alipay_life_rsa_public_text')}}" data-validation-message="{{:L('alipay_life_rsa_public_format')}}" required><present name="data">{{$data.rsa_public}}</present></textarea>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_rsa_private_text')}}</label>
|
||||
<textarea rows="3" name="rsa_private" class="am-radius" placeholder="{{:L('alipay_life_rsa_private_text')}}" data-validation-message="{{:L('alipay_life_rsa_private_format')}}" required><present name="data">{{$data.rsa_private}}</present></textarea>
|
||||
<textarea rows="5" name="rsa_private" class="am-radius" placeholder="{{:L('alipay_life_rsa_private_text')}}" data-validation-message="{{:L('alipay_life_rsa_private_format')}}" required><present name="data">{{$data.rsa_private}}</present></textarea>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_out_rsa_public_text')}}</label>
|
||||
<textarea rows="3" name="out_rsa_public" class="am-radius" placeholder="{{:L('alipay_life_out_rsa_public_text')}}" data-validation-message="{{:L('alipay_life_out_rsa_public_format')}}" required><present name="data">{{$data.out_rsa_public}}</present></textarea>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label class="block">{{:L('alipay_life_is_shelves_text')}}</label>
|
||||
<input name="is_shelves" value="1" type="checkbox" data-off-text="{{:L('common_operation_off_is_text')}}" data-on-text="{{:L('common_operation_on_is_text')}}" data-size="xs" data-on-color="success" data-off-color="default" data-handle-width="50" data-am-switch <if condition="(isset($data['is_shelves']) and $data['is_shelves'] eq 1) or !isset($data['is_shelves'])">checked="true"</if> />
|
||||
<textarea rows="5" name="out_rsa_public" class="am-radius" placeholder="{{:L('alipay_life_out_rsa_public_text')}}" data-validation-message="{{:L('alipay_life_out_rsa_public_format')}}" required><present name="data">{{$data.out_rsa_public}}</present></textarea>
|
||||
</div>
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" <notempty name="data"> value="{{$data.id}}"</notempty> />
|
||||
|
||||
185
service/Application/Admin/View/Default/AlipayLifeMenu/ContentIndex.html
Executable file
@ -0,0 +1,185 @@
|
||||
<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_menu_content_title')}}</span>
|
||||
<a href="{{:U('Admin/AlipayLifeMenu/Index')}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> {{:L('common_operation_back')}}</a>
|
||||
</legend>
|
||||
<!-- back nav end -->
|
||||
|
||||
<!-- operation start -->
|
||||
<div class="am-g">
|
||||
<a href="{{:U('Admin/AlipayLifeMenu/ContentSaveInfo', ['menu_id'=>$params['menu_id']])}}" 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_menu_name_text')}}</th>
|
||||
<th>{{:L('alipay_life_menu_action_type_text')}}</th>
|
||||
<th>{{:L('alipay_life_menu_action_value_text')}}</th>
|
||||
<th class="am-hide-sm-only">{{:L('alipay_life_menu_icon_text')}}</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>
|
||||
<if condition="empty($v['name'])"><span class="cr-ddd">{{:L('common_on_fill_in_the_text')}}</span><else />{{$v.name}}</if>
|
||||
</td>
|
||||
<td>
|
||||
<if condition="empty($v['action_type_name'])"><span class="cr-ddd">{{:L('common_on_fill_in_the_text')}}</span><else />{{$v.action_type_name}}</if>
|
||||
</td>
|
||||
<td>
|
||||
<if condition="empty($v['action_value'])"><span class="cr-ddd">{{:L('common_on_fill_in_the_text')}}</span><else />{{$v.action_value}}</if>
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
<if condition="!empty($v['icon'])">
|
||||
<a href="{{$v['icon']}}" target="_blank">
|
||||
<img src="{{$v['icon']}}" class="am-radius" width="50" />
|
||||
</a>
|
||||
<else />
|
||||
<span class="cr-ddd">{{:L('common_on_fill_in_images')}}</span>
|
||||
</if>
|
||||
</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_menu_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_menu_action_type_text')}}</dt>
|
||||
<dd><if condition="empty($v['action_type_name'])"><span class="cr-ddd">{{:L('common_on_fill_in_the_text')}}</span><else />{{$v.action_type_name}}</if></dd>
|
||||
|
||||
<dt>{{:L('alipay_life_menu_action_value_text')}}</dt>
|
||||
<dd><if condition="empty($v['action_value'])"><span class="cr-ddd">{{:L('common_on_fill_in_the_text')}}</span><else />{{$v.action_value}}</if></dd>
|
||||
|
||||
<dt>{{:L('alipay_life_menu_icon_text')}}</dt>
|
||||
<dd>
|
||||
<if condition="!empty($v['icon'])">
|
||||
<img src="{{$v['icon']}}" class="am-img-thumbnail am-radius" width="50" height="50" />
|
||||
<else />
|
||||
<span class="cr-ddd">{{:L('common_on_fill_in_images')}}</span>
|
||||
</if>
|
||||
</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="$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>
|
||||
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
<notempty name="v.items">
|
||||
<foreach name="v.items" item="vs">
|
||||
<tr id="data-list-{{$vs.id}}">
|
||||
<td class="p-l-30">
|
||||
<if condition="empty($vs['name'])"><span class="cr-ddd">{{:L('common_on_fill_in_the_text')}}</span><else />{{$vs.name}}</if>
|
||||
</td>
|
||||
<td>
|
||||
<if condition="empty($vs['action_type_name'])"><span class="cr-ddd">{{:L('common_on_fill_in_the_text')}}</span><else />{{$vs.action_type_name}}</if>
|
||||
</td>
|
||||
<td>
|
||||
<if condition="empty($vs['action_value'])"><span class="cr-ddd">{{:L('common_on_fill_in_the_text')}}</span><else />{{$vs.action_value}}</if>
|
||||
</td>
|
||||
<td class="am-hide-sm-only">
|
||||
<if condition="!empty($vs['icon'])">
|
||||
<a href="{{$vs['icon']}}" target="_blank">
|
||||
<img src="{{$vs['icon']}}" class="am-radius" width="50" />
|
||||
</a>
|
||||
<else />
|
||||
<span class="cr-ddd">{{:L('common_on_fill_in_images')}}</span>
|
||||
</if>
|
||||
</td>
|
||||
<td>
|
||||
<span class="am-icon-caret-down c-p" data-am-modal="{target: '#my-popup{{$vs.id}}'}"> {{:L('common_see_more_name')}}</span>
|
||||
<div class="am-popup am-radius" id="my-popup{{$vs.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_menu_name_text')}}</dt>
|
||||
<dd><if condition="empty($vs['name'])"><span class="cr-ddd">{{:L('common_on_fill_in_the_text')}}</span><else />{{$vs.name}}</if></dd>
|
||||
|
||||
<dt>{{:L('alipay_life_menu_action_type_text')}}</dt>
|
||||
<dd><if condition="empty($vs['action_type_name'])"><span class="cr-ddd">{{:L('common_on_fill_in_the_text')}}</span><else />{{$vs.action_type_name}}</if></dd>
|
||||
|
||||
<dt>{{:L('alipay_life_menu_action_value_text')}}</dt>
|
||||
<dd><if condition="empty($vs['action_value'])"><span class="cr-ddd">{{:L('common_on_fill_in_the_text')}}</span><else />{{$vs.action_value}}</if></dd>
|
||||
|
||||
<dt>{{:L('alipay_life_menu_icon_text')}}</dt>
|
||||
<dd>
|
||||
<if condition="!empty($vs['icon'])">
|
||||
<img src="{{$vs['icon']}}" class="am-img-thumbnail am-radius" width="50" height="50" />
|
||||
<else />
|
||||
<span class="cr-ddd">{{:L('common_on_fill_in_images')}}</span>
|
||||
</if>
|
||||
</dd>
|
||||
|
||||
<dt>{{:L('common_create_time_name')}}</dt>
|
||||
<dd>{{$vs.add_time}}</dd>
|
||||
|
||||
<dt>{{:L('common_upd_time_name')}}</dt>
|
||||
<dd>{{$vs.upd_time}}</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
</td>
|
||||
</tr>
|
||||
</foreach>
|
||||
</notempty>
|
||||
</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 -->
|
||||
81
service/Application/Admin/View/Default/AlipayLifeMenu/ContentSaveInfo.html
Executable file
@ -0,0 +1,81 @@
|
||||
<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/AlipayLifeMenu/ContentSave')}}" method="POST" request-type="ajax-url" request-value="{{:U('Admin/AlipayLifeMenu/ContentIndex', ['menu_id'=>$params['menu_id']])}}" 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_menu_add_name')}}</span>
|
||||
<a href="{{:U('Admin/AlipayLifeMenu/ContentIndex', ['menu_id'=>$params['menu_id']])}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> {{:L('common_operation_back')}}</a>
|
||||
</legend>
|
||||
|
||||
<if condition="$menu['type'] eq 0 and !empty($alipay_life_menu_list)">
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_menu_pid_text')}}</label>
|
||||
<select name="pid" class="am-radius c-p chosen-select" data-placeholder="{{:L('common_select_can_choose')}}" data-validation-message="{{:L('alipay_life_menu_pid_format')}}">
|
||||
<option value="">{{:L('common_select_can_choose')}}</option>
|
||||
<foreach name="alipay_life_menu_list" item="v">
|
||||
<option value="{{$v.id}}" <if condition="isset($data['pid']) and $v['id'] eq $data['pid']">selected</if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
</if>
|
||||
|
||||
<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')}}" maxlength="5" data-validation-message="{{:L('alipay_life_menu_name_format')}}" class="am-radius" value="<notempty name="data.name">{{$data.name}}</notempty>" required />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_menu_action_type_text')}}</label>
|
||||
<select name="action_type" class="am-radius c-p chosen-select" data-placeholder="{{:L('common_select_can_choose')}}" data-validation-message="{{:L('alipay_life_menu_action_type_format')}}" required>
|
||||
<option value="">{{:L('common_select_can_choose')}}</option>
|
||||
<foreach name="common_alipay_life_menu_action_type_list" item="v">
|
||||
<option value="{{$v.value}}" <if condition="isset($data['action_type']) and $v['value'] eq $data['action_type']">selected</if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_menu_action_value_text')}}</label>
|
||||
<input type="text" name="action_value" placeholder="{{:L('alipay_life_menu_action_value_text')}}" maxlength="250" data-validation-message="{{:L('alipay_life_menu_action_value_format')}}" class="am-radius" value="<notempty name="data.action_value">{{$data.action_value}}</notempty>" />
|
||||
</div>
|
||||
|
||||
<if condition="$menu['type'] eq 1">
|
||||
<div class="am-form-group am-form-file">
|
||||
<label class="block">{{:L('alipay_life_menu_icon_text')}}</label>
|
||||
<button type="button" class="am-btn am-btn-default am-btn-sm am-radius">
|
||||
<i class="am-icon-cloud-upload"></i> {{:L('common_select_images_text')}}</button>
|
||||
<input type="text" name="icon" class="am-radius js-choice-one original-images-url original-icon-images-url" data-choice-one-to='input[name="file_icon"]' data-validation-message="{{:L('alipay_life_menu_icon_format')}}" readonly="readonly" value="<notempty name="data.icon">{{$data.icon}}</notempty>" required />
|
||||
<input type="file" name="file_icon" multiple data-validation-message="{{:L('alipay_life_menu_icon_format')}}" accept="image/jpeg,image/jpg,image/png" class="js-choice-one images-file-event file_icon-tag" data-choice-one-to=".original-icon-images-url" data-tips-tag="#form-icon-tips" data-image-tag="#form-img-icon" required />
|
||||
<div id="form-icon-tips" class="m-t-5"></div>
|
||||
<notempty name="data.icon">
|
||||
<img src="{{$image_host}}{{$data.icon}}" id="form-img-icon" class="block m-t-5 am-img-thumbnail am-radius" width="100" height="100" data-default="{{$image_host}}/Public/Admin/Default/Images/default-images.png" />
|
||||
</notempty>
|
||||
<empty name="data.icon">
|
||||
<img src="{{$image_host}}/Public/Admin/Default/Images/default-images.png" id="form-img-icon" class="block m-t-5 am-img-thumbnail am-radius" width="100" height="100" data-default="{{$image_host}}/Public/Admin/Default/Images/default-images.png" />
|
||||
</empty>
|
||||
</div>
|
||||
</if>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('common_view_sort_title')}}</label>
|
||||
<input type="number" placeholder="{{:L('common_view_sort_title')}}" name="sort" min="0" max="255" data-validation-message="{{:L('common_sort_error')}}" class="am-radius" value="<if condition="isset($data['sort'])">{{$data.sort}}<else />0</if>" required />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<input type="hidden" name="id" value="{{$data.id}}" />
|
||||
<input type="hidden" name="menu_id" value="{{$params.menu_id}}" />
|
||||
<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 -->
|
||||
@ -0,0 +1,78 @@
|
||||
<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_menu_detail_text')}}</span>
|
||||
<a href="{{:U('Admin/AlipayLifeMenu/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_menu_life_text')}}</th>
|
||||
<th>{{:L('common_view_status_title')}}</th>
|
||||
<th>{{:L('alipay_life_menu_send_time_text')}}</th>
|
||||
<th>{{:L('alipay_life_menu_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_menu_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_menu_send_time_text')}}</dt>
|
||||
<dd>{{$v.send_time}}</dd>
|
||||
|
||||
<dt>{{:L('alipay_life_menu_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 -->
|
||||
145
service/Application/Admin/View/Default/AlipayLifeMenu/Index.html
Executable file
@ -0,0 +1,145 @@
|
||||
<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/AlipayLifeMenu/Index')}}" method="POST">
|
||||
<div class="am-g">
|
||||
<input type="text" class="am-radius form-keyword" placeholder="{{:L('alipay_life_menu_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_release_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="type" class="am-radius c-p m-t-10 m-l-5 param-where">
|
||||
<option value="-1">{{:L('alipay_life_menu_type_text')}}</option>
|
||||
<foreach name="common_alipay_life_menu_type_list" item="v">
|
||||
<option value="{{$v.value}}" <if condition="isset($params['type']) and $params['type'] 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/AlipayLifeMenu/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_menu_name_text')}}</th>
|
||||
<th>{{:L('alipay_life_menu_type_text')}}</th>
|
||||
<th class="am-hide-sm-only alipay-life-row">{{:L('alipay_life_menu_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.type_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_menu_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_menu_type_text')}}</dt>
|
||||
<dd><if condition="empty($v['type_name'])"><span class="cr-ddd">{{:L('common_on_fill_in_the_text')}}</span><else />{{$v.type_name}}</if></dd>
|
||||
|
||||
<dt>{{:L('alipay_life_menu_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_menu_startup_time_text')}}</dt>
|
||||
<dd>{{$v.startup_time}}</dd>
|
||||
|
||||
<dt>{{:L('alipay_life_menu_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'], [1,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>
|
||||
|
||||
<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>
|
||||
|
||||
<if condition="in_array($v['status'], [2,3,4])">
|
||||
<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>
|
||||
</if>
|
||||
</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 -->
|
||||
78
service/Application/Admin/View/Default/AlipayLifeMenu/SaveInfo.html
Executable file
@ -0,0 +1,78 @@
|
||||
<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/AlipayLifeMenu/Save')}}" method="POST" request-type="ajax-url" request-value="{{:U('Admin/AlipayLifeMenu/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_menu_add_name')}}</span>
|
||||
<a href="{{:U('Admin/AlipayLifeMenu/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_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 />
|
||||
</div>
|
||||
|
||||
<div class="am-form-group">
|
||||
<label>{{:L('alipay_life_menu_type_text')}}</label>
|
||||
<select name="type" class="am-radius c-p chosen-select" data-placeholder="{{:L('common_select_can_choose')}}" data-validation-message="{{:L('alipay_life_menu_type_format')}}" required>
|
||||
<option value="">{{:L('common_select_can_choose')}}</option>
|
||||
<foreach name="common_alipay_life_menu_type_list" item="v">
|
||||
<option value="{{$v.value}}" <if condition="isset($data['type']) and $v['value'] eq $data['type']">selected</if>>{{$v.name}}</option>
|
||||
</foreach>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<!-- 生活号容器 -->
|
||||
<div class="life-container">
|
||||
<label class="block">{{:L('alipay_life_menu_life_text')}}</label>
|
||||
<div class="life-form" data-search-url="{{:U('Admin/AlipayLifeMenu/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_menu_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_menu_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_menu_life_format')}}" required />
|
||||
<div class="life-items am-fl">
|
||||
<div class="title">{{:L('alipay_life_menu_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_menu_selected_all_text')}} <i class="am-icon-angle-double-right"></i></button>
|
||||
<div class="life-items am-fr">
|
||||
<div class="title">{{:L('alipay_life_menu_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 -->
|
||||
8
service/Application/Admin/View/Default/AlipayLifeMessage/ContentIndex.html
Normal file → Executable file
@ -3,10 +3,12 @@
|
||||
<!-- right content start -->
|
||||
<div class="content-right">
|
||||
<div class="content">
|
||||
<!-- back nav start -->
|
||||
<legend>
|
||||
<span class="fs-16">{{:L('alipay_life_message_content_title')}}</span>
|
||||
<a href="{{:U('Admin/AlipayLifeMessage/Index')}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> {{:L('common_operation_back')}}</a>
|
||||
</legend>
|
||||
<!-- back nav end -->
|
||||
|
||||
<!-- operation start -->
|
||||
<if condition="($msg_type eq 0 and $list_count eq 0) or ($msg_type eq 1 and $list_count lt 10)">
|
||||
@ -112,12 +114,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- list end -->
|
||||
|
||||
<!-- page start -->
|
||||
<if condition="!empty($list)">
|
||||
{{$page_html}}
|
||||
</if>
|
||||
<!-- page end -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- right content end -->
|
||||
|
||||
2
service/Application/Admin/View/Default/AlipayLifeMessage/ContentSaveInfo.html
Normal file → Executable file
@ -29,7 +29,7 @@
|
||||
<button type="button" class="am-btn am-btn-default am-btn-sm am-radius">
|
||||
<i class="am-icon-cloud-upload"></i> {{:L('common_select_images_text')}}</button>
|
||||
<input type="text" name="image_url" class="am-radius js-choice-one original-images-url original-icon-images-url" data-choice-one-to='input[name="file_image_url"]' data-validation-message="{{:L('alipay_life_message_image_url_format')}}" readonly="readonly" value="<notempty name="data.image_url">{{$data.image_url}}</notempty>" required />
|
||||
<input type="file" name="file_image_url" multiple data-validation-message="{{:L('alipay_life_message_image_url_format')}}" accept="image/gif,image/jpeg,image/jpg,image/png" class="js-choice-one images-file-event file_image_url-tag" data-choice-one-to=".original-icon-images-url" data-tips-tag="#form-icon-tips" data-image-tag="#form-img-icon" required />
|
||||
<input type="file" name="file_image_url" multiple data-validation-message="{{:L('alipay_life_message_image_url_format')}}" accept="image/jpeg,image/jpg,image/png" class="js-choice-one images-file-event file_image_url-tag" data-choice-one-to=".original-icon-images-url" data-tips-tag="#form-icon-tips" data-image-tag="#form-img-icon" required />
|
||||
<div id="form-icon-tips" class="m-t-5"></div>
|
||||
<notempty name="data.image_url">
|
||||
<img src="{{$image_host}}{{$data.image_url}}" id="form-img-icon" class="block m-t-5 am-img-thumbnail am-radius" width="100" height="100" data-default="{{$image_host}}/Public/Admin/Default/Images/default-images.png" />
|
||||
|
||||
83
service/Application/Admin/View/Default/AlipayLifeMessage/Detail.html
Executable file
@ -0,0 +1,83 @@
|
||||
<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_message_detail_text')}}</span>
|
||||
<a href="{{:U('Admin/AlipayLifeMessage/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_message_life_text')}}</th>
|
||||
<th>{{:L('alipay_life_message_user_text')}}</th>
|
||||
<th>{{:L('common_view_status_title')}}</th>
|
||||
<th>{{:L('alipay_life_message_send_time_text')}}</th>
|
||||
<th>{{:L('alipay_life_message_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.alipay_openid}}</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_message_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('alipay_life_message_user_text')}}</dt>
|
||||
<dd><if condition="empty($v['alipay_openid'])"><span class="cr-ddd">{{:L('common_on_fill_in_the_text')}}</span><else />{{$v.alipay_openid}}</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_message_send_time_text')}}</dt>
|
||||
<dd>{{$v.send_time}}</dd>
|
||||
|
||||
<dt>{{:L('alipay_life_message_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 -->
|
||||
@ -6,7 +6,7 @@
|
||||
<!-- form start -->
|
||||
<form class="am-form view-list" action="{{:U('Admin/AlipayLifeMessage/Index')}}" method="POST">
|
||||
<div class="am-g">
|
||||
<input type="text" class="am-radius form-keyword" placeholder="{{:L('alipay_life_message_keywords_text')}}" name="keyword" <present name="param['keyword']"> value="{{$params.keyword}}"</present> />
|
||||
<input type="text" class="am-radius form-keyword" placeholder="{{:L('alipay_life_message_keywords_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')}}
|
||||
@ -93,10 +93,10 @@
|
||||
<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_message_startup_time_text')}}</dt>
|
||||
<dd>{{$v.send_startup_time}}</dd>
|
||||
<dd>{{$v.startup_time}}</dd>
|
||||
|
||||
<dt>{{:L('alipay_life_message_success_time_text')}}</dt>
|
||||
<dd>{{$v.send_success_time}}</dd>
|
||||
<dd>{{$v.success_time}}</dd>
|
||||
|
||||
<dt>{{:L('common_create_time_name')}}</dt>
|
||||
<dd>{{$v.add_time}}</dd>
|
||||
|
||||
@ -1,7 +0,0 @@
|
||||
<ul class="am-nav am-nav-pills table-nav m-b-10">
|
||||
<foreach name="alipay_life_message_send_type_list" item="v">
|
||||
<li <if condition="$send_type eq $v['value']">class="am-active"</if> data-type="{{$v.value}}">
|
||||
<a href="{{:U('Admin/AlipayLifeMessage/SaveInfo', array_merge($params, ['send_type'=>$v['value']]))}}">{{$v.name}}</a>
|
||||
</li>
|
||||
</foreach>
|
||||
</ul>
|
||||
@ -1,7 +0,0 @@
|
||||
<ul class="am-nav am-nav-pills table-nav m-b-10">
|
||||
<foreach name="alipay_life_message_msg_type_list" item="v">
|
||||
<li <if condition="$msg_type eq $v['value']">class="am-active"</if> data-type="{{$v.value}}">
|
||||
<a href="{{:U('Admin/AlipayLifeMessage/ContentSaveInfo', array_merge($params, ['msg_type'=>$v['value']]))}}">{{$v.name}}</a>
|
||||
</li>
|
||||
</foreach>
|
||||
</ul>
|
||||
15
service/Application/Api/Controller/AlipayLifeController.class.php
Normal file → Executable file
@ -73,9 +73,22 @@ class AlipayLifeController extends CommonController
|
||||
* @date 2018-10-24
|
||||
* @desc description
|
||||
*/
|
||||
public function Send()
|
||||
public function MessageSend()
|
||||
{
|
||||
AlipayLifeService::MessageSend($_REQUEST);
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单发布
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-24
|
||||
* @desc description
|
||||
*/
|
||||
public function MenuRelease()
|
||||
{
|
||||
AlipayLifeService::MenuRelease($_REQUEST);
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -1315,6 +1315,31 @@ function params_checked($data, $params)
|
||||
return $v['error_msg'];
|
||||
}
|
||||
break;
|
||||
|
||||
case 'length' :
|
||||
if(!is_string($v['checked_data']))
|
||||
{
|
||||
return '内部调用参数配置有误';
|
||||
}
|
||||
if(!isset($data[$v['key_name']]))
|
||||
{
|
||||
return $v['error_msg'];
|
||||
}
|
||||
$length = mb_strlen($data[$v['key_name']], 'utf-8');
|
||||
$rule = explode(',', $v['checked_data']);
|
||||
if(count($rule) == 1)
|
||||
{
|
||||
if($length > intval($rule[0]))
|
||||
{
|
||||
return $v['error_msg'];
|
||||
}
|
||||
} else {
|
||||
if($length < intval($rule[0]) || $length > intval($rule[1]))
|
||||
{
|
||||
return $v['error_msg'];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@ -165,6 +165,7 @@ return array(
|
||||
'common_operation_install' => '安装',
|
||||
'common_operation_uninstall' => '卸载',
|
||||
'common_operation_pay' => '支付',
|
||||
'common_operation_release' => '发布',
|
||||
'common_delivery_tips' => '是否操作发货,操作后不可恢复!',
|
||||
'common_collect_submit' => '收货',
|
||||
'common_collect_tips' => '是否操作收货,操作后不可恢复!',
|
||||
@ -531,6 +532,29 @@ return array(
|
||||
4 => array('value' => 4, 'name' => '发送失败'),
|
||||
),
|
||||
|
||||
// 发布状态
|
||||
'common_release_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' => '事件型菜单'),
|
||||
1 => array('value' => 1, 'out_value' => 'link', 'name' => '链接型菜单'),
|
||||
2 => array('value' => 2, 'out_value' => 'tel', 'name' => '点击拨打电话'),
|
||||
3 => array('value' => 3, 'out_value' => 'map', 'name' => '点击查看地图'),
|
||||
4 => array('value' => 4, 'out_value' => 'consumption', 'name' => '点击查看用户与生活号'),
|
||||
),
|
||||
|
||||
// 支付宝生活号菜单类型
|
||||
'common_alipay_life_menu_type_list' => array(
|
||||
0 => array('value' => 0, 'name' => '文字'),
|
||||
1 => array('value' => 1, 'name' => '图标+文字'),
|
||||
),
|
||||
|
||||
|
||||
// 色彩值
|
||||
|
||||
0
service/Application/Home/Controller/MessageController.class.php
Normal file → Executable file
0
service/Application/Home/View/Default/Message/Index.html
Normal file → Executable file
0
service/Application/Home/View/Default/UserAddress/Index.html
Normal file → Executable file
146
service/Application/Library/AlipayLife.class.php
Normal file → Executable file
@ -499,5 +499,151 @@ class AlipayLife
|
||||
return ['status'=>-100, 'msg'=>$result['alipay_offline_material_image_upload_response']['sub_msg'].'['.$result['alipay_offline_material_image_upload_response']['code'].']', 'data'=>''];
|
||||
}
|
||||
|
||||
/**
|
||||
* 上架生活号
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-30
|
||||
* @desc description
|
||||
* @param [array] $data [输入参数]
|
||||
*/
|
||||
public function LifeStatus($params = [])
|
||||
{
|
||||
// 参数处理
|
||||
$p = $this->RequestCommonParams();
|
||||
$p['method'] = $params['method'];
|
||||
$biz_content = [];
|
||||
$p['biz_content'] = json_encode($biz_content, JSON_UNESCAPED_UNICODE);
|
||||
|
||||
// 生成签名
|
||||
$p['sign'] = $this->MyRsaSign($this->ArrayToUrlString($p));
|
||||
|
||||
// 请求接口
|
||||
$result = $this->HttpRequest('https://openapi.alipay.com/gateway.do', $p);
|
||||
$key = str_replace('.', '_', $p['method']).'_response';
|
||||
|
||||
// 验证签名
|
||||
if(!$this->SyncRsaVerify($result, $key))
|
||||
{
|
||||
return ['status'=>-1, 'msg'=>'签名验证错误'];
|
||||
}
|
||||
|
||||
// 状态
|
||||
if(isset($result[$key]['code']) && $result[$key]['code'] == 10000)
|
||||
{
|
||||
return ['status'=>0, 'msg'=>'操作成功'];
|
||||
}
|
||||
return ['status'=>-100, 'msg'=>$result[$key]['sub_msg'].'['.$result[$key]['code'].']'];
|
||||
}
|
||||
|
||||
/**
|
||||
* 上架生活号
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-30
|
||||
* @desc description
|
||||
* @param [array] $data [输入参数]
|
||||
*/
|
||||
public function LifeAboard($params = [])
|
||||
{
|
||||
$params['method'] = 'alipay.open.public.life.aboard.apply';
|
||||
return $this->LifeStatus($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 下架生活号
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-30
|
||||
* @desc description
|
||||
* @param [array] $data [输入参数]
|
||||
*/
|
||||
public function LifeDebark($params = [])
|
||||
{
|
||||
$params['method'] = 'alipay.open.public.life.debark.apply';
|
||||
return $this->LifeStatus($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单发布
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-30
|
||||
* @desc description
|
||||
* @param [array] $data [输入参数]
|
||||
*/
|
||||
public function MenuRelease($params = [])
|
||||
{
|
||||
// 参数处理
|
||||
$p = $this->RequestCommonParams();
|
||||
$p['method'] = 'alipay.open.public.menu.modify';
|
||||
$biz_content = [
|
||||
'type' => ($params['type'] == 1) ? 'icon' : 'text',
|
||||
'button' => [],
|
||||
];
|
||||
foreach($params['content'] as $v)
|
||||
{
|
||||
$button = [
|
||||
'name' => mb_substr($v['name'], 0, 5, 'utf-8'),
|
||||
'action_type' => $v['action_type'],
|
||||
'action_param' => $v['action_value'],
|
||||
];
|
||||
|
||||
// 是否为图标
|
||||
if($params['type'] == 1)
|
||||
{
|
||||
$button['icon'] = $v['out_icon'];
|
||||
}
|
||||
|
||||
// 不为图标并且存在二级
|
||||
if($params['type'] != 1 && !empty($v['items']))
|
||||
{
|
||||
foreach($v['items'] as $vs)
|
||||
{
|
||||
$button['sub_button'][] = [
|
||||
'name' => mb_substr($vs['name'], 0, 5, 'utf-8'),
|
||||
'action_type' => $vs['action_type'],
|
||||
'action_param' => $vs['action_value'],
|
||||
];
|
||||
}
|
||||
}
|
||||
$biz_content['button'][] = $button;
|
||||
}
|
||||
$p['biz_content'] = json_encode($biz_content, JSON_UNESCAPED_UNICODE);
|
||||
|
||||
// 生成签名
|
||||
$p['sign'] = $this->MyRsaSign($this->ArrayToUrlString($p));
|
||||
|
||||
// 请求接口
|
||||
$result = $this->HttpRequest('https://openapi.alipay.com/gateway.do', $p);
|
||||
$key = str_replace('.', '_', $p['method']).'_response';
|
||||
|
||||
// 验证签名
|
||||
if(!$this->SyncRsaVerify($result, $key))
|
||||
{
|
||||
return ['status'=>-1, 'msg'=>'签名验证错误'];
|
||||
}
|
||||
|
||||
// 状态
|
||||
if(isset($result[$key]['code']) && $result[$key]['code'] == 10000)
|
||||
{
|
||||
return ['status'=>0, 'msg'=>'操作成功'];
|
||||
}
|
||||
|
||||
// 错误是否为菜单不存在,则重新调用创建接口
|
||||
if(stripos($result[$key]['sub_code'], 'MENU_MODIFY_NOT_EXIST') !== false)
|
||||
{
|
||||
$params['method'] = 'alipay.open.public.menu.create';
|
||||
return $this->MenuRelease($params);
|
||||
}
|
||||
|
||||
// 失败
|
||||
return ['status'=>-100, 'msg'=>$result[$key]['sub_msg'].'['.$result[$key]['code'].']'];
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
0
service/Application/Library/FileUpload.class.php
Normal file → Executable file
648
service/Application/Service/AlipayLifeService.class.php
Normal file → Executable file
@ -12,7 +12,7 @@ namespace Service;
|
||||
class AlipayLifeService
|
||||
{
|
||||
/**
|
||||
* 消息添加
|
||||
* 消息保存
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
@ -20,10 +20,10 @@ class AlipayLifeService
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function MessageAdd($params = [])
|
||||
public static function MessageSave($params = [])
|
||||
{
|
||||
// 参数校验
|
||||
$ret = self::MessageAddCheck($params);
|
||||
$ret = self::MessageSaveCheck($params);
|
||||
if($ret['code'] != 0)
|
||||
{
|
||||
return $ret;
|
||||
@ -67,7 +67,7 @@ class AlipayLifeService
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息添加
|
||||
* 消息保存
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
@ -75,10 +75,10 @@ class AlipayLifeService
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function MessageContentAdd($params = [])
|
||||
public static function MessageContentSave($params = [])
|
||||
{
|
||||
// 参数校验
|
||||
$ret = self::MessageContentAddCheck($params);
|
||||
$ret = self::MessageContentSaveCheck($params);
|
||||
if($ret['code'] != 0)
|
||||
{
|
||||
return $ret;
|
||||
@ -162,7 +162,7 @@ class AlipayLifeService
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function MessageAddCheck($params = [])
|
||||
public static function MessageSaveCheck($params = [])
|
||||
{
|
||||
// 基础参数
|
||||
$p = [
|
||||
@ -228,7 +228,7 @@ class AlipayLifeService
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function MessageContentAddCheck($params = [])
|
||||
public static function MessageContentSaveCheck($params = [])
|
||||
{
|
||||
// 基础参数
|
||||
$p = [
|
||||
@ -249,12 +249,19 @@ class AlipayLifeService
|
||||
return DataReturn($ret, -1);
|
||||
}
|
||||
|
||||
// 主数据
|
||||
$message = M('AlipayLifeMessage')->find($params['message_id']);
|
||||
if(empty($message))
|
||||
{
|
||||
return DataReturn('消息数据不存在', -1);
|
||||
}
|
||||
|
||||
// 图文
|
||||
$p = [];
|
||||
if($params['type'] == 1)
|
||||
if($message['msg_type'] == 1)
|
||||
{
|
||||
// 图片
|
||||
if(empty($_FILES['file_image_url']))
|
||||
if(empty($_FILES['file_image_url']) && empty($params['image_url']))
|
||||
{
|
||||
return DataReturn('请上传封面图片', -1);
|
||||
}
|
||||
@ -460,10 +467,10 @@ class AlipayLifeService
|
||||
$m->startTrans();
|
||||
if(M('AlipayLifeMessageDetail')->addAll($data) !== false)
|
||||
{
|
||||
if($m->where(['id'=>$message['id']])->save(['status'=>1, 'send_startup_time'=>time(), 'upd_time'=>time()]) !== false)
|
||||
if($m->where(['id'=>$message['id']])->save(['status'=>1, 'startup_time'=>time(), 'upd_time'=>time()]) !== false)
|
||||
{
|
||||
$m->commit();
|
||||
self::SyncJobSend($message['id']);
|
||||
self::SyncJobSend($message['id'], 'message_id', 'MessageSend');
|
||||
return DataReturn(L('common_submit_success'), 0);
|
||||
}
|
||||
}
|
||||
@ -478,11 +485,13 @@ class AlipayLifeService
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-24
|
||||
* @desc description
|
||||
* @param [type] $message_id [description]
|
||||
* @param [int] $value_id [id值]
|
||||
* @param [string] $field_name [字段名称]
|
||||
* @param [string] $action [方法]
|
||||
*/
|
||||
public static function SyncJobSend($message_id)
|
||||
public static function SyncJobSend($value_id, $field_name, $action)
|
||||
{
|
||||
SyncJob(ApiUrl('AlipayLife', 'Send', ['message_id'=>$message_id]));
|
||||
SyncJob(ApiUrl('AlipayLife', $action, [$field_name=>$value_id]));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -512,7 +521,7 @@ class AlipayLifeService
|
||||
{
|
||||
die('[time:'.date('Y-m-d H:i:s')."][msg:{$params['message_id']}数据不存在]\n\n");
|
||||
}
|
||||
if(!in_array($message['status'], [0,1]))
|
||||
if(!in_array($message['status'], [1]))
|
||||
{
|
||||
die('[time:'.date('Y-m-d H:i:s')."][msg:{$message['status']}状态不可操作]\n\n");
|
||||
}
|
||||
@ -560,7 +569,7 @@ class AlipayLifeService
|
||||
|
||||
// 返回状态更新
|
||||
$status = (isset($ret['status']) && $ret['status'] == 0) ? 2 : 4;
|
||||
$detail_m->where(['id'=>$v['id']])->save(['status'=>$status, 'send_time'=>time(), 'upd_time'=>time(), 'send_return_msg'=>$ret['msg']]);
|
||||
$detail_m->where(['id'=>$v['id']])->save(['status'=>$status, 'send_time'=>time(), 'upd_time'=>time(), 'return_msg'=>$ret['msg']]);
|
||||
}
|
||||
echo '[count:'.count($detail).']';
|
||||
} else {
|
||||
@ -571,14 +580,14 @@ class AlipayLifeService
|
||||
} else {
|
||||
$status = 3;
|
||||
}
|
||||
$m->where(['id'=>$message['id']])->save(['send_success_time'=>time(), 'status'=>$status, 'upd_time'=>time()]);
|
||||
$m->where(['id'=>$message['id']])->save(['success_time'=>time(), 'status'=>$status, 'upd_time'=>time()]);
|
||||
echo '[success_time:'.date('Y-m-d H:i:s')."]\n";
|
||||
echo '[message:'.$params['message_id']."]\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
// 继续运行脚本
|
||||
self::SyncJobSend($message['id']);
|
||||
self::SyncJobSend($message['id'], 'message_id', 'MessageSend');
|
||||
|
||||
// end
|
||||
die('[end_time:'.date('Y-m-d H:i:s')."][msg:处理结束]\n\n");
|
||||
@ -591,7 +600,7 @@ class AlipayLifeService
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-29
|
||||
* @desc description
|
||||
* @param array $params [description]
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function AlipayLifeSearch($params = [])
|
||||
{
|
||||
@ -619,5 +628,604 @@ class AlipayLifeService
|
||||
return DataReturn(L('common_operation_success'), 0, $data);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 消息详情列表
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-30
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function MessageDetailList($params = [])
|
||||
{
|
||||
// 基础参数
|
||||
if(empty($params['message_id']))
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
// 条件
|
||||
$where = ['alipay_life_message_id' => intval($params['message_id'])];
|
||||
|
||||
// 列表
|
||||
$data = M('AlipayLifeMessageDetail')->where($where)->order('id desc')->select();
|
||||
if(!empty($data))
|
||||
{
|
||||
$common_send_status_list = L('common_send_status_list');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 状态
|
||||
$v['status_name'] = $common_send_status_list[$v['status']]['name'];
|
||||
|
||||
// 生活号
|
||||
$v['alipay_life_name'] = empty($v['alipay_life_id']) ? '' : M('AlipayLife')->where(['id'=>$v['alipay_life_id']])->getField('name');
|
||||
|
||||
// 用户
|
||||
$v['alipay_openid'] = empty($v['user_id']) ? '' : M('User')->where(['id'=>$v['user_id']])->getField('alipay_openid');
|
||||
|
||||
// 时间
|
||||
$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']);
|
||||
$v['send_time'] = empty($v['send_time']) ? '' : date('Y-m-d H:i:s', $v['send_time']);
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生活号状态操作
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-30
|
||||
* @desc 上架/下架操作
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function LifeStatus($params = [])
|
||||
{
|
||||
// 基础参数
|
||||
$p = [
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'alipay_life_id',
|
||||
'error_msg' => '生活号id有误',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'in',
|
||||
'key_name' => 'status',
|
||||
'checked_data' => [0,1],
|
||||
'error_msg' => '状态有误',
|
||||
],
|
||||
];
|
||||
$ret = params_checked($params, $p);
|
||||
if($ret !== true)
|
||||
{
|
||||
return DataReturn($ret, -1);
|
||||
}
|
||||
|
||||
// 数据更新
|
||||
$m = M('AlipayLife');
|
||||
$m->startTrans();
|
||||
if($m->where(array('id'=>$params['alipay_life_id']))->save(array('is_shelves'=>$params['status'], 'upd_time'=>time())))
|
||||
{
|
||||
$obj = new \Library\AlipayLife(['life_data'=>$m->find($params['alipay_life_id'])]);
|
||||
if($params['status'] == 1)
|
||||
{
|
||||
$ret = $obj->LifeAboard();
|
||||
} else {
|
||||
$ret = $obj->LifeDebark();
|
||||
}
|
||||
if($ret['status'] == 0)
|
||||
{
|
||||
$m->commit();
|
||||
return DataReturn(L('common_operation_edit_success'), 0);
|
||||
} else {
|
||||
$m->rollback();
|
||||
return DataReturn($ret['msg'], -100);
|
||||
}
|
||||
}
|
||||
|
||||
$m->rollback();
|
||||
return DataReturn(L('common_operation_edit_error'), -100);
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单保存
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-24
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function MenuSave($params = [])
|
||||
{
|
||||
// 参数校验
|
||||
$p = [
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'name',
|
||||
'error_msg' => '名称不能为空',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'length',
|
||||
'key_name' => 'name',
|
||||
'checked_data' => '30',
|
||||
'error_msg' => '名称最多30个字符',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'isset',
|
||||
'key_name' => 'type',
|
||||
'error_msg' => '请选择菜单类型',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'alipay_life_ids',
|
||||
'error_msg' => '请选择生活号',
|
||||
],
|
||||
];
|
||||
$ret = params_checked($params, $p);
|
||||
if($ret !== true)
|
||||
{
|
||||
return DataReturn($ret, -1);
|
||||
}
|
||||
|
||||
// 数据项
|
||||
$data = [
|
||||
'name' => I('name', '', '', $params),
|
||||
'type' => intval(I('type', 0, '', $params)),
|
||||
'alipay_life_ids' => empty($params['alipay_life_ids']) ? 0 : json_encode(explode(',', $params['alipay_life_ids'])),
|
||||
];
|
||||
|
||||
// 开始处理业务
|
||||
$status = false;
|
||||
$m = M('AlipayLifeMenu');
|
||||
if(empty($params['id']))
|
||||
{
|
||||
$data['add_time'] = time();
|
||||
if($m->add($data))
|
||||
{
|
||||
$status = true;
|
||||
$msg = L('common_operation_add_success');
|
||||
} else {
|
||||
$msg = L('common_operation_add_error');
|
||||
}
|
||||
} else {
|
||||
$data['upd_time'] = time();
|
||||
if($m->where(array('id'=>intval(I('id'))))->save($data))
|
||||
{
|
||||
$status = true;
|
||||
$msg = L('common_operation_edit_success');
|
||||
} else {
|
||||
$msg = L('common_operation_edit_error');
|
||||
}
|
||||
}
|
||||
|
||||
return DataReturn($msg, $status ? 0 : -100);
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单内容保存
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-24
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function MenuContentSave($params = [])
|
||||
{
|
||||
// 参数校验
|
||||
$ret = self::MenuContentSaveCheck($params);
|
||||
if($ret['code'] != 0)
|
||||
{
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// 开始处理业务
|
||||
$data = [
|
||||
'alipay_life_menu_id' => intval($params['menu_id']),
|
||||
'pid' => intval(I('pid', 0, null, $params)),
|
||||
'name' => I('name', '', null, $params),
|
||||
'action_type' => intval(I('action_type', 0, null, $params)),
|
||||
'action_value' => I('action_value', '', null, $params),
|
||||
'icon' => isset($params['icon']) ? $params['icon'] : '',
|
||||
'sort' => intval(I('sort', 0)),
|
||||
'add_time' => time(),
|
||||
];
|
||||
|
||||
// 图片
|
||||
if(isset($_FILES['file_icon']['error']))
|
||||
{
|
||||
$path = DS.'Public'.DS.'Upload'.DS.'alipay_life_menu'.DS.date('Y').DS.date('m').DS.date('d').DS;
|
||||
$file_obj = new \Library\FileUpload(['root_path'=>ROOT_PATH, 'path'=>$path]);
|
||||
$ret = $file_obj->Save('file_icon');
|
||||
if($ret['status'] === true)
|
||||
{
|
||||
$data['icon'] = $ret['data']['url'];
|
||||
|
||||
// 图片上传至支付宝
|
||||
$alipay_life_message = M('AlipayLifeMessage')->find($data['alipay_life_message_id']);
|
||||
if(!empty($alipay_life_message))
|
||||
{
|
||||
if($alipay_life_message['send_type'] == 1 && !empty($alipay_life_message['alipay_life_ids']))
|
||||
{
|
||||
$alipay_life_ids = json_decode($alipay_life_message['alipay_life_ids'], true);
|
||||
$$alipay_life_id = isset($alipay_life_ids[0]) ? $alipay_life_ids[0] : '';
|
||||
} else {
|
||||
$alipay_life_id = M('AlipayLifeUser')->where(['id'=>$alipay_life_message['alipay_life_user_id']])->getField('alipay_life_id');
|
||||
}
|
||||
}
|
||||
if(!empty($alipay_life_id))
|
||||
{
|
||||
$obj = new \Library\AlipayLife(['life_data'=>M('AlipayLife')->find($alipay_life_id)]);
|
||||
$res = $obj->UploadImage(['file'=>ROOT_PATH.substr($data['icon'], 1)]);
|
||||
$data['out_icon'] = (isset($res['status']) && $res['status'] == 0) ? $res['data'] : '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 开始处理业务
|
||||
$status = false;
|
||||
$m = M('AlipayLifeMenuContent');
|
||||
if(empty($params['id']))
|
||||
{
|
||||
$data['add_time'] = time();
|
||||
if($m->add($data))
|
||||
{
|
||||
$status = true;
|
||||
$msg = L('common_operation_add_success');
|
||||
} else {
|
||||
$msg = L('common_operation_add_error');
|
||||
}
|
||||
} else {
|
||||
$data['upd_time'] = time();
|
||||
if($m->where(array('id'=>intval(I('id'))))->save($data))
|
||||
{
|
||||
$status = true;
|
||||
$msg = L('common_operation_edit_success');
|
||||
} else {
|
||||
$msg = L('common_operation_edit_error');
|
||||
}
|
||||
}
|
||||
|
||||
return DataReturn($msg, $status ? 0 : -100);
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单内容参数校验
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-24
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function MenuContentSaveCheck($params = [])
|
||||
{
|
||||
// 基础参数
|
||||
$p = [
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'menu_id',
|
||||
'error_msg' => '菜单id有误',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'name',
|
||||
'error_msg' => '名称不能为空',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'length',
|
||||
'key_name' => 'name',
|
||||
'checked_data' => '5',
|
||||
'error_msg' => '名称最多5个字符',
|
||||
],
|
||||
[
|
||||
'checked_type' => 'isset',
|
||||
'key_name' => 'action_type',
|
||||
'error_msg' => '请选择事件类型',
|
||||
],
|
||||
];
|
||||
$ret = params_checked($params, $p);
|
||||
if($ret !== true)
|
||||
{
|
||||
return DataReturn($ret, -1);
|
||||
}
|
||||
|
||||
// 主数据
|
||||
$menu = M('AlipayLifeMenu')->find($params['menu_id']);
|
||||
if(empty($menu))
|
||||
{
|
||||
return DataReturn('消息数据不存在', -1);
|
||||
}
|
||||
|
||||
// 图标
|
||||
if($menu['type'] == 1)
|
||||
{
|
||||
// 图片
|
||||
if(empty($_FILES['file_icon']) && empty($params['icon']))
|
||||
{
|
||||
return DataReturn('请上传图标', -1);
|
||||
}
|
||||
}
|
||||
|
||||
// 事件值
|
||||
$p = [];
|
||||
if($params['action_type'] < 1)
|
||||
{
|
||||
$p[] = [
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'action_value',
|
||||
'error_msg' => '事件值不能为空',
|
||||
];
|
||||
}
|
||||
|
||||
// 验证
|
||||
if(!empty($p))
|
||||
{
|
||||
$ret = params_checked($params, $p);
|
||||
if($ret !== true)
|
||||
{
|
||||
return DataReturn($ret, -1);
|
||||
}
|
||||
}
|
||||
|
||||
return DataReturn('验证成功', 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单发布提交
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-24
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function MenuSubmit($params = [])
|
||||
{
|
||||
// 基础参数
|
||||
$p = [
|
||||
[
|
||||
'checked_type' => 'empty',
|
||||
'key_name' => 'id',
|
||||
'error_msg' => '菜单id有误',
|
||||
],
|
||||
];
|
||||
$ret = params_checked($params, $p);
|
||||
if($ret !== true)
|
||||
{
|
||||
return DataReturn($ret, -1);
|
||||
}
|
||||
|
||||
// 获取消息
|
||||
$m = M('AlipayLifeMenu');
|
||||
$menu = $m->find(intval($params['id']));
|
||||
if(empty($menu))
|
||||
{
|
||||
return DataReturn('菜单纪录不存在', -1);
|
||||
}
|
||||
$common_release_status_list = L('common_release_status_list');
|
||||
if(!in_array($menu['status'], [0,4]))
|
||||
{
|
||||
return DataReturn('状态不可操作['.$common_release_status_list[$menu['status']]['name'].']', -2);
|
||||
}
|
||||
|
||||
// 获取消息内容
|
||||
$content_list = M('AlipayLifeMenuContent')->field('id,name')->where(['alipay_life_menu_id'=>$menu['id'], 'pid'=>0])->select();
|
||||
if(empty($content_list))
|
||||
{
|
||||
return DataReturn('菜单数据不能为空', -1);
|
||||
}
|
||||
|
||||
$content_count = count($content_list);
|
||||
switch($menu['type'])
|
||||
{
|
||||
case 0 :
|
||||
if($content_count > 4)
|
||||
{
|
||||
return DataReturn('文字菜单最多4个', -1);
|
||||
}
|
||||
|
||||
// 子集校验
|
||||
foreach($content_list as $v)
|
||||
{
|
||||
$temp_count = M('AlipayLifeMenuContent')->where(['pid'=>$v['id']])->count();
|
||||
if($temp_count > 5)
|
||||
{
|
||||
return DataReturn('['.$v['name'].']二级菜单不能超过5个', -1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 1 :
|
||||
if($content_count > 8)
|
||||
{
|
||||
return DataReturn('图标菜单最多8个', -1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// 生活号
|
||||
$data = [];
|
||||
$alipay_life_all = json_decode($menu['alipay_life_ids'], true);
|
||||
foreach($alipay_life_all as $alipay_life_id)
|
||||
{
|
||||
$data[] = [
|
||||
'alipay_life_id' => $alipay_life_id,
|
||||
'alipay_life_menu_id' => $menu['id'],
|
||||
'add_time' => time(),
|
||||
];
|
||||
}
|
||||
|
||||
// 入库详情表
|
||||
$m->startTrans();
|
||||
if(M('AlipayLifeMenuDetail')->addAll($data) !== false)
|
||||
{
|
||||
$menu_data = [
|
||||
'status' => 1,
|
||||
'startup_time' => time(),
|
||||
'upd_time' => time()
|
||||
];
|
||||
$status = M('AlipayLifeMenu')->where(['id'=>$menu['id']])->save($menu_data);
|
||||
if($status !== false)
|
||||
{
|
||||
$m->commit();
|
||||
self::SyncJobSend($menu['id'], 'menu_id', 'MenuRelease');
|
||||
return DataReturn(L('common_submit_success'), 0);
|
||||
}
|
||||
}
|
||||
$m->rollback();
|
||||
return DataReturn(L('common_submit_error'), -100);
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单发布
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-24
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function MenuRelease($params = [])
|
||||
{
|
||||
if(empty($params['menu_id']))
|
||||
{
|
||||
die('[params_time:'.date('Y-m-d H:i:s')."][msg:id有误]\n\n");
|
||||
}
|
||||
|
||||
// 启动开始
|
||||
echo '[start_time:'.date('Y-m-d H:i:s')."]\n";
|
||||
echo '[menu:'.$params['menu_id']."]\n";
|
||||
|
||||
// 开始处理
|
||||
$m = M('AlipayLifeMenu');
|
||||
$menu = $m->find($params['menu_id']);
|
||||
if(empty($menu))
|
||||
{
|
||||
die('[time:'.date('Y-m-d H:i:s')."][msg:{$params['menu_id']}数据不存在]\n\n");
|
||||
}
|
||||
if(!in_array($menu['status'], [1]))
|
||||
{
|
||||
die('[time:'.date('Y-m-d H:i:s')."][msg:{$menu['status']}状态不可操作]\n\n");
|
||||
}
|
||||
|
||||
// 生活号
|
||||
$alipay_life_all = json_decode($menu['alipay_life_ids'], true);
|
||||
|
||||
// 消息内容
|
||||
$field = 'id,pid,name,action_type,action_value,out_icon';
|
||||
$menu['content'] = M('AlipayLifeMenuContent')->field($field)->where(['alipay_life_menu_id'=>$menu['id'], 'pid'=>0])->order('sort asc')->select();
|
||||
if(empty($menu['content']))
|
||||
{
|
||||
die('[time:'.date('Y-m-d H:i:s')."][msg:{$menu['id']}菜单内容为空]\n\n");
|
||||
}
|
||||
|
||||
// 是否文本类型
|
||||
$action_type_list = L('common_alipay_life_menu_action_type_list');
|
||||
foreach($menu['content'] as &$v)
|
||||
{
|
||||
// 外部事件值
|
||||
$v['action_type'] = $action_type_list[$v['action_type']]['out_value'];
|
||||
|
||||
// 是否需要读取子集
|
||||
if($menu['type'] == 0)
|
||||
{
|
||||
$items = M('AlipayLifeMenuContent')->field($field)->where(['pid'=>$v['id']])->order('sort asc')->select();
|
||||
if(!empty($items))
|
||||
{
|
||||
foreach($items as &$vs)
|
||||
{
|
||||
// 外部事件值
|
||||
$vs['action_type'] = $action_type_list[$vs['action_type']]['out_value'];
|
||||
}
|
||||
}
|
||||
$v['items'] = $items;
|
||||
}
|
||||
}
|
||||
|
||||
// 生活号循环处理
|
||||
$detail_m = M('AlipayLifeMenuDetail');
|
||||
$detail = $detail_m->where(['alipay_life_menu_id'=>$menu['id'], 'status'=>0])->select();
|
||||
if(!empty($detail))
|
||||
{
|
||||
foreach($detail as $d)
|
||||
{
|
||||
// 生活号
|
||||
$life = M('AlipayLife')->find($d['alipay_life_id']);
|
||||
|
||||
// 请求接口处理
|
||||
$obj = new \Library\AlipayLife(['life_data'=>$life]);
|
||||
$ret = $obj->MenuRelease($menu);
|
||||
|
||||
// 返回状态更新
|
||||
$status = (isset($ret['status']) && $ret['status'] == 0) ? 2 : 4;
|
||||
$detail_m->where(['id'=>$d['id']])->save(['status'=>$status, 'send_time'=>time(), 'upd_time'=>time(), 'return_msg'=>$ret['msg']]);
|
||||
}
|
||||
} else {
|
||||
$status_all = $detail_m->where(['alipay_life_menu_id'=>$menu['id']])->group('status')->getField('status', true);
|
||||
if(count($status_all) <= 1)
|
||||
{
|
||||
$status = in_array(2, $status_all) ? 2 : 4;
|
||||
} else {
|
||||
$status = 3;
|
||||
}
|
||||
$m->where(['id'=>$menu['id']])->save(['success_time'=>time(), 'status'=>$status, 'upd_time'=>time()]);
|
||||
echo '[success_time:'.date('Y-m-d H:i:s')."]\n";
|
||||
echo '[menu:'.$params['menu_id']."]\n\n";
|
||||
}
|
||||
|
||||
// 继续运行脚本
|
||||
self::SyncJobSend($menu['id'], 'menu_id', 'MenuRelease');
|
||||
|
||||
// end
|
||||
die('[end_time:'.date('Y-m-d H:i:s')."][msg:处理结束]\n\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* 菜单详情列表
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-30
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function MenuDetailList($params = [])
|
||||
{
|
||||
// 基础参数
|
||||
if(empty($params['message_id']))
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
// 条件
|
||||
$where = ['alipay_life_message_id' => intval($params['message_id'])];
|
||||
|
||||
// 列表
|
||||
$data = M('AlipayLifeMenuDetail')->where($where)->order('id desc')->select();
|
||||
if(!empty($data))
|
||||
{
|
||||
$common_release_status_list = L('common_release_status_list');
|
||||
foreach($data as &$v)
|
||||
{
|
||||
// 状态
|
||||
$v['status_name'] = $common_release_status_list[$v['status']]['name'];
|
||||
|
||||
// 生活号
|
||||
$v['alipay_life_name'] = empty($v['alipay_life_id']) ? '' : M('AlipayLife')->where(['id'=>$v['alipay_life_id']])->getField('name');
|
||||
|
||||
// 时间
|
||||
$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']);
|
||||
$v['send_time'] = empty($v['send_time']) ? '' : date('Y-m-d H:i:s', $v['send_time']);
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
?>
|
||||
0
service/Application/Service/MessageService.class.php
Normal file → Executable file
93
service/Public/Admin/Default/Css/AlipayLifeMenu.css
Executable file
@ -0,0 +1,93 @@
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
.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;
|
||||
}
|
||||
}
|
||||
107
service/Public/Admin/Default/Js/AlipayLifeMenu.js
Executable file
@ -0,0 +1,107 @@
|
||||
$(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('网络异常错误');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
0
service/Public/Admin/Default/Js/AlipayLifeMessage.js
Normal file → Executable file
0
service/Public/Home/Default/Css/Article.css
Normal file → Executable file
BIN
service/Public/Upload/alipay_life_menu/2018/10/30/2018103015052509480.png
Executable file
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102515241073367.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102515260951757.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102515264461166.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102515273808514.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102515274728622.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102515280305880.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102515281759524.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102515353033245.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 492 KiB After Width: | Height: | Size: 492 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102515360339741.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102515360965642.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102515361621068.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102515363855451.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102515372309900.jpg
Normal file → Executable file
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102517433011116.png
Normal file → Executable file
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/25/2018102517495338527.png
Normal file → Executable file
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/26/2018102600174550081.png
Normal file → Executable file
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/29/2018102918192237114.png
Normal file → Executable file
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/29/2018102918193238310.png
Normal file → Executable file
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/29/2018102918194343693.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
0
service/Public/Upload/alipay_life_message/2018/10/29/2018102918195581164.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
0
service/Public/Upload/brand/2018/09/20180911093753188783.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
0
service/Public/Upload/brand/2018/09/20180911093827728940.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
0
service/Public/Upload/brand/2018/09/20180911093845205790.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
0
service/Public/Upload/brand/2018/09/20180911094017352817.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 6.5 KiB |
0
service/Public/Upload/brand/2018/09/20180911094111296971.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
0
service/Public/Upload/brand/2018/09/20180911094133329172.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
0
service/Public/Upload/brand/2018/09/20180911094156207853.gif
Normal file → Executable file
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
0
service/Public/Upload/brand/2018/09/20180911094213446788.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
0
service/Public/Upload/brand/2018/09/20180911094257504723.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
0
service/Public/Upload/brand/2018/09/20180911094324597298.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
0
service/Public/Upload/brand/2018/09/20180911094344882885.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
0
service/Public/Upload/brand/2018/09/20180911094407378277.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
0
service/Public/Upload/brand/2018/09/20180911094429066146.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
0
service/Public/Upload/brand/2018/09/20180911094444771756.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
0
service/Public/Upload/brand/2018/09/20180911094500513270.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
0
service/Public/Upload/brand/2018/09/20180911094520484650.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
0
service/Public/Upload/brand/2018/09/20180911094538450476.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
0
service/Public/Upload/brand/2018/09/20180911094554937221.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
0
service/Public/Upload/brand/2018/09/20180911094614820628.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 7.2 KiB After Width: | Height: | Size: 7.2 KiB |
0
service/Public/Upload/brand/2018/09/20180911094632635433.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB |
0
service/Public/Upload/brand/2018/09/20180911094649275055.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB |
0
service/Public/Upload/brand/2018/09/20180911094704970519.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 4.8 KiB |
0
service/Public/Upload/brand/2018/09/20180911094722440979.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 8.3 KiB After Width: | Height: | Size: 8.3 KiB |
0
service/Public/Upload/brand/2018/09/20180911094738919225.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
0
service/Public/Upload/brand/2018/09/20180911094756976084.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
0
service/Public/Upload/brand/images/20180911144300_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
0
service/Public/Upload/brand/images/20180911144327_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
0
service/Public/Upload/brand/images/20180911144350_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
0
service/Public/Upload/brand/images/20180911144407_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.8 KiB |
0
service/Public/Upload/brand/images/20180911144430_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
0
service/Public/Upload/brand/images/20180911145756_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
0
service/Public/Upload/brand/images/20180911150230_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.7 KiB |
0
service/Public/Upload/brand/images/20180911150253_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 8.7 KiB |
0
service/Public/Upload/brand/images/20180911150312_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 8.4 KiB After Width: | Height: | Size: 8.4 KiB |
0
service/Public/Upload/brand/images/20180911150330_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
0
service/Public/Upload/brand/images/20180911150348_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
0
service/Public/Upload/brand/images/20180911150412_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
0
service/Public/Upload/brand/images/20180911150435_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 9.0 KiB |
0
service/Public/Upload/brand/images/20180911150454_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
0
service/Public/Upload/brand/images/20180911150512_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.6 KiB |
0
service/Public/Upload/brand/images/20180911150528_logo.jpeg
Normal file → Executable file
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |