Browse Source

剑鱼修改

wangchuanjin 9 years ago
parent
commit
b6cc13e804
1 changed files with 3 additions and 35 deletions
  1. 3 35
      core/src/qfw/mobile/wxmenu.go

+ 3 - 35
core/src/qfw/mobile/wxmenu.go

@@ -10,7 +10,6 @@ import (
 	"qfw/util"
 	"qfw/util/consts"
 	"qfw/util/mongodb"
-	"qfw/util/redis"
 	"runtime"
 	"time"
 )
@@ -24,18 +23,7 @@ func init() {
 func (m *Mobile) Guide() error {
 	url := coreconfig.SysConfig.DomainName + m.Url()
 	log.Println(url)
-	var shareData []string
-	if ret := redis.Get("other", "shareData-"+url); ret != nil {
-		if d, err := json.Marshal(ret); err != nil || json.Unmarshal(d, &shareData) != nil {
-			shareData = coreutil.GetJSInterfaceParam(url)
-			m.T["shareData"] = shareData
-		}
-	} else {
-		shareData = coreutil.GetJSInterfaceParam(url)
-		m.T["shareData"] = shareData
-		redis.Put("other", "shareData-"+url, shareData, 60*1000)
-	}
-	m.T["shareData"] = shareData
+	m.T["shareData"] = coreutil.GetJSInterfaceParam(url)
 	return m.Render("/swordfish/wxindex.html")
 }
 func (m *Mobile) Share() error {
@@ -86,17 +74,7 @@ func (m *Mobile) Wxrssset() error {
 		//m.T["mid"] = openid
 		url := coreconfig.SysConfig.DomainName + m.Url()
 		log.Println(url)
-		var shareData []string
-		if ret := redis.Get("other", "shareData-"+url); ret != nil {
-			if d, err := json.Marshal(ret); err != nil || json.Unmarshal(d, &shareData) != nil {
-				shareData = coreutil.GetJSInterfaceParam(url)
-				m.T["shareData"] = shareData
-			}
-		} else {
-			shareData = coreutil.GetJSInterfaceParam(url)
-			m.T["shareData"] = shareData
-			redis.Put("other", "shareData-"+url, shareData, 60*1000)
-		}
+		m.T["shareData"] = coreutil.GetJSInterfaceParam(url)
 		return m.Render("/swordfish/wxrssset.html", &m.T)
 	} else {
 		return m.Render("_err.html")
@@ -270,17 +248,7 @@ func (m *Mobile) WxpushList(s_m_openid string, _id string, msgid string) error {
 	m.T["_id"] = _id
 	url := coreconfig.SysConfig.DomainName + m.Url()
 	log.Println(url)
-	var shareData []string
-	if ret := redis.Get("other", "shareData-"+url); ret != nil {
-		if d, err := json.Marshal(ret); err != nil || json.Unmarshal(d, &shareData) != nil {
-			shareData = coreutil.GetJSInterfaceParam(url)
-			m.T["shareData"] = shareData
-		}
-	} else {
-		shareData = coreutil.GetJSInterfaceParam(url)
-		m.T["shareData"] = shareData
-		redis.Put("other", "shareData-"+url, shareData, 60*1000)
-	}
+	m.T["shareData"] = coreutil.GetJSInterfaceParam(url)
 	return m.Render("/swordfish/wxpush.html", &m.T)
 }