生活号消息发送-页面

This commit is contained in:
devil_gong
2018-10-23 18:31:56 +08:00
parent afded26434
commit 4b55aa6990
12 changed files with 831 additions and 12 deletions

View File

@ -0,0 +1,360 @@
<?php
namespace Admin\Controller;
/**
* 生活号消息管理
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class AlipayLifeMessageController 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()
{
// 参数
$param = array_merge($_POST, $_GET);
// 模型对象
$m = M('AlipayLifeMessage');
// 条件
$where = $this->GetIndexWhere();
// 分页
$number = MyC('admin_page_number');
$page_param = array(
'number' => $number,
'total' => $m->alias('a')->join('INNER JOIN __ALIPAY_LIFE_CATEGORY_JOIN__ AS cj ON a.id=cj.alipay_life_id')->where($where)->count('DISTINCT a.id'),
'where' => $param,
'url' => U('Admin/AlipayLifeMessage/Index'),
);
$page = new \Library\Page($page_param);
// 获取列表
$list = $m->alias('a')->field('a.*')->join('INNER JOIN __ALIPAY_LIFE_CATEGORY_JOIN__ AS cj ON a.id=cj.alipay_life_id')->where($where)->limit($page->GetPageStarNumber(), $number)->order('a.id desc')->group('a.id')->select();
$list = $this->SetDataHandle($list);
// 参数
$this->assign('param', $param);
// 分页
$this->assign('page_html', $page->GetPageHtml());
// 发送状态
$this->assign('common_send_status_list', L('common_send_status_list'));
// 生活号消息分类
$alipay_life_list = M('AlipayLife')->field('id,name')->select();
$this->assign('alipay_life_list', $alipay_life_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_is_enable_tips = L('common_is_enable_tips');
foreach($data as &$v)
{
// 分类名称
$category_all = M('AlipayLifeMessageCategoryJoin')->where(['alipay_life_id'=>$v['id']])->getField('alipay_life_category_id', true);
$v['alipay_life_category_text'] = M('AlipayLifeMessageCategory')->where(['id'=>['in', $category_all]])->getField('name', true);
// logo
$v['logo'] = empty($v['logo']) ? '' : C('IMAGE_HOST').$v['logo'];
// 添加时间
$v['add_time_text'] = date('Y-m-d H:i:s', $v['add_time']);
// 更新时间
$v['upd_time_text'] = 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['a.name'] = array('like', '%'.I('keyword').'%');
}
// 是否更多条件
if(I('is_more', 0) == 1)
{
if(I('is_shelves', -1) > -1)
{
$where['a.is_shelves'] = intval(I('is_shelves', 0));
}
if(I('alipay_life_category_id', -1) > -1)
{
$where['cj.alipay_life_category_id'] = intval(I('alipay_life_category_id', 0));
}
// 表达式
if(!empty($_REQUEST['time_start']))
{
$where['a.add_time'][] = array('gt', strtotime(I('time_start')));
}
if(!empty($_REQUEST['time_end']))
{
$where['a.add_time'][] = array('lt', strtotime(I('time_end')));
}
}
return $where;
}
/**
* [SendInfo 添加/编辑页面]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-14T21:37:02+0800
*/
public function SendInfo()
{
// 轮播图片信息
$data = empty($_REQUEST['id']) ? array() : M('AlipayLifeMessage')->find(I('id'));
$this->assign('data', $data);
// 发送状态
$this->assign('common_send_status_list', L('common_send_status_list'));
// 消息类型
$this->assign('alipay_life_message_type_list', L('alipay_life_message_type_list'));
// 单用户发消息用户信息
$user = empty($_GET['user_id']) ? '' : M('User')->find(intval(I('user_id')));
$this->assign('user', $user);
// 消息发送类型
$this->assign('alipay_life_message_send_type_list', L('alipay_life_message_send_type_list'));
$this->assign('send_type', empty($user) ? 1 : 0);
// 生活号消息分类
$alipay_life_list = M('AlipayLife')->field('id,name')->select();
$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('nav_type', I('nav_type', 0));
$this->display('SendInfo');
}
/**
* [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'));
}
// 图片
$this->ImagesSave('logo', 'file_logo', 'alipay_life');
// id为空则表示是新增
$m = D('AlipayLifeMessage');
// 公共额外数据处理
$_POST['is_shelves'] = intval(I('is_shelves', 0));
// 开启事务
$m->startTrans();
// 分类
$category_m = M('AlipayLifeMessageCategoryJoin');
if(empty($_POST['id']))
{
$type = 1;
} else {
$type = 2;
$category_m->where(['id'=>I('id')])->delete();
}
$status = false;
$msg = '';
$alipay_life_id = I('id', 0);
if($m->create($_POST, $type))
{
// 额外数据处理
$m->upd_time = time();
$m->name = I('name');
$m->appid = I('appid');
$m->rsa_public = I('rsa_public');
$m->rsa_private = I('rsa_private');
$m->out_rsa_public = I('out_rsa_public');
if($type == 1)
{
// 写入数据库
$m->add_time = time();
$alipay_life_id = $m->add();
if($alipay_life_id)
{
$status = true;
$msg = L('common_operation_add_success');
} else {
$msg = L('common_operation_add_error');
}
} else {
// 更新数据库
if($m->where(array('id'=>$alipay_life_id))->save())
{
$status = true;
$msg = L('common_operation_edit_success');
} else {
$msg = L('common_operation_edit_error');
}
}
} else {
$msg = $m->getError();
}
// 分类处理
if($status === true)
{
$count = 0;
$all = explode(',', I('alipay_life_category_id'));
foreach($all as $v)
{
if($category_m->add(['alipay_life_id'=>$alipay_life_id, 'alipay_life_category_id'=>$v, 'add_time'=>time()]))
{
$count++;
}
}
if($count < count($all))
{
// 回滚事务
$m->rollback();
$this->ajaxReturn(L('alipay_life_save_category_error'), -10);
}
} else {
// 回滚事务
$m->rollback();
$this->ajaxReturn($msg, -100);
}
// 回滚事务
$m->commit();
$this->ajaxReturn($msg, 0);
}
/**
* [Delete 生活号消息删除]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-25T22:36:12+0800
*/
public function Delete()
{
if(!IS_AJAX)
{
$this->error(L('common_unauthorized_access'));
}
$m = D('AlipayLifeMessage');
if($m->create($_POST, 5))
{
$id = I('id');
// 删除
if($m->delete($id))
{
$this->ajaxReturn(L('common_operation_delete_success'));
} else {
$this->ajaxReturn(L('common_operation_delete_error'), -100);
}
} else {
$this->ajaxReturn($m->getError(), -1);
}
}
/**
* [StatusUpdate 状态更新]
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2017-01-12T22:23:06+0800
*/
public function StatusUpdate()
{
// 参数
if(empty($_POST['id']) || !isset($_POST['state']))
{
$this->ajaxReturn(L('common_param_error'), -1);
}
// 数据更新
if(M('AlipayLifeMessage')->where(array('id'=>I('id')))->save(array('is_shelves'=>I('state'))))
{
$this->ajaxReturn(L('common_operation_edit_success'));
} else {
$this->ajaxReturn(L('common_operation_edit_error'), -100);
}
}
}
?>

