'正常', 2 => '冻结', ); $group = function() { $array = array(); $data = Dever::load('weixin/group-main'); if($data) { $array += $data; } return $array; }; return array ( # 表名 'name' => 'account', # 显示给用户看的名称 'lang' => '客服管理', 'desc' => '注意:多客服功能,如果您仅有一个客服,则可不需要使用此功能', 'menu' => false, 'start' => array ( # 更新客服信息到微信 'insert' => 'weixin/account.insert', # 更新客服信息到微信 'update' => 'weixin/account.update', # 更新客服信息到微信 'delete' => 'weixin/account.delete', ), # 数据结构 'struct' => array ( 'id' => array ( 'type' => 'int-11', 'name' => 'ID', 'default' => '', 'desc' => '', 'match' => 'is_numeric', //'search' => 'order', //'list' => true, ), 'site' => array ( 'type' => 'int-11', 'name' => '站点', 'default' => '', 'desc' => '请输入站点', 'match' => 'is_numeric', ), 'account' => array ( 'type' => 'varchar-50', 'name' => '客服账号', 'default' => '', 'desc' => '请输入客服账号', 'match' => 'is_string', 'search' => 'order,fulltext', //'update' => 'text', 'list' => true, ), 'nickname' => array ( 'type' => 'varchar-50', 'name' => '昵称', 'default' => '', 'desc' => '请输入昵称', 'match' => 'is_string', 'search' => 'fulltext', //'update' => 'text', 'list' => true, ), 'groupid' => array ( 'type' => 'int-11', 'name' => '分组(设置之后该客服只能回复该分组的用户消息)', 'default' => '0', 'desc' => '请选择分组', 'match' => 'option', 'option' => $group, 'search' => 'select', 'update' => 'radio', 'list' => true, ), 'pic' => array ( 'type' => 'varchar-150', 'name' => '头像(640X640)', 'default' => '', 'desc' => '请选择头像', 'match' => 'option', 'update' => 'image', 'key' => '1', 'place' => '640X640', ), 'state' => array ( 'type' => 'tinyint-1', 'name' => '状态', 'default' => '1', 'desc' => '请选择状态', 'match' => array('is_numeric', 1), 'option' => $option, //'update' => 'radio', 'list' => true, ), 'cdate' => array ( 'type' => 'int-11', 'name' => '录入时间', 'match' => array('is_numeric', time()), 'desc' => '', # 只有insert时才生效 'insert' => true, ), ), 'manage' => array ( //'list_button' => array(6 => '同步'), 'button' => array ( //'重新同步' => 'manage/api.update', ) ), # 后台新增功能,权限精细控制 他的值为需要控制的字段 'auth' => 'site', # request 请求接口定义 'request' => array ( # 根据hash取一条数据 'info' => array ( # 匹配的正则或函数 必填项 'where' => array ( 'site' => 'yes', 'openid' => 'yes', ), 'type' => 'one', ), # 根据unionid 获取信息 'getOne' => array ( # 匹配的正则或函数 必填项 'where' => array ( 'site' => 'yes', 'unionid' => 'yes', ), 'type' => 'one', ), # 改变订阅状态 'upSubscribe' => array ( 'type' => 'update', 'where' => array ( 'openid' => 'yes', 'site' => 'yes', ), 'set' => array ( 'subscribe' => 'yes', ), ), ), );