Răsfoiți Sursa

企业状态

wangchuanjin 9 ani în urmă
părinte
comite
6e3578fbf3

+ 1 - 1
core/src/message.json

@@ -6,7 +6,7 @@
 	"lawsearchaction":"/law/qfw/index",
 	"msiteaction":"/ent/wsite/edit",
 	"wxpushlist":"/wxpush/bidinfo/%s",
-	"turncards":"/active/flop/in",
+	"turncards":"/active/flop/in/in",
 	"indentify":{
 		"success":{
 			"result":"企业认证",

+ 1 - 1
core/src/qfw/active/active.go

@@ -10,7 +10,7 @@ var se util.SimpleEncrypt = util.SimpleEncrypt{Key: "topnet2015topnet2015"}
 
 type Active struct {
 	*xweb.Action
-	flop     xweb.Mapper `xweb:"/active/flop/(.*)"`
+	flop     xweb.Mapper `xweb:"/active/flop/(.*)/(.*)"`
 	flopAjax xweb.Mapper `xweb:"/active/flopAjax"`
 }
 

+ 5 - 2
core/src/qfw/active/flop.go

@@ -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 { //可以翻牌

+ 1 - 1
core/src/web/templates/active/flop.html

@@ -8,7 +8,7 @@
 <script>
 var signature = {{.T.signature}};
 var shareTitle = "{{.T.nickName}}在2016年{{.T.words}}";
-var shareLink = "http://www.qimingxing.info/active/flop/{{.T.openid}}";
+var shareLink = "http://www.qimingxing.info/active/flop/share/{{.T.openid}}";
 var shareIcon = "http://www.qimingxing.info/images/flop/blessing.png";
 if(typeof(signature) != "undefined" && signature != null && signature.length == 4){
 	wx.config({