| 123456789101112131415161718192021222324252627 | 
							- package pdd
 
- import (
 
- 	"duoduo/models/pdd"
 
- 	"duoduo/tools/app"
 
- 	"github.com/gin-gonic/gin"
 
- )
 
- func Set(c *gin.Context) {
 
- 	var inData pdd.SetRequest
 
- 	var outData pdd.SetResponse
 
- 	err := c.ShouldBindJSON(&inData)
 
- 	if err != nil {
 
- 		app.Error(c, 400, err, err.Error())
 
- 		return
 
- 	}
 
- 	if inData.Version == "1.0.1" {
 
- 		outData.Type = "true"
 
- 		app.OK(c, outData, app.Success)
 
- 	} else {
 
- 		outData.Type = "false"
 
- 		app.OK(c, outData, app.Success)
 
- 	}
 
- }
 
 
  |