|
@@ -87,7 +87,7 @@ type Front struct {
|
|
|
historypushPaging xweb.Mapper `xweb:"/swordfish/historypush/paging"` //历时推送记录--分页
|
|
|
aboutus xweb.Mapper `xweb:"/front/aboutus.html"` //关于我们
|
|
|
busicooperation xweb.Mapper `xweb:"/front/busicooperation.html"` //商务合作
|
|
|
-
|
|
|
+ subscribeTransfer xweb.Mapper `xweb:"/front/subscribeTransfer"` //原文链接中转
|
|
|
/********************wxkeyset:v1.8**************************/
|
|
|
wxKeysetAjaxReq xweb.Mapper `xweb:"/wxkeyset/ajaxReq"` //订阅词ajax请求
|
|
|
wxKeyset xweb.Mapper `xweb:"/wxkeyset/keyset/(\\w+)"` //订阅词设置
|
|
@@ -886,6 +886,7 @@ func (m *Front) Sess(ostr string) error {
|
|
|
ok = true
|
|
|
} else {
|
|
|
var identity *pb.Identity
|
|
|
+
|
|
|
if str[1] == "userId" || str[1] == "entUserId" || str[1] == "positionId" {
|
|
|
if str[1] == "userId" {
|
|
|
identity = config.Middleground.UserCenter.IdentityByUserId(util.Int64All(userFlag))
|
|
@@ -905,7 +906,11 @@ func (m *Front) Sess(ostr string) error {
|
|
|
if m.GetSession("positionId") != nil {
|
|
|
hasIdentity = true
|
|
|
}
|
|
|
- ok, _, _ = FindUserAndCreateSess(userFlag, m.Session(), "wx", false, !hasIdentity)
|
|
|
+ if userFlag == "" && m.GetSession("positionId") != nil {
|
|
|
+ ok = true
|
|
|
+ } else if userFlag != "" {
|
|
|
+ ok, _, _ = FindUserAndCreateSess(userFlag, m.Session(), "wx", false, !hasIdentity)
|
|
|
+ }
|
|
|
}
|
|
|
if !hasIdentity {
|
|
|
identity = config.Middleground.UserCenter.IdentityByUserId(util.Int64All(m.GetSession("base_user_id")))
|
|
@@ -1212,6 +1217,39 @@ func isInTSguide(userid string) bool {
|
|
|
func (f *Front) Transfer() error {
|
|
|
return f.Redirect(f.GetString("url"))
|
|
|
}
|
|
|
+func (f *Front) SubscribeTransfer() error {
|
|
|
+ vt := f.GetString("t")
|
|
|
+ switch vt {
|
|
|
+ case "member":
|
|
|
+ vt = "m"
|
|
|
+ case "vip":
|
|
|
+ vt = "v"
|
|
|
+ case "free":
|
|
|
+ vt = "f"
|
|
|
+ case "entniche":
|
|
|
+ vt = "s"
|
|
|
+ }
|
|
|
+ if vt != "" {
|
|
|
+ return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=%s", vt))
|
|
|
+ }
|
|
|
+ //查询用户状态
|
|
|
+ bigPower := jy.GetBigVipUserBaseMsg(f.Session(), *config.Middleground)
|
|
|
+ if bigPower.Status > 0 {
|
|
|
+ //大会员用户
|
|
|
+ return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=m"))
|
|
|
+ }
|
|
|
+ IsEntPower := bigPower.Data.Entniche.IsEntPower
|
|
|
+ if bigPower.EntnicheStatus == 1 && IsEntPower > 0 {
|
|
|
+ //商机管理
|
|
|
+ return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=s"))
|
|
|
+ }
|
|
|
+ if bigPower.VipStatus > 0 {
|
|
|
+ //超级订阅
|
|
|
+ return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=v"))
|
|
|
+ }
|
|
|
+ //免费用户
|
|
|
+ return f.Redirect(fmt.Sprintf("/page_workDesktop/work-bench/app/big/big_subscribe?vt=f"))
|
|
|
+}
|
|
|
|
|
|
// 关于我们
|
|
|
func (f *Front) Aboutus() error {
|