View File

@ -59,7 +59,7 @@ class AlipayLifeUserController extends CommonController
$page = new \Library\Page($page_param);
// 获取列表
$field = 'u.*, au.alipay_life_id';
$field = 'u.*, au.alipay_life_id, au.id AS alipay_life_user_id, au.user_id';
$list = $this->SetDataHandle($m->alias('au')->where($where)->join('INNER JOIN __USER__ AS u ON u.id=au.user_id')->field($field)->limit($page->GetPageStarNumber(), $number)->order('au.id desc')->select());
// 性别

View File

@ -0,0 +1,50 @@
<?php
/**
* 模块语言包-生活号消息
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
return array(
// 添加/编辑
'alipay_life_message_add_name' => '生活号消息添加',
'alipay_life_message_life_text' => '生活号',
'alipay_life_message_life_format' => '请选择生活号',
'alipay_life_message_category_text' => '生活号分类',
'alipay_life_message_category_format' => '请选择生活号分类',
'alipay_life_message_title_text' => '消息标题',
'alipay_life_message_title_format' => '消息标题格式 1~80 个字符',
'alipay_life_message_content_text' => '消息内容',
'alipay_life_message_content_format' => '消息内容格式 1~250 个字符',
'alipay_life_message_image_url_text' => '封面图片',
'alipay_life_message_image_url_format' => '请上传封面图片',
'alipay_life_message_url_text' => '图文url跳转地址',
'alipay_life_message_url_format' => '图文url跳转地址格式 1~255 个字符',
'alipay_life_message_action_name_text' => '链接文字',
'alipay_life_message_action_name_format'=> '链接文字格式最多 60 个字符',
'alipay_life_message_keywords_text' => '标题',
'alipay_life_message_type_text' => '消息类型',
'alipay_life_message_type_list' => array(
0 => array('value' => 0, 'name' => '文本'),
1 => array('value' => 1, 'name' => '图文'),
),
'alipay_life_message_send_type_text' => '发送类型',
'alipay_life_message_send_type_format' => '请选择消息发送类型',
'alipay_life_message_send_type_list' => array(
0 => array('value' => 0, 'name' => '单条'),
1 => array('value' => 1, 'name' => '批量'),
),
);
?>

View File

@ -33,5 +33,6 @@ return array(
'alipay_life_user_city_name' => '所在市',
'alipay_life_user_alipay_life_name_text' => '所属生活号',
'alipay_life_user_send_text' => '发消息',
);
?>

View File

@ -0,0 +1,27 @@
<?php
namespace Admin\Model;
use Think\Model;
/**
* 生活号消息模型
* @author Devil
* @blog http://gong.gg/
* @version 0.0.1
* @datetime 2016-12-01T21:51:08+0800
*/
class AlipayLifeMessageModel extends CommonModel
{
// 数据自动校验
protected $_validate = array(
// 添加,编辑
array('logo', '0,255', '{%alipay_life_logo_format}', 1, 'length', 3),
array('name', '2,30', '{%alipay_life_name_format}', 1, 'length', 3),
array('appid', '1,60', '{%alipay_life_appid_format}', 1, 'length', 3),
array('rsa_public', '1,2000', '{%alipay_life_rsa_public_format}', 1, 'length', 3),
array('rsa_private', '1,2000', '{%alipay_life_rsa_private_format}', 1, 'length', 3),
array('out_rsa_public', '1,2000', '{%alipay_life_out_rsa_public_format}', 1, 'length', 3),
array('alipay_life_category_id', 'require', '{%alipay_life_category_id_format}', 1, '', 3),
);
}
?>

