|
@@ -4,6 +4,7 @@
|
|
|
package credit
|
|
|
|
|
|
import (
|
|
|
+ "github.com/dchest/captcha"
|
|
|
"github.com/go-xweb/xweb"
|
|
|
. "gopkg.in/mgo.v2/bson"
|
|
|
"qfw/util"
|
|
@@ -168,3 +169,23 @@ func (c *credit) CreditList() error {
|
|
|
func (c *credit) CreditRule() error {
|
|
|
return c.Render("/member/credit/creditrule.html")
|
|
|
}
|
|
|
+
|
|
|
+func (c *credit) YqByemail() error {
|
|
|
+ userId := util.ObjToString(c.GetSession("userId"))
|
|
|
+ result := make(M)
|
|
|
+ var msg string
|
|
|
+ flag := false
|
|
|
+ if len(userId) > 0 {
|
|
|
+ if c.GetSession("CheckCodeId") == nil || !captcha.VerifyString(c.GetSession("CheckCodeId").(string), c.GetString("checkCodeId")) {
|
|
|
+ msg = "验证码错误!请重新输入验证码!"
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ msg = "请登录之后在操作"
|
|
|
+ }
|
|
|
+ result["flag"] = flag
|
|
|
+ result["msg"] = msg
|
|
|
+ c.ServeJson(result)
|
|
|
+ return nil
|
|
|
+}
|