func (r *Router) UserGet(p string, hf xweb.HandlerFunc) {
	r.r.GetFunc(p, r.preHandler, r.userHandler, hf, r.writerHandler)
}
UserGet support http method Get, identify access will be called before hf, and hf not be called when access failed.
package router
import (
	"encoding/json"
	"github.com/golang/glog"
	"github.com/oikomi/FishChatServer2/common/ecode"
	"github.com/oikomi/FishChatServer2/common/net/xweb"
	wctx "github.com/oikomi/FishChatServer2/common/net/xweb/context"
	"net/http"
	"strconv"
)
type Identify interface {
	Access(c wctx.Context, ip string) (mid int64, err error)
	Verify(c wctx.Context) (err error)
}
type Router struct {
	m *http.ServeMux
	r *xweb.Router
}
func New(m *http.ServeMux) *Router {
	r := &Router{
		m: m,
		r: xweb.NewRouter(m),
	}
	return r
}
func (r *Router) Group(p string, f func(r *Router)) {
	or := r.r
	cr := or.Group(p)
	r.r = cr
	f(r)
	r.r = or
}
func (r *Router) Get(p string, hf xweb.HandlerFunc) {
	r.r.GetFunc(p, r.preHandler, hf, r.writerHandler)
}
func (r *Router) Post(p string, hf xweb.HandlerFunc) {
	r.r.PostFunc(p, r.preHandler, hf, r.writerHandler)
}
func (r *Router) GuestGet(p string, hf xweb.HandlerFunc) {
	r.r.GetFunc(p, r.preHandler, r.guestHandler, hf, r.writerHandler)
}
func (r *Router) GuestPost(p string, hf xweb.HandlerFunc) {
	r.r.PostFunc(p, r.preHandler, r.guestHandler, hf, r.writerHandler)
}