浏览代码

分支合并

lianbingjie 2 年之前
父节点
当前提交
74456f7c33
共有 49 个文件被更改,包括 2972 次插入214 次删除
  1. 36 3
      src/jfw/filter/baseuserfilter.go
  2. 9 0
      src/jfw/front/front.go
  3. 6 6
      src/jfw/front/supsearch.go
  4. 255 0
      src/jfw/jyutil/jyutil.go
  5. 34 2
      src/jfw/modules/app/src/app/filter/baseuserfilter.go
  6. 6 1
      src/jfw/modules/app/src/app/filter/mergefilter.go
  7. 37 0
      src/jfw/modules/app/src/app/front/login.go
  8. 23 1
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/page_pro_follow_list.css
  9. 87 8
      src/jfw/modules/app/src/web/templates/big-member/page_pro_follow_list.html
  10. 3 3
      src/jfw/modules/app/src/web/templates/frontRouter/collection/sess/index.html
  11. 98 0
      src/jfw/modules/app/src/web/templates/frontRouter/share/free/invite-friends.html
  12. 105 0
      src/jfw/modules/app/src/web/templates/frontRouter/share/sess/invite-friends.html
  13. 65 0
      src/jfw/modules/common/src/qfw/util/jy/nsq.go
  14. 167 0
      src/jfw/modules/common/src/qfw/util/jy/userMerge.go
  15. 180 121
      src/jfw/modules/publicapply/src/shareFission/service/service.go
  16. 15 5
      src/jfw/modules/subscribepay/src/entity/shareFission.go
  17. 2 1
      src/jfw/modules/subscribepay/src/filter/mergefilter.go
  18. 10 9
      src/jfw/modules/subscribepay/src/service/userAccountInfo.go
  19. 3 2
      src/seo.json
  20. 23 1
      src/web/staticres/big-member/css/page_pro_follow_list.css
  21. 16 2
      src/web/staticres/common-module/collection/css/index.css
  22. 85 5
      src/web/staticres/common-module/collection/js/index-wx.js
  23. 83 0
      src/web/staticres/common-module/collection/js/index.js
  24. 190 0
      src/web/staticres/common-module/share/css/invite-friends.css
  25. 二进制
      src/web/staticres/common-module/share/img/blue-radius-bj.png
  26. 二进制
      src/web/staticres/common-module/share/img/explorer.png
  27. 二进制
      src/web/staticres/common-module/share/img/learner.png
  28. 二进制
      src/web/staticres/common-module/share/img/master.png
  29. 299 0
      src/web/staticres/common-module/share/js/invite-friends.js
  30. 二进制
      src/web/staticres/commonFunctions/wm-personal-reports.png
  31. 15 0
      src/web/staticres/css/common.css
  32. 53 0
      src/web/staticres/css/dev2/superSearch.css
  33. 34 3
      src/web/staticres/frontRouter/pc/collection/css/index-pc.css
  34. 97 8
      src/web/staticres/frontRouter/pc/collection/js/index-pc.js
  35. 10 1
      src/web/staticres/js/biddingSearch.js
  36. 11 1
      src/web/staticres/js/common.js
  37. 116 5
      src/web/staticres/js/superSearch.js
  38. 257 0
      src/web/staticres/share/css/invite-friends.css
  39. 二进制
      src/web/staticres/share/img/bi-report/explorer.png
  40. 二进制
      src/web/staticres/share/img/bi-report/learner.png
  41. 二进制
      src/web/staticres/share/img/bi-report/master.png
  42. 207 0
      src/web/staticres/share/js/invite-friends.js
  43. 83 7
      src/web/templates/big-member/wx/page_pro_follow_list.html
  44. 12 5
      src/web/templates/frontRouter/pc/collection/sess/index.html
  45. 17 0
      src/web/templates/frontRouter/pc/page_big_pc/sess/index.html
  46. 107 0
      src/web/templates/frontRouter/pc/share/sess/invite-friends.html
  47. 3 2
      src/web/templates/frontRouter/wx/collection/sess/index.html
  48. 91 0
      src/web/templates/frontRouter/wx/share/sess/invite-friends.html
  49. 22 12
      src/web/templates/pc/supsearch.html

+ 36 - 3
src/jfw/filter/baseuserfilter.go

@@ -2,9 +2,11 @@ package filter
 
 import (
 	"jy/src/jfw/config"
-	"app.yhyue.com/moapp/jypkg/public"
 	"log"
 	"net/http"
+	"qfw/util/usercenter"
+
+	"app.yhyue.com/moapp/jypkg/public"
 
 	util "app.yhyue.com/moapp/jybase/common"
 
@@ -28,17 +30,48 @@ func (this *baseUserFilter) Do() bool {
 		return true
 	}
 	if uid := this.GetSession["userId"]; uid != nil && uid != "" {
-		base_user_id := this.GetSession["base_user_id"]
-		if base_user_id == nil || base_user_id == 0 {
+		baseUserId := this.GetSession["base_user_id"]
+		if baseUserId == nil || baseUserId == 0 {
 			data, ok := public.MQFW.FindById("user", util.ObjToString(uid), `{"base_user_id":1}`)
 			if data != nil && ok && len(*data) > 0 {
 				if base_user_id := util.Int64All((*data)["base_user_id"]); base_user_id > 0 {
+					baseUserId = base_user_id
 					this.Session.Set("base_user_id", (*data)["base_user_id"])
 				} else {
 					log.Printf("%s用户暂无base_user_id", uid)
 				}
 			}
 		}
+		personId := this.GetSession["personId"]
+		if personId == nil || personId == 0 {
+			//获取自然人id,个人账户id,企业账户id,企业雇员职位id,企业雇员账户id,个人职位id
+			ck := &http.Cookie{}
+			entId := util.Int64All(this.GetSession["entId"])
+			identity := usercenter.GetUserIdentity(util.ObjToString(config.Sysconfig["userCenterApi"]), util.ObjToString(uid), util.Int64All(baseUserId), entId, ck)
+			if identity != nil {
+				if identity.PersonId > 0 {
+					this.Session.Set("personId", identity.PersonId)
+				}
+				if identity.UserName != "" {
+					this.Session.Set("userName", identity.UserName)
+				}
+				if identity.PersonId > 0 {
+					this.Session.Set("userAccountId", identity.PersonId)
+				}
+				if identity.EntAccountId > 0 {
+					this.Session.Set("entAccountId", identity.EntAccountId)
+				}
+				if identity.EntUserAccountId > 0 {
+					this.Session.Set("entUserAccountId", identity.EntUserAccountId)
+				}
+				if identity.UserPositionId > 0 {
+					this.Session.Set("userPositionId", identity.UserPositionId)
+				}
+				if identity.EntUserPositionId > 0 {
+					this.Session.Set("entUserPositionId", identity.EntUserPositionId)
+				}
+			}
+		}
 	}
 	return true
 }

+ 9 - 0
src/jfw/front/front.go

@@ -670,6 +670,14 @@ func (f *Front) SignOut() error {
 	f.DelSession("frameworkEntId")
 	f.DelSession("frameworkEntName")
 	f.DelSession("base_user_id")
+	//用户身份
+	f.DelSession("personId")
+	f.DelSession("userName")
+	f.DelSession("userAccountId")
+	f.DelSession("entAccountId")
+	f.DelSession("userPositionId")
+	f.DelSession("entUserPositionId")
+	f.DelSession("entAccountId")
 	f.ServeJson("ok")
 	return nil
 }
@@ -815,6 +823,7 @@ func CreateSession(q map[string]interface{}, sess *httpsession.Session, typ stri
 			redis.Put("other", jyutil.LoginRedisKey(userid), sess.Id(), 3600*util.IntAllDef(config.Sysconfig["pcSessionTimeout"], 168))
 		}
 	}
+
 	sessionVal["platform"] = typ
 	sess.SetMultiple(sessionVal)
 	s_nickname := util.If(sessionVal["s_nickname"] != nil, sessionVal["s_nickname"], sessionVal["phone"])

+ 6 - 6
src/jfw/front/supsearch.go

