array ( 'url' => 'https://api.weixin.qq.com/cgi-bin/groups/get?', 'param' => array ( 'access_token' => 'token', ), # 对结果的后续操作 'action' => array ( # 数据来源来openid 'data' => 'groups', # 根据哪个字段读取数据 'where' => array ( # 这边的字段,对应微信的字段,如果相同就不用写key 'groupid' => 'id', ), 'update' => array ( # 微信的字段,对应这边哪个字段,如果相同这里就不用加了。与上边正好相反,注意。 'id' => 'groupid', ), # 更新到哪个表中 'table' => 'group', ), ), # 创建分组 'group_create' => array ( 'url' => 'https://api.weixin.qq.com/cgi-bin/groups/create?', 'param' => array ( 'access_token' => 'token', 'group' => array('name' => urlencode(Dever::input('update_name'))), ), # json 传输 'json' => true, 'action' => array ( 'data' => 'group', 'where' => array ( 'groupid' => 'id', ), 'update' => array ( 'id' => 'groupid', ), 'table' => 'group', ), ), # 更新分组 'group_edit' => array ( 'url' => 'https://api.weixin.qq.com/cgi-bin/groups/update?', 'param' => array ( 'access_token' => 'token', 'group' => array('id' => Dever::input('update_groupid'), 'name' => Dever::input('update_name')), ), 'json' => true, ), # 删除分组 'group_delete' => array ( 'url' => 'https://api.weixin.qq.com/cgi-bin/groups/delete?', 'param' => array ( 'access_token' => 'token', 'group' => array('id' => Dever::input('group')), ), 'json' => true, ), # 移动用户分组 'group_move' => array ( 'url' => 'https://api.weixin.qq.com/cgi-bin/groups/members/update?', 'param' => array ( 'access_token' => 'token', 'openid' => Dever::input('openid'), 'to_groupid' => Dever::input('to_groupid'), ), 'json' => true, ), # 获取用户list 'user_list' => array ( 'url' => 'https://api.weixin.qq.com/cgi-bin/user/get?', 'param' => array ( 'access_token' => 'token', 'next_openid' => '', ), # 对结果的后续操作 'action' => array ( # 数据来源来openid 'data' => 'openid', # 调取的方法为user_info 'method' => 'user_info', ), ), # 获取用户基本信息 'user_info' => array ( 'url' => 'https://api.weixin.qq.com/cgi-bin/user/info?', 'param' => array ( 'access_token' => 'token', 'openid' => Dever::input('openid') ? Dever::input('openid') : 'openid', 'lang' => 'zh_CN' ), # 对结果的后续操作 'action' => array ( # 根据哪个字段读取数据 'where' => array('openid'), # 更新到哪个表中 'table' => 'user', ), ), ); return $config;