浏览代码

wip:模拟登录

wangshan 1 年之前
父节点
当前提交
c84896164a
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      src/jfw/modules/app/src/app/front/login.go

+ 4 - 3
src/jfw/modules/app/src/app/front/login.go

@@ -84,8 +84,8 @@ func init() {
 // 小程序激活活动模拟登录跳转详情页
 func (l *Login) ActivateLogin(id string) error {
 	redirectUrl := "/pages/tabbar/home/index" //小程序首页地址
-	if id != "" && encrypt.SE.EncodeString(id) != "" {
-		id = encrypt.SE.EncodeString(id)
+	if id != "" && encrypt.SE.DecodeString(id) != "" {
+		id = encrypt.SE.DecodeString(id)
 		sessVal := l.Session().GetMultiple()
 		userid, _ := sessVal["mgoUserId"].(string)
 		uId, err := strconv.Atoi(id)
@@ -104,7 +104,8 @@ func (l *Login) ActivateLogin(id string) error {
 					}
 				}
 			}
-			if userid != "" {
+			log.Println(userid, "----biddingId:", biddingId)
+			if userid != "" && biddingId != "" {
 				biddingId = encrypt.EncodeArticleId2ByCheck(biddingId)
 				redirectUrl = fmt.Sprintf("/jyapp/article/content/%s.html?miniprogram=%s", biddingId, encrypt.SE.Encode2Hex(strconv.FormatInt(time.Now().Unix(), 10)))
 			}