@@ -30,12 +30,12 @@ import (
 
 type Pcsearch struct {
 	*xweb.Action
-	pcSearchIndex   xweb.Mapper `xweb:"/jylab/(supsearch|medical)/index.html"` //搜索首页
-	getNewBids      xweb.Mapper `xweb:"/jylab/supsearch/getNewBids"`           //最新招标信息
-	getstatus       xweb.Mapper `xweb:"/jylab/supsearch/getstatus"`            //实验室开启状态
-	proposedProject xweb.Mapper `xweb:"/jylab/supsearch/proposedProject.html"` //拟建项目
-	qr              xweb.Mapper `xweb:"/jylab/supsearch/qr/(.*)"`              //生成进入实验室的二维码
-	changePro       xweb.Mapper `xweb:"/jylab/changePro"`                      //修改提示信息状态
+	pcSearchIndex   xweb.Mapper `xweb:"/jylab/(supsearch|medical|bi)/index.html"` //搜索首页
+	getNewBids      xweb.Mapper `xweb:"/jylab/supsearch/getNewBids"`              //最新招标信息
+	getstatus       xweb.Mapper `xweb:"/jylab/supsearch/getstatus"`               //实验室开启状态
+	proposedProject xweb.Mapper `xweb:"/jylab/supsearch/proposedProject.html"`    //拟建项目
+	qr              xweb.Mapper `xweb:"/jylab/supsearch/qr/(.*)"`                 //生成进入实验室的二维码
+	changePro       xweb.Mapper `xweb:"/jylab/changePro"`                         //修改提示信息状态
 }
 
 var industrylist map[string][]string

+ 255 - 0
src/jfw/jyutil/jyutil.go

@@ -0,0 +1,255 @@
+package jyutil
+
+import (
+	"encoding/json"
+	"fmt"
+	"io/ioutil"
+	"jfw/config"
+	"jfw/public"
+	"log"
+	. "mongodb"
+	"net/http"
+	"qfw/util"
+	"qfw/util/redis"
+	"qfw/util/usercenter"
+	"reflect"
+	"regexp"
+	"sort"
+
+	"strings"
+	"time"
+)
+
+var mongodb = public.MQFW
+var se = &util.SimpleEncrypt{Key: "topnet2015topnet2015"}
+
+var AC = &util.AES_CBC{
+	Key: "mGlAgnIBB8bx2nch",
+	Iv:  "1389461544135476",
+}
+
+//
+func FindMyShareId(activecode, openid string) string {
+	defer util.Catch()
+	ret, bres := mongodb.Find("person_share", "{'s_openid':'"+openid+"','s_businesscode':'"+activecode+"'}", `{"l_timestamp":-1}`, nil, true, -1, -1)
+	var shareid string
+	if bres {
+		var shareData = make(map[string]interface{})
+		var str = ""
+		for _, v := range *ret {
+			str = util.ObjToString(v["i_shareid"])
+		}
+		var tt = `^\d+$`
+		a, _ := regexp.Compile(tt)
+		if str == "" || a.MatchString(str) {
+			data := make(map[string]interface{})
+			data["s_openid"] = openid
+			data["s_businesscode"] = activecode
+			data["i_shareid"] = se.EncodeString(openid + "---" + activecode)
+			data["l_timestamp"] = time.Now().Unix()
+			mongodb.Save("person_share", data)
+			shareid = openid + "---" + activecode
+		} else {
+			shareid = se.DecodeString(str)
+		}
+		odata := redis.Get("sso", "p_shareData_"+shareid)
+		if odata == nil {
+			shareData["action"] = "32"
+			redis.Put("sso", "p_shareData_"+shareid, shareData, 24*60*60)
+		}
+	}
+	return shareid
+}
+
+//获取用户openid
+func Getopenid(code string) (openid string) {
+	defer util.Catch()
+	recturl := fmt.Sprintf(config.Wxoauthinfo, code)
+	resp, err := http.Get(recturl)
+	if err != nil {
+		log.Println(err.Error())
+		return
+	}
+	defer resp.Body.Close()
+	bs, _ := ioutil.ReadAll(resp.Body)
+	data := map[string]interface{}{}
+	json.Unmarshal(bs, &data)
+	openid, _ = data["openid"].(string)
+	return
+}
+
+//
+func GetSessionVal(q map[string]interface{}) (*map[string]interface{}, map[string]interface{}) {
+	person, ok := public.MQFW.FindOneByField("user", q, `{"_id":1,"i_shareknow":1,"s_m_openid":1,"s_nickname":1,"s_headimage":1,"s_headimageurl":1,"s_phone":1,"s_m_phone":1,"l_registedate":1,"b_merge_remind":1,"i_ispush":1,"i_unlimited":1,"s_jyname":1,"base_user_id":1}`)
+	sessionVal := make(map[string]interface{})
+	if !ok || person == nil || len(*person) == 0 {
+		return nil, sessionVal
+	}
+	sessionVal["user"] = *person
+	if (*person)["i_shareknow"] != nil {
+		sessionVal["shareknow"] = (*person)["i_shareknow"]
+	}
+	sessionVal["userId"] = BsonIdToSId((*person)["_id"])
+	nickName, _ := (*person)["s_nickname"].(string)
+	phone := util.ObjToString((*person)["s_phone"])
+	if nickName == "" {
+		if phone != "" && len(phone) > 3 {
+			nickName = string(phone[0:3]) + "****" + string(phone[len(phone)-4:])
+		}
+	}
+	if util.ObjToString((*person)["s_jyname"]) != "" {
+		sessionVal["s_jyname"] = util.ObjToString((*person)["s_jyname"])
+	}
+	sessionVal["s_nickname"] = nickName
+	sessionVal["nickname"] = nickName
+	avatar, _ := (*person)["s_headimageurl"].(string)
+	if avatar == "" {
+		avatar, _ = (*person)["s_headimage"].(string)
+	}
+	sessionVal["s_avatar"] = strings.Replace(avatar, "http://", "https://", 1)
+	sessionVal["s_m_openid"], _ = (*person)["s_m_openid"].(string)
+	sessionVal["openid"] = sessionVal["s_m_openid"]
+	if phone == "" {
+		phone = util.ObjToString((*person)["s_m_phone"])
+	}
+	if phone != "" {
+		//企业信息存session
+		sql := `SELECT a.id,a.name,a.startdate,a.enddate,a.quota,c.id as dept_id,b.id as user_id from entniche_info a 
+			INNER JOIN entniche_user b on (b.phone=? and a.id=b.ent_id) 
+			INNER JOIN entniche_department c on (c.pid=0 and a.id=c.ent_id) 
+			LEFT JOIN entniche_user_role d on (d.role_id=? and b.id=d.user_id)  
+			order by a.status DESC,b.power desc,a.auth_status DESC,d.role_id desc,a.createtime desc`
+		list := public.Mysql.SelectBySql(sql, phone, 1)
+		if list != nil {
+			for _, v := range *list {
+				if util.IntAll(v["id"]) == 0 {
+					break
+				}
+				sessionVal["entId"] = util.IntAll(v["id"])
+				sessionVal["entName"] = util.ObjToString(v["name"])
+				sessionVal["entUserId"] = util.IntAll(v["user_id"])
+				sessionVal["frameworkEntId"] = util.IntAll(v["id"])
+				sessionVal["frameworkEntName"] = util.ObjToString(v["name"])
+				break
+			}
+		}
+	}
+	sessionVal["phone"] = phone
+	sessionVal["i_unlimited"] = util.IntAll((*person)["i_unlimited"])
+	base_uid := util.IntAllDef((*person)["base_user_id"], 0)
+	if base_uid != 0 {
+		sessionVal["base_user_id"] = base_uid //用户中台的uid
+		//
+		entId := util.Int64All(sessionVal["entId"])
+		uid := util.ObjToString(sessionVal["userId"])
+		identity := usercenter.GetUserIdentity(util.ObjToString(config.Sysconfig["userCenterApi"]), uid, int64(base_uid), entId, &http.Cookie{})
+		if identity != nil {
+			if identity.PersonId > 0 {
+				sessionVal["personId"] = identity.PersonId
+			}
+			if identity.UserName != "" {
+				sessionVal["userName"] = identity.UserName
+			}
+			if identity.UserAccountId > 0 {
+				sessionVal["userAccountId"] = identity.UserAccountId
+			}
+			if identity.EntAccountId > 0 {
+				sessionVal["entAccountId"] = identity.EntAccountId
+			}
+			if identity.EntUserAccountId > 0 {
+				sessionVal["entUserAccountId"] = identity.EntUserAccountId
+			}
+			if identity.UserPositionId > 0 {
+				sessionVal["userPositionId"] = identity.UserPositionId
+			}
+			if identity.EntUserPositionId > 0 {
+				sessionVal["entUserPositionId"] = identity.EntUserPositionId
+			}
+		}
+	}
+	return person, sessionVal
+}
+
+//value 用户sessionid
+func LoginRedisKey(userid string) string {
+	return fmt.Sprintf("login_%s", userid)
+}
+
+// 排序 排序键必须为数字类型
+type SortBy struct {
+	Data    []map[string]interface{}
+	Sortkey string
+}
+
+func (a SortBy) Len() int { return len(a.Data) }
+
+func (a SortBy) Swap(i, j int) {
+	a.Data[i], a.Data[j] = a.Data[j], a.Data[i]
+}
+
+func (a SortBy) Less(i, j int) bool {
+	//return Float64(a.Data[i][a.Sortkey]) < Float64(a.Data[j][a.Sortkey])
+	m := a.Data[i][a.Sortkey]
+	n := a.Data[j][a.Sortkey]
+	w := reflect.ValueOf(m)
+	v := reflect.ValueOf(n)
+	switch v.Kind() {
+	case reflect.String:
+		return w.String() < v.String()
+	case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+		return w.Int() < v.Int()
+	case reflect.Float64, reflect.Float32:
+		return w.Float() < v.Float()
+	default:
+		return fmt.Sprintf("%v", w) < fmt.Sprintf("%v", v)
+	}
+}
+
+// ture  倒序3, 2, 1
+//fmt.Println(m)
+func SortData(data interface{}, sortkey string, reverse bool) {
+	//func SortData(data interface{}, sortkey string, reverse bool) {
+	var db []map[string]interface{}
+	err := Bind(data, &db)
+	if err != nil {
+		fmt.Println(err)
+		return
+	}
+	stb := SortBy{db, sortkey}
+	if !reverse {
+		sort.Sort(stb)
+	} else {
+		sort.Sort(sort.Reverse(stb))
+	}
+	err = Bind(stb.Data, data)
+	if err != nil {
+		fmt.Println(err)
+	}
+
+}
+
+// data 转换成ret
+func Bind(data interface{}, ret interface{}) error {
+	v := reflect.ValueOf(ret)
+	if v.Kind() != reflect.Ptr {
+		return fmt.Errorf("ptr input ret needed as type as input type %s", v.Kind())
+	}
+	havdata := false
+	var bk interface{}
+	if v.Elem().Kind() == reflect.Slice {
+		t := reflect.Zero(reflect.TypeOf(v.Elem().Interface()))
+		bk = v.Elem().Interface()
+		v.Elem().Set(t)
+		havdata = true
+	}
+	_data, _ := json.MarshalIndent(data, "", "    ")
+	err := json.Unmarshal(_data, ret)
+	if err != nil {
+		fmt.Println(err)
+		if havdata {
+			v.Elem().Set(reflect.ValueOf(bk))
+		}
+		return err
+	}
+	return nil
+}

+ 34 - 2
src/jfw/modules/app/src/app/filter/baseuserfilter.go

@@ -6,6 +6,7 @@ import (
 	"log"
 	"net/http"
 	util "app.yhyue.com/moapp/jybase/common"
+	"qfw/util/usercenter"
 
 	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 )
@@ -27,17 +28,48 @@ func (this *baseUserFilter) Do() bool {
 		return true
 	}
 	if uid := this.GetSession["userId"]; uid != nil && uid != "" {
-		base_user_id := this.GetSession["base_user_id"]
-		if base_user_id == nil || base_user_id == 0 {
+		baseUserId := this.GetSession["base_user_id"]
+		if baseUserId == nil || baseUserId == 0 {
 			data, ok := public.MQFW.FindById("user", util.ObjToString(uid), `{"base_user_id":1}`)
 			if data != nil && ok && len(*data) > 0 {
 				if base_user_id := util.Int64All((*data)["base_user_id"]); base_user_id > 0 {
+					baseUserId = base_user_id
 					this.Session.Set("base_user_id", (*data)["base_user_id"])
 				} else {
 					log.Printf("%s用户暂无base_user_id", uid)
 				}
 			}
 		}
+		personId := this.GetSession["personId"]
+		if personId == nil || personId == 0 {
+			//获取自然人id,个人账户id,企业账户id,企业雇员职位id,企业雇员账户id,个人职位id
+			ck := &http.Cookie{}
+			entId := util.Int64All(this.GetSession["entId"])
+			identity := usercenter.GetUserIdentity(util.ObjToString(config.Sysconfig["userCenterApi"]), util.ObjToString(uid), util.Int64All(baseUserId), entId, ck)
+			if identity != nil {
+				if identity.PersonId > 0 {
+					this.Session.Set("personId", identity.PersonId)
+				}
+				if identity.UserName != "" {
+					this.Session.Set("userName", identity.UserName)
+				}
+				if identity.PersonId > 0 {
+					this.Session.Set("userAccountId", identity.PersonId)
+				}
+				if identity.EntAccountId > 0 {
+					this.Session.Set("entAccountId", identity.EntAccountId)
+				}
+				if identity.EntUserAccountId > 0 {
+					this.Session.Set("entUserAccountId", identity.EntUserAccountId)
+				}
+				if identity.UserPositionId > 0 {
+					this.Session.Set("userPositionId", identity.UserPositionId)
+				}
+				if identity.EntUserPositionId > 0 {
+					this.Session.Set("entUserPositionId", identity.EntUserPositionId)
+				}
+			}
+		}
 	}
 	return true
 }

+ 6 - 1
src/jfw/modules/app/src/app/filter/mergefilter.go

@@ -5,6 +5,10 @@ import (
 	"log"
 	"net/http"
 	"app.yhyue.com/moapp/jybase/redis"
+	"jfw/config"
+	"jfw/public"
+	"log"
+	"net/http"
 
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"app.yhyue.com/moapp/jypkg/public"
@@ -26,7 +30,8 @@ func (l *mergeFilter) Do() bool {
 		if val := redis.Get("session", fmt.Sprintf("usermerge_delete_%s", uid)); val != nil {
 			if sUid, ok := val.(string); sUid != "" && ok {
 				log.Printf("账户合并 mergeFilter 自动刷新session old:%s new:%s\n", uid, sUid)
-				jy.CreateUserMerge(public.MQFW, public.Mysql, l.Session).FlushSession(nil, sUid)
+				ucApi := util.ObjToString(config.Sysconfig["userCenterApi"])
+				jy.CreateUserMerge(public.MQFW, public.Mysql, l.Session, ucApi).FlushSession(nil, sUid)
 				return true
 			}
 			if l.R.Method == "GET" {

+ 37 - 0
src/jfw/modules/app/src/app/front/login.go

@@ -985,6 +985,7 @@ func createSession(s *httpsession.Session, person map[string]interface{}, loginI
 		query := map[string]interface{}{
 			"i_appid": 2,
 		}
+		log.Println("~~~~~~~``", loginType, loginId)
 		switch loginType {
 		case 0: //_id登录
 			query["_id"], _ = primitive.ObjectIDFromHex(loginId)
@@ -1028,6 +1029,33 @@ func createSession(s *httpsession.Session, person map[string]interface{}, loginI
 	s.Set("i_unlimited", qutil.IntAll(person["i_unlimited"]))
 	if base_userid := qutil.IntAllDef(person["base_user_id"], 0); base_userid != 0 {
 		s.Set("base_user_id", base_userid)
+		//
+		//
+		uid := BsonIdToSId(person["_id"])
+		identity := usercenter.GetUserIdentity(qutil.ObjToString(config.Sysconfig["userCenterApi"]), uid, int64(base_userid), 0, &http.Cookie{})
+		if identity != nil {
+			if identity.PersonId > 0 {
+				s.Set("personId", identity.PersonId)
+			}
+			if identity.UserName != "" {
+				s.Set("personId", identity.PersonId)
+			}
+			if identity.UserAccountId > 0 {
+				s.Set("userAccountId", identity.UserAccountId)
+			}
+			if identity.EntAccountId > 0 {
+				s.Set("entAccountId", identity.EntAccountId)
+			}
+			if identity.EntUserAccountId > 0 {
+				s.Set("entUserAccountId", identity.EntUserAccountId)
+			}
+			if identity.UserPositionId > 0 {
+				s.Set("userPositionId", identity.UserPositionId)
+			}
+			if identity.EntUserPositionId > 0 {
+				s.Set("entUserPositionId", identity.EntUserPositionId)
+			}
+		}
 	}
 	if qutil.ObjToString(person["s_phone"]) != "" {
 		phone := person["s_phone"].(string)
@@ -1104,6 +1132,15 @@ func ClearSession(s *httpsession.Session) {
 	s.Del("base_user_id")
 	s.Del("user")
 	s.Del("nickname")
+	//
+	//用户身份
+	s.Del("personId")
+	s.Del("userName")
+	s.Del("userAccountId")
+	s.Del("entAccountId")
+	s.Del("userPositionId")
+	s.Del("entUserPositionId")
+	s.Del("entAccountId")
 }
 
 // 生成签名,返回手机端

+ 23 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/css/page_pro_follow_list.css

@@ -158,4 +158,26 @@
 /*/dev3.2/*/
 #jyovertime {
     color: #a0a0a0 !important;
-}
+}
+
+.article-item-hd {
+  display: flex;
+  justify-content: space-between;
+}
+
+.bi-report-inject-button {
+  display: inline-block;
+  border: 1px solid #2cb7ca;
+  color: #2cb7ca;
+  background-color: #fff;
+  padding: 0 .12rem;
+  height: .44rem;
+  line-height: .44rem;
+  border-radius: 4px;
+  font-size: 0.28rem;
+  text-align: center;
+  cursor: pointer;
+  box-sizing: content-box;
+  min-width: 0.84rem;
+  word-break: keep-all;
+}

+ 87 - 8
src/jfw/modules/app/src/web/templates/big-member/page_pro_follow_list.html

@@ -24,7 +24,7 @@
     {{include "/big-member/header.html"}}
     <!--S-Vue-->
     <div class="j-main" id="v-node" v-cloak>
-        <div class="j-main nofomain" v-if="foShow">
+        <div class="j-main nofomain" v-show="foShow">
             <div class="nofollow">
                 <div class="noimg">
                     <img src="/jyapp/big-member/image/img-empty.png" alt="">
@@ -34,7 +34,7 @@
             </div>
         </div>
         <div class="j-container" v-if="!foShow">
-            <div class="freeShow" v-if="!isbigvip">
+            <div class="freeShow" v-if="!isbigvip && !biEnv">
               <div class="purchase_in">
                 <div class="pur_text">购买大会员,最多关注500个项目</div>
                 <div class="pur_btn" @click="toBuy()">立即购买</div>
@@ -48,7 +48,12 @@
                     @load="getProjectList"
                 >
                     <div class="followList" :class="{ visited: item.visited }" v-for="(item,index) in list" :key="index" @click="followView(item.fid,item.sid,item)">
-                        <p class="pro_title visited-hd">${item.title}</p>
+                        <div class="article-item-hd">
+                            <p class="pro_title visited-hd">${item.title}</p>
+                            <span class="right-actions">
+                                <button class="bi-report-inject-button" :disabled="item.added" v-if="biEnv" @click.prevent.stop="biAddProject(item)">${ item.added ? '已添加' : '添加' }</button>
+                            </span>
+                        </div>
                         <div class="pro_tags">
                             <div class="tag_left">
                                 <span class="tag_text visited-ft" v-if="item.area!==''&&item.area!==null">${item.area}</span>
@@ -69,7 +74,7 @@
                 </div>
             </div>
             <div class="j-footer">
-                <div class="j-button-group">
+                <div class="j-button-group" v-if="!biEnv">
                     <div class="j-button-manycancel" @click="manycancel()">批量取消关注30天无更新的项目</div>
                 </div>
             </div>
@@ -96,6 +101,10 @@
 <!--E-当前页面的资源-->
 <!--小于100行同css,减少请求数-->
 <script>
+    var inInjectBI = utils.getParam('report') === 'bi' // 是否bi嵌入
+    if (inInjectBI) {
+      $('.j-header.jy-app-header').hide()
+    }
     var vNode = {
         delimiters: ['${', '}'],
         el: '#v-node',
@@ -107,15 +116,27 @@
             loading: false,
             finished: false,
             fid:'',//关注后的加密id
-            isbigvip:false, // 是否是大会员
+            isbigvip: false, // 是否是大会员
             pageNum:0,
+            inInjectBI: inInjectBI,
+            bi: {
+                addedIds: []
+            },
             isFree:false
         },
+        computed: {
+            biEnv: function () {
+                return this.inInjectBI
+            },
+        },
         created () {
             var recover = this.recover()
             if (!recover) {
                 this.isOpening()
             }
+            if (this.biEnv) {
+                this.getBiAddedProjects()
+            }
             // 取消关注重新赋值list
             var isCancel = sessionStorage.getItem('isCancel')
             if(isCancel){
@@ -251,9 +272,10 @@
                         } else {
                             _this.$toast(res.error_msg)
                         }
-
-
-                    }
+                    },
+                    complete: function () {
+                        _this.checkAddedState()
+                    },
                 })
             },
             followView:function(fid,sid,item) {
@@ -328,6 +350,63 @@
             },
             toBuy:function () {
               location.href = '/jyapp/big/page/landingPage'
+            },
+            getBiAddedProjects: function () {
+                $.ajax({
+                    url: '/jyapi/biService/getInfoId',
+                    type: 'POST',
+                    success: function (res) {
+                        if (res && res.error_code === 0 && $.isArray(res.data)) {
+                            this.bi.addedIds = res.data
+                            this.checkAddedState()
+                        }
+                    }.bind(this)
+                })
+            },
+            checkAddedState: function () {
+                var _this = this
+                var addedIds = this.bi.addedIds || []
+                if (!$.isArray(addedIds)) return
+                if (addedIds.length === 0) return
+                this.list.forEach(function (item) {
+                    var added = addedIds.indexOf(item.sid) !== -1
+                    _this.$set(item, 'added', added)
+                })
+            },
+            // 单个添加
+            biAddProject: function (item) {
+                if (item.added) return
+                const id = item.sid
+                if (!id) return
+                this.biBatchAddRequest([id])
+            },
+            biBatchAddRequest: function (ids) {
+                const loading = this.$toast.loading({
+                    forbidClick: true
+                })
+                var _this = this
+                var data = {
+                    info_id: ids.join(','),
+                    source: 3
+                }
+                $.ajax({
+                    url: '/jyapi/biService/addProject',
+                    type: 'POST',
+                    contentType: 'application/json',
+                    data: JSON.stringify(data),
+                    success: function (res) {
+                        if (res.error_code === 0 && res.data.status === 1) {
+                            loading.clear()
+                            _this.getBiAddedProjects()
+                            _this.$toast('添加成功')
+                        } else {
+                            _this.$toast(res.error_msg || '添加失败')
+                        }
+                    },
+                    error: function () {
+                        loading.clear()
+                    }
+                })
             }
         }
     }

+ 3 - 3
src/jfw/modules/app/src/web/templates/frontRouter/collection/sess/index.html

@@ -28,7 +28,7 @@
     <div class="j-main collection" id="myCollection" v-cloak ref="main">
       <div class="j-container" id="date-picker-other-box" v-if="!getParamsStatus||listState.list.length!==0">
         <div class="j-main">
-          <div class="search-container van-fade-an" ref="searchContainer">
+          <div class="search-container van-fade-an" ref="searchContainer" v-if="!biEnv">
             <div class="listaction">
               <div class="action_editor">
                 <span @click="screenBtn">
@@ -99,8 +99,8 @@
                     <div v-html="item.title" style="display: inline;"></div>
                   </div>
                   <div class="collec_star" @click="collecClick(event,item._id)">
-                    <span class="shoucang" v-if="condition"></span>
-                    <!-- <span class="weishoucang" v-if="!condition"></span> -->
+                    <button class="bi-report-inject-button" :disabled="item.added" v-if="biEnv" @click.prevent.stop="biAddProject(item)">${ item.added ? '已添加' : '添加' }</button>
+                    <span class="shoucang" v-if="condition && !biEnv"></span>
                   </div>
                 </div>
                 <div class="collec_action">

+ 98 - 0
src/jfw/modules/app/src/web/templates/frontRouter/share/free/invite-friends.html

@@ -0,0 +1,98 @@
+<!DOCTYPE html>
+<html lang="zh-CN" style="font-size: 50px;">
+
+<head>
+  <!--引入公共资源头部-->
+  {{include "/big-member/meta.html"}}
+  <title>邀请领好礼</title>
+  <!--S-当前页面的css资源-->
+  <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+  <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+  <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+  <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/share/css/invite-friends.css?v={{Msg "seo" "version"}}' />
+  {{include "/common/js.html"}}
+  <style>
+    .j-header .header-right.show-share {
+      width: 0.48rem;
+      height: 0.48rem;
+      background-size: cover;
+      background-repeat: no-repeat;
+      background-image: url(/jyapp/share/img/fenxiang.png);
+    }
+  </style>
+</head>
+
+<body>
+  <div class="j-container">
+    {{include "/big-member/header.html"}}
+    <div class="j-main" id="app" v-cloak>
+      <van-popup v-model="popupShow" position="bottom">
+        <section class="poster-card-container">
+          <div class="poster-card" ref="poster">
+            <div class="poster-card-hd">
+              <van-swipe class="poster-swiper" @change="swiperChange" ref="swiper">
+                <van-swipe-item v-for="(item, index) in swiperSlideList">
+                  <img :src="item.url" :alt="item.name">
+                </van-swipe-item>
+                <div class="indicator-container" slot="indicator">
+                  <span class="swiper-arrow swiper-arrow__left" @click="swiperPrev" v-if="swiperSlideList.length > 1" data-html2canvas-ignore>
+                    <van-icon name="arrow-left"></van-icon>
+                  </span>
+                  <span class="swiper-arrow swiper-arrow__right" @click="swiperNext" v-if="swiperSlideList.length > 1" data-html2canvas-ignore>
+                    <van-icon name="arrow"></van-icon>
+                  </span>
+                </div>
+              </van-swipe>
+              <div class="poster-tip-container" data-html2canvas-ignore v-if="swiperSlideList.length > 1">可选择画面,将以此画面生成海报</div>
+            </div>
+            <div class="poster-card-ft">
+              <div class="user-info-container">
+                <div class="user-avatar-container">
+                  <img name="user-avatar" :src="userInfo.headImage" alt="用户头像" />
+                </div>
+                <div class="user-info-content">
+                  <p class="user-name" v-text="userInfo.nickName"></p>
+                  <span class="user-info-content-text" v-html="conf.userInfoContentText"></span>
+                </div>
+              </div>
+              <div class="qr-container qr-container-mini" title="分享二维码">
+                <img name="share-qr" :src="qrImg" alt="分享二维码">
+              </div>
+            </div>
+          </div>
+          <div class="poster-card poster-card-mask">
+            <div class="indicator-container">
+              <span class="swiper-arrow swiper-arrow__left" @click="swiperPrev"></span>
+              <span class="swiper-arrow swiper-arrow__right" @click="swiperNext"></span>
+            </div>
+          </div>
+        </section>
+        <section class="van-share-sheet__options share-buttons">
+          <div class="van-share-sheet__option share-button" v-for="item in shareOptions" :key="item.id" @click="doAppShare(item)">
+            <div class="van-share-sheet__icon icon-box">
+              <img :src="item.icon" :alt="item.name">
+            </div>
+            <span class="van-share-sheet__name" v-text="item.name"></span>
+          </div>
+        </section>
+      </van-popup>
+    </div>
+  </div>
+  <!--S-当前页面的资源-->
+  <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js> </script> 
+  <script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
+  <script src=//cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js></script>
+  <script src="//cdn-common.jianyu360.com/cdn/lib/html2canvas/1.3.3/dist/html2canvas.min.js" crossorigin></script>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "version"}}'></script>
+  {{include "/big-member/commonjs.html"}}
+  <script>
+    $(function () {
+      $('.header-right').addClass('show-share').on('click', function () {
+        shareContent.popupShow = true
+      })
+    })
+  </script>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/share/js/invite-friends.js?v={{Msg "seo" "version"}}'></script>
+</body>
+
+</html>

+ 105 - 0
src/jfw/modules/app/src/web/templates/frontRouter/share/sess/invite-friends.html

