فهرست منبع

Merge branch 'master' into feature/v4.8.31

lianbingjie 2 سال پیش
والد
کامیت
4d853ff90d

+ 1 - 2
src/go.mod

@@ -4,12 +4,11 @@ go 1.18
 
 require (
 	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230307011807-2ef7ef8e0c09
-	app.yhyue.com/moapp/jybase v0.0.0-20230517064222-e0bdfc8ee0e8
+	app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
 	app.yhyue.com/moapp/jypkg v0.0.0-20230530080115-eeb9ad32daf0
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
-	github.com/dchest/captcha v1.0.0
 	github.com/fsnotify/fsnotify v1.6.0
 	github.com/gogf/gf/v2 v2.3.1
 	github.com/robfig/cron v1.2.0

+ 2 - 4
src/go.sum

@@ -5,8 +5,8 @@ app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230307011807-2ef7ef8e0c09/go.mod h1:J
 app.yhyue.com/moapp/jyPoints v1.1.1/go.mod h1:SvP8p5L3jGrejHiH2LXfgCg/NPlFiKBC5Yd0gsI12FU=
 app.yhyue.com/moapp/jybase v0.0.0-20220427020729-974c1a148186/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
-app.yhyue.com/moapp/jybase v0.0.0-20230517064222-e0bdfc8ee0e8 h1:0ukFbYC7yRkFvRsr0bFCgV2SHsc1TvE+kW5MlttQEzE=
-app.yhyue.com/moapp/jybase v0.0.0-20230517064222-e0bdfc8ee0e8/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
+app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb h1:fT7FIKElKjkRHTmDxXPeNr5LWe2RmyJU+5aod1nptek=
+app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb/go.mod h1:D40Ae0rQilH8Hc5o2Vtt04Tjh/DNEFpcS3/WkJMPJb8=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
 app.yhyue.com/moapp/jypkg v0.0.0-20230530080115-eeb9ad32daf0 h1:b3CN45x2afp2mUyGJZsa01CiFfw4v4TvY0B5fbbOW78=
@@ -492,8 +492,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f/go.mod h1:QGrK8vMWWHQYQ3QU9bw9Y9OPNfxccGzfb41qjvVeXtY=
-github.com/dchest/captcha v1.0.0 h1:vw+bm/qMFvTgcjQlYVTuQBJkarm5R0YSsDKhm1HZI2o=
-github.com/dchest/captcha v1.0.0/go.mod h1:7zoElIawLp7GUMLcj54K9kbw+jEyvz2K0FDdRRYhvWo=
 github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
 github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=

+ 1 - 1
src/jfw/front/login.go

@@ -21,7 +21,7 @@ import (
 	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
-	"github.com/dchest/captcha"
+	"app.yhyue.com/moapp/jybase/dchest/captcha"
 	"go.mongodb.org/mongo-driver/bson/primitive"
 )
 

+ 1 - 1
src/jfw/front/otherAct.go

@@ -10,7 +10,7 @@ import (
 
 	util "app.yhyue.com/moapp/jybase/common"
 
-	"github.com/dchest/captcha"
+	"app.yhyue.com/moapp/jybase/dchest/captcha"
 	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 )
 

+ 1 - 1
src/jfw/modules/app/src/app/front/front.go

@@ -24,7 +24,7 @@ import (
 
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 	"github.com/SKatiyar/qr"
-	"github.com/dchest/captcha"
+	"app.yhyue.com/moapp/jybase/dchest/captcha"
 	"go.mongodb.org/mongo-driver/bson"
 )
 

+ 1 - 1
src/jfw/modules/app/src/app/front/login.go

@@ -26,7 +26,7 @@ import (
 
 	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
-	"github.com/dchest/captcha"
+	"app.yhyue.com/moapp/jybase/dchest/captcha"
 	"go.mongodb.org/mongo-driver/bson"
 )
 

+ 1 - 2
src/jfw/modules/app/src/go.mod

@@ -3,12 +3,11 @@ module jy/src/jfw/modules/app/src
 go 1.18
 
 require (
-	app.yhyue.com/moapp/jybase v0.0.0-20230517064222-e0bdfc8ee0e8
+	app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
 	app.yhyue.com/moapp/jypkg v0.0.0-20230531014856-12e9a04b5c44
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
-	github.com/dchest/captcha v1.0.0
 	github.com/gogf/gf/v2 v2.3.1
 	github.com/pkg/errors v0.9.1
 	go.mongodb.org/mongo-driver v1.11.1

+ 2 - 4
src/jfw/modules/app/src/go.sum

@@ -5,8 +5,8 @@ app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547/go.mod h1:J
 app.yhyue.com/moapp/jyPoints v1.1.1/go.mod h1:SvP8p5L3jGrejHiH2LXfgCg/NPlFiKBC5Yd0gsI12FU=
 app.yhyue.com/moapp/jybase v0.0.0-20220427020729-974c1a148186/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
-app.yhyue.com/moapp/jybase v0.0.0-20230517064222-e0bdfc8ee0e8 h1:0ukFbYC7yRkFvRsr0bFCgV2SHsc1TvE+kW5MlttQEzE=
-app.yhyue.com/moapp/jybase v0.0.0-20230517064222-e0bdfc8ee0e8/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
+app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb h1:fT7FIKElKjkRHTmDxXPeNr5LWe2RmyJU+5aod1nptek=
+app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb/go.mod h1:D40Ae0rQilH8Hc5o2Vtt04Tjh/DNEFpcS3/WkJMPJb8=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
 app.yhyue.com/moapp/jypkg v0.0.0-20230531014856-12e9a04b5c44 h1:u7Y263EJvcCZDqJTwOfT+QkVQ6sJ/ZCBZxejEk8H9cI=
@@ -492,8 +492,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f/go.mod h1:QGrK8vMWWHQYQ3QU9bw9Y9OPNfxccGzfb41qjvVeXtY=
-github.com/dchest/captcha v1.0.0 h1:vw+bm/qMFvTgcjQlYVTuQBJkarm5R0YSsDKhm1HZI2o=
-github.com/dchest/captcha v1.0.0/go.mod h1:7zoElIawLp7GUMLcj54K9kbw+jEyvz2K0FDdRRYhvWo=
 github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
 github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=

+ 11 - 8
src/jfw/modules/app/src/web/templates/big-member/page_pro_follow_detail.html

@@ -561,16 +561,17 @@
             } else {
                 this.isAddClass = true
             }
-            if (utils.getParam('fid')) {
-                this.fid = utils.getParam('fid')
+            // utils.getParam('fid') 社交分享版本发现的问题(fid有时为空且不同人打开分享链接fid不是自己的)fid不从url和缓存中取  获取从detail接口取
+            if (utils.getParam('sid')) {
+                // this.fid = utils.getParam('fid')
                 this.sid = utils.getParam('sid')
                 var objId = {
-                    fid: utils.getParam('fid'),
+                    // fid: utils.getParam('fid'),
                     sid: utils.getParam('sid')
                 }
                 sessionStorage.setItem('bigvip-fid', JSON.stringify(objId))
             } else {
-                this.fid = JSON.parse(sessionStorage.getItem('bigvip-fid')).fid
+                // this.fid = JSON.parse(sessionStorage.getItem('bigvip-fid')).fid
                 this.sid = JSON.parse(sessionStorage.getItem('bigvip-fid')).sid
             }
             this.getProDetail()
@@ -801,8 +802,8 @@
               data: JSON.stringify(params),
               success: function(res) {
                 if(res.error_code === 0) {
-                  let list = res.data.list
-                  if(!list) {list = []}
+                  let list = res.data.list ? res.data.list : []
+                  // if(!list) {list = []}
                   if (list.length > 0) {
                     _this.cbInfo.isShowRefer = true
                   } else {
@@ -1035,10 +1036,11 @@
               }
             },
             getShareParams () {
+              var params = location.href.indexOf('?') > -1 ? '&fid=' + this.fid + '&sid=' + this.sid : '?fid=' + this.fid + '&sid=' + this.sid
               this.proParams = {
                 type: '2',
                 id: this.sid,
-                referer: location.href
+                referer: location.href + params
               }
             },
             goAnalysis: function () {
@@ -1147,7 +1149,7 @@
                     url: '/bigmember/follow/project/detail',
                     data: {
                         sid: _this.sid,
-                        fid: _this.fid
+                        // fid: _this.fid
                     },
                     success: function (res) {
                         if (res.error_code == 0) {
@@ -1157,6 +1159,7 @@
                             _this.prolist = projectInfos
                             _this.projectname = projectInfos.projectname
                             _this.sid = resdata.sid
+                            _this.fid= resdata.fid
                             _this.careShow = resdata.isfollow
                             // 地区显示
                             var getAreas = ['北京', '天津', '重庆', '上海']

+ 18 - 6
src/jfw/modules/bigmember/src/service/chatShare/obtainDetails.go

@@ -8,6 +8,7 @@ import (
 	"app.yhyue.com/moapp/jybase/redis"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"app.yhyue.com/moapp/jypkg/public"
+	"encoding/hex"
 	"encoding/json"
 	"errors"
 	"fmt"
@@ -36,6 +37,7 @@ type UserPower struct {
 type ForwardData struct {
 	Label string `json:"label"`
 	Value string `json:"value"`
+	IsUrl bool   `json:"isUrl"`
 }
 
 var (
@@ -109,7 +111,7 @@ func (this *ChatShareProject) BeaconDetails() ([]ForwardData, error) {
 		isEntniche = true
 	}
 
-	return append(SignalSharing(this.GetString("id"), this.GetString("stype"), (isVip && isOldVip) || isMember || isEntniche), ForwardData{Label: signalKeys["referer"], Value: this.GetString("referer")}), nil
+	return append(SignalSharing(this.GetString("id"), this.GetString("stype"), (isVip && isOldVip) || isMember || isEntniche), ForwardData{IsUrl: true, Label: signalKeys["referer"], Value: fmt.Sprintf("/publicapply/transfer?url=%s", hex.EncodeToString([]byte(HostRemove(this.GetString("referer")))))}), nil
 }
 
 // BuyerPortrait 采购单位画像
@@ -146,7 +148,7 @@ func (this *ChatShareProject) BuyerPortrait() ([]ForwardData, error) {
 		for _, v := range buyerKey {
 			res = append(res, ForwardData{Label: buyerKeys[v], Value: qutil.InterfaceToStr(qutil.If(qutil.InterfaceToStr(rData[v]) == "", "--", rData[v]))})
 		}
-		return append(res, ForwardData{Label: buyerKeys["referer"], Value: this.GetString("referer")}), nil
+		return append(res, ForwardData{Label: buyerKeys["referer"], IsUrl: true, Value: fmt.Sprintf("/publicapply/transfer?url=%s", hex.EncodeToString([]byte(HostRemove(this.GetString("referer")))))}), nil
 	}()
 	return rData, errMsg
 }
@@ -190,7 +192,7 @@ func (this *ChatShareProject) EntDetail() ([]ForwardData, error) {
 			}
 			res = append(res, ForwardData{Label: entKeys[v], Value: qutil.InterfaceToStr(qutil.If(qutil.InterfaceToStr(entInfo[v]) == "", "--", entInfo[v]))})
 		}
-		return append(res, ForwardData{Label: entKeys["referer"], Value: this.GetString("referer")}), nil
+		return append(res, ForwardData{Label: entKeys["referer"], IsUrl: true, Value: fmt.Sprintf("/publicapply/transfer?url=%s", hex.EncodeToString([]byte(HostRemove(this.GetString("referer")))))}), nil
 	}()
 	return rData, errMsg
 }
@@ -284,7 +286,7 @@ func (this *ChatShareProject) GetProjectDetail() (res []ForwardData, err error)
 			for _, v := range projectKey {
 				res = append(res, ForwardData{Label: projectKeys[v], Value: qutil.InterfaceToStr(qutil.If(qutil.InterfaceToStr(req[v]) == "", "--", req[v]))})
 			}
-			res = append(res, ForwardData{Label: projectKeys["referer"], Value: this.GetString("referer")})
+			res = append(res, ForwardData{Label: projectKeys["referer"], IsUrl: true, Value: fmt.Sprintf("/publicapply/transfer?url=%s", hex.EncodeToString([]byte(HostRemove(this.GetString("referer")))))})
 			return
 		}
 	}
@@ -297,7 +299,7 @@ func (this *ChatShareProject) GetProjectDetail() (res []ForwardData, err error)
 	for _, v := range projectKey {
 		res = append(res, ForwardData{Label: projectKeys[v], Value: qutil.InterfaceToStr(qutil.If(finalDate[v] == nil, "--", finalDate[v]))})
 	}
-	res = append(res, ForwardData{Label: projectKeys["referer"], Value: this.GetString("referer")})
+	res = append(res, ForwardData{Label: projectKeys["referer"], IsUrl: true, Value: fmt.Sprintf("/publicapply/transfer?url=%s", hex.EncodeToString([]byte(HostRemove(this.GetString("referer")))))})
 	return
 }
 
@@ -329,6 +331,16 @@ func (this *ChatShareProject) ProposedConstruction() (res []ForwardData, err err
 		}
 		res = append(res, ForwardData{Label: constructionKeys[v], Value: qutil.InterfaceToStr(qutil.If(qutil.InterfaceToStr((*data)[0][v]) == "", "--", (*data)[0][v]))})
 	}
