|
@@ -30,7 +30,10 @@ func (a *Active) FlopAjax() error {
|
|
|
}
|
|
|
|
|
|
//进入翻牌
|
|
|
-func (a *Active) Flop(encryptOpenid string) error {
|
|
|
+func (a *Active) Flop(reqType string, encryptOpenid string) error {
|
|
|
+ if reqType == "in" && a.GetSession("s_m_openid") != nil {
|
|
|
+ return a.Redirect("/active/flop/flop/" + flopEncrypt.EncodeString(a.GetSession("s_m_openid").(string)))
|
|
|
+ }
|
|
|
var flag int = 3 //标识
|
|
|
var cardType int = 1 //翻牌的类型
|
|
|
var multiple int = 2 //倍数
|
|
@@ -49,7 +52,7 @@ func (a *Active) Flop(encryptOpenid string) error {
|
|
|
}
|
|
|
}
|
|
|
//分享出去
|
|
|
- if a.GetSession("userId") == nil || a.GetSession("s_m_openid") == nil || a.GetSession("i_credit") == nil {
|
|
|
+ if reqType == "share" || a.GetSession("userId") == nil || a.GetSession("s_m_openid") == nil || a.GetSession("i_credit") == nil {
|
|
|
getFlopData()
|
|
|
a.T["shareid"] = coreutil.FindMyShareId("topflop", openid)
|
|
|
} else { //可以翻牌
|