123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- /*
- * @Descripttion:
- * @version:
- * @Author: Neo,Huang
- * @Date: 2020-12-16 11:22:56
- * @LastEditors: Neo,Huang
- * @LastEditTime: 2022-04-27 20:20:13
- */
- package main
- import (
- "net/http"
- "github.com/astaxie/beego"
- "github.com/drone/routes"
- "box-3rdServer/nppa"
- "box-3rdServer/sensitive"
- "box-3rdServer/utils"
- )
- func main() {
- utils.InitProject()
- utils.InitRedis()
- mux := routes.New()
- // 敏感词
- sensitive.Init()
- mux.Get("/sensitive/checkword", sensitive.HttpCheckWord)
- mux.Post("/sensitive/checkword", sensitive.HttpCheckWord)
- mux.Get("/sensitive/changeword", sensitive.HttpChangeWord)
- mux.Post("/sensitive/changeword", sensitive.HttpChangeWord)
- // 实名认证
- if nppa.IsModule() {
- nppa.Init()
- mux.Get("/nppa/check_id", nppa.HttpCheckPlayerID)
- mux.Post("/nppa/check_id", nppa.HttpCheckPlayerID)
- mux.Get("/nppa/query_id", nppa.HttpQueryPlayerID)
- mux.Post("/nppa/query_id", nppa.HttpQueryPlayerID)
- mux.Get("/nppa/loginout", nppa.HttpLoginout)
- mux.Post("/nppa/loginout", nppa.HttpLoginout)
- mux.Get("/nppa/test_check_id", nppa.HttpTestCheckPlayerID)
- mux.Get("/nppa/test_query_id", nppa.HttpTestQueryPlayerID)
- mux.Get("/nppa/test_loginout", nppa.HttpTestLoginout)
- }
- http.Handle("/", mux)
- http.ListenAndServe(":"+beego.AppConfig.String("httpport"), nil)
- }
|