摘要:
package services import ( "crypto/sha1" "encoding/json" "fmt" "io" "io/ioutil" "math/rand" "net/http" "sort" "strconv" "time" ) var appid string var appsecret string type wxconfig struct... 阅读全文
posted @ 2019-12-11 15:28
shijiu520
阅读(815)
评论(0)
推荐(0)
摘要:
// @router /other/download-video [*] func (this *OtherController) DownLoadVideo() { link := this.GetString("link", "") if link == "" { this.toJson(-403, "args err", map[string]string{}) } split := str 阅读全文
posted @ 2019-12-11 15:24
shijiu520
阅读(570)
评论(0)
推荐(0)
摘要:
package controllers import ( "github.com/astaxie/beego" ) type BaseController struct { beego.Controller } func (c *BaseController) toJson(code int,msg string,data interface{}) { var jsMap map[... 阅读全文
posted @ 2019-12-11 15:22
shijiu520
阅读(598)
评论(0)
推荐(0)
摘要:
package services import ( "github.com/go-redis/redis" ) type RedisService struct { //client *redis.Client } var RedisConn *redis.ClusterClient //var RedisConn *redis.Client func init() { RedisConn = r 阅读全文
posted @ 2019-12-11 15:20
shijiu520
阅读(505)
评论(0)
推荐(0)
摘要:
reqUrl := "###" //请求url content := "" cType := "" resp, err := http.PostForm(reqUrl, url.Values{"参数1": {content}, "参数2": {cType}}) if resp != nil { defer func() { e := resp.Body.Close() fmt.Println(e) 阅读全文
posted @ 2019-12-11 15:19
shijiu520
阅读(858)
评论(0)
推荐(0)
摘要:
package services import ( crand "crypto/rand" "errors" "fmt" "github.com/astaxie/beego/orm" "io" "math/rand" "strconv" "strings" "time" ) type UtilSer 阅读全文
posted @ 2019-12-11 15:16
shijiu520
阅读(674)
评论(0)
推荐(0)
摘要:
package services import ( "bytes" "math" "strconv" "time" ) type TimeUtilService struct { } /** * @des 时间转换函数 * @param atime string 要转换的时间戳(秒) * @return string */ func (this *TimeUtilService)... 阅读全文
posted @ 2019-12-11 15:13
shijiu520
阅读(678)
评论(0)
推荐(0)
摘要:
func (m *DecemberPrize) PrizeList(virtual int) ([]orm.Params, error) { o := orm.NewOrm() var maps []orm.Params if virtual == 1 { sql := "SELECT id,low_index,name,image,weight,num,virtual,if_reserve,st 阅读全文
posted @ 2019-12-11 15:08
shijiu520
阅读(885)
评论(0)
推荐(0)
摘要:
1 timeStr := time.Now().Format("2006-01-02 15:04:05") //转化所需模板 2 3 loc, _ := time.LoadLocation("Local") //获取时区 4 5 formatTime, _ := time.ParseInLocati 阅读全文
posted @ 2019-12-11 14:59
shijiu520
阅读(2710)
评论(0)
推荐(0)

浙公网安备 33010602011771号