wangchuanjin 9 anni fa
parent
commit
e78fb319e3

+ 2 - 1
core/src/config.json

@@ -27,5 +27,6 @@
     "httpCache": false,
     "mailFailureTime": 3,
     "chatServer": "127.0.0.1:83",
-    "chatRpc": "127.0.0.1:88"
+    "chatRpc": "127.0.0.1:88",
+	"wxshareurl":"test.qimingxing.info/swordfish/share"
 }

+ 1 - 0
core/src/qfw/coreconfig/SysConfig.go

@@ -23,6 +23,7 @@ type config struct {
 	ChatServer      string      `json:"chatServer"`
 	ChatRpc         string      `json:"chatRpc"`
 	ElasticPoolSize int         `json:"elasticPoolSize"`
+	Wxshareurl      string      `json:"wxshareurl"`
 }
 type smtp struct {
 	Addr     string `json:"addr"`

+ 4 - 5
core/src/qfw/mobile/wxmenu.go

@@ -5,6 +5,7 @@ import (
 	"fmt"
 	"log"
 	"math/rand"
+	"qfw/coreconfig"
 	"qfw/coreutil"
 	"qfw/util"
 	"qfw/util/consts"
@@ -15,14 +16,12 @@ import (
 
 var se util.SimpleEncrypt
 
-const ShareUrl string = "http://www.qimingxing.info/swordfish/share"
-
 func init() {
 	se = util.SimpleEncrypt{Key: "topnet"}
 }
 
 func (m *Mobile) Guide() error {
-	m.T["shareData"] = coreutil.GetJSInterfaceParam(ShareUrl)
+	m.T["shareData"] = coreutil.GetJSInterfaceParam(coreconfig.SysConfig.Wxshareurl)
 	return m.Render("/swordfish/wxindex.html")
 }
 func (m *Mobile) Share() error {
@@ -71,7 +70,7 @@ func (m *Mobile) Wxrssset() error {
 			}
 		}
 		//m.T["mid"] = openid
-		m.T["shareData"] = coreutil.GetJSInterfaceParam(ShareUrl)
+		m.T["shareData"] = coreutil.GetJSInterfaceParam(coreconfig.SysConfig.Wxshareurl)
 		return m.Render("/swordfish/wxrssset.html", &m.T)
 	} else {
 		return m.Render("_err.html")
@@ -243,7 +242,7 @@ func (m *Mobile) WxpushList(s_m_openid string, _id string, msgid string) error {
 	**/
 	m.T["data"] = *mongodb.FindById("wxpush", _id, `{"s_content":1,"s_words":1,"a_visitedindex":1,"a_publishtime":1,"s_type":1}`)
 	m.T["_id"] = _id
-	m.T["shareData"] = coreutil.GetJSInterfaceParam(ShareUrl)
+	m.T["shareData"] = coreutil.GetJSInterfaceParam(coreconfig.SysConfig.Wxshareurl)
 	return m.Render("/swordfish/wxpush.html", &m.T)
 }