|
@@ -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)
|
|
|
}
|
|
|
|
|
|
//暂时不用
|