@@ -0,0 +1,105 @@
+<!DOCTYPE html>
+<html lang="zh-CN" style="font-size: 50px;">
+
+<head>
+  <!--引入公共资源头部-->
+  {{include "/big-member/meta.html"}}
+  <title>邀请领好礼</title>
+  <!--S-当前页面的css资源-->
+  <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+  <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+  <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+  <link rel="stylesheet" href='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/share/css/invite-friends.css?v={{Msg "seo" "version"}}' />
+  {{include "/common/js.html"}}
+  <style>
+    .j-header .header-right.show-share {
+      width: 0.48rem;
+      height: 0.48rem;
+      background-size: cover;
+      background-repeat: no-repeat;
+      background-image: url(/jyapp/share/img/fenxiang.png);
+    }
+  </style>
+</head>
+
+<body>
+  <div class="j-container">
+    {{include "/big-member/header.html"}}
+    <div class="j-main" id="app" v-cloak>
+      <van-popup v-model="popupShow" position="bottom" @close="closePopup" @click.self="closePopup">
+        <section class="poster-card-container">
+          <div class="poster-card" ref="poster">
+            <div class="poster-card-hd">
+              <van-swipe class="poster-swiper" @change="swiperChange" ref="swiper">
+                <van-swipe-item v-for="(item, index) in swiperSlideList">
+                  <img v-lazy="item.url" :src="item.url" :alt="item.name" @load="changeView">
+                </van-swipe-item>
+                <div class="indicator-container" slot="indicator">
+                  <span class="swiper-arrow swiper-arrow__left" @click="swiperPrev" v-if="swiperSlideList.length > 1" data-html2canvas-ignore>
+                    <van-icon name="arrow-left"></van-icon>
+                  </span>
+                  <span class="swiper-arrow swiper-arrow__right" @click="swiperNext" v-if="swiperSlideList.length > 1" data-html2canvas-ignore>
+                    <van-icon name="arrow"></van-icon>
+                  </span>
+                </div>
+              </van-swipe>
+              <div class="poster-tip-container" data-html2canvas-ignore v-if="swiperSlideList.length > 1">可选择画面,将以此画面生成海报</div>
+            </div>
+            <div class="poster-card-ft">
+              <div class="user-info-container">
+                <div class="user-avatar-container">
+                  <img name="user-avatar" :src="userInfo.headImage" alt="用户头像" />
+                </div>
+                <div class="user-info-content">
+                  <p class="user-name" v-text="userInfo.nickName"></p>
+                  <span class="user-info-content-text" v-html="conf.userInfoContentText"></span>
+                </div>
+              </div>
+              <div class="qr-container qr-container-mini" title="分享二维码">
+                <img name="share-qr" :src="qrImg" alt="分享二维码">
+              </div>
+              <div class="create-poster-tip-container" data-html2canvas-ignore>
+                <div class="create-poster-tip" data-html2canvas-ignore>长按图片可保存到相册</div>
+              </div>
+            </div>
+          </div>
+          <div class="poster-card poster-card-mask" @touchstart="maskTouchStart" @touchend="maskTouchEnd">
+            <div class="indicator-container">
+              <span class="swiper-arrow swiper-arrow__left" @click="swiperPrev">
+                <i class="van-icon van-icon-arrow-left"><!----></i>
+              </span>
+              <span class="swiper-arrow swiper-arrow__right" @click="swiperNext">
+                <i class="van-icon van-icon-arrow"><!----></i>
+              </span>
+            </div>
+          </div>
+        </section>
+        <section class="van-share-sheet__options share-buttons">
+          <div class="van-share-sheet__option share-button" v-for="item in shareOptions" :key="item.id" @click="doShare(item)">
+            <div class="van-share-sheet__icon icon-box">
+              <img :src="item.icon" :alt="item.name">
+            </div>
+            <span class="van-share-sheet__name" v-text="item.name"></span>
+          </div>
+        </section>
+      </van-popup>
+    </div>
+  </div>
+  <!--S-当前页面的资源-->
+  <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js> </script>
+  <script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
+  <script src=//cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js></script>
+  <script src="//cdn-common.jianyu360.com/cdn/lib/html2canvas/1.3.3/dist/html2canvas.min.js" crossorigin></script>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/jyapp/js/common.js?v={{Msg "seo" "version"}}'></script>
+  {{include "/big-member/commonjs.html"}}
+  <script>
+    $(function () {
+      $('.header-right').addClass('show-share').on('click', function () {
+        shareContent.popupShow = true
+      })
+    })
+  </script>
+  <script src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/share/js/invite-friends.js?v={{Msg "seo" "version"}}'></script>
+</body>
+
+</html>

+ 65 - 0
src/jfw/modules/common/src/qfw/util/jy/nsq.go

@@ -0,0 +1,65 @@
+package jy
+
+import (
+	"encoding/json"
+	"errors"
+	"fmt"
+	. "mongodb"
+	"time"
+
+	"app.yhyue.com/moapp/message/model"
+	"github.com/nsqio/go-nsq"
+)
+
+const (
+	Jyweb_article_open     = "jyweb_article_open"     //打开招投标信息三级页
+	Jydocs_doc_open        = "jydocs_doc_open"        //打开文库三级页
+	Jyapp_wx_register      = "jyapp_wx_register"      //app微信注册
+	Jyapp_phone_register   = "jyapp_phone_register"   //app手机号注册
+	Jypc_phone_register    = "jypc_phone_register"    //pc端手机号注册
+	Jywx_subscribe_new     = "jywx_subscribe_new"     //微信新用户关注
+	Jywx_subscribe_invite  = "jywx_subscribe_invite"  //已邀请并产生了新用户
+	Jywx_subscribe_invited = "jywx_subscribe_invited" //被邀请产生新用户
+	Jywx_report_invited    = "jywx_report_invited"    //年终报告被邀请产生新用户
+
+	Jywx_node1  = "jywx_node1"  //微信端
+	Jyweb_node2 = "jyweb_node2" //pc端
+	Jyapp_node1 = "jyapp_node1" //app端
+	Jysubscrib  = "jysubscribe" //支付
+)
+
+//e_code 模块
+//e_app 终端
+func Publish(mg MongodbSim, ip, topicName, e_code, e_userid, e_app string) error {
+	if topicName == "" {
+		return errors.New("未找到topicName,请检查tye参数是否正确")
+	}
+	cfg := nsq.NewConfig()
+	producer, err := nsq.NewProducer(ip, cfg)
+	if err != nil {
+		fmt.Println("err1---", err)
+	}
+	msg := &model.Message{
+		E_code:   e_code,
+		E_userId: e_userid,
+		E_time:   time.Now().Unix(), //1605223065
+		E_app:    e_app,
+	}
+	b, _ := json.Marshal(msg)
+	err = producer.Publish(topicName, b)
+	if err != nil {
+		fmt.Println("errr2:", err)
+	}
+	producer.Stop()
+	saveLog(mg, topicName, *msg)
+	return err
+}
+
+func saveLog(mg MongodbSim, topicName string, msg model.Message) {
+	mg.Save("nsq_logs", map[string]interface{}{
+		"body":       msg,
+		"topicName":  topicName,
+		"createtime": time.Now().Unix(),
+		"type":       "producer",
+	})
+}

+ 167 - 0
src/jfw/modules/common/src/qfw/util/jy/userMerge.go

@@ -0,0 +1,167 @@
+package jy
+
+import (
+	"fmt"
+	. "mongodb"
+	"net/http"
+	qutil "qfw/util"
+	"qfw/util/mysql"
+	"qfw/util/usercenter"
+	"strings"
+
+	"github.com/go-xweb/httpsession"
+	"go.mongodb.org/mongo-driver/bson"
+)
+
+//dev3.7 账号合并
+type UserMerge struct {
+	mysqlDb       *mysql.Mysql
+	mg            MongodbSim
+	sess          *httpsession.Session
+	userCenterApi string //获取用户中台api
+}
+
+func CreateUserMerge(mg MongodbSim, msql *mysql.Mysql, sess *httpsession.Session, ucapi string) *UserMerge {
+	return &UserMerge{
+		mysqlDb:       msql,
+		mg:            mg,
+		sess:          sess,
+		userCenterApi: ucapi,
+	}
+}
+
+var (
+	MergeEncrypt = qutil.SimpleEncrypt{Key: "jy_merge_user"}
+)
+
+//查询合并
+//wId 微信用户id
+//pId 手机用户id
+//当wId和pId都为空时 即不需要合并
+func (this *UserMerge) MergeQuery() (wId, pId, bPhone string, err error) {
+	userId, _ := this.sess.Get("userId").(string)
+	if userId == "" {
+		err = fmt.Errorf("未获取到用户身份")
+		return
+	}
+	tud, _ := this.mg.FindById("user", userId, `{"s_m_phone":1,"s_phone":1,"s_unionid":1,"s_m_openid":1,"s_nickname":1}`)
+	if tud == nil || len(*tud) == 0 {
+		err = fmt.Errorf("查询用户身份异常")
+		return
+	}
+	s_m_phone, s_phone := qutil.ObjToString((*tud)["s_m_phone"]), qutil.ObjToString((*tud)["s_phone"])
+	if s_phone != "" {
+		bPhone = s_phone
+	} else {
+		bPhone = s_m_phone
+	}
+	//查询是否有对应微信需要合并
+	if unionid := qutil.ObjToString((*tud)["s_unionid"]); unionid != "" && len(unionid) > 11 {
+		mud, _ := this.mg.FindOneByField("user", bson.M{"i_appid": 2, "s_unionid": unionid, "_id": bson.M{"$ne": StringTOBsonId(userId)}}, `{"_id":1,"s_nickname":1,"s_phone":1}`)
+		if mud != nil && len(*mud) > 0 {
+			if qutil.ObjToString((*tud)["s_phone"]) == "" {
+				wId = userId
+				pId = BsonIdToSId((*mud)["_id"])
+				bPhone = qutil.ObjToString((*mud)["s_phone"])
+			} else {
+				pId = userId
+				wId = BsonIdToSId((*mud)["_id"])
+			}
+			return
+		}
+	}
+	//查询是否有对应手机号需要合并
+	if s_phone == s_m_phone { //已合并
+		return
+	}
+	if s_m_phone != "" { //当前用户为微信用户;查询对应的手机号用户
+		mud, _ := this.mg.FindOneByField("user", bson.M{"i_appid": 2, "s_phone": s_m_phone, "_id": bson.M{"$ne": StringTOBsonId(userId)}}, `{"_id":1}`)
+		if mud != nil && len(*mud) > 0 {
+			wId = BsonIdToSId((*tud)["_id"])
+			pId = BsonIdToSId((*mud)["_id"])
+			return
+		}
+	} else if s_phone != "" { //当前用户为手机号用户;查询对应的微信用户
+		mud, _ := this.mg.FindOneByField("user", bson.M{"i_appid": 2, "s_m_phone": s_phone, "_id": bson.M{"$ne": StringTOBsonId(userId)}}, `{"_id":1,"s_nickname":1}`)
+		if mud != nil && len(*mud) > 0 {
+			wId = BsonIdToSId((*mud)["_id"])
+			pId = BsonIdToSId((*tud)["_id"])
+			return
+		}
+	}
+	return
+}
+
+//更新session
+func (this *UserMerge) FlushSession(userData *map[string]interface{}, userId string) {
+	if userData == nil {
+		userData, _ = this.mg.FindById("user", userId, `{"_id":1,"i_shareknow":1,"s_m_openid":1,"s_nickname":1,"s_headimage":1,"s_headimageurl":1,"s_phone":1,"s_m_phone":1,"s_jpushid":1,"s_opushid":1,"s_appponetype":1,"s_appversion":1,"base_user_id":1}`)
+	}
+	sessionVal := make(map[string]interface{})
+	sessionVal["user"] = *userData
+	if (*userData)["i_shareknow"] != nil {
+		sessionVal["shareknow"] = (*userData)["i_shareknow"]
+	}
+	if userId == "" {
+		userId = BsonIdToSId((*userData)["_id"])
+	}
+	ClearBigVipUserPower(userId) //大会员状态刷新
+	sessionVal["userId"] = userId
+	nickName, _ := (*userData)["s_nickname"].(string)
+	phone, _ := (*userData)["s_phone"].(string)
+	if nickName == "" {
+		if phone != "" && len(phone) > 3 {
+			nickName = string(phone[0:3]) + "****" + string(phone[len(phone)-4:])
+		}
+	}
+	sessionVal["s_nickname"] = nickName
+	sessionVal["nickname"] = nickName
+	avatar, _ := (*userData)["s_headimageurl"].(string)
+	if avatar == "" {
+		avatar, _ = (*userData)["s_headimage"].(string)
+	}
+	sessionVal["s_avatar"] = strings.Replace(avatar, "http://", "https://", 1)
+	sessionVal["s_m_openid"], _ = (*userData)["s_m_openid"].(string)
+	sessionVal["openid"] = sessionVal["s_m_openid"]
+	//app端
+	sessionVal["s_phone"] = phone
+	if phone == "" {
+		phone, _ = (*userData)["s_m_phone"].(string)
+	}
+	sessionVal["phone"] = phone
+	sessionVal["s_headimageurl"] = strings.Replace(avatar, "http://", "https://", 1)
+	sessionVal["s_jpushid"], _ = (*userData)["s_jpushid"].(string)
+	sessionVal["s_opushid"], _ = (*userData)["s_opushid"].(string)
+	sessionVal["s_appponetype"], _ = (*userData)["s_appponetype"].(string)
+	sessionVal["s_appversion"], _ = (*userData)["s_appversion"].(string)
+	sessionVal["app_name"] = nickName
+	if base_userid := qutil.IntAllDef((*userData)["base_user_id"], 0); base_userid != 0 {
+		sessionVal["base_user_id"] = base_userid
+
+		identity := usercenter.GetUserIdentity(this.userCenterApi, userId, int64(base_userid), 0, &http.Cookie{})
+		if identity != nil {
+			if identity.PersonId > 0 {
+				sessionVal["personId"] = identity.PersonId
+			}
+			if identity.UserName != "" {
+				sessionVal["userName"] = identity.UserName
+			}
+			if identity.UserAccountId > 0 {
+				sessionVal["userAccountId"] = identity.UserAccountId
+			}
+			if identity.EntAccountId > 0 {
+				sessionVal["entAccountId"] = identity.EntAccountId
+			}
+			if identity.EntUserAccountId > 0 {
+				sessionVal["entUserAccountId"] = identity.EntUserAccountId
+			}
+			if identity.UserPositionId > 0 {
+				sessionVal["userPositionId"] = identity.UserPositionId
+			}
+			if identity.EntUserPositionId > 0 {
+				sessionVal["entUserPositionId"] = identity.EntUserPositionId
+			}
+		}
+	}
+	this.sess.SetMultiple(sessionVal)
+}

+ 180 - 121
src/jfw/modules/publicapply/src/shareFission/service/service.go

