123456789101112131415161718192021222324252627282930313233 |
- package controllers
-
- import (
- "XT_New/service"
- "fmt"
- "github.com/astaxie/beego"
- )
-
- type SignApiController struct {
- BaseAuthAPIController
- }
-
- func SignApiRegistRouters() {
-
- //获取短信验证码
- beego.Router("/api/sign/getsign", &SignApiController{}, "Get:GetSign")
- }
-
- // 短信服务接口
- func (this *SignApiController) GetSign() {
-
- phone := this.GetString("phone")
- fmt.Println("phone", phone)
- var tempphone string
- tempphone = "13318464642"
- sign := service.GetSignNameByPhone(tempphone)
- this.ServeSuccessJSON(map[string]interface{}{
- "sign": sign,
- })
- return
-
- }
|