Browse Source

feat:配置

wangshan 3 years ago
parent
commit
4e37fc872c
2 changed files with 5 additions and 5 deletions
  1. 1 1
      src/config.json
  2. 4 4
      src/jfw/front/org_structure.go

+ 1 - 1
src/config.json

@@ -310,5 +310,5 @@
     "pcSessionTimeout":168,
     "shareRedisName":"other",
     "wxWebdomain": "https://web-ws.jydev.jianyu360.com",
-    "wxOrgUrl": "/orgstructure/invpage.html"
+    "wxOrgUrl": "/orgstructure/autoLogon"
 }

+ 4 - 4
src/jfw/front/org_structure.go

@@ -33,10 +33,9 @@ type OrgStructure struct {
 //
 func (this *OrgStructure) InvitationQR(depId string) {
 	wxWebdomain := util.ObjToString(config.Sysconfig["wxWebdomain"])
-	wxOrgUrl := util.ObjToString(config.Sysconfig["wxOrgUrl"])
 	from := this.GetString("from") //邀请人
 	if wxWebdomain != "" {
-		qrUrl := wxWebdomain + wxOrgUrl + "?from=" + from + "&depId=" + depId
+		qrUrl := wxWebdomain + "/orgstructure/invpage.html?from=" + from + "&depId=" + depId
 		log.Println("qrUrl:", qrUrl)
 		//生二维码
 		_r, err := qr.Encode(qrUrl, qr.L)
@@ -58,6 +57,7 @@ func (this *OrgStructure) InvitationPage() error {
 	openId := util.ObjToString(this.Session().Get("s_m_openid"))
 	phone := ""
 	isSubscribe := false //是否关注
+	wxOrgUrl := util.ObjToString(config.Sysconfig["wxOrgUrl"])
 	log.Println(this.GetString("state"), "-----", this.GetString("code"))
 	if openId == "" {
 		if this.GetString("state") == "wx" {
@@ -77,11 +77,11 @@ func (this *OrgStructure) InvitationPage() error {
 		isSubscribe = CheckUserIsSubscribe(openId)
 		if isSubscribe {
 			FindUserAndCreateSess(openId, this.Session(), "wx", false)
+			phone = util.If(this.GetSession("phone") != nil, this.GetSession("phone"), "").(string)
 		}
-		phone = util.If(this.GetSession("phone") != nil, this.GetSession("phone"), "").(string)
 		log.Println("---:", phone)
 	}
-	return this.Redirect("/orgstructure/autoLogon?openId=" + openId + "&phone=" + phone)
+	return this.Redirect(wxOrgUrl + "?openId=" + openId + "&phone=" + phone)
 }
 
 //暂时不用