@@ -1,6 +1,7 @@
 package service
 
 import (
+<<<<<<< HEAD
 	"encoding/base64"
 	"fmt"
 	"jy/src/jfw/modules/publicapply/src/config"
@@ -18,101 +19,139 @@ import (
 
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 	"github.com/SKatiyar/qr"
+=======
+    . "api"
+    "config"
+    "db"
+    "encoding/base64"
+    "fmt"
+    "log"
+    qu "qfw/util"
+    "qfw/util/jy"
+    "qfw/util/redis"
+    "shareFission/entity"
+    "strings"
+    "time"
+
+    "github.com/SKatiyar/qr"
+    "github.com/go-xweb/xweb"
+>>>>>>> feature/v4.7.53
 )
 
 type Share struct {
-	*xweb.Action
-	info    xweb.Mapper `xweb:"/shareFission/info"`
-	receive xweb.Mapper `xweb:"/shareFission/receive"`
-	list    xweb.Mapper `xweb:"/shareFission/list"`
-	qwe     xweb.Mapper `xweb:"/qwe"`
+    *xweb.Action
+    info       xweb.Mapper `xweb:"/shareFission/info"`
+    reportInfo xweb.Mapper `xweb:"/shareFission/reportInfo"` // 年终报告分享地址
+    receive    xweb.Mapper `xweb:"/shareFission/receive"`
+    list       xweb.Mapper `xweb:"/shareFission/list"`
+    qwe        xweb.Mapper `xweb:"/qwe"`
 }
 
 func (this *Share) Qwe() {
-	rwe := db.Mgo.Count("user", map[string]interface{}{"s_m_openid": "o7Y1g0Rz_1JmNep3lnIU4lfjeooI", "i_appid": 2})
-	log.Println(rwe)
+    rwe := db.Mgo.Count("user", map[string]interface{}{"s_m_openid": "o7Y1g0Rz_1JmNep3lnIU4lfjeooI", "i_appid": 2})
+    log.Println(rwe)
 }
 
 func (this *Share) Info() {
-	defer qu.Catch()
-	userid, _ := this.GetSession("userId").(string)
-	r := func() map[string]interface{} {
-		res := map[string]interface{}{}
-		keyUser := fmt.Sprintf("SF_%s", userid)
-		if value := redis.GetStr(config.ShareConfig.ShareRedis, keyUser); value != "" {
-			varr := strings.Split(value, "#@#@")
-			link := fmt.Sprintf("%s/front/followGift/%s", config.ShareConfig.Webdomain, varr[3])
-			if config.ShareConfig.MayActive != "" {
-				link += config.ShareConfig.MayActive
-			}
-			r, _ := qr.Encode(link, qr.M)
-			pngdat := r.PNG()
-			res["data"] = map[string]interface{}{
-				"shareId":   varr[3], //口令
-				"shareLink": link,    //微信分享链接
-				"erUrl":     base64.StdEncoding.EncodeToString(pngdat),
-			}
-			res["error_code"] = 0
-			res["error_msg"] = ""
-		} else {
-			nickname, headimageurl := "", ""
-			if data := GetInfo(userid); data != nil {
-				nickname = qu.ObjToString(data["nickname"])
-				headimageurl = qu.ObjToString(data["headimageurl"])
-			}
-			shareId := entity.VarLSCPool.GetJob()
-			shareIdKey := fmt.Sprintf("shareId_%s", shareId)
-			value := fmt.Sprintf("%s#@#@%s#@#@%s#@#@%s", userid, nickname, headimageurl, shareIdKey)
-			redis.Put(config.ShareConfig.ShareRedis, shareIdKey, userid, -1)
-			redis.Put(config.ShareConfig.ShareRedis, keyUser, value, -1)
-			link := fmt.Sprintf("%s/front/followGift/%s", config.ShareConfig.Webdomain, shareIdKey)
-			if config.ShareConfig.MayActive != "" {
-				link += config.ShareConfig.MayActive
-			}
-			r, _ := qr.Encode(link, qr.M)
-			pngdat := r.PNG()
-			res["data"] = map[string]interface{}{
-				"shareId":   shareIdKey, //口令
-				"shareLink": link,       //微信分享链接
-				"erUrl":     base64.StdEncoding.EncodeToString(pngdat),
-			}
-			res["error_code"] = 0
-			res["error_msg"] = ""
-		}
-		return res
-	}()
-	this.ServeJson(r)
+    defer qu.Catch()
+    userid, _ := this.GetSession("userId").(string)
+    r := func() map[string]interface{} {
+        res := map[string]interface{}{}
+        keyUser := fmt.Sprintf("SF_%s", userid)
+        if value := redis.GetStr(config.ShareConfig.ShareRedis, keyUser); value != "" {
+            varr := strings.Split(value, "#@#@")
+            link := fmt.Sprintf("%s/front/followGift/%s", config.ShareConfig.Webdomain, varr[3])
+            if config.ShareConfig.MayActive != "" {
+                link += config.ShareConfig.MayActive
+            }
+            r, _ := qr.Encode(link, qr.M)
+            pngdat := r.PNG()
+            res["data"] = map[string]interface{}{
+                "shareId":   varr[3], //口令
+                "shareLink": link,    //微信分享链接
+                "erUrl":     base64.StdEncoding.EncodeToString(pngdat),
+            }
+            res["error_code"] = 0
+            res["error_msg"] = ""
+        } else {
+            nickname, headimageurl := "", ""
+            if data := GetInfo(userid); data != nil {
+                nickname = qu.ObjToString(data["nickname"])
+                headimageurl = qu.ObjToString(data["headimageurl"])
+            }
+            shareId := entity.VarLSCPool.GetJob()
+            shareIdKey := fmt.Sprintf("shareId_%s", shareId)
+            value := fmt.Sprintf("%s#@#@%s#@#@%s#@#@%s", userid, nickname, headimageurl, shareIdKey)
+            redis.Put(config.ShareConfig.ShareRedis, shareIdKey, userid, -1)
+            redis.Put(config.ShareConfig.ShareRedis, keyUser, value, -1)
+            link := fmt.Sprintf("%s/front/followGift/%s", config.ShareConfig.Webdomain, shareIdKey)
+            if config.ShareConfig.MayActive != "" {
+                link += config.ShareConfig.MayActive
+            }
+            r, _ := qr.Encode(link, qr.M)
+            pngdat := r.PNG()
+            res["data"] = map[string]interface{}{
+                "shareId":   shareIdKey, //口令
+                "shareLink": link,       //微信分享链接
+                "erUrl":     base64.StdEncoding.EncodeToString(pngdat),
+            }
+            res["error_code"] = 0
+            res["error_msg"] = ""
+        }
+        return res
+    }()
+    this.ServeJson(r)
+}
+
+// ReportInfo 年终报告分享地址
+func (this *Share) ReportInfo() {
+    defer qu.Catch()
+    r := func() map[string]interface{} {
+        res := map[string]interface{}{}
+        link := fmt.Sprintf("%s/active/transit/yearEndReport", config.ShareConfig.Webdomain)
+        r, _ := qr.Encode(link, qr.M)
+        pngdat := r.PNG()
+        res["data"] = map[string]interface{}{
+            "shareLink": link, //微信分享链接
+            "erUrl":     base64.StdEncoding.EncodeToString(pngdat),
+        }
+        res["error_code"] = 0
+        res["error_msg"] = ""
+        return res
+    }()
+    this.ServeJson(r)
 }
 
 //邀请人列表
 func (this *Share) List() {
-	userid, _ := this.GetSession("userId").(string)
-	pNum, _ := this.GetInteger("pageNum")
-	pSize, _ := this.GetInteger("pagesize")
-	rdata := map[string]interface{}{
-		"count":        0,
-		"haveNextPage": false,
-		"res":          []map[string]interface{}{},
-	}
-	query := map[string]interface{}{
-		"share_uid": userid,
-	}
-	count := db.Mgo.Count("user_share", query)
-	if count == 0 {
-		return
-	}
-	result, _ := db.Mgo.Find("user_share", query, `{"createtime":-1}`, `{"shared_uid":1}`, false, pNum*pSize, pSize)
-	haveNextPage := (pNum+1)*pSize < count
-	rdata["count"] = count
-	rdata["haveNextPage"] = haveNextPage
-	rdata["pageSize"] = pSize
-	rdata["res"] = Info(result)
-	this.ServeJson(Result{Data: rdata, Error_msg: ""})
+    userid, _ := this.GetSession("userId").(string)
+    pNum, _ := this.GetInteger("pageNum")
+    pSize, _ := this.GetInteger("pagesize")
+    rdata := map[string]interface{}{
+        "count":        0,
+        "haveNextPage": false,
+        "res":          []map[string]interface{}{},
+    }
+    query := map[string]interface{}{
+        "share_uid": userid,
+    }
+    count := db.Mgo.Count("user_share", query)
+    if count == 0 {
+        return
+    }
+    result, _ := db.Mgo.Find("user_share", query, `{"createtime":-1}`, `{"shared_uid":1}`, false, pNum*pSize, pSize)
+    haveNextPage := (pNum+1)*pSize < count
+    rdata["count"] = count
+    rdata["haveNextPage"] = haveNextPage
+    rdata["pageSize"] = pSize
+    rdata["res"] = Info(result)
+    this.ServeJson(Result{Data: rdata, Error_msg: ""})
 
 }
 
 //立即领取
 func (this *Share) Receive() {
+<<<<<<< HEAD
 	if !R.CheckReqParam(this.ResponseWriter, this.Request, "oid", "shareId") {
 		return
 	}
@@ -131,63 +170,83 @@ func (this *Share) Receive() {
 		return redis.Put(config.ShareConfig.ShareRedis, redisKey, shareUserid, timeOut()), ""
 	}()
 	this.ServeJson(Result{Data: M{"status": status}, Error_msg: msg})
+=======
+    if !R.CheckReqParam(this.ResponseWriter, this.Request, "oid", "shareId") {
+        return
+    }
+    status, msg := func() (bool, string) {
+        openid := qu.SE.DecodeString(this.GetString("oid")) //被分享者openid
+        if db.Mgo.Count("user", map[string]interface{}{"s_m_openid": openid, "i_appid": 2}) > 0 {
+            return false, "老用户无法领取奖励"
+        }
+        shareId := this.GetString("shareId")
+        redisKey := fmt.Sprintf("rec_%s", openid)
+        log.Println(openid, shareId, redisKey)                              //分享者和被分享者对应关系
+        shareUserid := redis.GetStr(config.ShareConfig.ShareRedis, shareId) //获取分享者
+        if shareUserid == "" {
+            return false, "领取失败"
+        }
+        return redis.Put(config.ShareConfig.ShareRedis, redisKey, shareUserid, timeOut()), ""
+    }()
+    this.ServeJson(Result{Data: M{"status": status}, Error_msg: msg})
+>>>>>>> feature/v4.7.53
 
 }
 
 type UserInfo struct {
-	HeadImg    interface{} `json:"headimg"`
-	Name       interface{} `json:"name"`
-	Createtime interface{} `json:"createtime"`
+    HeadImg    interface{} `json:"headimg"`
+    Name       interface{} `json:"name"`
+    Createtime interface{} `json:"createtime"`
 }
 
 func Info(data *[]map[string]interface{}) []*UserInfo {
-	userinfo := []*UserInfo{}
-	if len(*data) > 0 {
-		for _, v := range *data {
-			sharedId := qu.ObjToString(v["shared_uid"])
-			if rdata := GetInfo(sharedId); rdata != nil {
-				userinfo = append(userinfo, &UserInfo{
-					HeadImg:    rdata["headimageurl"],
-					Name:       rdata["nickname"],
-					Createtime: rdata["createtime"],
-				})
-			}
-		}
-	}
-	return userinfo
+    userinfo := []*UserInfo{}
+    if len(*data) > 0 {
+        for _, v := range *data {
+            sharedId := qu.ObjToString(v["shared_uid"])
+            if rdata := GetInfo(sharedId); rdata != nil {
+                userinfo = append(userinfo, &UserInfo{
+                    HeadImg:    rdata["headimageurl"],
+                    Name:       rdata["nickname"],
+                    Createtime: rdata["createtime"],
+                })
+            }
+        }
+    }
+    return userinfo
 }
 
 //到期时间
 func timeOut() int {
-	now := time.Now()
-	return int(now.AddDate(0, 0, config.ShareConfig.SaveTime).Unix() - now.Unix())
+    now := time.Now()
+    return int(now.AddDate(0, 0, config.ShareConfig.SaveTime).Unix() - now.Unix())
 }
 
 //获取用户头像,手机号
 func GetInfo(userid string) map[string]interface{} {
-	rdata, ok := db.Mgo.FindById("user", userid, `{"s_headimageurl":1,"s_headimage":1,"s_phone":1,"s_m_phone":1,"s_nickname":1,"l_registedate":1}`)
-	if ok && len(*rdata) > 0 && rdata != nil {
-		nickname, headimageurl := "", ""
-		if s_phone, _ := (*rdata)["s_phone"].(string); s_phone != "" {
-			nickname = s_phone
-		} else if s_m_phone, _ := (*rdata)["s_m_phone"].(string); s_m_phone != "" {
-			nickname = s_m_phone
-		} else if s_nickname, _ := (*rdata)["s_nickname"].(string); s_nickname != "" {
-			nickname = s_nickname
-		}
-		if jy.IsPhone(nickname) {
-			nickname = string(nickname[0:3]) + "****" + string(nickname[len(nickname)-4:])
-		}
-		if s_headimageurl, _ := (*rdata)["s_headimageurl"].(string); s_headimageurl != "" {
-			headimageurl = s_headimageurl
-		} else if s_headimage, _ := (*rdata)["s_headimage"].(string); s_headimage != "" {
-			headimageurl = config.ShareConfig.Webdomain + s_headimage
-		}
-		return map[string]interface{}{
-			"nickname":     nickname,
-			"headimageurl": headimageurl,
-			"createtime":   (*rdata)["l_registedate"],
-		}
-	}
-	return nil
+    rdata, ok := db.Mgo.FindById("user", userid, `{"s_headimageurl":1,"s_headimage":1,"s_phone":1,"s_m_phone":1,"s_nickname":1,"l_registedate":1}`)
+    if ok && len(*rdata) > 0 && rdata != nil {
+        nickname, headimageurl := "", ""
+        if s_phone, _ := (*rdata)["s_phone"].(string); s_phone != "" {
+            nickname = s_phone
+        } else if s_m_phone, _ := (*rdata)["s_m_phone"].(string); s_m_phone != "" {
+            nickname = s_m_phone
+        } else if s_nickname, _ := (*rdata)["s_nickname"].(string); s_nickname != "" {
+            nickname = s_nickname
+        }
+        if jy.IsPhone(nickname) {
+            nickname = string(nickname[0:3]) + "****" + string(nickname[len(nickname)-4:])
+        }
+        if s_headimageurl, _ := (*rdata)["s_headimageurl"].(string); s_headimageurl != "" {
+            headimageurl = s_headimageurl
+        } else if s_headimage, _ := (*rdata)["s_headimage"].(string); s_headimage != "" {
+            headimageurl = config.ShareConfig.Webdomain + s_headimage
+        }
+        return map[string]interface{}{
+            "nickname":     nickname,
+            "headimageurl": headimageurl,
+            "createtime":   (*rdata)["l_registedate"],
+        }
+    }
+    return nil
 }

+ 15 - 5
src/jfw/modules/subscribepay/src/entity/shareFission.go

@@ -18,14 +18,16 @@ import (
 )
 
 type ShareFission struct {
-	UserId   string //被分享者
-	ShareUid string //分享者
+	UserId    string //被分享者
+	ShareUid  string //分享者
+	NewSource string // 来源
 }
 
-func NewShareFission(userId, shareUid string) *ShareFission {
+func NewShareFission(userId, shareUid, newSource string) *ShareFission {
 	return &ShareFission{
-		UserId:   userId,
-		ShareUid: shareUid,
+		UserId:    userId,
+		ShareUid:  shareUid,
+		NewSource: newSource,
 	}
 }
 
@@ -54,6 +56,14 @@ func (this *ShareFission) AddPower(r *http.Request) {
 		//记录分享记录
 		this.Record()
 	} else { //无分享人-新用户
+		// 年终报告分享过来的
+		if this.NewSource == "reportShare" {
+			err := jy.Publish(util.Mgo_log, config.Config.Nsq, config.Config.Nsq_Topic, jy.Jywx_report_invited, this.UserId, jy.Jywx_node1)
+			if err != nil {
+				log.Println("nsq队列写入失败-->", err, jy.Jywx_report_invited, this.UserId)
+			}
+			return
+		}
 		e_code := jy.Jyapp_phone_register
 		if !mobileReg.MatchString(r.UserAgent()) { //PC端绑定手机号
 			e_code = jy.Jypc_phone_register

+ 2 - 1
src/jfw/modules/subscribepay/src/filter/mergefilter.go

@@ -1,6 +1,7 @@
 package filter
 
 import (
+	"config"
 	"fmt"
 	"log"
 	"net/http"
@@ -25,7 +26,7 @@ func (l *mergeFilter) Do() bool {
 		if val := redis.Get("session", fmt.Sprintf("usermerge_delete_%s", uid)); val != nil {
 			if sUid, ok := val.(string); sUid != "" && ok {
 				log.Printf("账户合并 mergeFilter 自动刷新session old:%s new:%s\n", uid, sUid)
-				jy.CreateUserMerge(util.MQFW, util.Mysql, l.Session).FlushSession(nil, sUid)
+				jy.CreateUserMerge(util.MQFW, util.Mysql, l.Session, config.Config.UserCenterApi).FlushSession(nil, sUid)
 				return true
 			}
 		}

+ 10 - 9
src/jfw/modules/subscribepay/src/service/userAccountInfo.go

@@ -374,7 +374,7 @@ func (this *UserAccount) PhoneBind() {
 		}
 		//校验验证码成功【校验是否需要合并】
 		if step == 2 {
-			uData, _ := util.MQFW.FindById("user", userId, `{"s_unionid":1,"s_name":1,"s_nickname":1,"s_headimageurl":1,"l_registedate":1,"i_ispush":1,"i_applystatus":1,"i_sex":1,"s_country":1,"s_province":1,"s_city":1,"s_m_openid":1,"a_m_openid":1,"base_user_id":1}`)
+			uData, _ := util.MQFW.FindById("user", userId, `{"s_unionid":1,"s_name":1,"s_nickname":1,"s_headimageurl":1,"l_registedate":1,"i_ispush":1,"i_applystatus":1,"i_sex":1,"s_country":1,"s_province":1,"s_city":1,"s_m_openid":1,"a_m_openid":1,"base_user_id":1,"s_newsource":1}`)
 			if uData == nil && len(*uData) == 0 {
 				return nil, DBQUERY_ERROR
 			}
@@ -390,12 +390,13 @@ func (this *UserAccount) PhoneBind() {
 				if relationPhoneId == "" {
 					//船新用户 查看是否有邀请关系 shareRedisName
 					go func(openId string) {
+						newSource := qutil.ObjToString((*uData)["s_newsource"])
 						var shareUid string
 						shareKey := fmt.Sprintf("rec_%s", openId)
 						if openId != "" {
 							shareUid = redis.GetStr(config.Config.ShareRedisName, shareKey)
 						}
-						entity.NewShareFission(userId, shareUid).AddPower(this.Request)
+						entity.NewShareFission(userId, shareUid, newSource).AddPower(this.Request)
 						if shareUid != "" {
 							redis.Del(config.Config.ShareRedisName, shareKey)
 						}
@@ -418,7 +419,7 @@ func (this *UserAccount) PhoneBind() {
 				ck, _ := this.GetCookie("SESSIONID")
 				usercenter.UpdateBaseUser(util.MQFW, config.Config.UserCenterApi, userId, ck)
 				//用户中台存储  结束
-				jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).FlushSession(nil, userId) //刷新session
+				jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session(), config.Config.UserCenterApi).FlushSession(nil, userId) //刷新session
 			} else if mode == "mergeBind" { //跳转绑定-不合并绑定无效
 				if qutil.Int64All((*uData)["l_registedate"]) > config.AutoMergeTimeStamp { //新微信直接绑定
 					data := map[string]interface{}{
@@ -452,7 +453,7 @@ func (this *UserAccount) PhoneBind() {
 							"id":    base_userid_del,
 						}, ck)
 						util.MQFW.Del("user", map[string]interface{}{"_id": mongodb.StringTOBsonId(userId)})
-						jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).FlushSession(nil, relationPhoneId)
+						jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session(), config.Config.UserCenterApi).FlushSession(nil, relationPhoneId)
 						redis.Put("session", fmt.Sprintf("usermerge_delete_%s", userId), relationPhoneId, 7*24*60*60)
 						//用户中台存储  结束
 						return rData, nil
@@ -496,7 +497,7 @@ func (this *UserAccount) PhoneChange() {
 				return nil, err
 			}
 			//发送短信验证码前,校验手机号是否存在
-			wId, _, _, err := jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).MergeQuery()
+			wId, _, _, err := jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session(), config.Config.UserCenterApi).MergeQuery()
 			if err != nil {
 				return nil, err
 			}
@@ -512,7 +513,7 @@ func (this *UserAccount) PhoneChange() {
 		//校验验证码成功绑定手机号
 		if step == 2 {
 			//更换手机号前,再次校验是否存在手机号
-			wId, _, _, err := jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).MergeQuery()
+			wId, _, _, err := jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session(), config.Config.UserCenterApi).MergeQuery()
 			if err != nil {
 				return nil, err
 			}
@@ -599,7 +600,7 @@ func (this *UserAccount) PhoneChange() {
 			}(phoneVerify, userId)
 			//用户中台存储  结束
 			this.Session().Del(phoneAuthPassSessionKey)
-			jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).FlushSession(nil, userId) //刷新session
+			jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session(), config.Config.UserCenterApi).FlushSession(nil, userId) //刷新session
 		}
 		return map[string]interface{}{
 			"state": 1,
@@ -696,7 +697,7 @@ func (this *UserAccount) WxBind() {
 		usercenter.UpdateBaseUser(util.MQFW, config.Config.UserCenterApi, userId, ck)
 		usercenter.UpdateBaseUser(util.MQFW, config.Config.UserCenterApi, relationWeixinId, ck)
 		//刷新session
-		jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).FlushSession(upDateMap, userId)
+		jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session(), config.Config.UserCenterApi).FlushSession(upDateMap, userId)
 		return map[string]interface{}{
 			"state": 1,
 		}, nil
@@ -794,7 +795,7 @@ func (this *UserAccount) WxUnBind() {
 		}
 
 		//2.刷新当前账户session
-		jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session()).FlushSession(nil, userId)
+		jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session(), config.Config.UserCenterApi).FlushSession(nil, userId)
 		return map[string]interface{}{
 			"state": 1,
 		}, nil

+ 3 - 2
src/seo.json

@@ -575,9 +575,10 @@
         "jywkseo": "jydocs"
     },
     "urlSource": {
-        "bidCourse": "/jyxsapp/",
+      "bidCourse": "/jyxsapp/",
 		"digitalCoupon":"?Rg==",
-		"digitalExpoH5":"/active/digital/index"
+		"digitalExpoH5":"/active/digital/index",
+    "reportShare": "/app/nzbg.app/nzbg_entrance_app"
     },
     "city": {
         "BJ_BJ": {

+ 23 - 1
src/web/staticres/big-member/css/page_pro_follow_list.css

@@ -158,4 +158,26 @@
 /*/dev3.2/*/
 #jyovertime {
     color: #a0a0a0 !important;
-}
+}
+
+.article-item-hd {
+  display: flex;
+  justify-content: space-between;
+}
+
+.bi-report-inject-button {
+  display: inline-block;
+  border: 1px solid #2cb7ca;
+  color: #2cb7ca;
+  background-color: #fff;
+  padding: 0 .12rem;
+  height: .44rem;
+  line-height: .44rem;
+  border-radius: 4px;
+  font-size: 0.28rem;
+  text-align: center;
+  cursor: pointer;
+  box-sizing: content-box;
+  min-width: 0.84rem;
+  word-break: keep-all;
+}

