20 lines
404 B
Go
20 lines
404 B
Go
package handler
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
"myschools.me/heritage/heritage-api/service"
|
|
)
|
|
|
|
// 系统选项map
|
|
func OptionMap(c *gin.Context) {
|
|
name := c.Query("name")
|
|
optionMap, err := service.OptionMap(&name)
|
|
if err != nil {
|
|
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"data": "查询失败"})
|
|
return
|
|
}
|
|
c.JSON(http.StatusOK, gin.H{"data": optionMap})
|
|
}
|