|
@@ -641,7 +641,7 @@ func (m *Front) VisitRedirect() {
|
|
|
m.T["signature"] = wx.SignJSSDK(m.Site() + m.Url())
|
|
|
userId, _ := m.GetSession("userId").(string)
|
|
|
var obj map[string]interface{}
|
|
|
- obj = wxvisitD(sid, userId, myopenid)
|
|
|
+ obj = wxvisitD(sid, userId, myopenid, true)
|
|
|
if len(obj) > 0 {
|
|
|
//获取打赏文案
|
|
|
m.T["rewardText"], m.T["advertText"] = getRewardText()
|
|
@@ -653,7 +653,7 @@ func (m *Front) VisitRedirect() {
|
|
|
m.Redirect(surl)
|
|
|
}
|
|
|
}
|
|
|
-func wxvisitD(sid, userId, openId string) (objdata map[string]interface{}) {
|
|
|
+func wxvisitD(sid, userId, openId string, isPayUser bool) (objdata map[string]interface{}) {
|
|
|
defer util.Catch()
|
|
|
var obj map[string]interface{}
|
|
|
if len(sid) > 5 {
|
|
@@ -669,6 +669,13 @@ func wxvisitD(sid, userId, openId string) (objdata map[string]interface{}) {
|
|
|
obj = *aobj
|
|
|
}
|
|
|
if ok && obj != nil && len(obj) >= 3 {
|
|
|
+ if !isPayUser && (util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向") {
|
|
|
+ for k, _ := range obj {
|
|
|
+ if k != "title" && k != "area" && k != "subtype" && k != "toptype" && k != "publishtime" && k != "budget" && k != "bidamount" {
|
|
|
+ delete(obj, k)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
fwt := util.ObjToString(obj["subtype"])
|
|
|
ltfd := getLowestField(fwt)
|
|
|
if ltfd != "" {
|
|
@@ -808,7 +815,7 @@ func (m *Front) PcVisitRedirect(sid string) {
|
|
|
if href != "" && !strings.HasPrefix(href, "http") {
|
|
|
href = "http://" + href
|
|
|
}
|
|
|
- po, bo, wo, obj := pcVRT(sid, "")
|
|
|
+ po, bo, wo, obj := pcVRT(sid, "", true)
|
|
|
if obj != nil && len(obj) > 0 {
|
|
|
if len(po) > 0 {
|
|
|
m.T["projectOther"] = po
|
|
@@ -834,7 +841,7 @@ func (m *Front) PcVisitRedirect(sid string) {
|
|
|
|
|
|
//pc三级页跳转
|
|
|
//20170821增加查询字段s_subscopeclass
|
|
|
-func pcVRT(sid, industry string) (po, bo, wo []map[string]interface{}, objdata map[string]interface{}) {
|
|
|
+func pcVRT(sid, industry string, isPayUser bool) (po, bo, wo []map[string]interface{}, objdata map[string]interface{}) {
|
|
|
defer util.Catch()
|
|
|
var projectOther, buyerOther, winnerOther []map[string]interface{}
|
|
|
var obj map[string]interface{}
|
|
@@ -851,6 +858,9 @@ func pcVRT(sid, industry string) (po, bo, wo []map[string]interface{}, objdata m
|
|
|
}
|
|
|
//obj, ok := elastic.GetByIdField("bidding", "bidding", sid, ""), true
|
|
|
if ok && obj != nil && len(obj) > 0 {
|
|
|
+ if !isPayUser && (util.ObjToString(obj["subtype"]) == "拟建" || util.ObjToString(obj["subtype"]) == "采购意向") {
|
|
|
+ delete(obj, "detail")
|
|
|
+ }
|
|
|
obj["_id"] = util.EncodeArticleId2ByCheck(sid)
|
|
|
var infoformat = util.IntAllDef(obj["infoformat"], 1)
|
|
|
obj["infoformat"] = infoformat
|