+ 16 - 2
src/web/staticres/common-module/collection/css/index.css

@@ -340,8 +340,6 @@
 
 .collec_star {
     margin-left: .36rem;
-    width: .4rem;
-    height: .4rem;
 }
 
 .collec_star .shoucang {
@@ -1440,6 +1438,22 @@
   width: 100%;
   height: 100%;
 }
+
+.bi-report-inject-button {
+  display: inline-block;
+  border: 1px solid #2cb7ca;
+  color: #2cb7ca;
+  background-color: #fff;
+  padding: 0 .12rem;
+  height: .44rem;
+  line-height: .44rem;
+  border-radius: 4px;
+  font-size: 0.28rem;
+  text-align: center;
+  cursor: pointer;
+  box-sizing: content-box;
+  min-width: 0.84rem;
+}
 .fl_{
   float: left;
 }

+ 85 - 5
src/web/staticres/common-module/collection/js/index-wx.js

@@ -1,3 +1,4 @@
+var inInjectBI = utils.getParam('report') === 'bi' // 是否bi嵌入
 var vNode = {
   delimiters: ['${', '}'],
   el: '#myCollection',
@@ -10,6 +11,10 @@ var vNode = {
   },
   data: {
     sessStorageKey: '$data-collection',
+    inInjectBI: inInjectBI,
+    bi: {
+        addedIds: []
+    },
     listState: {
       value: '',
       loading: false,
@@ -92,6 +97,9 @@ var vNode = {
     screenShow: false, // 筛选按钮是否显示
   },
   computed: {
+    biEnv: function () {
+      return this.inInjectBI
+    },
     getParamsStatus () {
       return this.limitlist.label=='' && this.limitlist.selectTime=='' && this.limitlist.buyerclass=='' && this.limitlist.buyerPhone==0 && this.limitlist.winnerPhone==0 && this.limitlist.pageNum==1
     }
@@ -99,10 +107,13 @@ var vNode = {
   created () {
     var recover = this.recover()
     let lid = utils.getParam('tag')
-      if(lid) {
-        lid = decodeURIComponent(lid)
-        this.getTagsList(lid)
-      }
+    if(lid) {
+      lid = decodeURIComponent(lid)
+      this.getTagsList(lid)
+    }
+    if (this.biEnv) {
+      this.getBiAddedProjects()
+    }
     if (!recover) {
       if(!lid) {
         this.getList()
@@ -285,6 +296,9 @@ var vNode = {
             _this.$toast(res.error_msg)
           }
         },
+        complete: function () {
+          _this.checkAddedState()
+        },
         error: function(err){
           _this.listState.loading = true
           _this.listState.finished = true;
@@ -503,7 +517,73 @@ var vNode = {
           }
         })
       }
+    },
+    getBiAddedProjects: function () {
+      $.ajax({
+        url: '/jyapi/biService/getInfoId',
+        type: 'POST',
+        success: function (res) {
+          if (res && res.error_code === 0 && $.isArray(res.data)) {
+            this.bi.addedIds = res.data
+            this.checkAddedState()
+          }
+        }.bind(this)
+      })
+    },
+    checkAddedState: function () {
+      var _this = this
+      var addedIds = this.bi.addedIds || []
+      if (!$.isArray(addedIds)) return
+      if (addedIds.length === 0) return
+      this.listState.list.forEach(function (item) {
+        var added = addedIds.indexOf(item._id) !== -1
+        _this.$set(item, 'added', added)
+      })
+    },
+    // 单个添加
+    biAddProject: function (item) {
+      if (item.added) return
+      const id = item._id
+      if (!id) return
+      this.biBatchAddRequest([id])
+    },
+    // bi下批量操作
+    biBatchAddSelected: function () {
+      var ids = selectDataIds
+      if (!$.isArray(ids)) return
+      if (ids.length === 0) {
+        return this.$toast('请选择要添加的信息')
+      }
+      this.biBatchAddRequest(ids)
+    },
+    biBatchAddRequest: function (ids) {
+      const loading = this.$toast.loading({
+        forbidClick: true
+      })
+      var _this = this
+      var data = {
+        info_id: ids.join(','),
+        source: 1
+      }
+      $.ajax({
+        url: '/jyapi/biService/addProject',
+        type: 'POST',
+        contentType: 'application/json',
+        data: JSON.stringify(data),
+        success: function (res) {
+          if (res.error_code === 0 && res.data.status === 1) {
+            loading.clear()
+            _this.getBiAddedProjects()
+            _this.$toast('添加成功')
+          } else {
+            _this.$toast(res.error_msg || '添加失败')
+          }
+        },
+        error: function () {
+          loading.clear()
+        }
+      })
     }
   }
 }
-var myCollection = new Vue(vNode)
+var myCollection = new Vue(vNode)

+ 83 - 0
src/web/staticres/common-module/collection/js/index.js

@@ -1,3 +1,7 @@
+var inInjectBI = utils.getParam('report') === 'bi' // 是否bi嵌入
+if (inInjectBI) {
+  $('.j-header.jy-app-header').hide()
+}
 var vNode = {
   delimiters: ['${', '}'],
   el: '#myCollection',
@@ -10,6 +14,10 @@ var vNode = {
   },
   data: {
     sessStorageKey: '$data-collection',
+    inInjectBI: inInjectBI,
+    bi: {
+        addedIds: []
+    },
     listState: {
       value: '',
       loading: false,
@@ -91,6 +99,9 @@ var vNode = {
     lid: '' // 获取从三级也跳转的id
   },
   computed: {
+    biEnv: function () {
+      return this.inInjectBI
+    },
     getParamsStatus () {
       return this.limitlist.label=='' && this.limitlist.selectTime=='' && this.limitlist.buyerclass=='' && this.limitlist.buyerPhone==0 && this.limitlist.winnerPhone==0 && this.limitlist.pageNum==1
     }
@@ -102,6 +113,9 @@ var vNode = {
       lid = decodeURIComponent(lid)
       this.getTagsList(lid)
     }
+    if (this.biEnv) {
+      this.getBiAddedProjects()
+    }
     if (!recover) {
       if(!lid) {
         this.getList()
@@ -284,6 +298,9 @@ var vNode = {
             _this.$toast(res.error_msg)
           }
         },
+        complete: function () {
+          _this.checkAddedState()
+        },
         error: function(err){
           _this.listState.loading = true
           _this.listState.finished = true;
@@ -501,6 +518,72 @@ var vNode = {
           }
         })
       }
+    },
+    getBiAddedProjects: function () {
+      $.ajax({
+        url: '/jyapi/biService/getInfoId',
+        type: 'POST',
+        success: function (res) {
+          if (res && res.error_code === 0 && $.isArray(res.data)) {
+            this.bi.addedIds = res.data
+            this.checkAddedState()
+          }
+        }.bind(this)
+      })
+    },
+    checkAddedState: function () {
+      var _this = this
+      var addedIds = this.bi.addedIds || []
+      if (!$.isArray(addedIds)) return
+      if (addedIds.length === 0) return
+      this.listState.list.forEach(function (item) {
+        var added = addedIds.indexOf(item._id) !== -1
+        _this.$set(item, 'added', added)
+      })
+    },
+    // 单个添加
+    biAddProject: function (item) {
+      if (item.added) return
+      const id = item._id
+      if (!id) return
+      this.biBatchAddRequest([id])
+    },
+    // bi下批量操作
+    biBatchAddSelected: function () {
+      var ids = selectDataIds
+      if (!$.isArray(ids)) return
+      if (ids.length === 0) {
+        return this.$toast('请选择要添加的信息')
+      }
+      this.biBatchAddRequest(ids)
+    },
+    biBatchAddRequest: function (ids) {
+      const loading = this.$toast.loading({
+        forbidClick: true
+      })
+      var _this = this
+      var data = {
+        info_id: ids.join(','),
+        source: 1
+      }
+      $.ajax({
+        url: '/jyapi/biService/addProject',
+        type: 'POST',
+        contentType: 'application/json',
+        data: JSON.stringify(data),
+        success: function (res) {
+          if (res.error_code === 0 && res.data.status === 1) {
+            loading.clear()
+            _this.getBiAddedProjects()
+            _this.$toast('添加成功')
+          } else {
+            _this.$toast(res.error_msg || '添加失败')
+          }
+        },
+        error: function () {
+          loading.clear()
+        }
+      })
     }
   }
 }

+ 190 - 0
src/web/staticres/common-module/share/css/invite-friends.css

@@ -0,0 +1,190 @@
+.share-buttons {
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  padding: .64rem 0 .84rem;
+  background-color: #fff;
+}
+.share-button {
+  margin: 0 .2rem;
+}
+.van-share-sheet__name {
+  color: #444;
+  font-size: .28rem;
+}
+
+.van-popup {
+  background-color: transparent;
+}
+.van-popup img {
+  display: block;
+  width: 100%;
+}
+.qr-container {
+  background: #fff;
+  border: 1px solid rgba(0, 0, 0, 0.1);
+  border-radius: .08rem;
+  overflow: hidden;
+}
+.qr-container-mini {
+  width: 1.28rem;
+  height: 1.28rem;
+}
+
+.poster-card-container {
+  position: relative;
+  bottom: -0.32rem;
+  margin: 0 auto;
+  width: 6rem;
+  z-index: 2;
+}
+.poster-card {
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+  min-height: 10.24rem;
+  border-radius: .32rem;
+  overflow: hidden;
+}
+.poster-card-hd {
+  position: relative;
+  flex: 1;
+  width: 6rem;
+}
+.poster-swiper {
+  width: 100%;
+  position: relative;
+}
+.poster-swiper .van-swipe-item {
+
+}
+
+.poster-card-hd .indicator-container {
+  display: none;
+}
+.swiper-arrow {
+  position: absolute;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  top: 50%;
+  width: .52rem;
+  height: .76rem;
+  color: rgba(255, 255, 255, 0.8);;
+  font-size: .32rem;
+  transform: translate(0,-50%);
+  background-color: rgba(0, 0, 0, 0.6);
+  z-index: 2;
+}
+.swiper-arrow__left {
+  padding-right: .08rem;
+  left: 0;
+  border-radius: 0 .4rem .4rem 0;
+}
+.swiper-arrow__right {
+  padding-left: .08rem;
+  right: 0;
+  border-radius: .4rem 0 0 .4rem;
+}
+.poster-tip-container {
+  position: absolute;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  padding: .16rem .64rem;
+  white-space: nowrap;
+  color: #fff;
+  background-color: rgba(0, 0, 0, 0.65);
+  border-radius: .4rem;
+  left: 50%;
+  bottom: .06rem;
+  transform: translate(-50%,0);
+  z-index: 2;
+}
+.poster-card-mask {
+  position: absolute;
+  top: 0;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  z-index: 2;
+}
+.float-swiper-arrow .swiper-arrow {
+  top: 39%;
+  width: .54rem;
+  height: .92rem;
+  background-color: transparent;
+  border-radius: none;
+}
+.poster-card-ft {
+  position: relative;
+  display: flex;
+  align-items: center;
+  min-height: 1.76rem;
+  padding: 0.24rem;
+  padding-bottom: 0.72rem;
+  background: linear-gradient(180deg, #FFFFFF 0%, #E9FCFD 100%);
+}
+.user-share-info-container {
+  display: flex;
+  align-items: center;
+  padding: .24rem .32rem;
+}
+.user-info-container {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  flex: 1;
+}
+.user-avatar-container {
+  width: .96rem;
+  height: .96rem;
+  border-radius: 50%;
+  overflow: hidden;
+}
+
+.user-info-content {
+  margin-left: 0.16rem;
+  /*margin-right: .24rem;*/
+  flex: 1;
+}
+.user-info-content .user-name {
+  font-size: .28rem;
+  line-height: .48rem;
+  color: #1D1D1D;
+}
+.user-info-content-text {
+  margin-top: .12rem;
+  font-size: .24rem;
+  line-height: .36rem;
+  color: #686868;
+}
+.create-poster-tip-container {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  position: absolute;
+  width: 100%;
+  bottom: 0;
+  left: 0;
+}
+.create-poster-tip {
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  margin: 0 auto;
+  width: 4.6rem;
+  height: 0.48rem;
+  font-size: .24rem;
+  line-height: .36rem;
+  color: #fff;
+  background: url(/common-module/share/img/blue-radius-bj.png) no-repeat center 0;
+  background-size: contain;
+}
+
+.wx .van-popup--bottom {
+  top: 0.5rem;
+}
+.wx .van-share-sheet__options {
+  display: none;
+}

二进制
src/web/staticres/common-module/share/img/blue-radius-bj.png


二进制
src/web/staticres/common-module/share/img/explorer.png


二进制
src/web/staticres/common-module/share/img/learner.png


二进制
src/web/staticres/common-module/share/img/master.png


+ 299 - 0
src/web/staticres/common-module/share/js/invite-friends.js

@@ -0,0 +1,299 @@
+var confMap = {
+    'bi-report': {
+        userInfoContentText: '微信扫码 查看我的年终报告<br >新用户领取送500剑鱼币',
+        swiperSlideList: [
+            {
+                name: '开拓者',
+                url: '/common-module/share/img/explorer.png'
+            },
+            {
+                name: '学习达人',
+                url: '/common-module/share/img/learner.png'
+            },
+            {
+                name: '投标达人',
+                url: '/common-module/share/img/master.png'
+            },
+        ],
+    }
+}
+var shareContent = new Vue({
+    el: '#app',
+    delimiters: ['{', '}'],
+    data: function () {
+        return {
+            type: 'bi-report', // 默认显示bi-report
+            popupShow: true,
+            conf: {
+                userInfoContentText: '',
+                swiperSlideList: [],
+            },
+            shareOptions: [
+                {
+                    id: 1,
+                    name: '微信朋友',
+                    icon: '/jyapp/share/img/wechat.png',
+                },
+                {
+                    id: 3,
+                    name: '朋友圈',
+                    icon: '/jyapp/share/img/friend.png',
+
+                },
+            ],
+            shareInfo: {
+                erUrl: '',
+                shareId: '',
+                shareLink: '',
+            },
+            userInfo: {
+                headImage: '',
+                name: '',
+                nickName: '',
+                phone: '',
+                userId: '',
+            },
+            activeSwiperIndex: 0,
+            maskTouchTimer: null,
+            createImg: {
+                src: ''
+            }
+        }
+    },
+    computed: {
+        swiperSlideList: function () {
+            var list = this.conf.swiperSlideList
+            if (list) {
+                return list
+            } else {
+                return []
+            }
+        },
+        activeSwiperSlide: function () {
+            return this.swiperSlideList[this.activeSwiperIndex]
+        },
+        activeSwiperName: function () {
+            if (this.activeSwiperSlide) {
+                return this.activeSwiperSlide.name
+            } else {
+                return ''
+            }
+        },
+        qrImg: function () {
+            var base64 = this.shareInfo.erUrl
+            if (base64) {
+                return 'data:image/png;base64,' + base64
+            } else {
+                return ''
+            }
+        },
+    },
+    created: function () {
+        var type = utils.getParam('type')
+        if (type) {
+            this.type = type
+        }
+        this.mergeConfig(type)
+        this.getUserInfo()
+        this.getShareInfo()
+    },
+    mounted: function () {
+      this.$nextTick(this.changeView.bind(this))
+    },
+    methods: {
+        imgOnLoadOfWx: function () {
+          this.changeView()
+          this.createPoster()
+        },
+        changeView: function () {
+          this.$refs.swiper.resize()
+        },
+        mergeConfig: function () {
+            var config = confMap[this.type]
+            if (config) {
+                Object.assign(this.conf, config)
+            } else {
+                this.dialogVisible = false
+            }
+        },
+        getShareInfo: function () {
+            var _this = this
+            $.ajax({
+                url: '/publicapply/shareFission/reportInfo',
+                type: 'GET',
+                success: function (res) {
+                    if (res && res.data) {
+                        Object.assign(_this.shareInfo, res.data)
+                        _this.initWxShare()
+                    }
+                }
+            })
+        },
+        initWxShare: function () {
+          if (!utils.isWeiXinBrowser) { return }
+          shareFn.init({
+            title: '「我的剑鱼标讯2022」年度总结已经生成,请查收',
+            desc: '点击领取你的年度总结',
+            link: this.shareInfo.shareLink,
+            imgUrl: 'https://cdn-ali.jianyu360.com/images/appext/share-icon.png'
+          })
+        },
+        getUserInfo: function () {
+            var _this = this
+            $.ajax({
+                url: '/jypay/user/getSimpleData',
+                type: 'GET',
+                success: function (res) {
+                    if (res) {
+                        var userInfo = res
+                        if (userInfo) {
+                            if (!userInfo.headImage) {
+                                userInfo.headImage = '/images/auto.png'
+                            }
+                            Object.assign(_this.userInfo, userInfo)
+                        }
+                    }
+                }
+            })
+        },
+        swiperPrev: function () {
+            var swiper = this.$refs.swiper
+            swiper.prev()
+        },
+        swiperNext () {
+            var swiper = this.$refs.swiper
+            swiper.next()
+        },
+        createPoster: function () {
+            console.log('createPoster')
+            this.createImage(this.$refs.poster)
+        },
+        createImage: function (dom) {
+            var _this = this
+            html2canvas(dom, {
+                // allowTaint: true,
+                useCORS: true,
+                backgroundColor: null,
+                scale: 3,
+                imageTimeout: 30000,
+            }).then(function(canvas) {
+                var imgUrl = canvas.toDataURL('image/png');
+                if (goTemplateData.platform === 'app') {
+                  _this.doAppSaveImg(imgUrl)
+                } else {
+                  _this.doWxSaveImg(imgUrl)
+                }
+                //_this.downLoadImage(imgUrl, '剑鱼标讯')
+                // try {
+                //     EasyAlert.show("生成海报成功", undefined, 2000);
+                //
+                // } catch (e) {
+                //     EasyAlert.show("生成海报失败", undefined, 2000);
+                // }
+            })
+        },
+        doWxSaveImg: function (img) {
+          this.createImg.src = img
+        },
+        doAppSaveImg: function (img) {
+          var imgUrl = img.replace('data:image/png;base64,', '')
+          var loading = this.$toast.loading({
+            message: '保存中...',
+            forbidClick: true,
+            duration: 0
+          })
+          try {
+            JyObj.savePic(imgUrl)
+            loading.clear()
+            this.$toast('图片已经保存,快去分享吧~')
+          } catch (e) {
+            loading.clear()
+            this.$toast('保存失败')
+          }
+        },
+        downLoadImage: function (src, name) {
+            var image = new Image()
+            // 解决跨域 Canvas 污染问题
+            image.setAttribute('crossOrigin', 'anonymous')
+            image.onload = function () {
+                // 生成一个a元素
+                var a = document.createElement('a')
+                // 创建一个单击事件
+                var event = new MouseEvent('click')
+
+                // 将a的download属性设置为我们想要下载的图片名称,若name不存在则使用‘下载图片名称’作为默认名称
+                a.download = name || '下载图片名称'
+                // 将生成的URL设置为a.href属性
+                a.href = src
+                // 触发a的单击事件
+                a.dispatchEvent(event)
+            }
+            image.src = src
+        },
+        doAppShare (shareType) {
+          var shareTitle = '「我的剑鱼标讯2022」年度总结已经生成,请查收'
+          var content = '点击领取你的年度总结'
+          var link = this.shareInfo.shareLink + '?source=app_infocontentshare'
+          if (shareType === 3) {
+            link += '&qrcodeType=app_infocontent_timeline_b'
+          }
+          try {
+            JyObj.share(shareType, shareTitle, content, link)
+          } catch (e) {
+            console.warn(e)
+          }
+        },
+        doShare: function (item) {
+            this.doAppShare(item.id)
+        },
+        swiperChange: function (index) {
+            this.activeSwiperIndex = index
+            // 微信端实时切换生成图片
+            if (utils.isWeiXinBrowser) {
+              this.createPoster()
+            }
+        },
+        dialogClosed: function () {
+            // 判断窗口是不是window.open打开的
+            if (window.opener && window.opener !== window) {
+                window.close()
+            } else {
+                history.back()
+            }
+        },
+        maskTouchStart: function () {
+            var _this = this
+            clearTimeout(_this.maskTouchTimer)
+            _this.maskTouchTimer = setTimeout(function () {
+                // 处理长按事件
+                _this.maskTouchTimer = null
+                _this.createPoster()
+            }, 600)
+        },
+        maskTouchEnd: function (e) {
+            var _this = this
+            clearTimeout(_this.maskTouchTimer)
+            if (_this.maskTouchTimer !== null) {
+                // 处理单击事件
+                _this.clickEvents(e)
+            }
+        },
+        clickEvents: function (e) {
+            var target = e.target
+            var $target = $(target)
+            if ($target.length && $target.hasClass('swiper-arrow')) {
+                // 点击的是箭头
+                if ($target.hasClass('swiper-arrow__right')) {
+                    // 右箭头
+                    this.swiperNext()
+                } else if ($target.hasClass('swiper-arrow__left')) {
+                    // 左箭头
+                    this.swiperPrev()
+                }
+            }
+        },
+        closePopup: function () {
+            history.back()
+        }
+    }
+})

二进制
src/web/staticres/commonFunctions/wm-personal-reports.png


+ 15 - 0
src/web/staticres/css/common.css

@@ -175,6 +175,21 @@ a{
 .easypopup .easypopup-alert .easypopup-footer>span{
 	width: 100%;
 }
+#j-toast{
+    position: fixed;
+    left: 50%;
+    top: 50%;
+    z-index: 9999;
+    transform: translate(-50%,-50%);
+    display: flex;
+	align-items: center;
+	justify-content: center;
+	padding: 6px 12px;
+    line-height: 22px;
+    border-radius: 5px;
+    color: #fff;
+    background-color: rgba(0,0,0,0.7);
+}
 /******************/
 .hide{
 	display: none;

+ 53 - 0
src/web/staticres/css/dev2/superSearch.css

@@ -424,3 +424,56 @@
   float: left;
 }
 /* E-用户发布样式-E */
+
+/*S-BI 嵌入样式-S */
+.bi-report-inject-button {
+  display: none;
+}
+.in-bi #searchInner .publish-button,
+.in-bi #searchInner .searchHeader .searchHeader-container .control-tabBtn a#entsearch,
+.in-bi #searchInner .searchHeader .searchHeader-container .control-tabBtn a#pursearch,
+.in-bi #searchInner .searchHeader .searchHeader-container .control-tabBtn a#gysearch {
+  display: none;
+}
+.in-bi .right-tabBtn-superSearch {
+  justify-content: flex-end;
+  padding-right: 15px;
+}
+.in-bi .right-tabBtn-superSearch > * {
+  display: none;
+}
+.in-bi .right-tabBtn-superSearch .bi-report-inject-button {
+  margin-top: 12px;
+}
+.in-bi .bi-report-inject-button {
+  display: inline-block;
+  margin-left: 16px;
+  border: 1px solid #2cb7ca;
+  color: #2cb7ca;
+  background-color: #fff;
+  padding: 0 6px;
+  height: 22px;
+  line-height: 22px;
+  border-radius: 4px;
+  font-size: 14px;
+  text-align: center;
+  cursor: pointer;
+  box-sizing: content-box;
+  min-width: 42px;
+}
+.in-bi .bi-change-group > *:not(.bi-mark) {
+  display: none !important;
+}
+
+.in-bi #bid-collect,
+.in-bi .icon-collect {
+  display: none !important;
+}
+
+.in-bi .custom-checkbox[disabled] {
+  background: #edf2fc;
+  border-color: #DCDFE6;
+  cursor: not-allowed;
+}
+
+/*E-BI 嵌入样式-E */

+ 34 - 3
src/web/staticres/frontRouter/pc/collection/css/index-pc.css

@@ -107,7 +107,17 @@
     color: #2CB7CA;
     cursor: pointer;
 }
-
+/* bi 环境下样式调整 */
+.in-bi .collection-header {
+  display: none;
+}
+.in-bi .collection-container {
+  padding-top: 0;
+  background: #fff;
+}
+.in-bi .collect-list-container {
+  margin-top: 0;
+}
 .collect-list-container {
     margin-top: 28px;
 }
@@ -339,7 +349,7 @@
   padding-top: 80px;
   background: linear-gradient(to bottom, rgba(255,255,255,0),rgba(255,255,255,0.8),rgba(255,255,255,1));
   text-align: center;
-  
+
 }
 .shade-table > .look-more-btn{
   display: inline-block;
@@ -352,4 +362,25 @@
   border: 1px solid #2cb7ca;
   background: #fff;
   cursor: pointer;
-}
+}
+
+.bi-report-inject-button {
+  display: inline-block;
+  margin-left: 16px;
+  border: 1px solid #2cb7ca;
+  color: #2cb7ca;
+  background-color: #fff;
+  padding: 0 6px;
+  height: 22px;
+  line-height: 22px;
+  border-radius: 4px;
+  font-size: 14px;
+  text-align: center;
+  cursor: pointer;
+  box-sizing: content-box;
+  min-width: 42px;
+}
+/* .bi-report-inject-button[disabled] {
+  opacity: 0.6;
+  cursor: not-allowed;
+} */

