|
@@ -138,7 +138,10 @@ func (c *credit) BookInfo() {
|
|
func (c *credit) SessionQdAjx() error {
|
|
func (c *credit) SessionQdAjx() error {
|
|
credit_qd := util.ObjToString(c.GetSession("credit_qd"))
|
|
credit_qd := util.ObjToString(c.GetSession("credit_qd"))
|
|
result := make(M)
|
|
result := make(M)
|
|
|
|
+ result["result"] = "n"
|
|
if credit_qd == "y" {
|
|
if credit_qd == "y" {
|
|
|
|
+ result["result"] = "y"
|
|
|
|
+ c.ServeJson(result)
|
|
return nil
|
|
return nil
|
|
}
|
|
}
|
|
userId := util.ObjToString(c.GetSession("userId"))
|
|
userId := util.ObjToString(c.GetSession("userId"))
|
|
@@ -147,8 +150,6 @@ func (c *credit) SessionQdAjx() error {
|
|
if time.Unix(int64(tmp[0]), 0).Day() == time.Now().Day() {
|
|
if time.Unix(int64(tmp[0]), 0).Day() == time.Now().Day() {
|
|
c.Session().UpdateByCustomField("id", userId, "credit_qd", "y")
|
|
c.Session().UpdateByCustomField("id", userId, "credit_qd", "y")
|
|
result["result"] = "y"
|
|
result["result"] = "y"
|
|
- } else {
|
|
|
|
- result["result"] = "n"
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
c.Session().UpdateByCustomField("id", userId, "credit_qd", "n")
|
|
c.Session().UpdateByCustomField("id", userId, "credit_qd", "n")
|