-	res = append(res, ForwardData{Label: constructionKeys["referer"], Value: fmt.Sprintf("https://%s/succbi/nzj/app/nzj.app/nzj_detail_1.spg?pid=%s", this.Host(), pid)})
+	res = append(res, ForwardData{Label: constructionKeys["referer"], IsUrl: true, Value: fmt.Sprintf("/publicapply/transfer?url=%s", hex.EncodeToString([]byte(fmt.Sprintf("/succbi/nzj/app/nzj.app/nzj_detail_1.spg?pid=%s", pid))))})
 	return
 }
+func HostRemove(s string) string {
+	s = strings.ReplaceAll(s, "https://", "")
+	s = strings.ReplaceAll(s, "http://", "")
+	urlArr := strings.Split(s, "/")
+	if len(urlArr) > 0 {
+		urlArr[0] = ""
+	}
+	newUrl := strings.Join(urlArr, "/")
+	return newUrl
+}

+ 13 - 13
src/jfw/modules/bigmember/src/service/follow/project.go

@@ -179,17 +179,15 @@ func (this *FollowProject) FollowDetail() {
 		if err != nil {
 			return nil, err
 		}
-		fid := util.DecodeId(this.GetString("fid")) //获取关注项目id
+		//fid := util.DecodeId(this.GetString("fid")) //获取关注项目id
 		sid := util.DecodeId(this.GetString("sid")) //获取信息id
-		if sid == "" && fid == "" {
+		if sid == "" {
 			return nil, errors.New("请求参数有误")
 		}
+		fid, _, _ := projectManager.FollowedCheck(sid)
 		//若前端未传fid,则根据sid查询获取fid
-		if fid == "" {
-			fid, _, _ = projectManager.FollowedCheck(sid)
-		}
 		var followData, projectInfo map[string]interface{}
-		if fid != "" { //已关注 查询详情
+		if fid != "" { //已关注 查询详情z
 			followData, projectInfo, err = projectManager.GetDetailByFid(fid)
 			sid = qutil.ObjToString(followData["sid"])
 			if sid != "" { //关注项目的来源信息id
@@ -204,7 +202,7 @@ func (this *FollowProject) FollowDetail() {
 			}
 		}
 		//查询结果合并
-		return mergeFollowDetail(followData, projectInfo, sid)
+		return mergeFollowDetail(followData, projectInfo, sid, fid)
 	}()
 	if errMsg != nil {
 		log.Printf("%s 项目关注详情页出错:%s\n", userId, errMsg.Error())
@@ -223,18 +221,20 @@ func GetWinnerFromProjectSet(sid string) (winner string) {
 	}
 	return
 }
-func mergeFollowDetail(followInfo, projectInfo map[string]interface{}, sid string) (map[string]interface{}, error) {
+func mergeFollowDetail(followInfo, projectInfo map[string]interface{}, sid, fid string) (map[string]interface{}, error) {
 	//未关注查看项目信息
 	visitArr := []string{}
 	if followInfo == nil {
 		followInfo = map[string]interface{}{
-			"isfollow":    false,              //是否关注
-			"sid":         util.EncodeId(sid), //关注项目的来源信息id
-			"remind":      0,                  //是否开启提醒
-			"bidopentime": nil,                //开标时间
-			"remindtime":  nil,                //提醒时间
+			"isfollow":    false,                                       //是否关注
+			"sid":         util.EncodeId(sid),                          //关注项目的来源信息id
+			"fid":         qutil.If(fid == "", "", util.EncodeId(fid)), //关注项目的来源信息id
+			"remind":      0,                                           //是否开启提醒
+			"bidopentime": nil,                                         //开标时间
+			"remindtime":  nil,                                         //提醒时间
 		}
 	} else { //已关注
+		followInfo["fid"] = qutil.If(fid == "", "", util.EncodeId(fid))
 		if followInfo["bidopentime"] == nil && projectInfo["bidopentime"] != nil {
 			followInfo["bidopentime"] = projectInfo["bidopentime"]
 		}

+ 2 - 0
src/jfw/modules/publicapply/src/go.mod

@@ -89,10 +89,12 @@ require (
 	github.com/spf13/viper v1.15.0 // indirect
 	github.com/subosito/gotenv v1.4.2 // indirect
 	github.com/tealeg/xlsx v1.0.5 // indirect
+	github.com/thinxer/go-word2vec v0.0.0-20150917053916-5c19ec7379ed // indirect
 	github.com/xdg-go/pbkdf2 v1.0.0 // indirect
 	github.com/xdg-go/scram v1.1.1 // indirect
 	github.com/xdg-go/stringprep v1.0.3 // indirect
 	github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
+	github.com/ziutek/blas v0.0.0-20190227122918-da4ca23e90bb // indirect
 	go.etcd.io/etcd/api/v3 v3.5.6 // indirect
 	go.etcd.io/etcd/client/pkg/v3 v3.5.6 // indirect
 	go.etcd.io/etcd/client/v3 v3.5.6 // indirect

+ 4 - 0
src/jfw/modules/publicapply/src/go.sum

@@ -1132,6 +1132,8 @@ github.com/subosito/gotenv v1.4.2/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNG
 github.com/tal-tech/go-zero v1.1.5/go.mod h1:LbN0C7/rbl2+LUWTSUYx5leXmgedeMWjt1jc3/8/zFA=
 github.com/tealeg/xlsx v1.0.5 h1:+f8oFmvY8Gw1iUXzPk+kz+4GpbDZPK1FhPiQRd+ypgE=
 github.com/tealeg/xlsx v1.0.5/go.mod h1:btRS8dz54TDnvKNosuAqxrM1QgN1udgk9O34bDCnORM=
+github.com/thinxer/go-word2vec v0.0.0-20150917053916-5c19ec7379ed h1:1+oKuPuDQ4AbN1WRMFxl9WQClH80GuZ81X/4FsOshjI=
+github.com/thinxer/go-word2vec v0.0.0-20150917053916-5c19ec7379ed/go.mod h1:WE5pZgSp3RwicfhHQmOJOexA0n4AKTzBqmnSu7R8Nbk=
 github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4=
 github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
 github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
@@ -1174,6 +1176,8 @@ github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxt
 github.com/zeromicro/go-zero v1.3.5/go.mod h1:wh4o794b7Ul3W0k35Pw9nc3iB4O0OpaQTMQz/PJc1bc=
 github.com/zeromicro/go-zero v1.4.4 h1:J8M768EVFNtIQJ/GCEsoIQPanxbx2HHT0it7r69U76Y=
 github.com/zeromicro/go-zero v1.4.4/go.mod h1:5WSUwtJm0bYdDZ69GlckigcT6D0EyAPbDaX3unbSY/4=
+github.com/ziutek/blas v0.0.0-20190227122918-da4ca23e90bb h1:uWiILQloLUVdtPYr1ZZo2zqtlpzo4G8vUpglo/Fs2H8=
+github.com/ziutek/blas v0.0.0-20190227122918-da4ca23e90bb/go.mod h1:J3xKssoVdrwZ2E29fIox/EKxOZWimS7AZ4fOTCFkOLo=
 github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0=
 go.etcd.io/bbolt v1.3.4/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ=
 go.etcd.io/etcd v0.0.0-20200402134248-51bdeb39e698/go.mod h1:YoUyTScD3Vcv2RBm3eGVOq7i1ULiz3OuXoQFWOirmAM=

+ 1 - 0
src/jfw/modules/publicapply/src/main.go

@@ -21,6 +21,7 @@ import (
 	_ "jy/src/jfw/modules/publicapply/src/message"
 	_ "jy/src/jfw/modules/publicapply/src/npsValue"
 	_ "jy/src/jfw/modules/publicapply/src/project"
+	_ "jy/src/jfw/modules/publicapply/src/transfer"
 	"net/http"
 
 	_ "jy/src/jfw/modules/publicapply/src/shareFission"

+ 280 - 0
src/jfw/modules/publicapply/src/transfer/transfer.go

@@ -0,0 +1,280 @@
+package transfer
+
+import (
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
+	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
+	"app.yhyue.com/moapp/jypkg/public"
+	"encoding/hex"
+	"fmt"
+	"jy/src/jfw/modules/publicapply/src/config"
+	"log"
+	"net/url"
+	"regexp"
+	"strings"
+)
+
+func init() {
+	xweb.AddAction(&Transfer{})
+}
+
+type Transfer struct {
+	*xweb.Action
+	transfer xweb.Mapper `xweb:"/transfer"`
+}
+
+func (this *Transfer) Transfer() error {
+	newUrl := func() string {
+		urlStr := this.GetString("url")
+		if urlStr == "" {
+			return ""
+		}
+		/*urlStr, _ = url.QueryUnescape(urlStr)*/
+		urlByte, _ := hex.DecodeString(urlStr)
+		urlStr = string(urlByte)
+		isWX := public.CheckWxBrowser(this.Request)
+		repType := "pc"
+		if isWX {
+			repType = "wx"
+		} else {
+			var mobileReg = regexp.MustCompile("(?i)(Android|Mobile|Phone)")
+			log.Println("11111", this.Request.UserAgent())
+			isApp := mobileReg.MatchString(this.Request.UserAgent())
+			if isApp {
+				repType = "app"
+			}
+		}
+		return UrlHandle(urlStr, repType, this.Session())
+	}()
+	if newUrl != "" {
+		log.Println("最近地址", newUrl)
+		return this.Redirect(newUrl)
+	}
+	return this.WriteBytes([]byte("请求异常"))
+}
+
+// 标讯
+var PCWXArticle = "/article/content/%s"
+var APPArticle = "/jyapp/article/content/%s"
+
+// 项目
+var PCProject = "/swordfish/page_big_pc/pro_follow_detail?sid=%s"
+var APPProject = "/jyapp/big/page/pro_follow_detail?sid=%s"
+var WXProject = "/big/wx/page/pro_follow_detail?sid=%s"
+var APPEntProject = "/jyapp/big/page/client_follow_detail?sid=%s&from=client"
+var WXEntProject = "/big/wx/page/client_follow_detail?sid=%s&from=client"
+
+// 拟在建项目
+var PCLandingPage = "/succbi/nzj/app/nzj.app/nzj_detail_0.spg?pid=%s"
+var AppLandingPage = "/jyapp/big/page/landingPage"
+var WXLandingPage = "/big/wx/page/landingPage"
+
+// 采购单位画像
+var PCBuyPortrait = "/swordfish/page_big_pc/unit_portrayal/%s"
+var APPBuyPortrait = "/jyapp/big/page/unit_portrayal?entName=%s"
+var WXBuyPortrait = "/big/wx/page/unit_portrayal?entName=%s"
+var PCEntBuyPortrait = "/entpc/unit_portrayal/%s"
+var APPEntBuyPortrait = "/jyapp/big/page/client_portrayal?type=replace&entName=%s"
+var WXEntBuyPortrait = "/big/wx/page/client_portrayal?entName=%s"
+
+// 企业画像
+var PCEntPortrait = "/swordfish/page_big_pc/ent_portrait/%s"
+var PCVipEntPortrait = "/swordfish/page_big_pc/svip/ent_ser_portrait/%s"
+var APPEntPortrait = "/jyapp/big/page/ent_portrait?eId=%s"
+var WXEntPortrait = "/weixin/frontPage/collection/sess/ent_portrait?eId=%s"
+
+func UrlHandle(urlStr string, repType string, u *httpsession.Session) string {
+	newUrl := ""
+	lastPath, queryMap := QueryHadle(urlStr)
+	if strings.Contains(urlStr, "/jyapp/article/content") {
+		//移动端地址
+		if repType == "app" {
+			newUrl = fmt.Sprintf(APPArticle, lastPath)
+		} else if repType == "wx" {
+			newUrl = fmt.Sprintf(PCWXArticle, lastPath)
+		} else {
+			newUrl = fmt.Sprintf(PCWXArticle, lastPath)
+		}
+		return newUrl
+	}
+	if strings.Contains(urlStr, "/article/content") {
+		//可能是pc或者微信地址
+		if repType == "app" {
+			newUrl = fmt.Sprintf(APPArticle, lastPath)
+		} else if repType == "wx" {
+			newUrl = fmt.Sprintf(PCWXArticle, lastPath)
+		} else {
+			newUrl = fmt.Sprintf(PCWXArticle, lastPath)
+		}
+	}
+
+	if strings.Contains(urlStr, "/pro_follow_detail") {
+		//移动端项目详情页
+		if repType == "app" {
+			newUrl = fmt.Sprintf(APPProject, url.QueryEscape(strings.Join(queryMap["sid"], "")))
+		} else if repType == "wx" {
+			newUrl = fmt.Sprintf(WXProject, url.QueryEscape(strings.Join(queryMap["sid"], "")))
+		} else {
+			newUrl = fmt.Sprintf(PCProject, url.QueryEscape(strings.Join(queryMap["sid"], "")))
+		}
+	}
+	if strings.Contains(urlStr, "/client_follow_detail") {
+		//商机管理项目详情页
+		if repType == "app" {
+			newUrl = fmt.Sprintf(APPEntProject, url.QueryEscape(strings.Join(queryMap["sid"], "")))
+		} else if repType == "wx" {
+			newUrl = fmt.Sprintf(WXEntProject, url.QueryEscape(strings.Join(queryMap["sid"], "")))
+		} else {
+			newUrl = fmt.Sprintf(PCProject, url.QueryEscape(strings.Join(queryMap["sid"], "")))
+		}
+	}
+	if strings.Contains(urlStr, "/succbi/nzj/app/nzj.app") {
+		//pc拟在建项目
+		if repType == "app" {
+			newUrl = AppLandingPage
+		} else if repType == "wx" {
+			newUrl = WXLandingPage
+		} else {
+			newUrl = fmt.Sprintf(PCLandingPage, url.QueryEscape(strings.Join(queryMap["pid"], "")))
+		}
+	}
+	if strings.Contains(urlStr, "/swordfish/page_big_pc/svip/ent_ser_portrait") || strings.Contains(urlStr, "/swordfish/page_big_pc/ent_portrait") {
+		//pc企业画像
+		Big := jy.GetBigVipUserBaseMsg(u, *config.Middleground)
+		if repType == "app" {
+			newUrl = fmt.Sprintf(APPEntPortrait, lastPath)
+		} else if repType == "wx" {
+			newUrl = fmt.Sprintf(WXEntPortrait, lastPath)
+		} else {
+			if Big.Status > 0 {
+				newUrl = fmt.Sprintf(PCEntPortrait, lastPath)
+			} else if Big.VipStatus > 0 {
+				newUrl = fmt.Sprintf(PCVipEntPortrait, lastPath)
+			} else {
+				newUrl = fmt.Sprintf(PCEntPortrait, lastPath)
+			}
+		}
+	}
+	if strings.Contains(urlStr, "/jyapp/big/page/ent_portrait") {
+		//移动端企业画像
+		//权限获取
+		Big := jy.GetBigVipUserBaseMsg(u, *config.Middleground)
+		if repType == "app" {
+			newUrl = fmt.Sprintf(APPEntPortrait, url.QueryEscape(strings.Join(queryMap["eId"], "")))
+		} else if repType == "wx" {
+			newUrl = fmt.Sprintf(WXEntPortrait, url.QueryEscape(strings.Join(queryMap["eId"], "")))
+		} else {
+			if Big.Status > 0 {
+				newUrl = fmt.Sprintf(PCEntPortrait, url.QueryEscape((strings.Join(queryMap["eId"], ""))))
+			} else if Big.VipStatus > 0 {
+				newUrl = fmt.Sprintf(PCVipEntPortrait, url.QueryEscape(strings.Join(queryMap["eId"], "")))
+			} else {
+				newUrl = fmt.Sprintf(PCEntPortrait, url.QueryEscape(strings.Join(queryMap["eId"], "")))
+			}
+		}
+	}
+	if strings.Contains(urlStr, "/weixin/frontPage/collection/sess/ent_portrait") {
+		//微信端企业画像
+		Big := jy.GetBigVipUserBaseMsg(u, *config.Middleground)
+		if repType == "app" {
+			newUrl = fmt.Sprintf(APPEntPortrait, url.QueryEscape(strings.Join(queryMap["eId"], "")))
+		} else if repType == "wx" {
+			newUrl = fmt.Sprintf(WXEntPortrait, url.QueryEscape(strings.Join(queryMap["eId"], "")))
+		} else {
+			if Big.Status > 0 {
+				newUrl = fmt.Sprintf(PCEntPortrait, url.QueryEscape(strings.Join(queryMap["eId"], "")))
+			} else if Big.VipStatus > 0 {
+				newUrl = fmt.Sprintf(PCVipEntPortrait, url.QueryEscape(strings.Join(queryMap["eId"], "")))
+			} else {
+				newUrl = fmt.Sprintf(PCEntPortrait, url.QueryEscape(strings.Join(queryMap["eId"], "")))
+			}
+		}
+	}
+	if strings.Contains(urlStr, "/swordfish/page_big_pc/unit_portrayal") {
+		//pc采购单位画像
+		lastPath, queryMap = NameQueryHadle(urlStr)
+		if repType == "app" {
+			newUrl = fmt.Sprintf(APPBuyPortrait, lastPath)
+		} else if repType == "wx" {
+			newUrl = fmt.Sprintf(WXBuyPortrait, lastPath)
+		} else {
+			newUrl = fmt.Sprintf(PCBuyPortrait, lastPath)
+		}
+	}
+	if strings.Contains(urlStr, "/jyapp/big/page/unit_portrayal") {
+		//移动端采购单位画像
+		if repType == "app" {
+			newUrl = fmt.Sprintf(APPBuyPortrait, url.QueryEscape(strings.Join(queryMap["entName"], "")))
+		} else if repType == "wx" {
+			newUrl = fmt.Sprintf(WXBuyPortrait, url.QueryEscape(strings.Join(queryMap["entName"], "")))
+		} else {
+			newUrl = fmt.Sprintf(PCBuyPortrait, url.QueryEscape(strings.Join(queryMap["entName"], "")))
+		}
+	}
+	if strings.Contains(urlStr, "/big/wx/page/unit_portrayal") {
+		//微信端采购单位画像
+		if repType == "app" {
+			newUrl = fmt.Sprintf(APPBuyPortrait, url.QueryEscape(strings.Join(queryMap["entName"], "")))
+		} else if repType == "wx" {
+			newUrl = fmt.Sprintf(WXBuyPortrait, url.QueryEscape(strings.Join(queryMap["entName"], "")))
+		} else {
+			newUrl = fmt.Sprintf(PCBuyPortrait, url.QueryEscape(strings.Join(queryMap["entName"], "")))
+		}
+	}
+	if strings.Contains(urlStr, "/entpc/unit_portrayal") {
+		//商机管理pc采购单位画像
+		lastPath, queryMap = NameQueryHadle(urlStr)
+		if repType == "app" {
+			newUrl = fmt.Sprintf(APPEntBuyPortrait, lastPath)
+		} else if repType == "wx" {
+			newUrl = fmt.Sprintf(WXEntBuyPortrait, lastPath)
+		} else {
+			newUrl = fmt.Sprintf(PCEntBuyPortrait, lastPath)
+		}
+	}
+	if strings.Contains(urlStr, "/jyapp/big/page/client_portrayal") {
+		//商机管理移动端采购单位画像
+		if repType == "app" {
+			newUrl = fmt.Sprintf(APPEntBuyPortrait, url.QueryEscape(strings.Join(queryMap["entName"], "")))
+		} else if repType == "wx" {
+			newUrl = fmt.Sprintf(WXEntBuyPortrait, url.QueryEscape(strings.Join(queryMap["entName"], "")))
+		} else {
+			newUrl = fmt.Sprintf(PCEntBuyPortrait, url.QueryEscape(strings.Join(queryMap["entName"], "")))
+		}
+	}
+	if strings.Contains(urlStr, "/big/wx/page/client_portrayal") {
+		//商机管理微信端采购单位画像
+		if repType == "app" {
+			newUrl = fmt.Sprintf(APPEntBuyPortrait, url.QueryEscape(strings.Join(queryMap["entName"], "")))
+		} else if repType == "wx" {
+			newUrl = fmt.Sprintf(WXEntBuyPortrait, url.QueryEscape(strings.Join(queryMap["entName"], "")))
+		} else {
+			newUrl = fmt.Sprintf(PCEntBuyPortrait, url.QueryEscape(strings.Join(queryMap["entName"], "")))
+		}
+	}
+	return newUrl
+}
+func QueryHadle(urlStr string) (string, url.Values) {
+	u, err := url.Parse(urlStr)
+	if err != nil {
+		return "", nil
+	}
+	pathArr := []string{}
+	if u.RawPath == "" {
+		pathArr = strings.Split(u.Path, "/")
+	} else {
+		pathArr = strings.Split(u.RawPath, "/")
+	}
+	m, _ := url.ParseQuery(u.RawQuery)
+	return pathArr[len(pathArr)-1], m
+}
+func NameQueryHadle(urlStr string) (string, url.Values) {
+	urlStr, _ = url.QueryUnescape(urlStr)
+	u, err := url.Parse(urlStr)
+	if err != nil {
+		return "", nil
+	}
+	pathArr := strings.Split(u.Path, "/")
+	m, _ := url.ParseQuery(u.RawQuery)
+	return pathArr[len(pathArr)-1], m
+}

+ 1 - 2
src/jfw/modules/subscribepay/src/go.mod

@@ -3,13 +3,12 @@ module jy/src/jfw/modules/subscribepay/src
 go 1.18
 
 require (
-	app.yhyue.com/moapp/jybase v0.0.0-20230517064222-e0bdfc8ee0e8
+	app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
 	app.yhyue.com/moapp/jypkg v0.0.0-20230517064346-54ec66481628
 	bp.jydev.jianyu360.cn/BaseService/pushpkg v0.0.0-20230225061813-384daf716c9d
 	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
-	github.com/dchest/captcha v1.0.0
 	github.com/gogf/gf/v2 v2.3.3
 	github.com/shopspring/decimal v1.3.1
 	github.com/tealeg/xlsx v1.0.5

+ 2 - 4
src/jfw/modules/subscribepay/src/go.sum

@@ -5,8 +5,8 @@ app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547/go.mod h1:J
 app.yhyue.com/moapp/jyPoints v1.1.1/go.mod h1:SvP8p5L3jGrejHiH2LXfgCg/NPlFiKBC5Yd0gsI12FU=
 app.yhyue.com/moapp/jybase v0.0.0-20220427020729-974c1a148186/go.mod h1:qNRA0sHuYqcLoYoP8irpaWnW9YsXixe6obBIkwaXpD0=
 app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
-app.yhyue.com/moapp/jybase v0.0.0-20230517064222-e0bdfc8ee0e8 h1:0ukFbYC7yRkFvRsr0bFCgV2SHsc1TvE+kW5MlttQEzE=
-app.yhyue.com/moapp/jybase v0.0.0-20230517064222-e0bdfc8ee0e8/go.mod h1:zB47XTeJvpcbtBRYgkQuxOICWNexiZfbUO+7aUf6mNs=
+app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb h1:fT7FIKElKjkRHTmDxXPeNr5LWe2RmyJU+5aod1nptek=
+app.yhyue.com/moapp/jybase v0.0.0-20230614085041-f8f20842d5cb/go.mod h1:D40Ae0rQilH8Hc5o2Vtt04Tjh/DNEFpcS3/WkJMPJb8=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545 h1:+Lak4m1zgsigQloOsvp8AJ+0XeX/+PGp9QP550xlbBQ=
 app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545/go.mod h1:uFrsdUBFbETiJlEmr4PtJWPsZlUpPj2bHQRhryu6ggk=
 app.yhyue.com/moapp/jypkg v0.0.0-20230517064346-54ec66481628 h1:JrlY3EGZv+sNffZSRXNFSCYtudPXKD3Dks3970vqJ40=
@@ -494,8 +494,6 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
 github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
 github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
 github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f/go.mod h1:QGrK8vMWWHQYQ3QU9bw9Y9OPNfxccGzfb41qjvVeXtY=
-github.com/dchest/captcha v1.0.0 h1:vw+bm/qMFvTgcjQlYVTuQBJkarm5R0YSsDKhm1HZI2o=
-github.com/dchest/captcha v1.0.0/go.mod h1:7zoElIawLp7GUMLcj54K9kbw+jEyvz2K0FDdRRYhvWo=
 github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
 github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=

+ 1 - 1
src/jfw/modules/subscribepay/src/service/userAccountInfo.go

@@ -24,7 +24,7 @@ import (
 	"app.yhyue.com/moapp/jybase/usercenter"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
-	"github.com/dchest/captcha"
+	"app.yhyue.com/moapp/jybase/dchest/captcha"
 )
 
 type UserAccount struct {

+ 1 - 1
src/jfw/modules/subscribepay/src/service/vipSubscribeTrial.go

@@ -17,7 +17,7 @@ import (
 	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-	"github.com/dchest/captcha"
+	"app.yhyue.com/moapp/jybase/dchest/captcha"
 	"go.mongodb.org/mongo-driver/bson"
 )
 

+ 9 - 6
src/web/staticres/common-module/big-member/js/page_client_follow_detail.js

@@ -197,16 +197,17 @@ var vNode = {
         } else {
             this.isAddClass = true
         }
-        if (utils.getParam('fid')) {
-            this.fid = utils.getParam('fid')
+        // utils.getParam('fid') 社交分享版本发现的问题(fid有时为空且不同人打开分享链接fid不是自己的)fid不从url和缓存中取  获取从detail接口取
+        if (utils.getParam('sid')) {
+            // this.fid = utils.getParam('fid')
             this.sid = utils.getParam('sid')
             var objId = {
-                fid: utils.getParam('fid'),
+                // fid: utils.getParam('fid'),
                 sid: utils.getParam('sid')
             }
             sessionStorage.setItem('bigvip-fid', JSON.stringify(objId))
         } else {
-            this.fid = JSON.parse(sessionStorage.getItem('bigvip-fid')).fid
+            // this.fid = JSON.parse(sessionStorage.getItem('bigvip-fid')).fid
             this.sid = JSON.parse(sessionStorage.getItem('bigvip-fid')).sid
         }
         this.getProDetail()
@@ -667,10 +668,11 @@ var vNode = {
           this.bidProject = false
         },
         getShareParams () {
+          var params = location.href.indexOf('?') > -1 ? '&fid=' + this.fid + '&sid=' + this.sid : '?fid=' + this.fid + '&sid=' + this.sid
           this.proParams = {
             type: '2',
             id: this.sid,
-            referer: location.href
+            referer: location.href + params
           }
         },
         goAnalysis: function () {
@@ -791,7 +793,7 @@ var vNode = {
                 url: url,
                 data: {
                     sid: _this.sid,
-                    fid: _this.fid
+                    // fid: _this.fid
                 },
                 success: function (res) {
                     if (res.error_code == 0) {
@@ -801,6 +803,7 @@ var vNode = {
                         _this.prolist = projectInfos
                         _this.projectname = projectInfos.projectname
                         _this.sid = resdata.sid
+                        _this.fid= resdata.fid
                         _this.careShow = resdata.isfollow
                         // 地区显示
                         var getAreas = ['北京', '天津', '重庆', '上海']

+ 11 - 8
src/web/templates/big-member/wx/page_pro_follow_detail.html

@@ -558,16 +558,17 @@
             } else {
                 this.isAddClass = true
             }
-            if (utils.getParam('fid')) {
-                this.fid = utils.getParam('fid')
+            // utils.getParam('fid') 社交分享版本发现的问题(fid有时为空且不同人打开分享链接fid不是自己的)fid不从url和缓存中取  获取从detail接口取
+            if (utils.getParam('sid')) {
+                // this.fid = utils.getParam('fid')
                 this.sid = utils.getParam('sid')
                 var objId = {
-                    fid: utils.getParam('fid'),
+                    // fid: utils.getParam('fid'),
                     sid: utils.getParam('sid')
                 }
                 sessionStorage.setItem('bigvip-fid', JSON.stringify(objId))
             } else {
-                this.fid = JSON.parse(sessionStorage.getItem('bigvip-fid')).fid
+                // this.fid = JSON.parse(sessionStorage.getItem('bigvip-fid')).fid
                 this.sid = JSON.parse(sessionStorage.getItem('bigvip-fid')).sid
             }
             this.getCanBiaoInfo()
@@ -812,8 +813,8 @@
               data: JSON.stringify(params),
               success: function(res) {
                 if(res.error_code === 0) {
-                  let list = res.data.list
-                  if(!list) {list = []}
+                  let list = res.data && res.data.list ? res.data.list : []
+                  // if(!list) {list = []}
                   if (list.length > 0) {
                     _this.cbInfo.isShowRefer = true
                   } else {
@@ -1065,10 +1066,11 @@
               this.bidProject = false
             },
             getShareParams () {
+              var params = location.href.indexOf('?') > -1 ? '&fid=' + this.fid + '&sid=' + this.sid : '?fid=' + this.fid + '&sid=' + this.sid
               this.proParams = {
                 type: '2',
                 id: this.sid,
-                referer: location.href
+                referer: location.href + params
               }
             },
             goAnalysis: function () {
@@ -1180,7 +1182,7 @@
                     url: '/bigmember/follow/project/detail',
                     data: {
                         sid: _this.sid,
-                        fid: _this.fid
+                        // fid: _this.fid
                     },
                     success: function (res) {
                         if (res.error_code == 0) {
@@ -1190,6 +1192,7 @@
                             _this.prolist = projectInfos
                             _this.projectname = projectInfos.projectname
                             _this.sid = resdata.sid
+                            _this.fid = resdata.fid
                             _this.careShow = resdata.isfollow
                             // 地区显示
                             var getAreas = ['北京', '天津', '重庆', '上海']