+ 97 - 8
src/web/staticres/frontRouter/pc/collection/js/index-pc.js

@@ -1,4 +1,8 @@
 var selectDataIds = []
+var inInjectBI = getParam('report') === 'bi' // 是否bi嵌入
+if (inInjectBI) {
+  $('body').addClass('in-bi')
+}
 var vm = new Vue({
     el: '.search-content',
     delimiters: ['${', '}'],
@@ -12,6 +16,11 @@ var vm = new Vue({
     data: function () {
         return {
             sessKey: '$data-collection-index',
+            inInjectBI: inInjectBI,
+            bi: {
+                loading: false,
+                addedIds: []
+            },
             powerInfo: {},
             powerLoaded: false,
             toast: {
@@ -75,6 +84,9 @@ var vm = new Vue({
         }
     },
     computed: {
+        biEnv: function () {
+            return this.inInjectBI
+        },
         power: function () {
             return this.powerInfo.entniche || this.powerInfo.member || this.powerInfo.vip !== 0
         }
@@ -85,6 +97,9 @@ var vm = new Vue({
         if (tag) {
             this.urlFilterTagId = tag.split(',')
         }
+        if (this.biEnv) {
+            this.getBiAddedProjects()
+        }
         this.getPower(function () {
             if (_this.hasRestoreState()) {
                 // 等TagList请求完成后在恢复数据
@@ -215,6 +230,7 @@ var vm = new Vue({
                     }
                 }.bind(this),
                 complete: function () {
+                    this.checkAddedState()
                     this.listState.loading = false
                     this.listState.loaded = true
                 }.bind(this)
@@ -238,7 +254,7 @@ var vm = new Vue({
                 data: JSON.stringify(data),
                 success: function (res) {
                     if (res.error_code === 0 && res.data) {
-                      selectDataIds = []
+                        selectDataIds = []
                         callback && callback()
                     }
                 }.bind(this)
@@ -308,10 +324,10 @@ var vm = new Vue({
             var i = arr.length;
             while (i--) {
               if (arr[i] == ele) {
-                    return true;  
-                }  
-            }  
-            return false;  
+                    return true;
+                }
+            }
+            return false;
         },
         doQuery: function () {
             this.resetListState()
@@ -365,7 +381,7 @@ var vm = new Vue({
                 this.filterState.buyerclass = ''
                 this.powerDialogShow = true
             }
-            
+
         },
         otherFilterChange: function (t) {
             if (this.power) {
@@ -462,7 +478,10 @@ var vm = new Vue({
         },
         clearSelectState: function () {
             selectDataIds = []
-        }, 
+            this.listState.list.forEach(function (item) {
+                item.selected = selectDataIds.indexOf(item._id) !== -1
+            })
+        },
         unStarThis: function (item) {
             baiduEvent('列表页标讯收藏-星标') // 收藏按钮百度统计
             var _this = this
@@ -657,10 +676,80 @@ var vm = new Vue({
             return !!$data
         },
         onSizeChange: function (val) {
-          console.log(val)
           this.listState.pageSize = val
           this.listState.pageNum = 1
           this.onPageChange(this.listState.pageNum)
+        },
+        getBiAddedProjects: function () {
+            $.ajax({
+                url: '/jyapi/biService/getInfoId',
+                type: 'POST',
+                success: function (res) {
+                    if (res && res.error_code === 0 && $.isArray(res.data)) {
+                        this.bi.addedIds = res.data
+                        this.checkAddedState()
+                    }
+                }.bind(this)
+            })
+        },
+        checkAddedState: function () {
+            var _this = this
+            var addedIds = this.bi.addedIds || []
+            if (!$.isArray(addedIds)) return
+            if (addedIds.length === 0) return
+            this.listState.list.forEach(function (item) {
+                var added = addedIds.indexOf(item._id) !== -1
+                _this.$set(item, 'added', added)
+            })
+        },
+        // 单个添加
+        biAddProject: function (item) {
+            if (item.added) return
+            const id = item._id
+            if (!id) return
+            this.biBatchAddRequest([id])
+        },
+        // bi下批量操作
+        biBatchAddSelected: function () {
+            var ids = selectDataIds
+            if (!$.isArray(ids)) return
+            if (ids.length === 0) {
+                return this.showToast('请选择要添加的信息')
+            }
+            this.biBatchAddRequest(ids)
+        },
+        biBatchAddRequest: function (ids) {
+            if (this.bi.loading) return
+            this.bi.loading = true
+            var _this = this
+            var data = {
+                info_id: ids.join(','),
+                source: 1
+            }
+            $.ajax({
+                url: '/jyapi/biService/addProject',
+                type: 'POST',
+                contentType: 'application/json',
+                data: JSON.stringify(data),
+                success: function (res) {
+                    if (res) {
+                        if (res.error_code === 0) {
+                            if (res.data && res.data.status === 1) {
+                                _this.clearSelectState()
+                                _this.showToast('添加成功')
+                            }
+                            _this.getBiAddedProjects()
+                        } else {
+                            if (res.error_msg) {
+                                _this.showToast(res.error_msg)
+                            }
+                        }
+                    }
+                },
+                complete: function () {
+                    _this.bi.loading = false
+                }
+            })
         }
     }
 })

+ 10 - 1
src/web/staticres/js/biddingSearch.js

@@ -154,7 +154,16 @@ $(function() {
 			if($content.children().hasClass("active")) {
 				$induAll.removeClass("active");
 			} else {
-				$induAll.addClass("active");
+        /**
+         * @date 2022/12/15 山川环境嵌入搜索
+         * 选择信息类型为-招标结果
+         */
+        var inInjectBI = getParam('report') === 'bi' || (location.href.indexOf('/jylab/bi/index') !== -1)
+        if (inInjectBI) {
+          $(".bi-mark.parent-node").addClass('active')
+        } else {
+          $induAll.addClass("active");
+        }
 			}
 		})
 		/*全部点击*/

+ 11 - 1
src/web/staticres/js/common.js

@@ -70,7 +70,17 @@ function priceTime(){
     $('.custom-select').siblings().hide()
 	})
 }
-//
+function showToast (text, duration) {
+	if (!text) return
+	duration = duration || 2000
+	var _html = ""
+	_html+='<div id="j-toast"><div class="mask" style="background-color: transparent;"></div><div class="toast-container">'
+	_html+='<span>' + text + '</span></div></div>'
+	$('body').append(_html)
+	setTimeout(function(){
+		$('#j-toast').fadeOut().remove();
+	}, duration)
+}
 var EasyAlert = {
 	timeout: null,
 	waitTime: 1000,

+ 116 - 5
src/web/staticres/js/superSearch.js

@@ -141,7 +141,7 @@ $(function() {
     if($(this).attr('datahref')){
       location.href= $(this).attr('datahref')
     }
-    
+
   })
 })
 //
@@ -480,7 +480,13 @@ function appendDatas(datas,flag,isNew,onlyUpdateTable){
 				}
       }
       // 是否收藏
-      listHtml += '<i class="icon-collect" dataid="'+datas[i]._id+'"></i></div>'
+      listHtml += '<i class="icon-collect" dataid="'+datas[i]._id+'"></i>'
+      // 是否山川应用嵌入环境 添加操作按钮
+      var inInjectBI = getParam('report') === 'bi' || (location.href.indexOf('/jylab/bi/index') !== -1)
+      if (inInjectBI) {
+        listHtml += '<button class="bi-report-inject-button" data-id="'+datas[i]._id+'">添加</button>'
+      }
+      listHtml += '</div>'
 
 
       //领域化展示 商品&采购单位&中标单位
@@ -625,6 +631,11 @@ function appendDatas(datas,flag,isNew,onlyUpdateTable){
   checkVisited()
   // 生成dom之后再查询是否勾选
   getCheckList()
+  /**
+   * @date 2022/12/15 山川环境嵌入搜索
+   * 更新是否已添加状态
+   */
+  InBIInjectHooks.check()
 }
 
 function getacount(bidamount,budget){
@@ -1222,13 +1233,13 @@ function getCheckList() {
     $('.custom-checkbox').prop("checked",true)
   } else {
     $('.custom-checkbox').prop("checked",false)
-    $dom.each(function() {
+    $dom.each(function(i, dNode) {
       if(selectDataIds.length == 0) return
       selectDataIds.forEach(function(item,index) {
-        let dataid = $(this).attr('dataid')
+        let dataid = $(dNode).attr('dataid')
         if (item == dataid) {
           getSelectNum++
-          $(this).prop('checked', true)
+          $(dNode).prop('checked', true)
         }
       })
     })
@@ -1441,6 +1452,106 @@ function collectClick() {
   })
 }
 
+/**
+ * @date 2022/12/15 山川环境嵌入搜索
+ * 山川应用嵌入环境 特殊处理
+ */
+
+var InBIInjectHooks = {
+  // 已添加的标讯信息
+  ids: [],
+  // 获取已添加的标讯信息
+  getInfoIds: function () {
+    $.ajax({
+      url: '/jyapi/biService/getInfoId',
+      type: 'POST',
+      success: function (res) {
+        if (Array.isArray(res.data)) {
+          this.ids = res.data
+          this.upDateView()
+        }
+      }.bind(this)
+    })
+  },
+  // 添加标讯信息
+  setInfoId (ids) {
+    $.ajax({
+      url: '/jyapi/biService/addProject',
+      type: 'POST',
+      contentType: 'application/json',
+      data: JSON.stringify({
+        info_id: ids.join(','),
+        source: 2
+      }),
+      success: function () {
+        this.getInfoIds()
+        if (ids.length > 1) {
+          selectDataIds = []
+          $('.custom-checkbox').prop("checked", false)
+        }
+      }.bind(this)
+    })
+  },
+  // 刷新视图
+  upDateView () {
+    var _this = this
+    $(".liLuceneList").each(function () {
+      var nowId = $(this).find('.custom-checkbox').attr('dataid')
+      var hasNowId = _this.ids.indexOf(nowId) !== -1
+
+      // 刷新 dom 状态
+      $(this).find('.bi-report-inject-button').text(hasNowId ? '已添加' : '添加')
+      $(this).find('.custom-checkbox').prop('disabled', hasNowId)
+    })
+  },
+  getCheckIds () {
+    return selectDataIds || []
+  },
+  checkInBI () {
+    var inInjectBI = getParam('report') === 'bi' || (location.href.indexOf('/jylab/bi/index') !== -1)
+    return inInjectBI
+  },
+  check () {
+    if (this.checkInBI()) {
+      // 获取数据
+      this.getInfoIds()
+    }
+  },
+  inject () {
+    if (this.checkInBI()) {
+      $("body").addClass('in-iframe in-bi')
+
+      // 仅展示信息-结果类型
+      $(".bi-mark.parent-node").trigger('click')
+
+      var _this = this
+      // 添加按钮点击事件
+      $("body").on('click', '.bi-report-inject-button', function () {
+        var nowStatus = $(this).text() === '已添加'
+        if (nowStatus) {
+          return
+        }
+        var nowId = $(this).attr('data-id')
+        var isAllButton = nowId === 'all'
+        // 批量添加
+        if (isAllButton) {
+          _this.setInfoId(_this.getCheckIds())
+        } else {
+          // 单个添加
+          _this.setInfoId([nowId])
+        }
+      })
+
+      // 获取数据
+      this.getInfoIds()
+    }
+  }
+}
+
+$(function () {
+  InBIInjectHooks.inject()
+})
+
 function arrUnique(arr){
   let ojb = {};
   arr = arr.reduce(function(prevArr, currentItem) {

+ 257 - 0
src/web/staticres/share/css/invite-friends.css

@@ -0,0 +1,257 @@
+[v-cloak] {
+  display: none !important;
+}
+
+.personal-report-dialog {
+  display: inline-block;
+  width: unset;
+  background: linear-gradient(180deg, #ffffff 0%, #E9FCFD 100%);
+  box-shadow: 0px 16px 40px rgba(51, 182, 202, 0.3);
+  border-radius: 16px;
+  top: 45%;
+  left: 50%;
+  transform: translate(-50%,-50%);
+}
+.personal-report-dialog .el-dialog__header,
+.personal-report-dialog .el-dialog__body {
+  padding: 0;
+}
+
+
+.qr-container {
+  background: #FFF;
+  border: 1px solid rgba(0, 0, 0, 0.1);
+  border-radius: 12px;
+  overflow: hidden;
+}
+.qr-container img,
+.user-avatar-container img,
+.el-carousel__item img {
+  display: block;
+  width: 100%;
+}
+
+.close-icon {
+  position: absolute;
+  top: 14px;
+  right: 14px;
+  color: #fff;
+  font-size: 26px;
+  z-index: 9;
+  cursor: pointer;
+}
+
+.share-container {
+  position: relative;
+  display: flex;
+  justify-content: space-between;
+  height: 626px;
+}
+.share-container .share-left {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  flex: 1;
+  padding: 40px 60px;
+}
+.share-container .share-right {
+  width: 375px;
+}
+.share-container .share-left-title {
+  font-size: 24px;
+  line-height: 36px;
+  color: #1D1D1D;
+}
+.share-container .share-left-reward {
+  margin-top: 10px;
+  padding: 9px 32px;
+  font-size: 20px;
+  line-height: 26px;
+  text-align: center;
+  color: #FFF;
+  background: linear-gradient(92.4deg, #4DCDDE 0%, #26A4FF 100%);
+  border-radius: 30px;
+}
+.share-container .share-left-sub-title {
+  margin-top: 10px;
+  font-weight: 700;
+  font-size: 24px;
+  line-height: 40px;
+  color: #171826;
+}
+
+.qr-container-large {
+  margin: 30px 0 10px;
+  width: 200px;
+  height: 200px;
+}
+.share-left-qr-tip-container {
+  color: #1d1d1d;
+  font-size: 18px;
+  line-height: 28px;
+  text-align: center;
+}
+.share-left-qr-tip2 {
+  font-weight: 700;
+}
+.share-left-link-container {
+  margin-top: 30px;
+  text-align: center
+}
+.share-left-link-tiptext {
+  margin-bottom: 13px;
+  font-size: 16px;
+  line-height: 24px;
+  color: #2ABED1
+}
+.share-left-link {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  width: 500px;
+  height: 48px;
+  background: #fff;
+  border-radius: 30px;
+  border: 1px solid #e3e3e5;
+  text-align: center;
+  line-height: 48px;
+}
+.share-link-text {
+  width: 213px;
+  display: inline-block;
+  font-size: 14px;
+  color: #1d1d1d;
+  line-height: 22px;
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+.share-copy-link {
+  padding: 0;
+  flex-shrink: 0;
+  width: 56px;
+  height: 22px;
+  font-size: 14px;
+  color: #2cb7ca;
+  line-height: 22px;
+  margin-left: 12px;
+  background-color: transparent;
+}
+.share-link-box {
+  flex: 1;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 20px;
+}
+.share-create-picture {
+  flex-shrink: 0;
+  width: 180px;
+  height: 48px;
+  background: linear-gradient(135deg, #4cccde 0%, #25a3ff 100%);
+  border-radius: 30px;
+  font-size: 20px;
+  font-weight: bold;
+  color: #fff;
+  line-height: 28px;
+}
+.single-column-float-button {
+  position: absolute;
+  bottom: -68px;
+  left: 50%;
+  transform: translate(-50%,0);
+}
+
+.share-pic-container {
+  display: flex;
+  flex-direction: column;
+  background-color: #fff;
+  border-radius: 0 16px 16px 0;
+  overflow: hidden;
+}
+.share-pic-hd {
+  position: relative;
+  flex: 1;
+  width: 100%;
+  background-color: #430D82;
+}
+.share-pic-ft {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 24px;
+  height: 126px;
+}
+.qr-container-mini {
+  width: 80px;
+  height: 80px;
+}
+.user-info-container {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  flex: 1;
+}
+.user-avatar-container {
+  width: 48px;
+  height: 48px;
+  border-radius: 50%;
+  overflow: hidden;
+}
+.user-info-content {
+  margin: 0 24px;
+  flex: 1;
+}
+.user-info-content .user-name {
+  font-size: 16px;
+  line-height: 24px;
+  color: #1D1D1D;
+}
+.user-info-content-text {
+  margin-top: 6px;
+  font-size: 12px;
+  line-height: 18px;
+  color: #686868;
+}
+
+.select-pic-tip-container {
+  position: absolute;
+  left: 50%;
+  bottom: 16px;
+  transform: translate(-50%, 0);
+  padding: 8px 32px;
+  font-size: 14px;
+  line-height: 22px;
+  color: #fff;
+  background: rgba(0, 0, 0, 0.65);
+  border-radius: 19px;
+  white-space: nowrap;
+  z-index: 9;
+}
+
+.swiper-container,
+.swiper-container .el-carousel {
+  height: 100%;
+}
+.swiper-container .el-carousel {
+  margin-top: -1px;
+  margin-left: -1px;
+}
+.swiper-container .el-carousel__arrow {
+  width: 38px;
+  height: 38px;
+  background: rgba(0, 0, 0, 0.6);
+}
+.swiper-container .el-carousel__arrow.el-carousel__arrow--left {
+  left: -8px;
+  border-radius: 0px 20px 20px 0px;
+}
+.swiper-container .el-carousel__arrow.el-carousel__arrow--right {
+  right: -8px;
+  border-radius: 20px 0 0 20px;
+}
+
+.single-column .share-pic-container {
+  border-radius: 16px;
+}
+

二进制
src/web/staticres/share/img/bi-report/explorer.png


二进制
src/web/staticres/share/img/bi-report/learner.png


二进制
src/web/staticres/share/img/bi-report/master.png


+ 207 - 0
src/web/staticres/share/js/invite-friends.js

@@ -0,0 +1,207 @@
+var confMap = {
+    'bi-report': {
+        leftTitle: '邀好友一起开启年终报告 汇报更轻松',
+        leftSubTitle: '你分享 我送礼',
+        leftRewardText: '新用户领取送500剑鱼币',
+        leftShareLinkTipText: '你的努力,值得被看见。将链接或海报分享到朋友圈/好友',
+        userInfoContentText: '微信扫码 查看我的年终报告<br>新用户领取送500剑鱼币',
+        showShareLeft: false,
+        swiperSlideList: [
+            {
+                name: '开拓者',
+                url: '/share/img/bi-report/explorer.png'
+            },
+            {
+                name: '学习达人',
+                url: '/share/img/bi-report/learner.png'
+            },
+            {
+                name: '投标达人',
+                url: '/share/img/bi-report/master.png'
+            },
+        ],
+    }
+}
+var shareContent = new Vue({
+    el: '.share-section',
+    delimiters: ['{', '}'],
+    data: function () {
+        return {
+            type: 'bi-report', // 默认显示bi-report
+            dialogVisible: true,
+            conf: {
+                showShareLeft: false,
+                leftTitle: '',
+                leftSubTitle: '',
+                leftRewardText: '',
+                leftShareLinkTipText: '',
+                userInfoContentText: '',
+                swiperSlideList: [],
+            },
+            shareInfo: {
+                erUrl: '',
+                shareId: '',
+                shareLink: '',
+            },
+            userInfo: {
+                headImage: '',
+                name: '',
+                nickName: '',
+                phone: '',
+                userId: '',
+            },
+            activeSwiperIndex: 0,
+        }
+    },
+    computed: {
+        showShareLeft: function () {
+            return this.conf.showShareLeft
+        },
+        swiperSlideList: function () {
+            var list = this.conf.swiperSlideList
+            if (list) {
+                return list
+            } else {
+                return []
+            }
+        },
+        copyTextComputed: function () {
+            return this.shareInfo.shareLink
+        },
+        carouselArrowShow: function () {
+            if (this.swiperSlideList.length > 1) {
+                return 'always'
+            } else {
+                return 'never'
+            }
+        },
+        activeSwiperSlide: function () {
+            return this.swiperSlideList[this.activeSwiperIndex]
+        },
+        activeSwiperName: function () {
+            if (this.activeSwiperSlide) {
+                return this.activeSwiperSlide.name
+            } else {
+                return ''
+            }
+        },
+        qrImg: function () {
+            var base64 = this.shareInfo.erUrl
+            if (base64) {
+                return 'data:image/png;base64,' + base64
+            } else {
+                return ''
+            }
+        },
+    },
+    created: function () {
+        var type = getParam('type')
+        if (type) {
+            this.type = type
+        }
+        this.mergeConfig(type)
+        window.getUserInfoCallback = this.getUserInfoCallback
+        this.getShareInfo()
+    },
+    mounted: function () {
+        setTimeout(this.changeView, 100)
+    },
+    methods: {
+        mergeConfig: function () {
+            var config = confMap[this.type]
+            if (config) {
+                Object.assign(this.conf, config)
+            } else {
+                this.dialogVisible = false
+            }
+        },
+        getShareInfo: function () {
+            var _this = this
+            $.ajax({
+                url: '/publicapply/shareFission/reportInfo',
+                type: 'GET',
+                success: function (res) {
+                    if (res && res.data) {
+                        Object.assign(_this.shareInfo, res.data)
+                    }
+                }
+            })
+        },
+        getUserInfoCallback: function () {
+            var userInfo = ajaxUserInfo
+            if (userInfo) {
+                if (!userInfo.headImage) {
+                    userInfo.headImage = '/images/auto.png'
+                }
+                Object.assign(this.userInfo, userInfo)
+            }
+        },
+        changeView: function () {
+            $('.swiper-container .el-carousel__arrow').attr('data-html2canvas-ignore', '')
+        },
+        copyLink: function () {
+            this.copyText(this.copyTextComputed)
+            showToast('复制成功')
+        },
+        copyText (text) {
+            const input = document.createElement('input') // js创建一个input输入框
+            input.value = text // 将需要复制的文本赋值到创建的input输入框中
+            document.body.appendChild(input) // 将输入框暂时创建到实例里面
+            input.select() // 选中输入框中的内容
+            document.execCommand('copy') // 执行复制操作
+            document.body.removeChild(input) // 最后删除实例中临时创建的input输入框,完成复制操作
+        },
+        createPoster: function () {
+            this.createImage(this.$refs.poster)
+        },
+        createImage: function (dom) {
+            var _this = this
+            html2canvas(dom, {
+                // allowTaint: true,
+                useCORS: true,
+                backgroundColor: null,
+                scale: 3,
+                imageTimeout: 30000,
+            }).then(function(canvas) {
+                var imgUrl = canvas.toDataURL('image/png');
+                _this.downLoadImage(imgUrl, '剑鱼标讯')
+                try {
+                    EasyAlert.show("生成海报成功", undefined, 2000);
+
+                } catch (e) {
+                    EasyAlert.show("生成海报失败", undefined, 2000);
+                }
+            })
+        },
+        downLoadImage: function (src, name) {
+            var image = new Image()
+            // 解决跨域 Canvas 污染问题
+            image.setAttribute('crossOrigin', 'anonymous')
+            image.onload = function () {
+                // 生成一个a元素
+                var a = document.createElement('a')
+                // 创建一个单击事件
+                var event = new MouseEvent('click')
+
+                // 将a的download属性设置为我们想要下载的图片名称,若name不存在则使用‘下载图片名称’作为默认名称
+                a.download = name || '下载图片名称'
+                // 将生成的URL设置为a.href属性
+                a.href = src
+                // 触发a的单击事件
+                a.dispatchEvent(event)
+            }
+            image.src = src
+        },
+        swiperChange: function (index) {
+            this.activeSwiperIndex = index
+        },
+        dialogClosed: function () {
+            // 判断窗口是不是window.open打开的
+            if (window.opener && window.opener !== window) {
+                window.close()
+            } else {
+                history.back()
+            }
+        },
+    }
+})

+ 83 - 7
src/web/templates/big-member/wx/page_pro_follow_list.html

@@ -24,7 +24,7 @@
     {{include "/big-member/wx/header.html"}}
     <!--S-Vue-->
     <div class="j-main" id="v-node" v-cloak>
-        <div class="j-main nofomain" v-if="foShow">
+        <div class="j-main nofomain" v-show="foShow">
             <div class="nofollow">
                 <div class="noimg">
                     <img src="/big-member/image/img-empty.png" alt="">
@@ -34,7 +34,7 @@
             </div>
         </div>
         <div class="j-container" v-if="!foShow">
-            <div class="freeShow" v-if="!isbigvip">
+            <div class="freeShow" v-if="!isbigvip && !biEnv">
               <div class="purchase_in">
                 <div class="pur_text">购买大会员,最多关注500个项目</div>
                 <div class="pur_btn" @click="toBuy()">立即购买</div>
@@ -48,7 +48,12 @@
                     @load="getProjectList"
                 >
                     <div class="followList" :class="{ visited: item.visited }" v-for="(item,index) in list" :key="index" @click="followView(item.fid,item.sid,item)">
-                        <p class="pro_title visited-hd">${item.title}</p>
+                        <div class="article-item-hd">
+                            <p class="pro_title visited-hd">${item.title}</p>
+                            <span class="right-actions">
+                                <button class="bi-report-inject-button" :disabled="item.added" v-if="biEnv" @click.prevent.stop="biAddProject(item)">${ item.added ? '已添加' : '添加' }</button>
+                            </span>
+                        </div>
                         <div class="pro_tags">
                             <div class="tag_left">
                                 <span class="tag_text visited-ft" v-if="item.area!==''&&item.area!==null">${item.area}</span>
@@ -69,7 +74,7 @@
                 </div>
             </div>
             <div class="j-footer">
-                <div class="j-button-group">
+                <div class="j-button-group" v-if="!biEnv">
                     <div class="j-button-manycancel" @click="manycancel()">批量取消关注30天无更新的项目</div>
                 </div>
             </div>
@@ -96,6 +101,7 @@
 <!--E-当前页面的资源-->
 <!--小于100行同css,减少请求数-->
 <script>
+    var inInjectBI = utils.getParam('report') === 'bi' // 是否bi嵌入
     var vNode = {
         delimiters: ['${', '}'],
         el: '#v-node',
@@ -109,13 +115,25 @@
             fid:'',//关注后的加密id
             isbigvip:false, // 是否是大会员
             pageNum:0,
+            inInjectBI: inInjectBI,
+            bi: {
+                addedIds: []
+            },
             isFree:false
         },
+        computed: {
+            biEnv: function () {
+                return this.inInjectBI
+            },
+        },
         created () {
             var recover = this.recover()
             if (!recover) {
                 this.isOpening()
             }
+            if (this.biEnv) {
+                this.getBiAddedProjects()
+            }
             // 取消关注重新赋值list
             var isCancel = sessionStorage.getItem('isCancel')
             if(isCancel){
@@ -251,9 +269,10 @@
                         } else {
                             _this.$toast(res.error_msg)
                         }
-
-
-                    }
+                    },
+                    complete: function () {
+                        _this.checkAddedState()
+                    },
                 })
             },
             followView:function(fid,sid,item) {
@@ -328,6 +347,63 @@
             },
             toBuy:function () {
               location.href = '/big/wx/page/landingPage'
+            },
+            getBiAddedProjects: function () {
+                $.ajax({
+                    url: '/jyapi/biService/getInfoId',
+                    type: 'POST',
+                    success: function (res) {
+                        if (res && res.error_code === 0 && $.isArray(res.data)) {
+                            this.bi.addedIds = res.data
+                            this.checkAddedState()
+                        }
+                    }.bind(this)
+                })
+            },
+            checkAddedState: function () {
+                var _this = this
+                var addedIds = this.bi.addedIds || []
+                if (!$.isArray(addedIds)) return
+                if (addedIds.length === 0) return
+                this.list.forEach(function (item) {
+                    var added = addedIds.indexOf(item.sid) !== -1
+                    _this.$set(item, 'added', added)
+                })
+            },
+            // 单个添加
+            biAddProject: function (item) {
+                if (item.added) return
+                const id = item.sid
+                if (!id) return
+                this.biBatchAddRequest([id])
+            },
+            biBatchAddRequest: function (ids) {
+                const loading = this.$toast.loading({
+                    forbidClick: true
+                })
+                var _this = this
+                var data = {
+                    info_id: ids.join(','),
+                    source: 3
+                }
+                $.ajax({
+                    url: '/jyapi/biService/addProject',
+                    type: 'POST',
+                    contentType: 'application/json',
+                    data: JSON.stringify(data),
+                    success: function (res) {
+                        if (res.error_code === 0 && res.data.status === 1) {
+                            loading.clear()
+                            _this.getBiAddedProjects()
+                            _this.$toast('添加成功')
+                        } else {
+                            _this.$toast(res.error_msg || '添加失败')
+                        }
+                    },
+                    error: function () {
+                        loading.clear()
+                    }
+                })
             }
         }
     }

+ 12 - 5
src/web/templates/frontRouter/pc/collection/sess/index.html

@@ -41,7 +41,7 @@
             <h3 class="tab-title">标讯收藏</h3>
         </div>
         <div class="search-content w" v-cloak>
-            <div class="selector-card-container search-filters">
+            <div class="selector-card-container search-filters" v-if="!biEnv">
                 <div class="selector-card">
                     <div class="selector-card-header">个人标签:</div>
                     <div class="selector-card-content tag-list-container">
@@ -150,7 +150,13 @@
                             <el-checkbox v-model="currentPageAllChecked" @change="allCheckboxChange"></el-checkbox>
                             <div class="list-title">标讯收藏</div>
                         </div>
-                        <div class="right flex">
+                        <div class="right flex" v-if="biEnv">
+                            <div class="icon-box flex" @click="biBatchAddSelected">
+                                <!-- <span class="j-icon icon-star"></span> -->
+                                <span class="icon-text">批量添加</span>
+                            </div>
+                        </div>
+                        <div class="right flex" v-else>
                             <div class="right-line flex">
                                 <div class="icon-box flex" @click="changeListType('line')" :class="listState.listType === 'line' ? 'active' : ''">
                                     <span class="j-icon" :class="listState.listType === 'line' ? 'icon-list-active' : 'icon-list'"></span>
@@ -176,7 +182,7 @@
                     <div class="list collect-line-list" v-loading="listState.loading" v-show="listState.listType === 'line'">
                         <div class="list-item flex" :class="{ visited: item.visited }" v-for="(item, index) in listState.list" :key="item._id">
                             <div class="pre-container flex visited-hd">
-                                <el-checkbox v-model="item.selected" @change="listItemCheckboxChange(item._id, item.selected)"></el-checkbox>
+                                <el-checkbox v-model="item.selected" :disabled="item.added" @change="listItemCheckboxChange(item._id, item.selected)"></el-checkbox>
                                 <div v-if="item.site === '剑鱼信息发布平台' || item.spidercode === 'a_jyxxfbpt_gg'" class="yhfb">用户发布</div>
                                 <div class="list-index">${ item.index }. </div>
                             </div>
@@ -189,7 +195,8 @@
                                 ></article-item-component>
                             </div>
                             <div class="append-container">
-                                <span class="j-icon" :class="item.star ? 'icon-star-active' : 'icon-star'" @click.prevent.stop="unStarThis(item)"></span>
+                                <button class="bi-report-inject-button" :disabled="item.added" v-if="biEnv" @click.prevent.stop="biAddProject(item)">${ item.added ? '已添加' : '添加' }</button>
+                                <span class="j-icon" v-if="!biEnv" :class="item.star ? 'icon-star-active' : 'icon-star'" @click.prevent.stop="unStarThis(item)"></span>
                             </div>
                         </div>
                         <no-data style="display: none;" v-show="listState.list.length === 0 && listState.loaded" tip-text="暂未收藏标讯"></no-data>
@@ -305,7 +312,7 @@
 
     <script src="https://cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js"></script>
     <script src="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.13-rc/lib/index.js"></script>
-    <script src="{{Msg "seo" "cdn"}}/big-member/js/utils.js?v={{Msg "seo" "version"}}"></script>
+    <script src='{{Msg "seo" "cdn"}}/big-member/js/utils.js?v={{Msg "seo" "version"}}'></script>
     <script>
         haslogin({{.T.logid}})
         function baiduEvent(name) {

+ 17 - 0
src/web/templates/frontRouter/pc/page_big_pc/sess/index.html

@@ -40,6 +40,16 @@
             border-bottom: 1px solid #e0e0e0;
             background: #fff;
         }
+        .page--docs--index.in-bi .page--potential .for_header {
+          display: none;
+        }
+        .page--docs--index.in-bi .page--potential .for_main {
+          top: 0;
+          margin-top: -17px;
+        }
+        .page--docs--index.in-bi .page-container {
+          padding-top: 0;
+        }
         .page--docs--index .page-container {
             min-height: calc(100vh - 364px);
             padding-top: 64px;
@@ -93,6 +103,13 @@
     $(function () {
         haslogin({{.T.logid}});
     })
+    /**
+     * @date 2022/12/28 山川环境嵌入搜索
+     */
+    var inInjectBI = getParam('report') === 'bi'
+    if (inInjectBI) {
+      $('body').addClass('in-bi')
+    }
 </script>
 <!--S-百度统计-->
 {{include "/common/pcbottom.html"}}

+ 107 - 0
src/web/templates/frontRouter/pc/share/sess/invite-friends.html

@@ -0,0 +1,107 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+    <title>邀请领好礼</title>
+    <meta content="IE=edge,Chrome=1" http-equiv="X-UA-Compatible" />
+    <meta name="keywords" content="招标订阅,招标项目,中标项目,招标信息,剑鱼标讯,年终报告"  />
+    <meta name="description" content="使用剑鱼标讯,可以精准匹配招标信息,只需要微信关注剑鱼标讯公众号,然后自行设定所关注的招标关键词和地区,满足订阅需求的招标信息就会在两个小时内自动推送。" />
+    <meta name="renderer" content="webkit" />
+    <meta name="format-detection" content="telephone=no" />
+    <meta name="enable-header" content="个人年终报告" theme="light" />
+    {{include "/common/pnc.html"}}
+    <link href='{{Msg "seo" "cdn"}}/css/reset.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css" />
+    <link href='{{Msg "seo" "cdn"}}/pccss/reset_pc.css' rel="stylesheet" type="text/css" />
+    <link href='{{Msg "seo" "cdn"}}/css/pc.css?v={{Msg "seo" "version"}}' rel="stylesheet" />
+    <link href='{{Msg "seo" "cdn"}}/pccss/public-nav-1200.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css" />
+    <link href="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/theme-chalk/index.css" rel="stylesheet" />
+    <link href='{{Msg "seo" "cdn"}}/share/css/invite-friends.css?v={{Msg "seo" "version"}}' rel="stylesheet" type="text/css" />
+    <style>
+        .public-nav,
+        .j-bottom,
+        .right-side-box {
+            display: none!important;
+        }
+    </style>
+</head>
+
+<body class="page--personal-report">
+    {{include "/common/pchead.html"}}
+    <!-- S-注入  -->
+    <section class="share-section" v-cloak>
+        <el-dialog
+            :visible.sync="dialogVisible"
+            custom-class="personal-report-dialog"
+            top="0"
+            :show-close="false"
+            @closed="dialogClosed">
+            <div class="share-container" :class="{ 'single-column': !showShareLeft }">
+                <div class="close-icon" @click="dialogVisible=false">
+                    <i class="el-icon-circle-close"></i>
+                </div>
+                <button class="share-create-picture single-column-float-button" v-if="!showShareLeft" @click="createPoster">生成海报</button>
+                <div class="share-left" v-if="showShareLeft">
+                    <h2 class="share-left-title" v-text="conf.leftTitle"></h2>
+                    <div class="share-left-reward" v-text="conf.leftRewardText"></div>
+                    <h1 class="share-left-sub-title" v-text="conf.leftSubTitle"></h1>
+                    <div class="qr-container qr-container-large" title="分享二维码">
+                        <img name="share-qr" :src="qrImg" alt="分享二维码">
+                    </div>
+                    <div class="share-left-qr-tip-container">
+                        <p class="share-left-qr-tip1">微信扫描专属二维码</p>
+                        <p class="share-left-qr-tip2">打开页面并分享</p>
+                    </div>
+                    <div class="share-left-link-container">
+                        <p class="share-left-link-tiptext" v-text="conf.leftShareLinkTipText"></p>
+                        <div class="share-left-link">
+                            <div class="share-link-box">
+                                <div class="share-link-text" v-text="shareInfo.shareLink"></div>
+                                <button class="share-copy-link" @click="copyLink">复制链接</button>
+                            </div>
+                            <button class="share-create-picture" @click="createPoster">生成海报</button>
+                        </div>
+                    </div>
+                </div>
+                <div class="share-right share-pic-container" ref="poster">
+                    <div class="share-pic-hd">
+                        <div class="swiper-container">
+                            <el-carousel :arrow="carouselArrowShow" :autoplay="false" height="100%" indicator-position="none" @change="swiperChange">
+                                <el-carousel-item v-for="(item, index) in swiperSlideList" :key="index">
+                                  <img :src="item.url" :alt="item.name">
+                                </el-carousel-item>
+                            </el-carousel>
+                        </div>
+                        <div class="select-pic-tip-container" v-if="swiperSlideList.length > 1" data-html2canvas-ignore>可选择画面,将以此画面生成海报</div>
+                    </div>
+                    <div class="share-pic-ft">
+                        <div class="user-info-container">
+                            <div class="user-avatar-container">
+                                <img name="user-avatar" :src="userInfo.headImage" alt="用户头像" />
+                            </div>
+                            <div class="user-info-content">
+                                <p class="user-name" v-text="userInfo.nickName"></p>
+                                <span class="user-info-content-text" v-html="conf.userInfoContentText"></span>
+                            </div>
+                        </div>
+                        <div class="qr-container qr-container-mini" title="分享二维码">
+                            <img name="share-qr" :src="qrImg" alt="分享二维码">
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </el-dialog>
+    </section>
+    <script src='{{Msg "seo" "cdn"}}/js/jquery.cookie.js?v={{Msg "seo" "version"}}' type="text/javascript"></script>
+    <script src='{{Msg "seo" "cdn"}}/js/public-nav.js?v={{Msg "seo" "version"}}' type="text/javascript" ></script>
+    <script src="//cdn-common.jianyu360.com/cdn/lib/vue/2.6.14/vue.min.js"></script>
+    <script src="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/index.js"></script>
+    <script src="https://cdn-common.jianyu360.com/cdn/lib/clipboard/2.0.8/dist/clipboard.min.js"></script>
+    <script src="https://cdn-common.jianyu360.com/cdn/lib/html2canvas/1.3.3/dist/html2canvas.min.js" crossorigin></script>
+    <script src='{{Msg "seo" "cdn"}}/share/js/invite-friends.js?v={{Msg "seo" "version"}}' type="text/javascript" ></script>
+    <!--S-百度统计-->
+    {{include "/common/pcbottom.html"}}
+    {{include "/common/baiducc.html"}}
+    <!--E-百度统计-->
+</body>
+
+</html>

+ 3 - 2
src/web/templates/frontRouter/wx/collection/sess/index.html

@@ -49,7 +49,7 @@
     <div class="j-main collection" id="myCollection" v-cloak ref="main">
       <div class="j-container" id="date-picker-other-box" v-if="!getParamsStatus||listState.list.length!==0">
         <div class="j-main">
-          <div class="search-container van-fade-an" ref="searchContainer">
+          <div class="search-container van-fade-an" ref="searchContainer" v-if="!biEnv">
             <div class="listaction">
               <div class="action_editor" @click="screenBtn">
                 <span  v-if="screenShow">筛选</span>
@@ -118,7 +118,8 @@
                     <div v-html="item.title" style="display: inline;"></div>
                   </div>
                   <div class="collec_star" @click="collecClick(event,item._id)">
-                    <span class="shoucang" v-if="condition"></span>
+                    <button class="bi-report-inject-button" :disabled="item.added" v-if="biEnv" @click.prevent.stop="biAddProject(item)">${ item.added ? '已添加' : '添加' }</button>
+                    <span class="shoucang" v-if="condition && !biEnv"></span>
                     <!-- <span class="weishoucang" v-if="!condition"></span> -->
                   </div>
                 </div>

+ 91 - 0
src/web/templates/frontRouter/wx/share/sess/invite-friends.html

@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html lang="zh-CN" style="font-size: 50px;">
+
+<head>
+  <!--引入公共资源头部-->
+  {{include "/big-member/wx/meta.html"}}
+  <title>邀请领好礼</title>
+  <!--S-当前页面的css资源-->
+  <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/reset-css/5.0.1/reset.min.css />
+  <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/index.css />
+  <link rel="stylesheet" href=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/icon/local.css />
+  <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/common-module/share/css/invite-friends.css?v={{Msg "seo" "version"}}' />
+  {{include "/big-member/wx/commonjs.html"}}
+  <script src="//res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
+  <script src='{{Msg "seo" "cdn"}}/common-module/public/js/wx-sdk-share.js?v={{Msg "seo" "version"}}'></script>
+</head>
+
+<body>
+  <div class="j-container">
+    {{include "/big-member/wx/header.html"}}
+    <div class="j-main wx" id="app" v-cloak>
+      <van-popup v-model="popupShow" position="bottom" @close="closePopup"  @click.self="closePopup">
+        <section class="poster-card-container">
+          <div class="poster-card" ref="poster">
+            <div class="poster-card-hd">
+              <van-swipe class="poster-swiper" @change="swiperChange" ref="swiper">
+                <van-swipe-item v-for="(item, index) in swiperSlideList">
+                  <img v-lazy="item.url" :src="item.url" :alt="item.name" @load="imgOnLoadOfWx">
+                </van-swipe-item>
+                <div class="indicator-container" slot="indicator">
+                  <span class="swiper-arrow swiper-arrow__left" @click="swiperPrev" v-if="swiperSlideList.length > 1" data-html2canvas-ignore>
+                    <van-icon name="arrow-left"></van-icon>
+                  </span>
+                  <span class="swiper-arrow swiper-arrow__right" @click="swiperNext" v-if="swiperSlideList.length > 1" data-html2canvas-ignore>
+                    <van-icon name="arrow"></van-icon>
+                  </span>
+                </div>
+              </van-swipe>
+              <div class="poster-tip-container" data-html2canvas-ignore v-if="swiperSlideList.length > 1">可选择画面,将以此画面生成海报</div>
+            </div>
+            <div class="poster-card-ft">
+              <div class="user-info-container">
+                <div class="user-avatar-container">
+                  <img name="user-avatar" :src="userInfo.headImage" alt="用户头像" />
+                </div>
+                <div class="user-info-content">
+                  <p class="user-name" v-text="userInfo.nickName"></p>
+                  <span class="user-info-content-text" v-html="conf.userInfoContentText"></span>
+                </div>
+              </div>
+              <div class="qr-container qr-container-mini" title="分享二维码">
+                <img name="share-qr" :src="qrImg" alt="分享二维码">
+              </div>
+              <div class="create-poster-tip-container" data-html2canvas-ignore>
+                <div class="create-poster-tip" data-html2canvas-ignore>长按图片可保存到相册</div>
+              </div>
+            </div>
+          </div>
+          <div class="poster-card poster-card-mask" @touchstart="maskTouchStart" @touchend="maskTouchEnd">
+            <img :src="createImg.src" alt="长按保存图片" style="opacity: 0">
+            <div class="indicator-container">
+              <span class="swiper-arrow swiper-arrow__left" @click="swiperPrev">
+                <i class="van-icon van-icon-arrow-left"><!----></i>
+              </span>
+              <span class="swiper-arrow swiper-arrow__right" @click="swiperNext">
+                <i class="van-icon van-icon-arrow"><!----></i>
+              </span>
+            </div>
+          </div>
+        </section>
+        <section class="van-share-sheet__options share-buttons">
+          <div class="van-share-sheet__option share-button" v-for="item in shareOptions" :key="item.id" @click="doShare(item)">
+            <div class="van-share-sheet__icon icon-box">
+              <img :src="item.icon" :alt="item.name">
+            </div>
+            <span class="van-share-sheet__name" v-text="item.name"></span>
+          </div>
+        </section>
+      </van-popup>
+    </div>
+  </div>
+  <!--S-当前页面的资源-->
+  <script src=//cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js> </script>
+  <script src=//cdn-common.jianyu360.com/cdn/lib/vant/2.12.24/lib/vant.min.js></script>
+  <script src=//cdn-common.jianyu360.com/cdn/lib/jquery/3.6.0/jquery.min.js></script>
+  <script src="//cdn-common.jianyu360.com/cdn/lib/html2canvas/1.3.3/dist/html2canvas.min.js" crossorigin></script>
+
+  <script src='{{Msg "seo" "cdn"}}/common-module/share/js/invite-friends.js?v={{Msg "seo" "version"}}'></script>
+</body>
+
+</html>

+ 22 - 12
src/web/templates/pc/supsearch.html

@@ -956,7 +956,7 @@ var IframeOnClick = {
             <div class="leftTitle">
               信息类型:
             </div>
-            <div class="info-content">
+            <div class="info-content bi-change-group">
               <span id="infoBtn" class=" active">全部</span>
               <i class="diver"></i>
               <font class="parent-node nologin-hide">拟建项目</font>
@@ -983,16 +983,16 @@ var IframeOnClick = {
               <font data-value="竞价">竞价</font>
               <font data-value="变更">变更</font>
               <i class="diver"></i>
-              <font class="parent-node">招标结果</font>
-              <font data-value="中标">中标</font>
-              <font data-value="成交">成交</font>
-              <font data-value="废标">废标</font>
-              <font data-value="流标">流标</font>
+              <font class="bi-mark parent-node">招标结果</font>
+              <font class="bi-mark" data-value="中标">中标</font>
+              <font class="bi-mark" data-value="成交">成交</font>
+              <font class="bi-mark" data-value="废标">废标</font>
+              <font class="bi-mark" data-value="流标">流标</font>
               <i class="diver"></i>
-              <font class="parent-node">招标信用信息</font>
-              <font data-value="合同">合同</font>
-              <font data-value="验收">验收</font>
-              <font data-value="违规">违规</font>
+              <font class="bi-mark parent-node">招标信用信息</font>
+              <font class="bi-mark" data-value="合同">合同</font>
+              <font class="bi-mark" data-value="验收">验收</font>
+              <font class="bi-mark" data-value="违规">违规</font>
             </div>
             <span class="remind" style="display:none;">
               <span class="remindone"></span>
@@ -1208,6 +1208,7 @@ var IframeOnClick = {
             <button id="right-export" data-need-bind-phone>数据导出</button>
             <div class="split-line"></div>
             <button id="bid-collect">标讯收藏</button>
+            <div class="bi-report-inject-button" data-id="all">添加</div>
           </div>
         </div>
         <div class="tabContainer" id="fix-tab" style="margin: 0">
@@ -1522,10 +1523,19 @@ $(function(){
     $('#sideIcon').removeClass('hide')
     searchInnerVue.$refs.areaRefs.shoWcity=true //显示地市
     searchInnerVue.islogin=true
-    if(!goTemplateData.inIframe){//不在工作桌面去工作桌面
+    /**
+     * @date 2022/12/15 山川环境嵌入搜索
+     */
+    var inInjectBI = getParam('report') === 'bi' || (location.href.indexOf('/jylab/bi/index') !== -1)
+    if (inInjectBI) {
+      return
+    }
+
+    // 不在工作桌面去工作桌面
+    if(!goTemplateData.inIframe){
       var formNode_ = $('#zbSeatchT')
       var goHref_ = location.origin + '/jylab/supsearch/index.html'
-      // window.location.replace('/page_workDesktop/work-bench/page?link=' + encodeURIComponent(goHref_ + '?' + formNode_.serialize()))
+      window.location.replace('/page_workDesktop/work-bench/page?link=' + encodeURIComponent(goHref_ + '?' + formNode_.serialize()))
     }
 
   }