package stock import ( "appNewPlatform/generalmethod" "appNewPlatform/utils" "appNewPlatform/utils/formatoutput" "github.com/gin-gonic/gin" ) /* * @ 作者: 秦东 @ 时间: 2025-02-26 08:52:39 @ 功能: 入口 */ func (a *ApiMethod) Index(c *gin.Context) { sendMap := generalmethod.MapOut[string]() token, _ := utils.ReleaseToken("300450") sendMap["token"] = token sendMap["tokenStr"], sendMap["claims"], sendMap["err"] = utils.ParseToken(token) formatoutput.Result(0, sendMap, c) } /* * @ 作者: 秦东 @ 时间: 2025-02-26 08:51:04 @ 功能: 天干地址选股法 @ 参数 # @ 返回值 # @ 方法原型 # */ func (a *ApiMethod) appNewPlatform(c *gin.Context) { var request GainHeavenlyEarthly err := c.ShouldBindJSON(&request) if err != nil { formatoutput.Result(10, err, c) return } if request.HeavenlyStems == "" || request.EarthlyBranches == "" { formatoutput.Result(102, request, c) return } // HeavenlyStemsStarIndex := 0 //天干起始计算位置 // for i, v := range formatoutput.HeavenlyStems { // if v == request.HeavenlyStems { // HeavenlyStemsStarIndex = i // return // } // } // EarthlyBranchesStarIndex := 0 //地支起始计算位置 // for i, v := range formatoutput.EarthlyBranches { // if v == request.EarthlyBranches { // EarthlyBranchesStarIndex = i // return // } // } // theSameDay := time.Now().Unix() }