View File

@ -0,0 +1,112 @@
<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/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="{{$param.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($param['is_more']) and $param['is_more'] eq 1">checked</if> />
<i class="am-icon-angle-down"></i>
</label>
<div class="more-where <if condition="!isset($param['is_more']) or $param['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_send_status_list" item="v">
<option value="{{$v.id}}" <if condition="isset($param['status']) and $param['status'] eq $v['id']">selected</if>>{{$v.name}}</option>
</foreach>
</select>
<select name="alipay_life_id" class="am-radius c-p m-t-10 m-l-5 param-where">
<option value="">{{:L('alipay_life_message_name_text')}}</option>
<foreach name="alipay_life_list" item="v">
<option value="{{$v.id}}" <if condition="isset($param['alipay_life_id']) and $param['alipay_life_id'] eq $v['id']">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($param['time_start'])">value="{{$param.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($param['time_end'])">value="{{$param.time_end}}"</if>/>
</div>
</div>
</div>
</form>
<!-- form end -->
<!-- operation start -->
<div class="am-g m-t-15">
<a href="{{:U('Admin/AlipayLifeMessage/SendInfo')}}" 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_message_life_text')}}</th>
<th>{{:L('alipay_life_message_type_text')}}</th>
<th>{{:L('alipay_life_message_title_text')}}</th>
<th>{{:L('alipay_life_message_content_text')}}</th>
<th class="am-hide-sm-only">{{:L('alipay_life_message_image_url_text')}}</th>
<th class="am-hide-sm-only">{{:L('alipay_life_message_url_text')}}</th>
<th class="am-hide-sm-only">{{:L('alipay_life_message_action_name_text')}}</th>
<th>{{:L('common_view_status_title')}}</th>
<th class="am-hide-sm-only">{{:L('common_create_time_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.alipay_life_name}}</td>
<td>{{$v.type_name}}</td>
<td>{{$v.title}}</td>
<td>{{$v.content}}</td>
<td class="am-hide-sm-only">
<if condition="!empty($v['image_url'])">
<a href="{{$v['image_url']}}" target="_blank">
<img src="{{$v['image_url']}}" class="am-radius" width="100" />
</a>
<else />
<span class="cr-ddd">{{:L('common_on_fill_in_images')}}</span>
</if>
</td>
<td class="am-hide-sm-only">{{$v.url}}</td>
<td class="am-hide-sm-only">{{$v.action_name}}</td>
<td>{{$v.status_name}}</td>
<td class="am-hide-sm-only">{{$v.add_time_text}}</td>
<td class="view-operation">
<if condition="$v['status'] eq 0">
<a href="{{:U('Admin/AlipayLifeMessage/SendInfo', 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/AlipayLifeMessage/Delete')}}" data-id="{{$v.id}}"> {{:L('common_operation_delete')}}</button>
</if>
</td>
</tr>
</foreach>
<else />
<tr><td colspan="7" 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 -->

View File

@ -0,0 +1,7 @@
<ul class="am-nav am-nav-pills table-nav m-b-10">
<foreach name="alipay_life_message_type_list" item="v">
<li <if condition="$nav_type eq $v['value']">class="am-active"</if> data-type="{{$v.value}}">
<a href="{{:U('Admin/AlipayLifeMessage/SendInfo', array_merge($params, ['nav_type'=>$v['value']]))}}">{{$v.name}}</a>
</li>
</foreach>
</ul>

View File

@ -0,0 +1,94 @@
<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/AlipayLifeMessage/Save')}}" method="POST" request-type="ajax-url" request-value="{{:U('Admin/AlipayLifeMessage/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_message_add_name')}}</span>
<a href="{{:U('Admin/AlipayLifeMessage/Index')}}" class="fr fs-14 m-t-5 am-icon-mail-reply"> {{:L('common_operation_back')}}</a>
</legend>
<!-- table nav start -->
<include file="Nav" />
<!-- table nav end -->
<div class="am-form-group">
<label>{{:L('alipay_life_message_send_type_text')}}</label>
<select name="send_type" class="am-radius c-p chosen-select" data-placeholder="{{:L('common_select_can_choose')}}" data-validation-message="{{:L('alipay_life_message_send_type_format')}}" disabled required>
<option value="">{{:L('common_select_can_choose')}}</option>
<foreach name="alipay_life_message_send_type_list" item="v">
<option value="{{$v.value}}" <if condition="isset($send_type) and $v['value'] eq $send_type">selected</if>>{{$v.name}}</option>
</foreach>
</select>
</div>
<if condition="$send_type eq 1">
<div class="am-form-group">
<label>{{:L('alipay_life_message_category_text')}}</label>
<select name="alipay_life_id" class="am-radius c-p chosen-select" multiple="multiple" data-placeholder="{{:L('common_select_can_choose')}}" data-validation-message="{{:L('alipay_life_message_category_format')}}" required>
<foreach name="alipay_life_category" item="v">
<option value="{{$v.id}}" <if condition="!empty($data['alipay_life_id']) and in_array($v['id'], $data['alipay_life_id'])">selected</if>>{{$v.name}}</option>
</foreach>
</select>
</div>
<div class="am-form-group">
<label>{{:L('alipay_life_message_life_text')}}</label>
<select name="alipay_life_category_id" class="am-radius c-p chosen-select" multiple="multiple" data-placeholder="{{:L('common_select_can_choose')}}" data-validation-message="{{:L('alipay_life_message_life_format')}}" required>
<foreach name="alipay_life_list" item="v">
<option value="{{$v.id}}" <if condition="!empty($data['alipay_life_category_id']) and in_array($v['id'], $data['alipay_life_category_id'])">selected</if>>{{$v.name}}</option>
</foreach>
</select>
</div>
</if>
<if condition="$nav_type eq 1">
<div class="am-form-group">
<label>{{:L('alipay_life_message_title_text')}}</label>
<input type="text" name="title" placeholder="{{:L('alipay_life_message_title_text')}}" maxlength="80" data-validation-message="{{:L('alipay_life_message_title_format')}}" class="am-radius" <notempty name="data"> value="{{$data.title}}"</notempty> />
</div>
</if>
<div class="am-form-group">
<label>{{:L('alipay_life_message_content_text')}}</label>
<textarea rows="5" name="content" class="am-radius" placeholder="{{:L('alipay_life_message_content_text')}}" data-validation-message="{{:L('alipay_life_message_content_format')}}" maxlength="250" required><present name="data">{{$data.content}}</present></textarea>
</div>
<if condition="$nav_type eq 1">
<div class="am-form-group am-form-file">
<label class="block">{{:L('alipay_life_message_image_url_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="image_url" class="am-radius js-choice-one original-images-url original-icon-images-url" data-choice-one-to='input[name="file_image_url"]' <notempty name="data"> value="{{$data.image_url}}"</notempty>" data-validation-message="{{:L('alipay_life_message_image_url_format')}}" readonly="readonly" />
<i class="am-icon-trash-o am-icon-sm original-images-url-delete" data-input-tag="input.original-icon-images-url" data-image-tag="#form-img-icon" data-tips-tag="#form-icon-tips" data-file-tag="input.file_image_url-tag"></i>
<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" />
<div id="form-icon-tips" class="m-t-5"></div>
<img src="<if condition="!empty($data['image_url'])">{{$image_host}}{{$data.image_url}}<else />{{$image_host}}/Public/Admin/Default/Images/default-images.png</if>" 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" />
</div>
<div class="am-form-group">
<label>{{:L('alipay_life_message_url_text')}}</label>
<input type="text" name="url" placeholder="{{:L('alipay_life_message_url_text')}}" data-validation-message="{{:L('alipay_life_message_url_format')}}" class="am-radius" maxlength="255" <notempty name="data"> value="{{$data.url}}"</notempty> required />
</div>
<div class="am-form-group">
<label>{{:L('alipay_life_message_action_name_text')}}</label>
<input type="text" name="action_name" placeholder="{{:L('alipay_life_message_action_name_text')}}" data-validation-message="{{:L('alipay_life_message_action_name_format')}}" class="am-radius" maxlength="60" <notempty name="data"> value="{{$data.action_name}}"</notempty> />
</div>
</if>
<div class="am-form-group">
<input type="hidden" name="id" <notempty name="data"> value="{{$data.id}}"</notempty> />
<input type="hidden" name="type" value="{{$nav_type}}" />
<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 -->

View File

@ -43,6 +43,7 @@
<th class="am-hide-sm-only">{{:L('common_view_gender_name')}}</th>
<th class="am-hide-sm-only">{{:L('alipay_life_user_birthday_name')}}</th>
<th>{{:L('common_more_name')}}</th>
<th>{{:L('common_operation_name')}}</th>
</tr>
</thead>
<tbody>
@ -130,6 +131,11 @@
</div>
</div>
</td>
<td>
<a href="{{:U('Admin/AlipayLifeMessage/SendInfo', ['user_id'=>$v['user_id'], 'alipay_life_user_id'=>$v['alipay_life_user_id']])}}">
<button class="am-btn am-btn-default am-btn-xs am-radius am-icon-send-o"> {{:L('alipay_life_user_send_text')}}</button>
</a>
</td>
</tr>
</foreach>
<else />

View File

@ -520,6 +520,14 @@ return array(
2 => array('value' => 2, 'name' => '自定义'),
),
// 发送状态
'common_send_status_list' => array(
0 => array('value' => 0, 'name' => '未发送'),
1 => array('value' => 1, 'name' => '发送中'),
2 => array('value' => 2, 'name' => '发送成功'),
3 => array('value' => 3, 'name' => '发送失败'),
),
// 色彩值

View File

@ -0,0 +1,18 @@
/**
* 列表
*/
.form-keyword { width: 55% !important; display: initial !important; }
.more-submit input { display: none; }
.param-where, .param-date input { display: initial !important; }
@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; }
}

File diff suppressed because one or more lines are too long