lianbingjie 1 rok temu
rodzic
commit
0a27e276a7
87 zmienionych plików z 2564 dodań i 1206 usunięć
  1. 36 23
      src/jfw/front/front.go
  2. 19 9
      src/jfw/front/login.go
  3. 20 0
      src/jfw/front/org_structure.go
  4. 9 0
      src/jfw/modules/app/src/app/front/front.go
  5. 60 10
      src/jfw/modules/app/src/app/front/login.go
  6. 16 0
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js
  7. 7 0
      src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/utils.js
  8. 44 10
      src/jfw/modules/app/src/web/staticres/jyapp/me/js/mail_bind.js
  9. 10 1
      src/jfw/modules/app/src/web/staticres/jyapp/me/js/phone_bind.js
  10. 27 2
      src/jfw/modules/app/src/web/staticres/jyapp/wxtsguide/main.js
  11. 97 1
      src/jfw/modules/app/src/web/templates/frontRouter/fileRecord/sess/index.html
  12. 10 10
      src/jfw/modules/app/src/web/templates/me/account.html
  13. 161 55
      src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html
  14. 5 0
      src/jfw/modules/bigmember/src/config.json
  15. 10 0
      src/jfw/modules/bigmember/src/config/config.go
  16. 2 2
      src/jfw/modules/bigmember/src/entity/followProject.go
  17. 4 4
      src/jfw/modules/bigmember/src/go.mod
  18. 8 8
      src/jfw/modules/bigmember/src/go.sum
  19. 13 2
      src/jfw/modules/bigmember/src/service/follow/enterprise.go
  20. 17 3
      src/jfw/modules/bigmember/src/service/follow/project.go
  21. 2 1
      src/jfw/modules/publicapply/src/config.json
  22. 1 0
      src/jfw/modules/publicapply/src/config/config.go
  23. 4 0
      src/jfw/modules/publicapply/src/identity/service/action.go
  24. 103 0
      src/jfw/modules/publicapply/src/identity/service/service.go
  25. 25 1
      src/jfw/modules/publicapply/src/subscribePush/entity/keyWords.go
  26. 7 7
      src/jfw/modules/subscribepay/src/baseApi.json
  27. 11 10
      src/jfw/modules/subscribepay/src/config.json
  28. 1 1
      src/jfw/modules/subscribepay/src/config.yaml
  29. 4 3
      src/jfw/modules/subscribepay/src/config/config.go
  30. 69 71
      src/jfw/modules/subscribepay/src/entity/basePack.go
  31. 23 18
      src/jfw/modules/subscribepay/src/entity/commonApi.go
  32. 1 1
      src/jfw/modules/subscribepay/src/entity/dataExportPackStruct.go
  33. 1 1
      src/jfw/modules/subscribepay/src/entity/dataexport.go
  34. 13 15
      src/jfw/modules/subscribepay/src/entity/resourcePackStruct.go
  35. 1 1
      src/jfw/modules/subscribepay/src/go.mod
  36. 26 8
      src/jfw/modules/subscribepay/src/service/basePack.go
  37. 8 10
      src/jfw/modules/subscribepay/src/service/resourcePack.go
  38. 48 0
      src/jfw/modules/subscribepay/src/service/userAccountInfo.go
  39. 1 1
      src/jfw/modules/subscribepay/src/util/db.go
  40. 1 0
      src/jfw/modules/weixin/src/config.json
  41. 59 50
      src/jfw/modules/weixin/src/go.mod
  42. 184 441
      src/jfw/modules/weixin/src/go.sum
  43. 12 3
      src/jfw/modules/weixin/src/wx/wx.go
  44. 7 0
      src/web/staticres/big-member/js/utils.js
  45. 34 1
      src/web/staticres/common-module/big-member/js/high_set.js
  46. BIN
      src/web/staticres/common-module/collection/image/save-pic-bg.png
  47. BIN
      src/web/staticres/common-module/collection/image/subscribe-icon.png
  48. BIN
      src/web/staticres/common-module/collection/image/wx2.png
  49. 16 1
      src/web/staticres/common-module/collection/js/ent_portrait.js
  50. BIN
      src/web/staticres/common-module/file-pack/images/dialog-bg.png
  51. 100 33
      src/web/staticres/common-module/file-pack/js/index-wx.js
  52. 140 19
      src/web/staticres/common-module/file-pack/js/index.js
  53. 13 9
      src/web/staticres/common-module/perfect-info/js/perfect-info.js
  54. 7 0
      src/web/staticres/common-module/public/js/utils.js
  55. BIN
      src/web/staticres/common-module/task/frame.png
  56. BIN
      src/web/staticres/common-module/task/task-app.png
  57. BIN
      src/web/staticres/common-module/task/task-bdsjh.png
  58. BIN
      src/web/staticres/common-module/task/task-bdyx.png
  59. BIN
      src/web/staticres/common-module/task/task-gsmc.png
  60. BIN
      src/web/staticres/common-module/task/task-gzh.png
  61. BIN
      src/web/staticres/common-module/task/task-gzqy.png
  62. BIN
      src/web/staticres/common-module/task/task-gzxm.png
  63. BIN
      src/web/staticres/common-module/task/task-wcdy.png
  64. BIN
      src/web/staticres/common-module/task/task-xrrw.png
  65. BIN
      src/web/staticres/common-module/task/task-ywlx.png
  66. 39 4
      src/web/staticres/common-module/vipsubscribe/js/vip-subscribe-set-template.js
  67. BIN
      src/web/staticres/commonFunctions/set-account-info.png
  68. BIN
      src/web/staticres/commonFunctions/set-identity-info.png
  69. 151 13
      src/web/staticres/frontRouter/pc/fileHistory/js/index-pc.js
  70. 179 0
      src/web/staticres/frontRouter/pc/seeBuyerHistory/css/index-pc.css
  71. BIN
      src/web/staticres/images/save-pic-bg.png
  72. BIN
      src/web/staticres/images/wx2.png
  73. 6 0
      src/web/staticres/js/ent-search-index-pc.js
  74. 2 0
      src/web/staticres/js/pc-collect-user-info.js
  75. 43 9
      src/web/staticres/me/js/mail_bind.js
  76. 11 0
      src/web/staticres/me/js/phone_bind.js
  77. 192 95
      src/web/staticres/public-pc/js/article-content.js
  78. 1 1
      src/web/staticres/public-pc/js/header-nav.js
  79. 2 1
      src/web/staticres/tags/js/no-login-detail.js
  80. BIN
      src/web/staticres/vipsubscribe/image/file-download-overview-bg@2x.png
  81. 10 0
      src/web/staticres/wxtsguide/main.js
  82. 96 63
      src/web/templates/frontRouter/pc/fileHistory/sess/index.html
  83. 50 61
      src/web/templates/frontRouter/pc/integral/sess/index.html
  84. 99 1
      src/web/templates/frontRouter/wx/fileRecord/sess/index.html
  85. 6 14
      src/web/templates/pc/biddetail_rec.html
  86. 7 7
      src/web/templates/weixin/me/security.html
  87. 173 91
      src/web/templates/weixin/wxinfocontent_rec.html

+ 36 - 23
src/jfw/front/front.go

@@ -882,35 +882,39 @@ func (m *Front) Sess(ostr string) error {
 	if len(str) == 4 {
 		userFlag := str[0]
 		ok := false
-		var identity *pb.Identity
-		if str[1] == "userId" || str[1] == "entUserId" || str[1] == "positionId" {
-			if str[1] == "userId" {
-				identity = config.Middleground.UserCenter.IdentityByUserId(util.Int64All(userFlag))
-			} else if str[1] == "entUserId" {
-				identity = config.Middleground.UserCenter.IdentityByEntUserId(util.Int64All(userFlag))
-			} else if str[1] == "positionId" {
-				identity = config.Middleground.UserCenter.IdentityByPositionId(util.Int64All(userFlag))
-			}
-			if identity != nil {
-				ok, _, _ = FindUserAndCreateSessByBaseUserId(identity.UserId, m.Session(), false, false)
-			}
+		if str[2] == "identityKeep" && m.GetSession("positionId") != nil {
+			ok = true
 		} else {
-			hasIdentity := false
-			if str[1] == "_id" {
-				ok, _, _ = FindUserAndCreateSessById(mgdb.StringTOBsonId(userFlag), m.Session(), false, !hasIdentity)
+			var identity *pb.Identity
+			if str[1] == "userId" || str[1] == "entUserId" || str[1] == "positionId" {
+				if str[1] == "userId" {
+					identity = config.Middleground.UserCenter.IdentityByUserId(util.Int64All(userFlag))
+				} else if str[1] == "entUserId" {
+					identity = config.Middleground.UserCenter.IdentityByEntUserId(util.Int64All(userFlag))
+				} else if str[1] == "positionId" {
+					identity = config.Middleground.UserCenter.IdentityByPositionId(util.Int64All(userFlag))
+				}
+				if identity != nil {
+					ok, _, _ = FindUserAndCreateSessByBaseUserId(identity.UserId, m.Session(), false, false)
+				}
 			} else {
-				if m.GetSession("positionId") != nil {
-					hasIdentity = true
+				hasIdentity := false
+				if str[1] == "_id" {
+					ok, _, _ = FindUserAndCreateSessById(mgdb.StringTOBsonId(userFlag), m.Session(), false, !hasIdentity)
+				} else {
+					if m.GetSession("positionId") != nil {
+						hasIdentity = true
+					}
+					ok, _, _ = FindUserAndCreateSess(userFlag, m.Session(), "wx", false, !hasIdentity)
+				}
+				if !hasIdentity {
+					identity = config.Middleground.UserCenter.IdentityByUserId(util.Int64All(m.GetSession("base_user_id")))
 				}
-				ok, _, _ = FindUserAndCreateSess(userFlag, m.Session(), "wx", false, !hasIdentity)
 			}
-			if !hasIdentity {
-				identity = config.Middleground.UserCenter.IdentityByUserId(util.Int64All(m.GetSession("base_user_id")))
+			if identity != nil {
+				ok = ok && NewIdentityInfo(identity).Switch(m.Session(), &public.MQFW)
 			}
 		}
-		if identity != nil {
-			ok = ok && NewIdentityInfo(identity).Switch(m.Session(), &public.MQFW)
-		}
 		if ok {
 			actionurl := ""
 			if str[3] == "" {
@@ -1138,6 +1142,15 @@ func (f *Front) TSGuide() error {
 					"i_ts_guide":        2,
 					"o_jy.i_newfree":    1,
 				}
+				nsqPath, _ := config.Sysconfig["nsq"].(string)
+				nsq_topic, _ := config.Sysconfig["nsq_topic"].(string)
+				jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", util.ObjToString(f.GetSession("mgoUserId")), jy.Jywx_node1, map[string]interface{}{
+					"code":       1015, //首次订阅
+					"types":      "subscribeKeyWords",
+					"num":        50,
+					"baseUserId": f.GetSession("base_user_id"),
+					"positionId": f.GetSession("positionId"),
+				})
 				result["flag"] = jyutil.Compatible.Update(userid, bson.M{"$set": saveData})
 			}
 		} else if reqType == "over" {

+ 19 - 9
src/jfw/front/login.go

@@ -1,6 +1,14 @@
 package front
 
 import (
+	"fmt"
+	"jy/src/jfw/config"
+	jutil "jy/src/jfw/jyutil"
+	"log"
+	"regexp"
+	"strings"
+	"time"
+
 	qutil "app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/dchest/captcha"
 	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
@@ -10,14 +18,7 @@ import (
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"app.yhyue.com/moapp/jypkg/public"
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
-	"fmt"
 	"go.mongodb.org/mongo-driver/bson/primitive"
-	"jy/src/jfw/config"
-	jutil "jy/src/jfw/jyutil"
-	"log"
-	"regexp"
-	"strings"
-	"time"
 )
 
 type Login struct {
@@ -177,10 +178,11 @@ func (l *Login) Login() error {
 						data["s_tracksource"] = source
 					}
 					//获取base_user_id
-					if resp := config.Middleground.UserCenter.UserAdd(pb.UserAddReq{
+					resp := config.Middleground.UserCenter.UserAdd(pb.UserAddReq{
 						Appid: "10000",
 						Phone: phone,
-					}); resp != nil && resp.Data.Id > 0 {
+					})
+					if resp != nil && resp.Data.Id > 0 {
 						data["base_user_id"] = resp.Data.Id
 					} else {
 						log.Println(phone, "调用usercenter失败")
@@ -200,6 +202,14 @@ func (l *Login) Login() error {
 						if ok {
 							result["userInfo"] = userInfo
 							go anonymousLogin(l.Session(), l.Cookie("JYTrustedId"))
+							jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", _id, jy.Jyweb_node2, map[string]interface{}{
+								"code":       1007, //绑定手机号任务
+								"types":      "bindPhone",
+								"num":        50,
+								"baseUserId": resp.Data.Id,
+								"positionId": l.GetSession("positionId"),
+							})
+
 							return 1, true
 						}
 					}

+ 20 - 0
src/jfw/front/org_structure.go

@@ -21,6 +21,7 @@ import (
 	"app.yhyue.com/moapp/jypkg/public"
 
 	util "app.yhyue.com/moapp/jybase/common"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
 
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
@@ -194,6 +195,25 @@ func (this *OrgStructure) AutoLogon() error {
 			}); resp != nil && resp.Data.Id > 0 {
 				data["base_user_id"] = resp.Data.Id
 				if id := mongodb.Save("user", data); id != "" {
+
+					nsqPath, _ := config.Sysconfig["nsq"].(string)
+					nsq_topic, _ := config.Sysconfig["nsq_topic"].(string)
+					jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", id, jy.Jyweb_node2, map[string]interface{}{
+						"code":       1007,
+						"types":      "bindPhone",
+						"num":        50,
+						"baseUserId": resp.Data.Id,
+						"positionId": this.GetSession("positionId"),
+					})
+					if mail != "" {
+						jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", id, jy.Jyweb_node2, map[string]interface{}{
+							"code":       1009,
+							"types":      "bindMail",
+							"num":        50,
+							"baseUserId": resp.Data.Id,
+							"positionId": this.GetSession("positionId"),
+						})
+					}
 					rb = true
 				}
 			} else {

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

@@ -340,6 +340,15 @@ func (f *Front) TSGuide() error {
 					"i_ts_guide":        2,
 					"o_jy.i_newfree":    1,
 				}
+				nsqPath, _ := config.Sysconfig["nsq"].(string)
+				nsq_topic, _ := config.Sysconfig["nsq_topic"].(string)
+				jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", util.ObjToString(f.GetSession("mgoUserId")), jy.Jywx_node1, map[string]interface{}{
+					"code":       1015, //首次订阅
+					"types":      "subscribeKeyWords",
+					"num":        50,
+					"baseUserId": f.GetSession("base_user_id"),
+					"positionId": f.GetSession("positionId"),
+				})
 				result["flag"] = utils.Compatible.Update(userid, map[string]interface{}{"$set": saveData})
 			}
 		} else if reqType == "over" {

+ 60 - 10
src/jfw/modules/app/src/app/front/login.go

@@ -106,6 +106,9 @@ func (l *Login) Login() error {
 	returnSign := ""
 	userInfo := map[string]interface{}{}
 	status := func() int {
+		nsqPath, _ := config.Sysconfig["nsq"].(string)
+		nsq_topic, _ := config.Sysconfig["nsq_topic"].(string)
+
 		reqType := l.GetString("reqType")
 		if reqType == "phoneLogin" {
 			phone := l.GetString("phone")
@@ -131,6 +134,14 @@ func (l *Login) Login() error {
 				deviceId := l.GetString("deviceId")
 				phoneType := l.GetString("phoneType")
 				returnSign = afterLogin((*user)[0], l.Session(), rid, oid, phoneType, channel, deviceId, false, l.ResponseWriter)
+
+				jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", BsonIdToSId((*user)[0]["_id"]), jy.Jyapp_node1, map[string]interface{}{
+					"code":       1014, //下载app任务
+					"types":      "downloadApp",
+					"num":        50,
+					"baseUserId": l.GetSession("base_user_id"),
+					"positionId": l.GetSession("positionId"),
+				})
 				return 1
 			}
 			return -1 //用户名或密码不正确
@@ -238,28 +249,33 @@ func (l *Login) Login() error {
 
 						jy.ClearPhoneIdentSession(l.Session())
 						returnSign = afterLogin(data, l.Session(), rid, oid, phoneType, channel, deviceId, true, l.ResponseWriter)
-						addr, _ := config.Sysconfig["nsq"].(string)
-						nsq_topic, _ := config.Sysconfig["nsq_topic"].(string)
 						if disWord != "" {
 							redisDis := redis.GetStr("other", "DIS_"+disWord[1:])
 							//邀请新用户 调用队列
 							if redisDisArr := strings.Split(redisDis, "##"); len(redisDisArr) > 1 {
 								fromUserId := redisDisArr[1]
-								err := jy.Publish(public.Mgo_Log, addr, nsq_topic, jy.Jywx_subscribe_invite, fromUserId, jy.Jyapp_node1, nil)
+								err := jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, jy.Jywx_subscribe_invite, fromUserId, jy.Jyapp_node1, nil)
 								if err != nil {
 									log.Println("nsq队列写入失败-->", err, jy.Jywx_subscribe_invite, fromUserId)
 								}
-								err = jy.Publish(public.Mgo_Log, addr, nsq_topic, jy.Jywx_subscribe_invited, _id, jy.Jyapp_node1, nil)
+								err = jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, jy.Jywx_subscribe_invited, _id, jy.Jyapp_node1, nil)
 								if err != nil {
 									log.Println("nsq队列写入失败-->", err, jy.Jywx_subscribe_invited, _id)
 								}
 							}
 						} else {
-							err := jy.Publish(public.Mgo_Log, addr, nsq_topic, jy.Jyapp_phone_register, _id, jy.Jyapp_node1, nil)
+							err := jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, jy.Jyapp_phone_register, _id, jy.Jyapp_node1, nil)
 							if err != nil {
 								log.Println("nsq队列写入失败-->", err, jy.Jyapp_phone_register, _id)
 							}
 						}
+						jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", _id, jy.Jyapp_node1, map[string]interface{}{
+							"code":       1014, //下载app任务
+							"types":      "downloadApp",
+							"num":        50,
+							"baseUserId": l.GetSession("base_user_id"),
+							"positionId": l.GetSession("positionId"),
+						})
 						return 1
 					}
 				} else {
@@ -281,6 +297,14 @@ func (l *Login) Login() error {
 					}
 					jy.ClearPhoneIdentSession(l.Session())
 					returnSign = afterLogin(user, l.Session(), rid, oid, phoneType, channel, deviceId, false, l.ResponseWriter)
+
+					jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", BsonIdToSId(user["_id"]), jy.Jyapp_node1, map[string]interface{}{
+						"code":       1014, //下载app任务
+						"types":      "downloadApp",
+						"num":        50,
+						"baseUserId": l.GetSession("base_user_id"),
+						"positionId": l.GetSession("positionId"),
+					})
 					return 1
 				}
 			}
@@ -463,6 +487,8 @@ func (l *Login) Register() error {
 		return l.Render("/me/register.html", &l.T)
 	}
 	var returnSign string
+	nsqPath, _ := config.Sysconfig["nsq"].(string)
+	nsq_topic, _ := config.Sysconfig["nsq_topic"].(string)
 	status := func() string {
 		reqType := l.GetString("reqType")
 		if reqType == "sendIdentCode" { //发短信
@@ -519,25 +545,23 @@ func (l *Login) Register() error {
 				registerclient := jy.NewRegister(jyutil.Compatible.Mgo, jyutil.Compatible.BaseService, jyutil.Compatible.MainMysql, jyutil.Compatible.Middleground)
 				_, errStr = registerclient.PublicRegister(phone, email, isAndroidOrIOS(l.Header("User-Agent")), data, func(saveid string) {
 
-					addr := config.Sysconfig["nsq"].(string)
-					topic := config.Sysconfig["nsq_topic"].(string)
 					go func() {
 						if disWord != "" {
 							redisDis := redis.GetStr("other", "DIS_"+disWord[1:])
 							//邀请新用户 调用队列
 							if redisDisArr := strings.Split(redisDis, "##"); len(redisDisArr) > 1 {
 								fromUserId := redisDisArr[1]
-								err := jy.Publish(public.Mgo_Log, addr, topic, jy.Jywx_subscribe_invite, fromUserId, jy.Jyapp_node1, nil)
+								err := jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, jy.Jywx_subscribe_invite, fromUserId, jy.Jyapp_node1, nil)
 								if err != nil {
 									log.Println("nsq队列写入失败-->", err, jy.Jywx_subscribe_invite, fromUserId)
 								}
-								err = jy.Publish(public.Mgo_Log, addr, topic, jy.Jywx_subscribe_invited, saveid, jy.Jyapp_node1, nil)
+								err = jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, jy.Jywx_subscribe_invited, saveid, jy.Jyapp_node1, nil)
 								if err != nil {
 									log.Println("nsq队列写入失败-->", err, jy.Jywx_subscribe_invited, saveid)
 								}
 							}
 						} else {
-							err := jy.Publish(public.Mgo_Log, addr, topic, jy.Jyapp_phone_register, saveid, jy.Jyapp_node1, nil)
+							err := jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, jy.Jyapp_phone_register, saveid, jy.Jyapp_node1, nil)
 							if err != nil {
 								log.Println("nsq队列写入失败-->", err, jy.Jyapp_phone_register, saveid)
 							}
@@ -545,9 +569,25 @@ func (l *Login) Register() error {
 					}()
 					l.DelSession("registerStep")
 					jy.ClearPhoneIdentSession(l.Session())
+
+					jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", qutil.ObjToString(l.GetSession("mgoUserId")), jy.Jyapp_node1, map[string]interface{}{
+						"code":       1014, //下载app任务
+						"types":      "downloadApp",
+						"num":        50,
+						"baseUserId": l.GetSession("base_user_id"),
+						"positionId": l.GetSession("positionId"),
+					})
 				})
 				if errStr == "y" {
 					returnSign = afterLogin(data, l.Session(), rid, oid, phoneType, channel, deviceId, true, l.ResponseWriter)
+
+					jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", qutil.ObjToString(l.GetSession("mgoUserId")), jy.Jyapp_node1, map[string]interface{}{
+						"code":       1014, //下载app任务
+						"types":      "downloadApp",
+						"num":        50,
+						"baseUserId": l.GetSession("base_user_id"),
+						"positionId": l.GetSession("positionId"),
+					})
 				}
 				return errStr
 			}()
@@ -723,6 +763,16 @@ func (l *Login) WxLogin() {
 		}
 		return 0
 	}()
+
+	nsqPath, _ := config.Sysconfig["nsq"].(string)
+	nsq_topic, _ := config.Sysconfig["nsq_topic"].(string)
+	jy.Publish(public.Mgo_Log, nsqPath, nsq_topic, "task", qutil.ObjToString(l.GetSession("mgoUserId")), jy.Jyapp_node1, map[string]interface{}{
+		"code":       1014, //下载app任务
+		"types":      "downloadApp",
+		"num":        50,
+		"baseUserId": l.GetSession("base_user_id"),
+		"positionId": l.GetSession("positionId"),
+	})
 	//返回
 	result := map[string]interface{}{
 		"status": status,

+ 16 - 0
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/ent_portrait.js

@@ -960,6 +960,9 @@ var vNode = {
             if (res.data && res.data == 'success') {
               _this.entInfo.follow = !_this.entInfo.follow
             }
+            if(_this.entInfo.follow) {
+              _this.pointsTaskSuccessTip()
+            }
 
             if (!_this.entInfo.follow) {
               history.back()
@@ -974,6 +977,19 @@ var vNode = {
         }
       })
     },
+    // 赚剑鱼币任务完成提示
+    pointsTaskSuccessTip: function() {
+      // 获取剑鱼币任务信息
+      const from =  utils.getParam('from')
+      var point = utils.getParam('point') || 0
+      if(from && from === 'task'){
+        this.$toast({
+          message: `关注企业成功,获得${point}剑鱼币。`,
+          duration: 1500
+        })
+        utils.delUrlParam('from')
+      }
+    },
     // 初始化图标数据
     initChartsData: function () {
       var dataSet = this.entPortraitInfo

+ 7 - 0
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/utils.js

@@ -115,6 +115,13 @@ var utils = {
         r = null;
         return context == null || context == '' || context == 'undefined' ? '' : context;
     },
+    // 移除url参数,但是不刷新页面
+    delUrlParam: function (name){
+      var href = window.location.href;
+      const e = eval(`/&?${name}=[^&#]*/g`);
+      href = href.replace(e, '');
+      history.replaceState('','',href);// replaceState方法不会触发页面刷新,只是导致history对象发生变化,地址栏
+    },
     // 取[m, n]随机数
     getRandomNumber: function (min, max) {
         return Math.floor(Math.random() * (max - min + 1) + min);

+ 44 - 10
src/jfw/modules/app/src/web/staticres/jyapp/me/js/mail_bind.js

@@ -48,9 +48,25 @@ var vm = new Vue({
         }
     },
     created: function () {
-        this.getType()
+      this.getType()
+      this.getUserInfo()
     },
     methods: {
+        getUserInfo: function () {
+          var _this = this
+          this.getUserInfoLoaded = false
+          $.ajax({
+            type: 'GET',
+            url: '/jypay/user/getAccountInfo?t=' + Date.now(),
+            success: function (res) {
+              if (res.error_code == 0 && res.data) {
+                if(res.data.otherMail) {
+                  _this.info.mail = res.data.otherMail
+                }
+              }
+            }
+          })
+        },
         getType: function () {
             if (location.pathname.indexOf('bind') !== -1) {
                 this.type = 'bind'
@@ -137,19 +153,37 @@ var vm = new Vue({
                 success: function (res) {
                     loading.clear()
                     if (res.error_code == 0 && res.data.state == 1) {
-                        _this.$toast({
-                            message: _this.someText.text + '成功',
-                            duration: 1500,
-                            forbidClick: true,
-                            onClose: function () {
-                                history.back()
-                            }
-                        })
+                      _this.pointsTaskSuccessTip()
                     } else {
                         _this.showToast(res.error_msg)
                     }
                 }
             })
         },
+        // 赚剑鱼币任务完成提示
+        pointsTaskSuccessTip: function() {
+          // 获取剑鱼币任务信息
+          const from =  utils.getParam('from')
+          var point = utils.getParam('point') || 0
+          if(from && from === 'task'){
+            this.$toast({
+              message: `绑定邮箱成功,获得${point}剑鱼币。`,
+              duration: 1500,
+              forbidClick: true,
+              onClose: function () {
+                history.back()
+              }
+            })
+          } else {
+            this.$toast({
+              message: this.someText.text + '成功',
+              duration: 1500,
+              forbidClick: true,
+              onClose: function () {
+                history.back()
+              }
+            })
+          }
+        }
     }
-})
+})

+ 10 - 1
src/jfw/modules/app/src/web/staticres/jyapp/me/js/phone_bind.js

@@ -5,7 +5,7 @@ var vm = new Vue({
         type: 'bind',
         act: '',  // 是否要做某些操作
         mode: '',  // 是否跳转强制绑定
-        from: '',  // 是否通过iframe进入
+        from: '',  // 是否通过iframe进入(form=task则是来自剑鱼币做任务)
         token: '',  // 账号合并需要的token
         fastButton: false, // 一键绑定按钮是否展示
         userInfo: {
@@ -418,6 +418,7 @@ var vm = new Vue({
         bindPhoneSuccess: function (state) {
             var _this = this
             if (state == 1) {
+                this.pointsTaskSuccessTip()
                 // 绑定手机号完成后,如果已经填写过公司。则不发送提交公司的请求
                 // 可以直接判断计算属性showEntItem,来判断需不需要填写公司
                 if (_this.showEntItem) {
@@ -467,6 +468,14 @@ var vm = new Vue({
                 // location.replace('/jyapp/free/login?back=index&flag=quit')
                 // location.replace('/jyapp/jylab/mainSearch')
             })
+        },
+        // 赚剑鱼币任务完成提示
+        pointsTaskSuccessTip: function() {
+          // 获取剑鱼币任务信息
+          if(this.from === 'task' && this.type === 'bind'){
+            var point = utils.getParam('point') || 0
+            this.showToast(`绑定手机号成功,获得${point}剑鱼币。`)
+          }
         }
     }
 })

+ 27 - 2
src/jfw/modules/app/src/web/staticres/jyapp/wxtsguide/main.js

@@ -188,6 +188,7 @@ var Guide = {
 			$("body").removeClass("step-3-body");
 		}else if(index == 4){
 			this.saveLSkeywords(true);
+      Guide.pointsTaskSuccessTip()
 			$(".step-3").hide();
 			$(".com-top-two-b").show();
 			$("body").removeClass("step-3-body");
@@ -214,6 +215,15 @@ var Guide = {
 			localStorage.tsGuide_step = index-1;
 		}
 	},
+  // 赚剑鱼币任务完成提示
+  pointsTaskSuccessTip: function () {
+    // 获取剑鱼币任务信息
+    var from = getUrlParam('from')
+    var point = getUrlParam('point') || 0
+    if(from && from === 'task'){
+      JYAlert("关注企业成功,获得" + point + "剑鱼币。")
+    }
+  },
 	appendHaskeywords: function(text){
 		text = $.trim(text);
 		if(this.checkIsMax(true) || text == ""){
@@ -468,9 +478,23 @@ var wantToUrl = getParam('url')
 if (wantToUrl) {
   Guide.params.url = decodeURIComponent(wantToUrl)
 }
-
+// 传入你要获取的参数的名字
+function getUrlParam (name) {
+  var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
+  if(Guide.params.url && Guide.params.url.split('?').length > 0) {
+    var par = Guide.params.url.split('?')[1]
+    var r = par.match(reg); //获取url中'?'符后的字符串并正则匹配
+    var context = '';
+    if (r != null) context = r[2];
+    // 释放变量
+    reg = null;
+    r = null;
+    return context == null || context == '' || context == 'undefined' ? '' : context;
+  } else {
+    return ''
+  }
+}
 Guide.clearHistoryPushDataCache()
-
 //
 var RecomKWs = function() {
 	this.count = 20;
@@ -854,6 +878,7 @@ var JYAlert = function(T,comStartFlag){
 		$("#jydialog").css({"left":"50%","margin-top":"-50px","margin-left":"-140px"});
 		$("#myModal").modal("show");
 	}
+  	$(".jyhead_mask").html(T)
 }
 // 获取已经设置过的关键词
 function getHadKeywords(step, callback){

Plik diff jest za duży
+ 97 - 1
src/jfw/modules/app/src/web/templates/frontRouter/fileRecord/sess/index.html


+ 10 - 10
src/jfw/modules/app/src/web/templates/me/account.html

@@ -50,16 +50,16 @@
                         </div>
                         <i class="van-icon van-icon-arrow van-cell__right-icon phone-icon"></i>
                     </div>
-                    <div role="button" class="van-cell van-cell--clickable van-cell--center companyClick" >
-                        <div class="van-cell__title">
-                            <span>公司</span>
-                        </div>
-                        <div class="van-cell__value">
-                            <span class="company-value" style="display:none"></span>
-                            <span class="bind-company"></span>
-                        </div>
-                        <i class="van-icon van-icon-arrow van-cell__right-icon phone-icon"></i>
-                    </div>
+<!--                    <div role="button" class="van-cell van-cell&#45;&#45;clickable van-cell&#45;&#45;center companyClick" >-->
+<!--                        <div class="van-cell__title">-->
+<!--                            <span>公司</span>-->
+<!--                        </div>-->
+<!--                        <div class="van-cell__value">-->
+<!--                            <span class="company-value" style="display:none"></span>-->
+<!--                            <span class="bind-company"></span>-->
+<!--                        </div>-->
+<!--                        <i class="van-icon van-icon-arrow van-cell__right-icon phone-icon"></i>-->
+<!--                    </div>-->
                 </div>
                 <div class="bindinfo">
                     <div class="van-cell-group__title">绑定信息</div>

+ 161 - 55
src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html

@@ -980,7 +980,8 @@
                             <span class="concat-kf">联系客服</span>
 							<span class="go-buy-file-pack" style="display: none">立即充值</span>
                             <span class="free-open-tip" style="display: none;">
-                              <span class="down-more-text">下载更多附件</span>
+                              <span class="free-has-num down-more-text" style="display:none;">本月剩余:<em class="file-count"></em>个</span>
+                              <span class="free-no-num down-more-text" style="display: none;">下载更多附件</span>
                               <span class="open-vip-btn">开通超级订阅</span>
                             </span>
                         </div>
@@ -1436,7 +1437,8 @@
                 window.vipStatus = res.data.vipStatus // 是否是超级订阅用户
                 window.viper = res.data.viper // 是否是超级订阅老用户 false:老用户 true: 新用户
                 window.entniche = res.data.entniche // 商机管理用户
-                window.fileNum = res.data.fileNum // 超级订阅用户可下载附件次数
+                // window.fileNum = res.data.fileNum // 超级订阅用户可下载附件次数
+                window.memberStatus = res.data.memberStatus // 大会员
                 window.isEntService = res.data.isEntService
                 bigstatus = res.data.memberStatus
                 hasServiceArr = res.data.power ? res.data.power : []
@@ -1487,13 +1489,13 @@
                     })
                   }
                 }
-                //非大会员或大会员无此功能 且是新超级订阅用户
-                if (res.data && res.data.vipStatus > 0 && res.data.viper&&!window.isMemberAndPower) {
-                  $('.file-count-tip').css('display', 'inline-block')
-                  $('.go-buy-file-pack').css('display', 'inline-block')
-                  $('.icon-help').css('display', 'inline-block')
-                  $('.file-count').html(res.data.fileNum)
-                }
+                // //非大会员或大会员无此功能 且是新超级订阅用户
+                // if (res.data && res.data.vipStatus > 0 && res.data.viper&&!window.isMemberAndPower) {
+                //   $('.file-count-tip').css('display', 'inline-block')
+                //   $('.go-buy-file-pack').css('display', 'inline-block')
+                //   $('.icon-help').css('display', 'inline-block')
+                //   // $('.file-count').html(res.data.fileNum)
+                // }
                 setEntServiceInfo(res)
             },
             error:function(err) {
@@ -2051,7 +2053,7 @@
       e.preventDefault()
       location.href = '/jyapp/big/page/client_portrayal?entName=' + encodeURIComponent({{.T.obj.buyer}}) + '&from=client'
     }
-    function downFileOfVIP (fileName, callback) {
+    function downloadFileAjax (fileName, callback) {
         // 有下载次数
         $.ajax({
             type: 'post',
@@ -2064,27 +2066,44 @@
                 title: title
             },
             success: function (r) {
-                if (r&&r.r&&r.r.code&&r.r.code<0&&window.vipStatus>0){
-                    // 次数用完提醒联系客服
-                    vant.Dialog.confirm({
-                        message: '您本月附件下载机会已消耗完毕,如需下载更多附件,请前往充值。',
-                        showCancelButton: true,
-                        confirmButtonText: '立即充值',
-                        confirmButtonColor: '#2ABDD1',
-                        className: 'custom-dialog',
-                        width: 303
-
-                    }).then(() => {
-                        location.href = '/jy_mobile/common/order/create/filepack?type=0'
-                    })
-                        .catch(() => {})
+                  // 重新获取下载次数
+                  subPoint()
+                if (r&&r.r&&r.r.code&&r.r.code<0){
+                    // 次数用完提醒
+                      if(window.vipStatus>0) {
+                        vant.Dialog.confirm({
+                          message: '您本月附件下载机会已消耗完毕,如需下载更多附件,请前往充值。',
+                          showCancelButton: true,
+                          confirmButtonText: '立即充值',
+                          confirmButtonColor: '#2ABDD1',
+                          className: 'custom-dialog',
+                          width: 303
+
+                        }).then(() => {
+                          location.href = '/jy_mobile/common/order/create/filepack?type=0'
+                        }).catch(() => {})
+                      } else if(window.isFree) {
+                        vant.Dialog.confirm({
+                          title: '开通超级订阅',
+                          message: '您的免费【附件下载】次数已使用完,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。',
+                          showCancelButton: true,
+                          confirmButtonText: '去开通',
+                          confirmButtonColor: '#2ABDD1',
+                          className: 'custom-dialog',
+                          width: 303,
+                          messageAlign: 'left',
+                        }).then(() => {
+                          // location.href = '/jyapp/vipsubscribe/vipsubscribe_new'
+                          location.href = '/jy_mobile/common/order/create/svip?type=buy'
+                        }).catch(() => {})
+                      }
                     return
                 }else if (r && r.m === '' && r.r) {
                     var url = r.r.downUrl
                     if (url){
                         if (!r.r.isExists){
-                            window.fileNum = window.fileNum - 1;
-                            $('.file-count').html($('.file-count').text()-1)
+                            // window.fileNum = Number(window.fileNum) - 1;
+                            // $('.file-count').text(Number($('.file-count').text())-1)
                         }
                         if(mySysIsIos()){
                             typeof callback === 'function' ? callback(url) : null
@@ -2101,6 +2120,57 @@
         })
     }
 
+    // 获取当前用户附件下载数量(用户下载次数判断需要)
+    window.downloadNum = 0
+    function subPoint() {
+      $.ajax({
+        url: '/jypay/resourcePack/account',
+        type: 'POST',
+        contentType: 'application/x-www-form-urlencoded',
+        data: {
+          product: 'attachmentDownPack'
+        },
+        dataType: 'json'
+      }).done(res => {
+        if (res.error_msg === '' && res.data && res.data.data) {
+          try {
+            var downloadNum =  res.data.data[0].number || 0
+            window.downloadNum = downloadNum // 免费用户可下载附件次数
+            window.fileNum = downloadNum // 超级订阅用户可下载附件次数
+            // 免费用户处理
+            if(window.isFree) {
+              // 免费用户且未留资过也未体验过,展示文案(引导留资)
+              if (window.freeFile == 0) {
+                if(downloadNum > 0) {
+                  $('.free-down-text').text('免费用户享有' + downloadNum + '次附件下载权益')
+                } else {
+                  $('.free-down-text').text('免费用户享有1次附件下载权益')
+                }
+              } else {
+                // 免费用户体验过
+               if(downloadNum > 0){
+                  $('.free-has-num').show() // 展示下载次数
+                  $('.free-no-num').hide()
+                } else{
+                 $('.free-has-num').hide() // 隐藏下载次数
+                 $('.free-no-num').show() // 展示下载更多附件
+               }
+              }
+            }
+            //非大会员或大会员无此功能 且是新超级订阅用户
+            if ( window.vipStatus > 0 && window.viper&&!window.isMemberAndPower) {
+              $('.file-count-tip').css('display', 'inline-block')
+              $('.go-buy-file-pack').css('display', 'inline-block')
+              $('.icon-help').css('display', 'inline-block')
+            }
+            // 下载次数
+            $('.file-count').html(downloadNum)
+          } catch (e) {
+            console.warn(e)
+          }
+        }
+      })
+    }
     // 附件下载展示
     function andownload() {
         $.ajax({
@@ -2123,26 +2193,31 @@
                             html += "<li class='downs'>"+"<a class='menu_list' data-href="+data.data.attachment[i].downurl+">"+data.data.attachment[i].filename+"</a></li>"
                         }
                     }
-
                     $('.download-list>ul').append(html)
-                     // 下载附件
+                  // 下载附件
                     $('.downs').on('click', function() {
                       var url = $(this).find('a').attr('data-href')
                       var size = $(this).find('a').attr('date-size')
                       var fileName = $(this).find('a').text()
-                      console.log(window.isNoMember, window.isFree,window.freeFile, window.vipStatus, window.viper)
+                      console.log(window.isNoMember, window.isFree,window.freeFile, window.downloadNum,window.vipStatus, window.viper)
                       // 免费用户
                       if (window.isFree) {
                         // 判断有无体验过 0:未体验过
                         if (window.freeFile == 0) {
+                          // h5页跳转走数据不刷新处理
+                          if (utils.$envs.inH5) {
+                            subPoint()
+                          }
                           // 判断有无留过资 且未体验过 - 去留资
                           location.href = '/jyapp/frontPage/bigmember/free/perfect_info?source=article_attach_freeuser'
                           return
-                        } else if (window.freeFile < 0 ) {
-                          // 免费用户 体验过 下载次数为-1 弹框提醒跳至超级订阅购买页
+                        } else if (window.freeFile < 0 && window.downloadNum <= 0) {
+                          // 免费体验用户,无下载此处提示开通超级订阅
+                          // 免费用户 体验过(freeFile=-1) 剩余下载次数 弹框提醒跳至超级订阅购买页
+                          // message: '您已经免费解锁过【附件下载】权益1次,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。',
                           vant.Dialog.confirm({
                             title: '开通超级订阅',
-                            message: '您已经免费解锁过【附件下载】权益1次,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。',
+                            message: '您的免费【附件下载】次数已使用完,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。',
                             showCancelButton: true,
                             confirmButtonText: '去开通',
                             confirmButtonColor: '#2ABDD1',
@@ -2155,19 +2230,25 @@
                           })
                           .catch(() => {})
                           return
-                        }else if(window.freeFile>0){
+                        }else{
+                          // P317版本改为免费用户只要有下载次数,均可正常下载
                           window.freeFile=-1
-                          //
-                          gotoFilePage($(this).find('a').text())
+                          // IOS APP端特殊流程处理,先提示填写邮箱后扣次数
+                          if(mySysIsIos()) {
+                            return iosShow(url, fileName,size)
+                          }
+                          downloadFileAjax(fileName)
+                          // gotoFilePage($(this).find('a').text())
                         }
                       } else {
                         // 付费用户
-                        // 大会员用户 有下载权限
-                        if (window.isMemberAndPower) {
+                        // 大会员用户 且有附件下载个数
+                        if (window.memberStatus > 0) {
                           if(mySysIsIos()){
                             iosShow(url,fileName,size,false)
                           } else {
-                            location.href = url
+                            downloadFileAjax(fileName)
+                            // location.href = url
                           }
                           return
                         }
@@ -2179,13 +2260,13 @@
                             if(mySysIsIos()) {
                               return iosShow(url, fileName,size,false)
                             }
-                            downFileOfVIP(fileName)
+                            downloadFileAjax(fileName)
                             return
                             //if (window.fileNum <= 0) {
                             //}else{
-                              //window.fileNum = window.fileNum - 1;
-                              //gotoFilePageOfVip($(this).find('a').text())
-                              //return
+                            //window.fileNum = window.fileNum - 1;
+                            //gotoFilePageOfVip($(this).find('a').text())
+                            //return
                             //}
                           } else {
                             // 老超级订阅用户 提醒升级
@@ -2206,6 +2287,16 @@
                             return
                           }
                         }
+                        // 商机管理用户只要有个数就有下载权限
+                        if(window.entniche && window.downloadNum > 0){
+                          if(mySysIsIos()){
+                            iosShow(url,fileName,size,false)
+                          } else {
+                            downloadFileAjax(fileName)
+                          }
+                          return
+                        }
+
                         // 是大会员自定义版本没有下载权限 或 非超级订阅的商机管理用户 (弹框提醒联系客服)
                         var memberNoVip = window.isNoMember == true && !(window.vipStatus >0 && window.viper)
                         if (memberNoVip || (window.vipStatus <=0 && window.entniche)) {
@@ -2215,7 +2306,8 @@
                             confirmButtonText: '我知道了',
                             confirmButtonColor: '#2ABDD1',
                             width: 303,
-                          }).then(() => {})
+                          }).then(() => {
+                          })
                           return
                         }
                       }
@@ -2271,19 +2363,15 @@
     //ios更改为下载
     //老版本还走邮件模式  新版本走下载 需要判断版本号
     //isfree 是否是免费
-    function iosShow(url,fileName,size,isfree){
+    function iosShow(url,fileName,size){
       var version = JyObj.getVersion()
       if(version && compareVersion('3.0.4',version)){
         //切割名称获取格式
           var name = fileName ? fileName.substring(0, fileName.lastIndexOf('.')) : ''
           var types = fileName ? fileName.substring(fileName.lastIndexOf('.') + 1) : ''
-          if (isfree){
-              JyObj.downLoadFile(name,types,url,size);
-          }else{
-            downFileOfVIP(fileName, function (url) {
-              JyObj.downLoadFile(name,types,url,size);
-            })
-          }
+          downloadFileAjax(fileName, function (url) {
+            JyObj.downLoadFile(name,types,url,size);
+          })
         }else{
           iosShow_email(url,fileName,isfree)
         }
@@ -2323,7 +2411,7 @@
                     //按下确定按钮执行的操作
                     //todo ....
                     if (!isfree) {
-                        downFileOfVIP(fileName, function (url) {
+                        downloadFileAjax(fileName, function (url) {
                             sendAlert(url,getinputemail)
                         })
                     } else {
@@ -2779,6 +2867,7 @@
         $('.caigouunit .textcontent').css('color', '#171826')
         $('.zhongbiaounit').addClass('notextcontent')
       }
+      // 获取isAdd的信息
       isOpening()
       $(document).on('click',".border-tel",function(){
           if(!isEntniche&&!isVIP&&bigstatus<=0){
@@ -3218,7 +3307,8 @@
                               sessionStorage.followSetReload = "1";
                           }
                           followId = r.data;
-                          EasyAlert.show("已关注,可从“我的-<br>项目关注”查看<br>或设置提醒日期",{"text-align":"left","width":"195px"});
+                          // EasyAlert.show("已关注,可从“我的-<br>项目关注”查看<br>或设置提醒日期",{"text-align":"left","width":"195px"});
+                          pointsTaskSuccessTip()
                           followFlag = true;
                           jumpFlag = true;
                           $(".follow").html('<i class="glyphicon yiguanzhu"></i>已关注');
@@ -3248,7 +3338,19 @@
               location.href = '/jyapp/big/page/landingPage'
           })
       });
-
+      // 赚剑鱼币任务完成提示
+      function pointsTaskSuccessTip() {
+        // 获取剑鱼币任务信息
+        const from =  utils.getParam('from')
+        var point = utils.getParam('point') || 0
+        if(from && from === 'task'){
+          EasyAlert.show("关注项目成功,获得" + point + "剑鱼币。<br>可从“我的-<br>项目关注”查看<br>或设置提醒日期",{"text-align":"left","width":"195px"}, 2000);
+          utils.delUrlParam('from')
+        } else {
+          // 普通提示
+          EasyAlert.show("已关注,可从“我的-<br>项目关注”查看<br>或设置提醒日期",{"text-align":"left","width":"195px"});
+        }
+      }
       //
       $(".myfollowent").click(function(){
           var entname = $(this).text()
@@ -3472,9 +3574,13 @@
       window.addEventListener('pagehide', function () {
           isPageHide = true;
       });
+      subPoint()
       if (canRead) {
         // 有权限查看的才会下载附件
-        andownload()
+        setTimeout(function(){
+          andownload()
+        }, 500)
+
       }
       // 收藏
       $('.collec_star').on('click', function () {

+ 5 - 0
src/jfw/modules/bigmember/src/config.json

@@ -181,6 +181,11 @@
   "newDataTime": 1685606275,
   "projectCount": 5000,
   "portraitStartTime": 2018,
+<<<<<<< HEAD
   "portraitDynamicTime": 7,
   "portraitCount": 30
+=======
+  "nsq": "192.168.3.240:4260",
+  "nsq_topic": "jy_event"
+>>>>>>> master
 }

+ 10 - 0
src/jfw/modules/bigmember/src/config/config.go

@@ -65,6 +65,7 @@ type config struct {
 		Details  string `json:"details"`
 		ListPage string `json:"listPage"`
 	} `json:"claim"`
+<<<<<<< HEAD
 	ContextOldVipLimit  int64 `json:"contextOldVipLimit"` //超级订阅部分用户:--- 超前项目权限
 	PotentialCount      int   `json:"potentialCount"`     //潜在客户 潜在竞争对手数据量
 	NewDataTime         int64 `json:"newDataTime"`        // 用于周边月报区分是否为新数据 、配置为p350发版的时间
@@ -72,6 +73,15 @@ type config struct {
 	PortraitStartTime   int   `json:"portraitStartTime"`
 	PortraitDynamicTime int   `json:"portraitDynamicTime"`
 	PortraitCount       int   `json:"portraitCount"`
+=======
+	ContextOldVipLimit int64  `json:"contextOldVipLimit"` //超级订阅部分用户:--- 超前项目权限
+	PotentialCount     int    `json:"potentialCount"`     //潜在客户 潜在竞争对手数据量
+	NewDataTime        int64  `json:"newDataTime"`        // 用于周边月报区分是否为新数据 、配置为p350发版的时间
+	ProjectCount       int    `json:"projectCount"`       //画像和报告项目明细最大数量
+	PortraitStartTime  int    `json:"portraitStartTime"`
+	Nsq                string `json:"nsq"`
+	Nsq_topic          string `json:"nsq_topic"`
+>>>>>>> master
 }
 
 type CustomerInfo struct {

+ 2 - 2
src/jfw/modules/bigmember/src/entity/followProject.go

@@ -1,7 +1,6 @@
 package entity
 
 import (
-	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"encoding/json"
 	"errors"
 	"fmt"
@@ -15,6 +14,8 @@ import (
 	"sync"
 	"time"
 
+	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
+
 	qutil "app.yhyue.com/moapp/jybase/common"
 	elastic "app.yhyue.com/moapp/jybase/es"
 	"app.yhyue.com/moapp/jybase/redis"
@@ -145,7 +146,6 @@ func (this *ProjectFollow) SaveProject(sid string) (string, error) {
 	if followId == "" {
 		return "", errors.New("关注项目出错")
 	}
-
 	return followId, nil
 }
 

+ 4 - 4
src/jfw/modules/bigmember/src/go.mod

@@ -5,8 +5,8 @@ go 1.19
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230727083622-4dfc804ea6cf
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v0.0.0-20230710012638-0d2f7219700e
-	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13
+	app.yhyue.com/moapp/jypkg v0.0.0-20231024062045-5c364be1561d
+	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.14
 	github.com/donnie4w/go-logger v0.0.0-20230316073421-36a48f87a69a
 	github.com/gogf/gf/v2 v2.4.2
 	github.com/olivere/elastic/v7 v7.0.32
@@ -18,7 +18,7 @@ require (
 	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547 // indirect
 	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae // indirect
 	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e // indirect
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230222052351-9d6fad062447 // indirect
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a // indirect
 	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7 // indirect
 	github.com/BurntSushi/toml v1.1.0 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
@@ -134,7 +134,7 @@ require (
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 	gorm.io/driver/mysql v1.0.5 // indirect
 	gorm.io/gorm v1.21.3 // indirect
-	jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230630032508-eefb06a4588e // indirect
+	jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20231017031425-45003ca9f35a // indirect
 	k8s.io/api v0.26.3 // indirect
 	k8s.io/apimachinery v0.27.0-alpha.3 // indirect
 	k8s.io/client-go v0.26.3 // indirect

+ 8 - 8
src/jfw/modules/bigmember/src/go.sum

@@ -9,18 +9,18 @@ app.yhyue.com/moapp/jybase v0.0.0-20230727083622-4dfc804ea6cf h1:/Tk5haITmGc5c3/
 app.yhyue.com/moapp/jybase v0.0.0-20230727083622-4dfc804ea6cf/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-20230710012638-0d2f7219700e h1:phO8+opFgz3p1XebtdLepM1u8q/TE/EgLYjP4Ebt/jU=
-app.yhyue.com/moapp/jypkg v0.0.0-20230710012638-0d2f7219700e/go.mod h1:wbDWBpLODtGhkQw4dCShvmRr6G8CazuW8kWq42paQOM=
+app.yhyue.com/moapp/jypkg v0.0.0-20231024062045-5c364be1561d h1:h8SnO8ONZlmtx8ZSYtpw36TdBhYPy8WgLeWHyMGZj0Q=
+app.yhyue.com/moapp/jypkg v0.0.0-20231024062045-5c364be1561d/go.mod h1:76Kz6+MuxcRJRyFad9W8R4AByiQlVGzuGFzklY+2m38=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae h1:6rDDaz6yxvE8viTSzEBwKYOFWq14TMfuBivSazUZMz4=
 app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae/go.mod h1:b0zZHev3gmJao1Fo+2Z2KPVjsuLOJVvVxf+kCnu9WkA=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e h1:h+VEI3o1qC0jeCzkFGTrLI4f27cfa/W/y+0sXokWMgE=
 bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e/go.mod h1:7Xhygw0KBuL4h0G76FnFg4otQcA9bmOO0c8M0FCjAyQ=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230222052351-9d6fad062447 h1:hrBqrsf2QHTrnoR9VTV4w7g2akDfbpQ+umNQvkkNs+Y=
-bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230222052351-9d6fad062447/go.mod h1:5nimT8GJh46AyfeeDeyRlDQygMlO7TRM8Pwm41Gxemc=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a h1:JX2jEMrbdLzXfVC/nTUvdFOkqNj5DUxkJFjl3XE1gyg=
+bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a/go.mod h1:5nimT8GJh46AyfeeDeyRlDQygMlO7TRM8Pwm41Gxemc=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7 h1:G6PHMWAHfYEuY6kbl7OM/KnCQf1Xa54mdhuP7JzK8/I=
 bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7/go.mod h1:rRiGzKG4F/fmkNxXQCxrkxNWc8yf1SmW8qWCKfGIQSM=
-bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13 h1:aK3ya7aznINdAuEl7sKq9U2MvJidUfk6nxPGjjX+t3Y=
-bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13/go.mod h1:vDEKni2rnCraKgKnnCEIwsFmO92GxnpfKmNQ+83wKP0=
+bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.14 h1:L/0RrgU+l8nMS7YO2JizszaX3lAo0gqzg2Bqmu0So0s=
+bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.14/go.mod h1:03M9BWIGHy7BbGxLvjt8V9zZzEZDWhN6BuHVfVcDFbQ=
 cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
 cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
 cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw=
@@ -1420,8 +1420,8 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh
 honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
 honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
-jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230630032508-eefb06a4588e h1:1O11hFuKvLD3Ls+9wxssUpMV3fG9qD4EfeeAy92dsWY=
-jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20230630032508-eefb06a4588e/go.mod h1:wBxeFODhYtGenkxXJGThN/VrFaxPvvHMxzpS09pxApM=
+jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20231017031425-45003ca9f35a h1:kwjO4pqB3gnNGrQ9aXyz6f8s9qXAUenPUDWip8gYR/Q=
+jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20231017031425-45003ca9f35a/go.mod h1:p/595fgbj4r6GhSJhHDpx3Ru1NkD5UASFL8OuIQw09E=
 k8s.io/api v0.22.9/go.mod h1:rcjO/FPOuvc3x7nQWx29UcDrFJMx82RxDob71ntNH4A=
 k8s.io/api v0.26.3 h1:emf74GIQMTik01Aum9dPP0gAypL8JTLl/lHa4V9RFSU=
 k8s.io/api v0.26.3/go.mod h1:PXsqwPMXBSBcL1lJ9CYDKy7kIReUydukS5JiRlxC3qE=

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

@@ -1,15 +1,18 @@
 package follow
 
 import (
-	. "app.yhyue.com/moapp/jybase/api"
-	qutil "app.yhyue.com/moapp/jybase/common"
 	"errors"
 	"fmt"
+	"jy/src/jfw/modules/bigmember/src/config"
+	"jy/src/jfw/modules/bigmember/src/db"
 	"jy/src/jfw/modules/bigmember/src/entity"
 	"jy/src/jfw/modules/bigmember/src/util"
 	"log"
 
+	. "app.yhyue.com/moapp/jybase/api"
+	qutil "app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 )
 
 // FollowEnt 大会员关注企业接口(企业情报)
@@ -146,6 +149,14 @@ func (this *FollowEnt) AddFollow() {
 		if err != nil {
 			return nil, err
 		}
+		//	首次完成关注企业可获得积分
+		jy.Publish(db.Mgo_Log, config.Config.Nsq, config.Config.Nsq_topic, "task", qutil.ObjToString(this.GetSession("mgoUserId")), jy.Jywx_node1, map[string]interface{}{
+			"code":       1012, //关注企业
+			"types":      "followEnt",
+			"num":        50,
+			"baseUserId": this.GetSession("base_user_id"),
+			"positionId": this.GetSession("positionId"),
+		})
 		return "success", nil
 	}()
 	if errMsg != nil {

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

@@ -1,17 +1,21 @@
 package follow
 
 import (
-	. "app.yhyue.com/moapp/jybase/api"
-	qutil "app.yhyue.com/moapp/jybase/common"
-	elastic "app.yhyue.com/moapp/jybase/es"
 	"errors"
 	"fmt"
+	"jy/src/jfw/modules/bigmember/src/config"
+	"jy/src/jfw/modules/bigmember/src/db"
 	"jy/src/jfw/modules/bigmember/src/entity"
 	"jy/src/jfw/modules/bigmember/src/util"
+
 	"log"
 	"strings"
 
+	. "app.yhyue.com/moapp/jybase/api"
+	qutil "app.yhyue.com/moapp/jybase/common"
+	elastic "app.yhyue.com/moapp/jybase/es"
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 )
 
 // FollowProject 大会员关注项目接口
@@ -48,6 +52,16 @@ func (this *FollowProject) AddProject() {
 		if err != nil {
 			return nil, err
 		}
+
+		//	首次完成项目关注可获得积分
+		jy.Publish(db.Mgo_Log, config.Config.Nsq, config.Config.Nsq_topic, "task", qutil.ObjToString(this.GetSession("mgoUserId")), jy.Jywx_node1, map[string]interface{}{
+			"code":       1013, //关注项目
+			"types":      "followProject",
+			"num":        50,
+			"baseUserId": this.GetSession("base_user_id"),
+			"positionId": this.GetSession("positionId"),
+		})
+
 		return util.EncodeId(followId), nil
 	}()
 	if errMsg != nil {

+ 2 - 1
src/jfw/modules/publicapply/src/config.json

@@ -57,5 +57,6 @@
   "nsq":"192.168.3.240:4260",
   "nsq_topic": "jy_event",
   "accountMergeOnline": "2015-03-30 00:00:00",
-  "criticality":2
+  "criticality":2,
+  "taskStartTime":1698020000
 }

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

@@ -41,6 +41,7 @@ type config struct {
 	NsqTopic           string `json:"nsq_topic"`
 	AccountMergeOnline string `json:"accountMergeOnline"`
 	Criticality        int    `json:"criticality"`
+	TaskStartTime      int64
 }
 type BidColl struct {
 	PayUserCollLimit      int    //付费用户收藏数量最大限制

+ 4 - 0
src/jfw/modules/publicapply/src/identity/service/action.go

@@ -10,4 +10,8 @@ type Identity struct {
 	list xweb.Mapper `xweb:"/identity/list"`
 	//身份切换
 	switchIdentity xweb.Mapper `xweb:"/identity/switch"`
+	//编辑身份信息维护
+	edit xweb.Mapper `xweb:"/identity/maintenance/edit"`
+	//获取身份信息维护
+	detail xweb.Mapper `xweb:"/identity/maintenance/detail"`
 }

+ 103 - 0
src/jfw/modules/publicapply/src/identity/service/service.go

@@ -6,10 +6,12 @@ import (
 	. "jy/src/jfw/modules/publicapply/src/config"
 	. "jy/src/jfw/modules/publicapply/src/db"
 	"log"
+	"strings"
 
 	. "app.yhyue.com/moapp/jybase/api"
 	util "app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/encrypt"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	. "app.yhyue.com/moapp/jypkg/identity"
 )
 
@@ -98,3 +100,104 @@ func (f *Identity) SwitchIdentity() {
 		Data: status,
 	})
 }
+
+func (f *Identity) Edit() {
+	userId, _ := f.GetSession("mgoUserId").(string)
+	set := map[string]interface{}{}
+	entName := strings.TrimSpace(f.GetString("entName"))
+	if entName != "" {
+		set["s_company"] = entName
+	}
+	if entType := strings.TrimSpace(f.GetString("entType")); entType != "" {
+		set["identity_info.ent_type"] = entType
+	}
+	if position := strings.TrimSpace(f.GetString("position")); position != "" {
+		set["identity_info.position"] = position
+	}
+	if deptName := strings.TrimSpace(f.GetString("deptName")); deptName != "" {
+		set["identity_info.dept_name"] = deptName
+	}
+	entBusinessType := strings.TrimSpace(f.GetString("entBusinessType"))
+	if entBusinessType != "" {
+		set["identity_info.ent_businessType"] = entBusinessType
+	}
+	status := 0
+	if len(set) > 0 {
+		if Mgo.UpdateById("user", userId, map[string]interface{}{"$set": set}) {
+			userMsg, _ := Mgo.FindById("user", userId, `{"l_registedate":1}`)
+			isNew := false
+			if userMsg != nil && len(*userMsg) > 0 {
+				l_registedate := util.Int64All((*userMsg)["l_registedate"])
+				isNew = l_registedate > Config.TaskStartTime //是否注册时间处于新手任务开始时间
+			}
+			status = 1
+			if entName != "" {
+				err := jy.Publish(Mgo_Log, Config.Nsq, Config.NsqTopic, "task", userId, "", map[string]interface{}{
+					"code":       util.If(isNew, "1010", "1017"),
+					"types":      "improveEntInfo",
+					"baseUserId": util.Int64All(f.GetSession("base_user_id")),
+				})
+				if err != nil {
+					log.Println(userId, "完善身份信息-公司信息,发送nsq消息错误-->", err)
+				}
+			}
+			if entBusinessType != "" {
+				err := jy.Publish(Mgo_Log, Config.Nsq, Config.NsqTopic, "task", userId, "", map[string]interface{}{
+					"code":       util.If(isNew, "1011", "1018"),
+					"types":      "improveBusiness",
+					"baseUserId": util.Int64All(f.GetSession("base_user_id")),
+				})
+				if err != nil {
+					log.Println(userId, "完善身份信息-公司信息,发送nsq消息错误-->", err)
+				}
+			}
+		}
+	}
+	f.ServeJson(Result{Data: status})
+}
+
+func (f *Identity) Detail() {
+	userId, _ := f.GetSession("userId").(string)
+	mgoUserId, _ := f.GetSession("mgoUserId").(string)
+	u, ok := Mgo.FindById("user", mgoUserId, `{"s_company":1,"identity_info":1}`)
+	data := M{}
+	if ok && u != nil && len(*u) > 0 {
+		entType, position, deptName, entBusinessType := "", "", "", ""
+		entName, _ := (*u)["s_company"].(string)
+		identityInfo, _ := (*u)["identity_info"].(map[string]interface{})
+		if identityInfo != nil {
+			entType, _ = identityInfo["ent_type"].(string)
+			position, _ = identityInfo["position"].(string)
+			deptName, _ = identityInfo["dept_name"].(string)
+			entBusinessType, _ = identityInfo["ent_businessType"].(string)
+		}
+		if entName == "" || position == "" || deptName == "" || entType == "" {
+			saleLeads, ok := Mgo.Find("saleLeads", map[string]interface{}{
+				"userid": userId,
+			}, `{"createtime":-1}`, `{"company":1,"position":1,"department":1,"companyType":1,"branch":1}`, false, 0, 1)
+			if ok && saleLeads != nil && len(*saleLeads) == 1 {
+				if entName == "" {
+					entName, _ = (*saleLeads)[0]["company"].(string)
+				}
+				if position == "" {
+					position, _ = (*saleLeads)[0]["position"].(string)
+				}
+				if deptName == "" {
+					deptName, _ = (*saleLeads)[0]["department"].(string)
+				}
+				if deptName == "" {
+					deptName, _ = (*saleLeads)[0]["branch"].(string)
+				}
+				if entType == "" {
+					entType, _ = (*saleLeads)[0]["companyType"].(string)
+				}
+			}
+		}
+		data["entName"] = entName
+		data["entType"] = entType
+		data["position"] = position
+		data["deptName"] = deptName
+		data["entBusinessType"] = entBusinessType
+	}
+	f.ServeJson(Result{Data: data})
+}

+ 25 - 1
src/jfw/modules/publicapply/src/subscribePush/entity/keyWords.go

@@ -1,7 +1,6 @@
 package entity
 
 import (
-	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
 	"fmt"
 	"jy/src/jfw/modules/publicapply/src/config"
 	"jy/src/jfw/modules/publicapply/src/db"
@@ -10,6 +9,8 @@ import (
 	"strings"
 	"time"
 
+	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
+
 	qutil "app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
@@ -268,6 +269,17 @@ func AddKeyWordsFree(types, userId, classIndex, className, keywordsIndex, keywor
 				AppId:      "10000",
 			})
 			config.Middleground.PowerCheckCenter.DelCheckRedis("10000", qutil.Int64All(positionId))
+			//判断是新增
+			if (keywordCount == "" || keywordCount == "0") || (keywordCount == keywordsIndex || qutil.Int64All(keywordCount) == qutil.Int64All(keywordsIndex)+1) {
+				//设置关键词送积分
+				jy.Publish(db.Mgo_Log, config.Config.Nsq, config.Config.NsqTopic, "task", qutil.ObjToString(session.Get("mgoUserId")), jy.Jywx_node1, map[string]interface{}{
+					"code":       1015, //首次订阅
+					"types":      "subscribeKeyWords",
+					"num":        50,
+					"baseUserId": session.Get("base_user_id"),
+					"positionId": positionId,
+				})
+			}
 		}
 		SetLog(userId, types, 0, session)
 	}
@@ -342,6 +354,18 @@ func AddKeyWords(types, userId, classIndex, className, keywordsIndex, keywordNam
 			"$set": saveData,
 		})
 		SetLog(userId, types, positionType, session)
+		//判断是新增
+
+		if (keywordCount == "" || keywordCount == "0") || (keywordCount == keywordsIndex || qutil.Int64All(keywordCount) == qutil.Int64All(keywordsIndex)+1) {
+			//设置关键词送积分
+			jy.Publish(db.Mgo_Log, config.Config.Nsq, config.Config.NsqTopic, "task", qutil.ObjToString(session.Get("mgoUserId")), jy.Jywx_node1, map[string]interface{}{
+				"code":       1015, //首次订阅
+				"types":      "subscribeKeyWords",
+				"num":        50,
+				"baseUserId": session.Get("base_user_id"),
+				"positionId": session.Get("positionId"),
+			})
+		}
 	}
 	return map[string]interface{}{"flag": flag, "msg": ""}
 }

+ 7 - 7
src/jfw/modules/subscribepay/src/baseApi.json

@@ -1,12 +1,12 @@
 {
   "appId": "10000",
   "apiList": {
-    "buyBalance": "http://127.0.0.1:8124/resources/purchaseUserBalance",
-    "useBalance": "http://127.0.0.1:8124/resources/useUserDetailed",
-    "findPreview": "http://127.0.0.1:8124/resources/findPreview",
-    "findBalance": "http://127.0.0.1:8124/resources/findBalance",
-    "findRecord": "http://127.0.0.1:8124/resources/findRecord",
-    "entdedupUrl": "http://127.0.0.1:8888/data/deduplication",
-    "updateVipTime":"http://127.0.0.1:8124/resources/updateVipTime"
+    "buyBalance": "http://127.0.0.1:8889/resources/purchaseUserBalance",
+    "useBalance": "http://127.0.0.1:8889/resources/useUserDetailed",
+    "findPreview": "http://127.0.0.1:8889/resources/findPreview",
+    "findBalance": "http://127.0.0.1:8889/resources/findBalance",
+    "findRecord": "http://127.0.0.1:8889/resources/findRecord",
+    "entdedupUrl": "http://127.0.0.1:8889/data/deduplication",
+    "updateVipTime":"http://127.0.0.1:8889/resources/updateVipTime"
   }
 }

+ 11 - 10
src/jfw/modules/subscribepay/src/config.json

@@ -1,17 +1,17 @@
 {
-  "smsServiceRpc":"192.168.3.11:932",
+  "smsServiceRpc":"192.168.3.149:932",
   "mongodbServers": "192.168.3.206:27080",
   "mongodbPoolSize": 10,
   "mongodbName": "qfw",
   "mongoent":{
-    "address": "192.168.3.207:27001,192.168.3.206:27002",
+    "address": "192.168.3.206:27002",
     "size": 5,
     "dbName": "qfw_data",
     "userName": "jyDevGroup",
     "password": "jy@DevGroup"
   },
   "mongobidding":{
-    "address": "192.168.3.207:27001,192.168.3.206:27002",
+    "address": "192.168.3.206:27002",
     "size": 5,
     "dbName": "qfw_data",
     "replSet": "",
@@ -33,7 +33,7 @@
     "userName": "admin",
     "password": "123456"
   },
-  "redisaddrs": "other=192.168.3.206:1712,session=192.168.3.11:1713,push=192.168.3.206:1712,newother=192.168.3.206:1712",
+  "redisaddrs": "other=192.168.3.149:1712,session=192.168.3.149:1713,push=192.168.3.149:1712,newother=192.168.3.149:1712",
   "elasticsearch": "http://192.168.3.206:9800,http://192.168.3.206:9801",
   "elasticPoolSize": 30,
   "elasticVersion": "v7",
@@ -43,7 +43,7 @@
   "appsecret": "ed5961aa2fca99d13ccff99130ba2866",
   "webport": "86",
   "webrpcport": "84",
-  "weixinrpc": "192.168.3.11:8202",
+  "weixinrpc": "127.0.0.1:8202",
   "cassandra": {
     "log": {
       "host": [
@@ -61,7 +61,7 @@
   },
     "mysql": {
         "dbName": "jianyu",
-        "address": "192.168.3.11:3366",
+        "address": "192.168.3.149:3306",
         "userName": "root",
         "passWord": "Topnet123",
 		"maxOpenConns":5,
@@ -69,15 +69,15 @@
 	},
     "infoMysql": {
         "dbName": "base_service",
-        "address": "192.168.3.11:3366",
+        "address": "192.168.3.217:4000",
         "userName": "root",
-        "passWord": "Topnet123",
+        "passWord": "=PDT49#80Z!RVv52_z",
 		"maxOpenConns":2,
 		"maxIdleConns":2
 	},
 	"activityMysql":{
 		 "dbName": "jyactivities",
-        "address": "192.168.3.11:3366",
+        "address": "192.168.3.149:3306",
         "userName": "root",
         "passWord": "Topnet123",
 		"maxOpenConns":5,
@@ -157,5 +157,6 @@
     "etcd": {
     	"hosts": "192.168.3.149:2379",
     	"key": "powercheck.rpc"
-    }
+    },
+    "taskStartTime":1698020000
 }

+ 1 - 1
src/jfw/modules/subscribepay/src/config.yaml

@@ -1,6 +1,6 @@
 etcd:
   hosts:
-  - 192.168.3.149:2379
+  - 127.0.0.1:2379
 userCenterKey: "usercenter.rpc" #用户中台rpc
 powerCheckCenterKey: "powercheck.rpc" #权益校验中台
 activityKey: "activity.rpc" #营销平台rpc

+ 4 - 3
src/jfw/modules/subscribepay/src/config/config.go

@@ -3,9 +3,6 @@ package config
 import (
 	"time"
 
-	"app.yhyue.com/moapp/jypkg/middleground"
-	"github.com/gogf/gf/v2/frame/g"
-	"github.com/gogf/gf/v2/os/gcfg"
 	"github.com/gogf/gf/v2/os/gctx"
 
 	qutil "app.yhyue.com/moapp/jybase/common"
@@ -13,6 +10,9 @@ import (
 	"app.yhyue.com/moapp/jybase/mail"
 	qrpc "app.yhyue.com/moapp/jybase/rpc"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/middleGround"
+	"app.yhyue.com/moapp/jypkg/middleground"
+	"github.com/gogf/gf/v2/frame/g"
+	"github.com/gogf/gf/v2/os/gcfg"
 )
 
 type config struct {
@@ -116,6 +116,7 @@ type config struct {
 	}
 	KeywordsLimit     int
 	BreakRenewTipTime string
+	TaskStartTime     int64
 }
 type mgoConf struct {
 	Address           string

+ 69 - 71
src/jfw/modules/subscribepay/src/entity/basePack.go

@@ -4,6 +4,7 @@ import (
 	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
 	"encoding/json"
 	"fmt"
+	"github.com/gogf/gf/v2/util/gconv"
 	"jy/src/jfw/modules/subscribepay/src/config"
 	"jy/src/jfw/modules/subscribepay/src/util"
 	"log"
@@ -13,7 +14,6 @@ import (
 	. "app.yhyue.com/moapp/jybase/date"
 	"app.yhyue.com/moapp/jybase/encrypt"
 	. "app.yhyue.com/moapp/jybase/mongodb"
-	"app.yhyue.com/moapp/jybase/redis"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 )
 
@@ -26,20 +26,56 @@ func (this *UseBalanceStruct) defaultConsume() (r map[string]interface{}, m stri
 	return
 }
 
-//附件下载消费 fui:免费赠送已使用次数;pui:付费权限已使用次数
+// 附件下载消费 fui:免费赠送已使用次数;pui:付费权限已使用次数
 func (this *UseBalanceStruct) fileConsume() (r map[string]interface{}, m string, c int) {
 	_fileName := this.Remarks["fileName"].(string)
 	_id := this.Remarks["id"].(string)
 	log.Println("附件下载包。。。。。")
 	BaseMsg := jy.GetBigVipUserBaseMsg(this.Session, *config.Middleground)
 	log.Println("---:", this.Remarks)
+	//获取余额数量
+	dbs := &FindBalanceStruct{
+		AccountId:    this.UserId,
+		ResourceType: "附件下载包",
+		VipState:     BaseMsg.VipStatus,
+	}
+	this.VipState = BaseMsg.VipStatus
+	data, err := dbs.FindBalance()
+	if data == nil || err != nil {
+		c = -1
+		m = "余额不足"
+		return
+	}
+	number := 0
+	if data != nil {
+		dataArr := gconv.SliceAny(data["data"])
+		if len(dataArr) > 0 {
+			dataMap := gconv.MapStrStr(dataArr[0])
+			number = gconv.Int(dataMap["number"])
+		}
+	}
+	isExists := false
+	id := this.FindJyConsumePackRecord()
+	if id != "" && this.Remarks["downUrl"] != nil {
+		if util.MQFW.UpdateById(jyCC, id, map[string]interface{}{
+			"$set": map[string]interface{}{
+				"l_updateDate": time.Now().Unix(),
+			},
+		}) {
+			delete(this.Remarks, "id")
+			delete(this.Remarks, "title")
+			r = this.Remarks
+			r["isExists"] = true
+			isExists = true
+		}
+	}
 	if BaseMsg.Status > 0 && BaseMsg.PowerMap[3] {
 		if this.Remarks["infoType"] != nil && this.Remarks["infoType"].(string) == "S" {
 			r = SupplyInfoFile(_fileName, _id)
 		} else {
 			r = fileAttachRpc(_fileName, _id)
 		}
-		go func(this *UseBalanceStruct, r map[string]interface{}) {
+		/*go func(this *UseBalanceStruct, r map[string]interface{}) {
 			data := make(map[string]interface{})
 			data["p_type"] = "大会员用户附件下载"
 			data["p_userid"] = this.UserId
@@ -51,38 +87,21 @@ func (this *UseBalanceStruct) fileConsume() (r map[string]interface{}, m string,
 			if util.MQFW.Save("filehistroy", data) == "" {
 				log.Println("大会员附件下载-历史记录异常:" + this.UserId)
 			}
-		}(this, r)
-	} else if BaseMsg.VipStatus > 0 {
-		isExists := false
-		//查询当月附件下载历史记录-如是已下载过的附件不再扣除次数
-		id := this.FindJyConsumePackRecord()
-		if id != "" && this.Remarks["downUrl"] != nil {
-			if util.MQFW.UpdateById(jyCC, id, map[string]interface{}{
-				"$set": map[string]interface{}{
-					"l_updateDate": time.Now().Unix(),
-				},
-			}) {
-				delete(this.Remarks, "id")
-				delete(this.Remarks, "title")
-				r = this.Remarks
-				r["isExists"] = true
-				isExists = true
-			}
+		}(this, r)*/
+		if r["downUrl"] != nil {
+			this.Remarks["downUrl"] = r["downUrl"]
+			this.Remarks["size"] = r["size"]
 		}
+		if !isExists {
+			this.saveJyConsumePackList()
+		}
+	} else {
+		//查询当月附件下载历史记录-如是已下载过的附件不再扣除次数
 		// log.Println(this.Remarks, "++++++", this.AccountId, id, "-------------", isExists)
 		//当月未有消费记录
 		if !isExists {
-			isCanConsume_f := false
-			isCanConsume_p := false
 			//免费赠送已使用次数
-			mon_free := fmt.Sprintf(jy.VipFileUploadNumKey, this.UserId, fmt.Sprint(time.Now().Month()))
-			fui := redis.GetInt(jy.PowerCacheDb, mon_free)
-			if fui < config.BidfileConfig.File_number {
-				isCanConsume_f = true
-			} else if payCount := this.accountPack(); payCount > 0 { //付费未使用次数
-				isCanConsume_p = true
-			}
-			if isCanConsume_f || isCanConsume_p {
+			if number > 0 {
 				if this.Remarks["infoType"] != nil && this.Remarks["infoType"].(string) == "S" {
 					r = SupplyInfoFile(_fileName, _id)
 				} else {
@@ -92,24 +111,10 @@ func (this *UseBalanceStruct) fileConsume() (r map[string]interface{}, m string,
 					this.Remarks["downUrl"] = r["downUrl"]
 					this.Remarks["size"] = r["size"]
 					if this.saveJyConsumePackList() {
-						if isCanConsume_p {
-							//中台消费记录
-							rb, err := this.UseBalance()
-							if err != nil || (rb != nil && qutil.IntAll(rb["code"]) == 0) {
-								m = fmt.Sprintf("消费记录保存异常:%s", qutil.ObjToString(rb["message"]))
-							} else {
-								//更新redis 购买附件下载包数量
-								mon_pay := fmt.Sprintf(jy.FilePackNumKey, this.UserId, fmt.Sprint(time.Now().Month()))
-								if redis.GetInt(jy.PowerCacheDb, mon_pay) <= 0 || redis.Decrby(jy.PowerCacheDb, mon_pay, 1) < 0 {
-									log.Println(fmt.Sprintf("附件下载包 消费异常:%s,附件名称:%s", this.UserId, this.Remarks["fileName"].(string)))
-								}
-							}
-						} else if isCanConsume_f { //下载后自增一次 免费权限默认存储31d
-							if fui == 0 {
-								redis.Put(jy.PowerCacheDb, mon_free, 1, 60*60*24*31)
-							} else {
-								redis.Incr(jy.PowerCacheDb, mon_free)
-							}
+						//中台消费记录
+						rb, err := this.UseBalance()
+						if err != nil || (rb != nil && qutil.IntAll(rb["code"]) == 0) {
+							m = fmt.Sprintf("消费记录保存异常:%s", qutil.ObjToString(rb["message"]))
 						}
 					}
 				} else {
@@ -117,22 +122,8 @@ func (this *UseBalanceStruct) fileConsume() (r map[string]interface{}, m string,
 				}
 			} else {
 				c = -1
-				m = "该用户下载权限当前月已用完"
-			}
-		}
-	} else {
-		//判断免费用户是否有留资下载权限
-		if _, _, freeFileNum := jy.FreeExperience(this.UserId); freeFileNum == 1 {
-			if this.Remarks["infoType"] != nil && this.Remarks["infoType"].(string) == "S" {
-				r = SupplyInfoFile(_fileName, _id)
-			} else {
-				r = fileAttachRpc(_fileName, _id)
+				m = "该用户下载权限已用完"
 			}
-			//免费用户下载后取消下载权限
-			redis.PutKV(fmt.Sprintf(jy.PowerCacheFileKey, this.UserId), -1)
-		} else {
-			c = -1
-			m = "该用户没有下载权限"
 		}
 	}
 	return
@@ -140,7 +131,7 @@ func (this *UseBalanceStruct) fileConsume() (r map[string]interface{}, m string,
 
 var jyCC = "jy_consumepack"
 
-//查询jy 消费日志记录
+// 查询jy 消费日志记录
 func (this *UseBalanceStruct) FindJyConsumePackRecord() string {
 	query := map[string]interface{}{
 		"s_id":       this.Remarks["id"].(string),
@@ -161,7 +152,7 @@ func (this *UseBalanceStruct) FindJyConsumePackRecord() string {
 	return BsonIdToSId((*res)["_id"])
 }
 
-//保存日志
+// 保存日志
 func (this *UseBalanceStruct) saveJyConsumePackList() (b bool) {
 	saveMap := map[string]interface{}{
 		"s_id":         this.Remarks["id"],
@@ -184,7 +175,7 @@ func (this *UseBalanceStruct) saveJyConsumePackList() (b bool) {
 	return
 }
 
-//调rpc 获取附件信息
+// 调rpc 获取附件信息
 func fileAttachRpc(fileName, id string) (r map[string]interface{}) {
 	r = make(map[string]interface{})
 	// 调用rpc 获取附件信息
@@ -210,7 +201,7 @@ func fileAttachRpc(fileName, id string) (r map[string]interface{}) {
 	return
 }
 
-//供应信息附件
+// 供应信息附件
 func SupplyInfoFile(fileName, msgId string) (r map[string]interface{}) {
 	//查数据
 	data := util.InfoMysql.FindOne("supply_info", map[string]interface{}{"id": msgId}, "", "")
@@ -236,7 +227,14 @@ func SupplyInfoFile(fileName, msgId string) (r map[string]interface{}) {
 	return
 }
 
-//消费
+// 兑换作废
+func JyexchangeCance(userId, product, platform, queryTime string, pageSize, pageNum int) (list []map[string]interface{}, total int, err error) {
+	RStruct := InitFindRecord(userId, product, queryTime, platform, pageSize, pageNum, 2)
+	list, total = RStruct.DefaultData()
+	return list, total, nil
+}
+
+// 消费
 func JyConsumePack(userId, product, platform string, remarks map[string]interface{}, session *httpsession.Session) (r map[string]interface{}, m string, c int) {
 	CStruct := InitUseBalance(userId, product, product, "", "", nil, remarks, 1, platform, session)
 	switch product {
@@ -248,7 +246,7 @@ func JyConsumePack(userId, product, platform string, remarks map[string]interfac
 	return
 }
 
-//流水
+// 流水
 func JyFindRecordPack(userId, productName, queryTime, platform string, pageSize, pageNum int) (list []map[string]interface{}, total int, err error) {
 	RStruct := InitFindRecord(userId, productName, queryTime, platform, pageSize, pageNum, 0)
 	switch productName {
@@ -260,7 +258,7 @@ func JyFindRecordPack(userId, productName, queryTime, platform string, pageSize,
 	return list, total, nil
 }
 
-//数据处理-附件下载包
+// 数据处理-附件下载包
 func (this *FindRecordStruct) FindJyConsumePackAllRecord() ([]map[string]interface{}, int) {
 	var articleAddMap = map[string]string{
 		"PC":  "/article/content/%s.html",
@@ -301,7 +299,7 @@ func (this *FindRecordStruct) FindJyConsumePackAllRecord() ([]map[string]interfa
 	return *list, total
 }
 
-//数据处理-default
+// 数据处理-default
 func (this *FindRecordStruct) DefaultData() ([]map[string]interface{}, int) {
 	returnList, total, err := this.FindRecord()
 	if err != nil {

+ 23 - 18
src/jfw/modules/subscribepay/src/entity/commonApi.go

@@ -1,22 +1,18 @@
 package entity
 
 import (
+	qu "app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/middleGround"
 	"encoding/json"
 	"fmt"
 	"jy/src/jfw/modules/subscribepay/src/config"
 	"log"
 	"net/url"
 	"strings"
-	"time"
-
-	qu "app.yhyue.com/moapp/jybase/common"
-	"app.yhyue.com/moapp/jybase/redis"
-	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
-	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/middleGround"
 )
 
-//充值
+// 充值
 type PayStruct struct {
 	AccountId    string                 //用户身份
 	Name         string                 //资源名称
@@ -27,9 +23,10 @@ type PayStruct struct {
 	Remarks      map[string]interface{} //备注
 	AppId        string                 //appId默认10000
 	VipTime      int64                  //超级订阅截止日期
+	VipState     int64                  //超级订阅状态
 }
 
-func InitPurchase(userId, product, resourceType, num, spec, endTime string, remarks map[string]interface{}, vipEndTime int64) *PayStruct {
+func InitPurchase(userId, product, resourceType, num, spec, endTime string, remarks map[string]interface{}, vipEndTime int64, vipState int) *PayStruct {
 	return &PayStruct{
 		AccountId:    userId,
 		Name:         product,      //资源名称
@@ -40,6 +37,7 @@ func InitPurchase(userId, product, resourceType, num, spec, endTime string, rema
 		Remarks:      remarks,      //备注
 		AppId:        config.CouponConfig.AppId,
 		VipTime:      vipEndTime,
+		VipState:     int64(vipState),
 	}
 }
 
@@ -72,6 +70,7 @@ func (this *PayStruct) PurchaseUserBalance() (bool, error) {
 type FindBalanceStruct struct {
 	AccountId    string //账户标识
 	ResourceType string //产品类型
+	VipState     int
 }
 
 // @Summary 余额接口【数据流量包、附件下载包。。】
@@ -81,6 +80,7 @@ func (this *FindBalanceStruct) FindBalance() (map[string]interface{}, error) {
 	param := url.Values{
 		"accountId":    []string{this.AccountId},
 		"resourceType": []string{this.ResourceType},
+		"vipState":     []string{qu.InterfaceToStr(this.VipState)},
 	}
 	rmap, err := middleGround.CommonPost(middleGround.JyApiConfig.ApiList.FindBalance, param)
 	if err != nil {
@@ -90,24 +90,28 @@ func (this *FindBalanceStruct) FindBalance() (map[string]interface{}, error) {
 	if rmap != nil && len(rmap) > 0 && this.ResourceType == "附件下载包" {
 		rdata, _ := rmap["data"].([]interface{})
 		rdataArr := qu.ObjArrToMapArr(rdata)
-		vipFileKey := fmt.Sprintf(jy.VipFileUploadNumKey, this.AccountId, fmt.Sprint(time.Now().Month()))
-		vipFileKeyNum := redis.GetInt(jy.PowerCacheDb, vipFileKey)
-		free_num := config.BidfileConfig.File_number - vipFileKeyNum //free
+		//vipFileKey := fmt.Sprintf(jy.VipFileUploadNumKey, this.AccountId, fmt.Sprint(time.Now().Month()))
+		//vipFileKeyNum := redis.GetInt(jy.PowerCacheDb, vipFileKey)
+		//free_num := config.BidfileConfig.File_number - vipFileKeyNum //free
 		if len(rdata) > 0 {
 			for k, v := range rdataArr {
 				num := qu.IntAll(v["number"]) //buy
-				v["number"] = num + free_num
+				v["number"] = num
+				v["purchaseNum"] = qu.IntAll(v["number1"]) //充值数量
+				v["exchangeNum"] = qu.IntAll(v["number2"]) //兑换数量
+				v["grantNum"] = qu.IntAll(v["number3"])    //超级订阅定期发放数量
+				v["freeNum"] = qu.IntAll(v["number4"])     //免费数量
 				rdataArr[k] = v
 			}
 		} else {
-			rdataArr = append(rdataArr, map[string]interface{}{"name": this.ResourceType, "number": free_num, "resourceType": this.ResourceType, "thirtyNum": 0})
+			rdataArr = append(rdataArr, map[string]interface{}{"name": this.ResourceType, "number": 0, "purchaseNum": 0, "exchangeNum": 0, "grantNum": 0, "freeNum": 0, "resourceType": this.ResourceType, "thirtyNum": 0})
 		}
 		rmap["data"] = rdataArr
 	}
 	return rmap, err
 }
 
-//使用
+// 使用
 type UseBalanceStruct struct {
 	AccountId        string                 //账户标识
 	Name             string                 //资源名称
@@ -121,9 +125,9 @@ type UseBalanceStruct struct {
 	InfoId           []string               //数据Id,多个以逗号隔开【数据流量包用到】
 	Platform         string                 //平台:PC;APP;WX
 	Session          *httpsession.Session
+	VipState         int
 }
 
-//
 func InitUseBalance(userId, product, resourceType, ruleId, duplicateRemoval string, infoId []string, remarks map[string]interface{}, num int, platform string, session *httpsession.Session) *UseBalanceStruct {
 	return &UseBalanceStruct{
 		AccountId:        userId,
@@ -159,6 +163,7 @@ func (this *UseBalanceStruct) UseBalance() (map[string]interface{}, error) {
 		"remarks":          []string{string(remarkBytes)},            //备注 查询条件、下载地址、导出时间、导出条数
 		"infoId":           []string{strings.Join(this.InfoId, ",")}, //数据Id,多个以逗号隔开
 		"duplicateRemoval": []string{this.DuplicateRemoval},          //是否去重0不去1去重
+		"vipState":         []string{qu.InterfaceToStr(this.VipState)},
 	})
 	if err != nil {
 		log.Println("UseBalance post err:", err)
@@ -167,7 +172,7 @@ func (this *UseBalanceStruct) UseBalance() (map[string]interface{}, error) {
 	return resMap, err
 }
 
-//流水
+// 流水
 type FindRecordStruct struct {
 	AccountId    string //账户标识
 	UserId       string //用户标识
@@ -181,7 +186,7 @@ type FindRecordStruct struct {
 
 }
 
-//定义结构体
+// 定义结构体
 func InitFindRecord(userId, resourceType, queryTime, platform string, pageSize, pageNum, state int) *FindRecordStruct {
 	if pageSize == 0 {
 		pageSize = 10
@@ -249,7 +254,7 @@ func (this *UpdateVipTimeStruct) UpdateVipEndTime() (bool, error) {
 	return ok, nil
 }
 
-//账户信息
+// 账户信息
 func (this *UseBalanceStruct) accountPack() (payCount int) {
 	resMap, err := middleGround.CommonPost(middleGround.JyApiConfig.ApiList.FindBalance, url.Values{
 		"accountId":    []string{this.UserId}, //账户标识*

+ 1 - 1
src/jfw/modules/subscribepay/src/entity/dataExportPackStruct.go

@@ -625,7 +625,7 @@ func sendPackExportMail(userId, selectId, userMail, excelPath string) {
 	if userId == "" || selectId == "" || userMail == "" || excelPath == "" {
 		return
 	}
-	mailContent, err := GetPackDataExportMailContent(selectId, config.Config.WebDomain+excelPath)
+	mailContent, err := GetPackDataExportMailContent(selectId, config.Config.WxDomain+excelPath)
 	if err != nil {
 		log.Printf("SendDataExportMailForPayed SendMailToPayUser 订单号%s获取邮件内容异常%v\n", selectId, err)
 	}

+ 1 - 1
src/jfw/modules/subscribepay/src/entity/dataexport.go

@@ -699,7 +699,7 @@ func GetDataExportMailContent(orderCode string) (content string, err error) {
 	product_type := qutil.ObjToString((*orderData)["product_type"]) + "导出"
 	order_money := qutil.Float64All((*orderData)["order_money"]) / 100
 	pay_time := qutil.ObjToString((*orderData)["pay_time"])
-	download_url := config.Config.WebDomain + qutil.ObjToString((*orderData)["download_url"])
+	download_url := config.Config.WxDomain + qutil.ObjToString((*orderData)["download_url"])
 
 	create_time := qutil.ObjToString((*orderData)["create_time"])
 	if create_time != "" {

+ 13 - 15
src/jfw/modules/subscribepay/src/entity/resourcePackStruct.go

@@ -14,7 +14,6 @@ import (
 
 	qu "app.yhyue.com/moapp/jybase/common"
 	. "app.yhyue.com/moapp/jybase/date"
-	"app.yhyue.com/moapp/jybase/redis"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"github.com/shopspring/decimal"
 )
@@ -68,12 +67,14 @@ func (this *resoucePackStruct) PayCallBack(param *CallBackParam) bool {
 
 			//中台资源中心更新
 			var vipEndTime int64 = 0
-			udata := util.Compatible.Select(userId, `{"l_vip_endtime":1}`)
+			var vipState int = 0
+			udata := util.Compatible.Select(userId, `{"l_vip_endtime":1,"i_vip_status":1}`)
 			if udata != nil {
 				vipEndTime = qu.Int64All((*udata)["l_vip_endtime"])
+				vipState = qu.IntAll((*udata)["i_vip_status"])
 			}
 			if ok, err := InitPurchase(userId, productType, productType, strconv.Itoa(qu.IntAll(filterM["num"])), "个",
-				JyresoucePack.LastDate(now).Format(Date_Short_Layout), filterM, vipEndTime).PurchaseUserBalance(); !ok {
+				JyresoucePack.LastDate(now).Format(Date_Short_Layout), filterM, vipEndTime, vipState).PurchaseUserBalance(); !ok {
 				log.Printf("用户%s 订单类型:%s  订单号:%s PurchaseUserBalance出错:%v", userId, productType, (*orderData)["order_code"], err)
 				return false
 			}
@@ -81,15 +82,15 @@ func (this *resoucePackStruct) PayCallBack(param *CallBackParam) bool {
 			//不同产品逻辑处理
 			switch productType {
 			case ATTACHMENT:
-				//附件下载包剩余次数
-				filePackKey := fmt.Sprintf(jy.FilePackNumKey, userId, fmt.Sprint(time.Now().Month()))
-				filePackNum := redis.GetInt(jy.PowerCacheDb, filePackKey)
-				if filePackNum == 0 {
-					redis.Put(jy.PowerCacheDb, filePackKey, qu.IntAll(filterM["num"]), int(this.LastDate(now).Unix()-now.Unix()))
-				} else {
-					filePackNum += qu.IntAll(filterM["num"])
-					redis.Put(jy.PowerCacheDb, filePackKey, filePackNum, int(this.LastDate(now).Unix()-now.Unix()))
-				}
+				/* //附件下载包剩余次数
+				   filePackKey := fmt.Sprintf(jy.FilePackNumKey, userId, fmt.Sprint(time.Now().Month()))
+				   filePackNum := redis.GetInt(jy.PowerCacheDb, filePackKey)
+				   if filePackNum == 0 {
+				       redis.Put(jy.PowerCacheDb, filePackKey, qu.IntAll(filterM["num"]), int(this.LastDate(now).Unix()-now.Unix()))
+				   } else {
+				       filePackNum += qu.IntAll(filterM["num"])
+				       redis.Put(jy.PowerCacheDb, filePackKey, filePackNum, int(this.LastDate(now).Unix()-now.Unix()))
+				   }*/
 			}
 
 			//核销卡卷
@@ -128,9 +129,6 @@ func (this *resoucePackStruct) Filter(product, userid, lotteryId, discountId str
 	case "dataExportPack":
 	//TODO
 	case "attachmentDownPack": //超级订阅用户可以购买
-		if data.VipStatus <= 0 {
-			msg = "非超级订阅用户,暂无权益"
-		}
 		num := qu.IntAll(m["num"])
 		products := fmt.Sprintf("附件下载包-%v个", num)
 		price := config.ResConf.AttachmentDownPackPrice[strconv.Itoa(num)]

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

@@ -1,6 +1,6 @@
 module jy/src/jfw/modules/subscribepay/src
 
-go 1.18
+go 1.20
 
 require (
 	app.yhyue.com/moapp/jybase v0.0.0-20230718012114-37013054344b

+ 26 - 8
src/jfw/modules/subscribepay/src/service/basePack.go

@@ -2,7 +2,6 @@ package service
 
 import (
 	"fmt"
-	"jy/src/jfw/modules/subscribepay/src/config"
 	"jy/src/jfw/modules/subscribepay/src/entity"
 	"log"
 	"time"
@@ -10,10 +9,33 @@ import (
 	. "app.yhyue.com/moapp/jybase/api"
 	qutil "app.yhyue.com/moapp/jybase/common"
 	"app.yhyue.com/moapp/jybase/encrypt"
-	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 )
 
-//“包”的消费
+// “包”的兑换过期记录
+func (this *ResourcePack) ExchangeCancelList() {
+	userId, _ := this.GetSession("userId").(string)
+	productName := this.GetString("productName")
+	pageSize, _ := this.GetInteger("pageSize")
+	pageNum, _ := this.GetInteger("pageNum")
+	queryTime := this.GetString("queryTime")
+	rData, errMsg := func() (interface{}, error) {
+		if this.Method() != "POST" {
+			return "请求方式有误", nil
+		}
+		returnList, total, err := entity.JyexchangeCance(userId, productName, "", queryTime, pageSize, pageNum)
+		returnData := map[string]interface{}{
+			"list": returnList,
+		}
+		returnData["total"] = total
+		return returnData, err
+	}()
+	if errMsg != nil {
+		log.Printf("%s %s RecordList 异常:%s\n", userId, productName, errMsg.Error())
+	}
+	this.ServeJson(NewResult(rData, errMsg))
+}
+
+// “包”的消费
 func (this *ResourcePack) ConsumePack() {
 	userId, _ := this.GetSession("userId").(string)
 	productName := this.GetString("productName")
@@ -51,7 +73,7 @@ func (this *ResourcePack) ConsumePack() {
 	})
 }
 
-//“包”的使用记录
+// “包”的使用记录
 func (this *ResourcePack) RecordList() {
 	userId, _ := this.GetSession("userId").(string)
 	productName := this.GetString("productName")
@@ -66,10 +88,6 @@ func (this *ResourcePack) RecordList() {
 		if productName == "" || platform == "" {
 			return "参数有误", nil
 		}
-		vipMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
-		if vipMsg.VipStatus <= 0 {
-			return "无权限,请联系管理员", nil
-		}
 		if queryTime == "" {
 			queryTime = time.Now().Format("2006-01")
 		}

+ 8 - 10
src/jfw/modules/subscribepay/src/service/resourcePack.go

@@ -1,6 +1,7 @@
 package service
 
 import (
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"encoding/json"
 	"fmt"
 	"jy/src/jfw/modules/subscribepay/src/config"
@@ -15,18 +16,18 @@ import (
 	qu "app.yhyue.com/moapp/jybase/common"
 	. "app.yhyue.com/moapp/jybase/date"
 	"app.yhyue.com/moapp/jybase/go-xweb/xweb"
-	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 )
 
 //资源包相关(数据流量包,附件下载包,采购单位流量包...)
 
 type ResourcePack struct {
 	*xweb.Action
-	price       xweb.Mapper `xweb:"/resourcePack/price"`       //价格
-	createOrder xweb.Mapper `xweb:"/resourcePack/createOrder"` //线上自助数据包充值-创建订单
-	account     xweb.Mapper `xweb:"/resourcePack/account"`     //个人账户
-	recordList  xweb.Mapper `xweb:"/resourcePack/recordList"`  //“资源包”使用记录
-	consumePack xweb.Mapper `xweb:"/resourcePack/consumePack"` //“资源包”消费
+	price              xweb.Mapper `xweb:"/resourcePack/price"`              //价格
+	createOrder        xweb.Mapper `xweb:"/resourcePack/createOrder"`        //线上自助数据包充值-创建订单
+	account            xweb.Mapper `xweb:"/resourcePack/account"`            //个人账户
+	recordList         xweb.Mapper `xweb:"/resourcePack/recordList"`         //“资源包”使用记录
+	consumePack        xweb.Mapper `xweb:"/resourcePack/consumePack"`        //“资源包”消费
+	exchangeCancelList xweb.Mapper `xweb:"/resourcePack/exchangeCancelList"` //“资源包”兑换作废
 }
 
 const (
@@ -167,13 +168,10 @@ func (this *ResourcePack) Account() {
 		return
 	}
 	vipMsg := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
-	if vipMsg.VipStatus <= 0 {
-		this.ServeJson(Result{Error_msg: "无权限,请联系管理员"})
-		return
-	}
 	dbs := &entity.FindBalanceStruct{
 		AccountId:    userId,
 		ResourceType: config.ResConf.Product[product],
+		VipState:     vipMsg.VipStatus,
 	}
 	data, err := dbs.FindBalance()
 	if err != nil {

+ 48 - 0
src/jfw/modules/subscribepay/src/service/userAccountInfo.go

@@ -24,6 +24,7 @@ import (
 	"app.yhyue.com/moapp/jybase/mongodb"
 	"app.yhyue.com/moapp/jybase/redis"
 	"app.yhyue.com/moapp/jybase/usercenter"
+	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/dataexport"
 	"app.yhyue.com/moapp/jypkg/common/src/qfw/util/jy"
 	"bp.jydev.jianyu360.cn/BaseService/userCenter/rpc/pb"
 )
@@ -119,6 +120,22 @@ func (this *UserAccount) GetAccountInfo() {
 			}
 		}
 		b := jy.GetBigVipUserBaseMsg(this.Session(), *config.Middleground)
+		//s从数据导出填写的邮箱或者从数据定制服务这里获取的邮箱
+		_, otherMail := dataexport.GetLastExportPhoneAndMail(util.Mysql, userId, qutil.ObjToString(this.GetSession("entUserId")))
+		if otherMail == "" {
+			saleData, _ := util.MQFW.FindOne("saleLeads", map[string]interface{}{
+				"userid": this.GetSession("userId"),
+				"mail": map[string]interface{}{
+					"$exists": true,
+				},
+			})
+			if saleData != nil && len(*saleData) > 0 {
+				otherMail = qutil.ObjToString((*saleData)["mail"])
+			}
+			if qutil.ObjToString((*userMsg)["s_myemail"]) != "" {
+				otherMail = qutil.ObjToString((*userMsg)["s_myemail"])
+			}
+		}
 		return map[string]interface{}{
 			"userId":        encrypt.EncodeArticleId(userId),
 			"email":         qutil.ObjToString((*userMsg)["s_myemail"]),
@@ -132,6 +149,7 @@ func (this *UserAccount) GetAccountInfo() {
 			"company":       qutil.ObjToString((*userMsg)["s_company"]),
 			"isWx":          isWx, //是否是微信账号
 			"breakRenewTip": breakRenewTip,
+			"otherMail":     otherMail, //从数据导出填写的邮箱或者从数据定制服务这里获取的邮箱
 		}, nil
 	}()
 	this.ServeJson(NewResult(rData, errMsg))
@@ -204,6 +222,19 @@ func (this *UserAccount) MailSet(doType string) {
 			}) {
 				return nil, DBUPDATE_ERROR
 			}
+			userMsg, _ := util.MQFW.FindById("user", userId, `{"l_registedate":1}`)
+			isNew := false
+			if userMsg != nil && len(*userMsg) > 0 {
+				l_registedate := qutil.Int64All((*userMsg)["l_registedate"])
+				isNew = l_registedate > config.Config.TaskStartTime //是否注册时间处于新手任务开始时间
+			}
+			jy.Publish(util.Mgo_log, config.Config.Nsq, config.Config.Nsq_Topic, "task", userId, jy.Jyweb_node2, map[string]interface{}{
+				"code":       qutil.If(isNew, 1009, 1016),
+				"types":      "bindMail",
+				"num":        50,
+				"baseUserId": this.GetSession("base_user_id"),
+				"positionId": this.GetSession("positionId"),
+			})
 			this.Session().Del(mailAuthPassSessionKey)
 		}
 		return map[string]interface{}{
@@ -408,6 +439,22 @@ func (this *UserAccount) PhoneBind() {
 							redis.Del(config.Config.ShareRedisName, shareKey)
 						}
 					}(qutil.ObjToString((*uData)["s_m_openid"]))
+
+					//绑定手机号和关注公众号
+					jy.Publish(util.Mgo_log, config.Config.Nsq, config.Config.Nsq_Topic, "task", userId, jy.Jyweb_node2, map[string]interface{}{
+						"code":       1007,
+						"types":      "bindPhone",
+						"num":        50,
+						"baseUserId": this.GetSession("base_user_id"),
+						"positionId": this.GetSession("positionId"),
+					})
+					jy.Publish(util.Mgo_log, config.Config.Nsq, config.Config.Nsq_Topic, "task", userId, jy.Jyweb_node2, map[string]interface{}{
+						"code":       1008,
+						"types":      "followWx",
+						"num":        50,
+						"baseUserId": this.GetSession("base_user_id"),
+						"positionId": this.GetSession("positionId"),
+					})
 				}
 				data := map[string]interface{}{
 					"s_unionid":      (*uData)["s_unionid"],
@@ -428,6 +475,7 @@ func (this *UserAccount) PhoneBind() {
 				}
 				//用户中台存储  结束
 				jy.CreateUserMerge(util.MQFW, util.Mysql, this.Session(), config.Middleground).FlushSession(userId) //刷新session
+
 			} else if mode == "mergeBind" { //跳转绑定-不合并绑定无效
 				if qutil.Int64All((*uData)["l_registedate"]) > config.AutoMergeTimeStamp { //新微信直接绑定
 					data := map[string]interface{}{

+ 1 - 1
src/jfw/modules/subscribepay/src/util/db.go

@@ -1,6 +1,7 @@
 package util
 
 import (
+	"app.yhyue.com/moapp/jypkg/compatible"
 	. "jy/src/jfw/modules/subscribepay/src/config"
 
 	qutil "app.yhyue.com/moapp/jybase/common"
@@ -8,7 +9,6 @@ import (
 	mg "app.yhyue.com/moapp/jybase/mongodb"
 	"app.yhyue.com/moapp/jybase/mysql"
 	"app.yhyue.com/moapp/jybase/redis"
-	"app.yhyue.com/moapp/jypkg/compatible"
 )
 
 var MQFW mg.MongodbSim

+ 1 - 0
src/jfw/modules/weixin/src/config.json

@@ -117,6 +117,7 @@
     "description": "剑鱼新年活动"
   },
   "nsq": "192.168.3.240:4260",
+  "nsq_topic": "jy_event",
   "cookieSource": {
     "jywkzmt": "jydocs",
     "jywkseo": "jydocs",

+ 59 - 50
src/jfw/modules/weixin/src/go.mod

@@ -3,76 +3,81 @@ module jy/src/jfw/modules/weixin/src
 go 1.18
 
 require (
-	app.yhyue.com/moapp/jybase v0.0.0-20230117032034-ad7c00ffe11a
+	app.yhyue.com/moapp/jybase v0.0.0-20230718012114-37013054344b
 	app.yhyue.com/moapp/jylog v0.0.0-20230522075550-05d7230ca545
-	app.yhyue.com/moapp/jypkg v0.0.0-20230225014640-5541595140d1
-	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.13
+	app.yhyue.com/moapp/jypkg v1.0.3
+	bp.jydev.jianyu360.cn/BaseService/userCenter v1.2.14
 	github.com/SKatiyar/qr v0.0.0-20151201054752-25b6bdf44e67
 	github.com/gogf/gf/v2 v2.3.1
-	go.mongodb.org/mongo-driver v1.11.1
+	go.mongodb.org/mongo-driver v1.11.6
 )
 
 require (
 	app.yhyue.com/moapp/esv1 v0.0.0-20220414031211-3da4123e648d // indirect
+	app.yhyue.com/moapp/jyMarketing v0.0.2-0.20230304035551-21bb1eedf547 // indirect
 	app.yhyue.com/moapp/message v0.0.0-20221223100203-6402e389d9ae // indirect
 	bp.jydev.jianyu360.cn/BaseService/entManageApplication v0.0.0-20230214091519-89a98c01ab0e // indirect
-	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230222052351-9d6fad062447 // indirect
+	bp.jydev.jianyu360.cn/BaseService/powerCheckCenter v0.0.0-20230225125145-431a4f70093a // indirect
 	bp.jydev.jianyu360.cn/BaseService/resourceCenter v0.0.7 // indirect
 	github.com/BurntSushi/toml v1.1.0 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cenkalti/backoff/v4 v4.2.1 // indirect
 	github.com/cespare/xxhash/v2 v2.2.0 // indirect
 	github.com/clbanning/mxj/v2 v2.5.5 // indirect
-	github.com/coreos/go-semver v0.3.0 // indirect
-	github.com/coreos/go-systemd/v22 v22.3.2 // indirect
+	github.com/coreos/go-semver v0.3.1 // indirect
+	github.com/coreos/go-systemd/v22 v22.5.0 // indirect
 	github.com/davecgh/go-spew v1.1.1 // indirect
-	github.com/dchest/captcha v0.0.0-20200903113550-03f5f0333e1f // indirect
 	github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
-	github.com/fatih/color v1.13.0 // indirect
-	github.com/felixge/fgprof v0.9.3 // indirect
+	github.com/emicklei/go-restful/v3 v3.9.0 // indirect
+	github.com/fatih/color v1.15.0 // indirect
 	github.com/fsnotify/fsnotify v1.6.0 // indirect
 	github.com/garyburd/redigo v1.6.2 // indirect
 	github.com/go-logr/logr v1.2.4 // indirect
 	github.com/go-logr/stdr v1.2.2 // indirect
+	github.com/go-openapi/jsonpointer v0.19.6 // indirect
+	github.com/go-openapi/jsonreference v0.20.1 // indirect
+	github.com/go-openapi/swag v0.22.3 // indirect
 	github.com/go-redis/redis/v8 v8.11.5 // indirect
-	github.com/go-sql-driver/mysql v1.7.0 // indirect
+	github.com/go-sql-driver/mysql v1.7.1 // indirect
 	github.com/gogo/protobuf v1.3.2 // indirect
-	github.com/golang-jwt/jwt/v4 v4.4.3 // indirect
 	github.com/golang/mock v1.6.0 // indirect
-	github.com/golang/protobuf v1.5.2 // indirect
+	github.com/golang/protobuf v1.5.3 // indirect
 	github.com/golang/snappy v0.0.4 // indirect
-	github.com/gomodule/redigo v1.8.9 // indirect
+	github.com/gomodule/redigo v2.0.0+incompatible // indirect
+	github.com/google/gnostic v0.5.7-v3refs // indirect
 	github.com/google/go-cmp v0.5.9 // indirect
 	github.com/google/gofuzz v1.2.0 // indirect
-	github.com/google/pprof v0.0.0-20211214055906-6f57359322fd // indirect
-	github.com/googleapis/gnostic v0.5.5 // indirect
 	github.com/gorilla/websocket v1.5.0 // indirect
 	github.com/grokify/html-strip-tags-go v0.0.1 // indirect
-	github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 // indirect
+	github.com/grpc-ecosystem/grpc-gateway/v2 v2.15.0 // indirect
 	github.com/hashicorp/hcl v1.0.0 // indirect
 	github.com/jinzhu/inflection v1.0.0 // indirect
 	github.com/jinzhu/now v1.1.1 // indirect
+	github.com/josharian/intern v1.0.0 // indirect
 	github.com/json-iterator/go v1.1.12 // indirect
-	github.com/klauspost/compress v1.15.11 // indirect
+	github.com/klauspost/compress v1.15.15 // indirect
 	github.com/magiconair/properties v1.8.7 // indirect
-	github.com/mattn/go-colorable v0.1.12 // indirect
-	github.com/mattn/go-isatty v0.0.14 // indirect
+	github.com/mailru/easyjson v0.7.7 // indirect
+	github.com/mattn/go-colorable v0.1.13 // indirect
+	github.com/mattn/go-isatty v0.0.17 // indirect
 	github.com/mattn/go-runewidth v0.0.13 // indirect
-	github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
+	github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
 	github.com/mitchellh/mapstructure v1.5.0 // indirect
 	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
 	github.com/modern-go/reflect2 v1.0.2 // indirect
 	github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe // indirect
+	github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
 	github.com/nsqio/go-nsq v1.1.0 // indirect
 	github.com/olekukonko/tablewriter v0.0.5 // indirect
 	github.com/olivere/elastic v6.2.37+incompatible // indirect
+	github.com/olivere/elastic/v7 v7.0.22 // indirect
 	github.com/openzipkin/zipkin-go v0.4.1 // indirect
-	github.com/pelletier/go-toml/v2 v2.0.6 // indirect
+	github.com/pelletier/go-toml/v2 v2.0.8 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
-	github.com/prometheus/client_golang v1.13.0 // indirect
-	github.com/prometheus/client_model v0.2.0 // indirect
-	github.com/prometheus/common v0.37.0 // indirect
-	github.com/prometheus/procfs v0.8.0 // indirect
+	github.com/prometheus/client_golang v1.15.1 // indirect
+	github.com/prometheus/client_model v0.3.0 // indirect
+	github.com/prometheus/common v0.42.0 // indirect
+	github.com/prometheus/procfs v0.9.0 // indirect
 	github.com/rivo/uniseg v0.2.0 // indirect
 	github.com/sirupsen/logrus v1.8.3 // indirect
 	github.com/spaolacci/murmur3 v1.1.0 // indirect
@@ -86,36 +91,37 @@ require (
 	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/zeromicro/go-zero v1.4.4 // 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
+	github.com/zeromicro/go-zero v1.5.3 // indirect
+	go.etcd.io/etcd/api/v3 v3.5.9 // indirect
+	go.etcd.io/etcd/client/pkg/v3 v3.5.9 // indirect
+	go.etcd.io/etcd/client/v3 v3.5.9 // indirect
 	go.opentelemetry.io/otel v1.15.1 // indirect
 	go.opentelemetry.io/otel/exporters/jaeger v1.15.1 // indirect
 	go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.15.1 // indirect
 	go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.15.1 // indirect
 	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.15.1 // indirect
 	go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.15.1 // indirect
+	go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0 // indirect
 	go.opentelemetry.io/otel/exporters/zipkin v1.15.1 // indirect
 	go.opentelemetry.io/otel/sdk v1.15.1 // indirect
 	go.opentelemetry.io/otel/trace v1.15.1 // indirect
 	go.opentelemetry.io/proto/otlp v0.19.0 // indirect
-	go.uber.org/atomic v1.9.0 // indirect
-	go.uber.org/automaxprocs v1.5.1 // indirect
-	go.uber.org/multierr v1.8.0 // indirect
-	go.uber.org/zap v1.21.0 // indirect
-	golang.org/x/crypto v0.0.0-20221010152910-d6f0a8c073c2 // indirect
-	golang.org/x/net v0.8.0 // indirect
-	golang.org/x/oauth2 v0.4.0 // indirect
+	go.uber.org/atomic v1.10.0 // indirect
+	go.uber.org/automaxprocs v1.5.2 // indirect
+	go.uber.org/multierr v1.9.0 // indirect
+	go.uber.org/zap v1.24.0 // indirect
+	golang.org/x/crypto v0.6.0 // indirect
+	golang.org/x/net v0.10.0 // indirect
+	golang.org/x/oauth2 v0.7.0 // indirect
 	golang.org/x/sync v0.1.0 // indirect
-	golang.org/x/sys v0.7.0 // indirect
-	golang.org/x/term v0.6.0 // indirect
-	golang.org/x/text v0.8.0 // indirect
+	golang.org/x/sys v0.8.0 // indirect
+	golang.org/x/term v0.8.0 // indirect
+	golang.org/x/text v0.9.0 // indirect
 	golang.org/x/time v0.3.0 // indirect
 	google.golang.org/appengine v1.6.7 // indirect
-	google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
-	google.golang.org/grpc v1.54.0 // indirect
-	google.golang.org/protobuf v1.30.0 // indirect
+	google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
+	google.golang.org/grpc v1.56.1 // indirect
+	google.golang.org/protobuf v1.31.0 // indirect
 	gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect
 	gopkg.in/inf.v0 v0.9.1 // indirect
 	gopkg.in/ini.v1 v1.67.0 // indirect
@@ -124,11 +130,14 @@ require (
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 	gorm.io/driver/mysql v1.0.5 // indirect
 	gorm.io/gorm v1.21.3 // indirect
-	k8s.io/api v0.22.9 // indirect
-	k8s.io/apimachinery v0.22.9 // indirect
-	k8s.io/client-go v0.22.9 // indirect
-	k8s.io/klog/v2 v2.80.1 // indirect
-	k8s.io/utils v0.0.0-20221108210102-8e77b1f39fe2 // indirect
-	sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
-	sigs.k8s.io/yaml v1.2.0 // indirect
+	jygit.jydev.jianyu360.cn/ApplicationCenter/publicService v0.0.0-20231017031425-45003ca9f35a // indirect
+	k8s.io/api v0.26.3 // indirect
+	k8s.io/apimachinery v0.27.0-alpha.3 // indirect
+	k8s.io/client-go v0.26.3 // indirect
+	k8s.io/klog/v2 v2.90.1 // indirect
+	k8s.io/kube-openapi v0.0.0-20230307230338-69ee2d25a840 // indirect
+	k8s.io/utils v0.0.0-20230209194617-a36077c30491 // indirect
+	sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
+	sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
+	sigs.k8s.io/yaml v1.3.0 // indirect
 )

Plik diff jest za duży
+ 184 - 441
src/jfw/modules/weixin/src/go.sum


+ 12 - 3
src/jfw/modules/weixin/src/wx/wx.go

@@ -933,7 +933,7 @@ func WxBind(code, openId string, w ResponseWriter, newUnionId string) bool {
 	bindUserId := fmt.Sprint((*data)["userId"])
 	source := fmt.Sprint((*data)["source"])
 	//1查询用户微信号和扫码是否是同一个微信号
-	bindData, b := tools.MQFW.FindById("user", bindUserId, `{"s_m_phone":1,"s_phone":1,"s_unionid":1,"s_m_openid":1}`)
+	bindData, b := tools.MQFW.FindById("user", bindUserId, `{"s_m_phone":1,"s_phone":1,"s_unionid":1,"s_m_openid":1,"base_user_id":1}`)
 	if !b {
 		return true
 	}
@@ -950,10 +950,11 @@ func WxBind(code, openId string, w ResponseWriter, newUnionId string) bool {
 			return true
 		}
 	}
-
+	nsqPath, _ := config.Sysconfig["nsq"].(string)
+	nsq_topic, _ := config.Sysconfig["nsq_topic"].(string)
 	userId := ""
 	unionid := ""
-	m, b := tools.MQFW.Find("user", `{"s_unionid":"`+newUnionId+`","i_appid":2}`, nil, `{"_id":1,"s_m_phone":1,"s_phone":1}`, false, -1, -1)
+	m, b := tools.MQFW.Find("user", `{"s_unionid":"`+newUnionId+`","i_appid":2}`, nil, `{"_id":1,"s_m_phone":1,"s_phone":1,"base_user_id":1}`, false, -1, -1)
 	if len(*m) == 0 {
 		if len(bindUnionid) > 11 {
 			log.Println("对不起,微信绑定失败,请使用原微信绑定账号扫码关注")
@@ -968,7 +969,14 @@ func WxBind(code, openId string, w ResponseWriter, newUnionId string) bool {
 				"s_unionid":  newUnionId,
 			},
 		}
+
 		tools.MQFW.UpdateById("user", bindUserId, &update)
+		jy.Publish(tools.MGLOG, nsqPath, nsq_topic, "task", bindUserId, jy.Jyweb_node2, map[string]interface{}{
+			"code":       1008, //绑定手机号任务
+			"types":      "followWx",
+			"num":        50,
+			"baseUserId": (*bindData)["base_user_id"],
+		})
 		return false
 	}
 	//需要进行绑定
@@ -996,6 +1004,7 @@ func WxBind(code, openId string, w ResponseWriter, newUnionId string) bool {
 				},
 			}
 			tools.MQFW.UpdateById("user", userId, &update1)
+
 			var bindUrl = fmt.Sprintf(config.Sysconfig["proxysess"].(string), tools.SE.EncodeString(openId+","+unionid+","+strconv.Itoa(int(time.Now().Unix()))+",wxMerge"))
 			fmt.Println(fmt.Sprintf(fmt.Sprint(config.Sysconfig["merge"]), bindUrl))
 			w.ReplyText(fmt.Sprintf(fmt.Sprint(config.Sysconfig["merge"]), bindUrl))

+ 7 - 0
src/web/staticres/big-member/js/utils.js

@@ -97,6 +97,13 @@ var utils = {
         r = null;
         return context == null || context == '' || context == 'undefined' ? '' : context;
     },
+    // 移除url参数,但是不刷新页面
+    delUrlParam: function (name){
+      var href = window.location.href;
+      const e = eval(`/&?${name}=[^&#]*/g`);
+      href = href.replace(e, '');
+      history.replaceState('','',href);// replaceState方法不会触发页面刷新,只是导致history对象发生变化,地址栏
+    },
     // 取[m, n]随机数
     getRandomNumber: function (min, max) {
         return Math.floor(Math.random() * (max - min + 1) + min);

+ 34 - 1
src/web/staticres/common-module/big-member/js/high_set.js

@@ -66,9 +66,11 @@ var highSet = new Vue({
         entName: ''
       },
       reqSign: 'bigmember',
+      // 备选项
       filterInitData: {
         areaArr: [],
-        industry: []
+        industry: [],
+        buyerClassArr: [],
       },
       selectAreaList: ['全国'],
       selectIndustryList: [],
@@ -278,6 +280,7 @@ var highSet = new Vue({
             loading.clear()
             _this.filterInitData.areaArr = res.data.areaArr || []
             _this.filterInitData.scopeArr = res.data.scopeArr || []
+            _this.filterInitData.buyerClassArr = res.data.buyerClassArr || []
             // _this.initSelector(res.data)
           } else {
             _this.showToast(res.error_msg)
@@ -340,6 +343,10 @@ var highSet = new Vue({
             _this.filterInitData.industry = data.scopeArr
             _this.initProjectIndustrySelector(data.scopeArr)
             break;
+          case 'buyerclass':
+            _this.filterInitData.buyerClassArr = data.buyerClassArr
+            _this.initBuyerClassSelector(data.buyerClassArr)
+            break;
           case 'start':
             _this.startRange = _this.getCurFourYears()
             break;
@@ -416,6 +423,32 @@ var highSet = new Vue({
       this.$refs.industryCom.canClick = false
       // this.$refs.industryCom.setState(this.selectIndustryList)
     },
+    // 过滤采购单位类型
+    initBuyerClassSelector: function (data) {
+      if (!Array.isArray(data)) return
+      var map = {}
+      data.forEach(function (item) {
+        for (var key in buyerclassSourceMap) {
+          if (buyerclassSourceMap[key].indexOf(item) !== -1) {
+            if (map[key]) {
+              map[key].push(item)
+            } else {
+              map[key] = [item]
+            }
+          }
+        }
+      })
+      var arr = []
+      for (k in map) {
+        arr.push({
+          [k]: map[k]
+        })
+      }
+      // console.log(arr, '过滤好的信息类型数据')
+      this.$refs.buyerclassCom.getSourceList(arr)
+      this.$refs.buyerclassCom.canClick = false
+      this.$refs.buyerclassCom.setState(this.selectIndustryList)
+    },
     // 分析方式
     checkMatch: function (item) {
       this.conf.match = item

BIN
src/web/staticres/common-module/collection/image/save-pic-bg.png


BIN
src/web/staticres/common-module/collection/image/subscribe-icon.png


BIN
src/web/staticres/common-module/collection/image/wx2.png


+ 16 - 1
src/web/staticres/common-module/collection/js/ent_portrait.js

@@ -927,7 +927,9 @@ var vNode = {
             if (res.data && res.data == 'success') {
               _this.entInfo.follow = !_this.entInfo.follow
             }
-
+            if(_this.entInfo.follow) {
+              _this.pointsTaskSuccessTip()
+            }
             if (!_this.entInfo.follow) {
               history.back()
             }
@@ -939,7 +941,20 @@ var vNode = {
           console.log(error)
         }
       })
+    }, // 赚剑鱼币任务完成提示
+    pointsTaskSuccessTip: function() {
+      // 获取剑鱼币任务信息
+      const from =  utils.getParam('from')
+      var point = utils.getParam('point') || 0
+      if(from && from === 'task'){
+        this.$toast({
+          message: `关注企业成功,获得${point}剑鱼币。`,
+          duration: 1500
+        })
+        utils.delUrlParam('from')
+      }
     },
+
     // 初始化图标数据
     initChartsData: function () {
       var dataSet = this.entPortraitInfo

BIN
src/web/staticres/common-module/file-pack/images/dialog-bg.png


+ 100 - 33
src/web/staticres/common-module/file-pack/js/index-wx.js

@@ -96,7 +96,37 @@ var vm = new Vue({
       statusEnum: ['存续', '吊销', '停业', '撤销'],
       statusColors: ['#2CB7CA', '#F5AF5C', '#58A1E7', '#51CEA2'],
       list: [],
-      ptype:""
+      ptype:"",
+      userPower: {
+        // 免费用户
+        isFree: false,
+        // 超级订阅(超级订阅默认一定有附件下载权益)
+        vipStatus: 0,
+        // 大会员
+        memberStatus: 0,
+        // 大会员power包含3, 则表示大会员有附件下载权益
+        power: []
+      },
+      // 附件下载相关权益信息
+      accountInfo: {
+        // 充值数量
+        purchaseNum: 0,
+        // 兑换数量
+        exchangeNum: 0,
+        // 超级订阅剩余权益个数
+        grantNum: 0,
+        // 免费数量(免费用户权益个数)
+        freeNum: 0
+      },
+      kfDialogShow: false,
+      // 二维码
+      QRCode: ''
+    }
+  },
+  computed: {
+    // 大会员是否拥有附件下载权益
+    hasDownloadPower () {
+      return this.userPower.power.indexOf(3) > -1
     }
   },
   created: function () {
@@ -107,34 +137,78 @@ var vm = new Vue({
       this.curDate = new Date()
       this.minDate = new Date(2021, 0)
       this.maxTime = new Date(this.years, this.months - 1)
+      this.getUserPower()
       this.subPoint()
       this.onLoad()
-    	this.initHtml()
   },
   methods: {
-	initHtml(){
-		if(this.ptype=="1"){
-			document.title = '采购单位画像记录'
-            typeof setHeaderTitle === 'function' ? setHeaderTitle(document.title) : null
-			$(".btns span").text("当月采购单位画像剩余数")
-			$(".emptytext").text("暂无采购单位画像记录")
-		}
-	},
-	getPType(paraName){
-      	let _this = this
-		var url = document.location.toString();
-	   var arrObj = url.split("?");
-	   if (arrObj.length > 1) {
-      	var arrPara = arrObj[1].split("&");
-      	var arr;
-      	for (var i = 0; i < arrPara.length; i++) {
-        	arr = arrPara[i].split("=");
-        	if (arr != null && arr[0] == paraName) {
-          	_this.ptype =  arr[1];
-        	}
-      	}
-    	}
-	},
+    // 获取用户权限
+    getUserPower() {
+      var _this = this
+      $.ajax({
+        url: '/bigmember/use/isAdd',
+        type: 'POST',
+        success: function (res) {
+          console.log(res)
+          if (res.data) {
+            var resData = res.data
+            _this.userPower.isFree = resData.isFree
+            _this.userPower.vipStatus = resData.vipStatus
+            _this.userPower.memberStatus = resData.memberStatus
+            _this.userPower.power = resData.power
+            // 客服二维码获取
+            if(resData.customers && resData.customers.length > 0 ){
+              resData.customers.forEach(function (ele) {
+                if (ele.vip) {
+                  _this.QRCode = ele.wxer
+                } else  {
+                  _this.QRCode = ele.wxer
+                }
+              })
+            }
+          }
+        }
+      })
+    },
+    // 超级订阅-了解详情
+    knowMore () {
+      location.href = '/weixin/frontPage/bigmember/free/perfect_info?source=wx_mine_member_attach_learnmore'
+    },
+    // 咨询客服
+    consultKf () {
+      this.kfDialogShow = true
+    },
+    // 去兑换
+    exchangeHandle() {
+      location.href = '/jy_mobile/points/my_points'
+    },
+    // 兑换明细
+    viewDetail () {
+      location.href = '/jy_mobile/fileRecord/exchange'
+    },
+    // 去充值
+    setBook() {
+      if(this.userPower && this.userPower.isFree){
+        location.href = '/jy_mobile/common/order/create/svip?type=buy'
+        return
+      }
+      location.href = '/jy_mobile/common/order/create/filepack?type=0'
+    },
+    getPType(paraName){
+          let _this = this
+      var url = document.location.toString();
+       var arrObj = url.split("?");
+       if (arrObj.length > 1) {
+        	var arrPara = arrObj[1].split("&");
+        	var arr;
+        	for (var i = 0; i < arrPara.length; i++) {
+          	arr = arrPara[i].split("=");
+          	if (arr != null && arr[0] == paraName) {
+            	_this.ptype =  arr[1];
+          	}
+        	}
+      	}
+    },
     usedHised() {
       let _this = this
       _this.pShow = true
@@ -152,6 +226,7 @@ var vm = new Vue({
           if (res.error_msg === '' && res.data && res.data.data) {
             try {
               var tempInfo = res.data.data[0]
+              this.accountInfo = tempInfo
               this.points.total = tempInfo.number
             } catch (e) {
               console.warn(e)
@@ -305,14 +380,6 @@ var vm = new Vue({
     contractPerson() {
       // location.href = '400-108-6670'
       location.href = '/big/wx/page/customer'
-    },
-    setBook() {
-      var temp = {
-        wx: '/jy_mobile/common/order/create/filepack?type=0',
-        app: '/jy_mobile/common/order/create/filepack?type=0'
-      }
-      var isWeixin = navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1
-      location.href = temp[isWeixin ? 'wx' : 'app']
     }
   }
 })

+ 140 - 19
src/web/staticres/common-module/file-pack/js/index.js

@@ -53,8 +53,8 @@ var vm = new Vue({
       minDate: '',
       maxTime: '',
       points: {
-    	total: 0,
-		usage: 0
+    	  total: 0,
+		    usage: 0
       },
       years: '',
       months: '',
@@ -70,7 +70,40 @@ var vm = new Vue({
       statusEnum: ['存续', '吊销', '停业', '撤销'],
       statusColors: ['#2CB7CA', '#F5AF5C', '#58A1E7', '#51CEA2'],
       list: [],
-      ptype: ""
+      ptype: "",
+      userPower: {
+        // 免费用户
+        isFree: false,
+        // 超级订阅(超级订阅默认一定有附件下载权益)
+        vipStatus: 0,
+        // 大会员
+        memberStatus: 0,
+        // 大会员power包含3, 则表示大会员有附件下载权益
+        power: []
+      },
+      // 附件下载相关权益信息
+      accountInfo: {
+        // 充值数量
+        purchaseNum: 0,
+        // 兑换数量
+        exchangeNum: 0,
+        // 超级订阅剩余权益个数
+        grantNum: 0,
+        // 免费数量(免费用户权益个数)
+        freeNum: 0
+      },
+      kfDialogShow: false,
+      // 二维码
+      QRCode: '',
+      // 保存图片是否成功
+      savePicSuccess: false,
+      picImgUrl: null
+    }
+  },
+  computed: {
+    // 大会员是否拥有附件下载权益
+    hasDownloadPower () {
+      return this.userPower.power.indexOf(3) > -1
     }
   },
   created: function () {
@@ -81,19 +114,115 @@ var vm = new Vue({
     this.curDate = new Date()
     this.minDate = new Date(2021, 0)
     this.maxTime = new Date(this.years, this.months - 1)
+    this.getUserPower()
     this.subPoint()
     this.onLoad()
-    this.initHtml()
   },
   methods: {
-    initHtml () {
-      if (this.ptype == "1") {
-        document.title = '采购单位画像记录'
-        typeof setHeaderTitle === 'function' ? setHeaderTitle(document.title) : null
-        $(".btns span").text("当月采购单位画像剩余数")
-        $(".emptytext").text("暂无采购单位画像记录")
+    // 获取用户权限
+    getUserPower() {
+      var _this = this
+      $.ajax({
+        url: '/bigmember/use/isAdd',
+        type: 'POST',
+        success: function (res) {
+          console.log(res)
+          if (res.data) {
+            var resData = res.data
+            _this.userPower.isFree = resData.isFree
+            _this.userPower.vipStatus = resData.vipStatus
+            _this.userPower.memberStatus = resData.memberStatus
+            _this.userPower.power = resData.power
+            // 客服二维码获取
+            if(resData.customers && resData.customers.length > 0 ){
+              resData.customers.forEach(function (ele) {
+                if (ele.vip) {
+                  _this.QRCode = ele.wxer
+                } else  {
+                  _this.QRCode = ele.wxer
+                }
+              })
+            }
+          }
+        }
+      })
+    },
+    // 超级订阅-了解详情
+    knowMore () {
+      var source = 'app_mine_member_attach_learnmore'
+      if(utils.$env.platform === 'h5') {
+        source = 'h5_mine_member_attach_learnmore'
+      }
+      location.href = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + source
+    },
+    // 咨询客服
+    consultKf () {
+      this.kfDialogShow = true
+    },
+    // 保存二维码
+    savePicHandle () {
+      var _this = this
+      if(_this.savePicSuccess) return
+      var loading = _this.$toast.loading({ duration: 0, message: '保存中...' })
+      if(!_this.picImgUrl) {
+        $("#creat-img-box").append($('#QRCode-pic').clone().attr('id', 'clone-image'))
+        html2canvas(document.querySelector('#clone-image'), {
+          // allowTaint: true,
+          useCORS: true,
+          backgroundColor: null,
+          scale: 3,
+          imageTimeout: 30000,
+        }).then(canvas => {
+          var imgUrl = canvas.toDataURL('image/png');
+          imgUrl = imgUrl.replace('data:image/png;base64,', '')
+          _this.picImgUrl = imgUrl
+          $('#clone-image').remove()
+          try {
+            window.JyObj.savePic(imgUrl)
+            _this.$toast('图片已经保存~')
+            loading.clear()
+            setTimeout(() => {
+              _this.saveSuccess = false
+            }, 1500)
+          } catch (e) {
+            $('#clone-image').remove()
+            loading.clear()
+            _this.$toast('保存失败')
+            setTimeout(() => {
+              _this.saveSuccess = false
+            }, 1500)
+          }
+        })
+      }else {
+        try {
+          window.JyObj.savePic(_this.picImgUrl)
+          loading.clear()
+          _this.$toast('图片已经保存,快去分享吧~')
+        } catch (e) {
+          loading.clear()
+          _this.$toast('保存失败')
+        }
+        setTimeout(() => {
+          _this.saveSuccess = false
+        }, 1500)
       }
     },
+    // 去兑换
+    exchangeHandle() {
+      location.href = '/jy_mobile/points/my_points'
+    },
+    // 兑换明细
+    viewDetail () {
+      location.href = '/jy_mobile/fileRecord/exchange'
+    },
+    // 去充值
+    setBook() {
+      if(this.userPower && this.userPower.isFree){
+        location.href = '/jy_mobile/common/order/create/svip?type=buy'
+        return
+      }
+      location.href = '/jy_mobile/common/order/create/filepack?type=0'
+    },
     getPType (paraName) {
       let _this = this
       var url = document.location.toString();
@@ -126,8 +255,8 @@ var vm = new Vue({
           if (res.error_msg === '' && res.data && res.data.data) {
             try {
               var tempInfo = res.data.data[0]
+              this.accountInfo = tempInfo
               this.points.total = tempInfo.number
-
             } catch (e) {
               console.warn(e)
             }
@@ -285,14 +414,6 @@ var vm = new Vue({
       // } catch (error) {
       //   console.log(error)
       // }
-    },
-    setBook() {
-      var temp = {
-        wx: '/jy_mobile/common/order/create/filepack?type=0',
-        app: '/jy_mobile/common/order/create/filepack?type=0'
-      }
-      var isWeixin = navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1
-      location.href = temp[isWeixin ? 'wx' : 'app']
     }
   }
 })

+ 13 - 9
src/web/staticres/common-module/perfect-info/js/perfect-info.js

@@ -123,6 +123,10 @@ var tipMap = {
   article_collection: '重要项目一键创建标签收藏!请完善个人信息,为您匹配精准服务',
   // 标讯详情免费用户--免费体验
   article_member_freeuse: '请升级大会员无限制查看标讯、超前项目,优先对接项目负责人,抢占绝对先机!',
+  // 附件下载记录
+  app_mine_member_attach_learnmore: '请留下联系方式,我们会尽快联系您!部分招标公告信息等相关文件资料自主下载,帮助企业投标,客户分析、市场挖掘更高效。',
+  wx_mine_member_attach_learnmore: '请留下联系方式,我们会尽快联系您!部分招标公告信息等相关文件资料自主下载,帮助企业投标,客户分析、市场挖掘更高效。',
+  h5_mine_member_attach_learnmore: '请留下联系方式,我们会尽快联系您!部分招标公告信息等相关文件资料自主下载,帮助企业投标,客户分析、市场挖掘更高效。',
   member_attach: '请留下联系方式,我们会尽快联系您!体验附件下载特权,挖掘更多项目情报!',
   member_freeuse: '请留下联系方式,我们会尽快联系您体验大会员全部功能!',
   month_: '请留下联系方式,我们会尽快联系您!体验市场分析周报/月报!',
@@ -196,14 +200,14 @@ var tipMap = {
   app_supermarket_details_IndustryFields:'请留下您的联系方式及定制数据字段需求,我们将安排专业的数据经理与您对接,为您打造专属的数据服务方案,可快速交付!',
   wx_supermarket_details_IndustryFields:'请留下您的联系方式及定制数据字段需求,我们将安排专业的数据经理与您对接,为您打造专属的数据服务方案,可快速交付!',
   h5_supermarket_details_IndustryFields:'请留下您的联系方式及定制数据字段需求,我们将安排专业的数据经理与您对接,为您打造专属的数据服务方案,可快速交付!',
-  // 
+  //
   app_supermarket_details_AnalysisCase:'请留下您的联系方式,免费获取领域客户应用案例。如有其他业务需求请联系客服:<a onclick="appcallPhone()" class="tips_tel">400-108-6670</a>',
   wx_supermarket_details_AnalysisCase:'请留下您的联系方式,免费获取领域客户应用案例。如有其他业务需求请联系客服:<a href="tel:400-108-6670" class="tips_tel">400-108-6670</a>',
   h5_supermarket_details_AnalysisCase:'请留下您的联系方式,免费获取领域客户应用案例。如有其他业务需求请联系客服:<a href="tel:400-108-6670" class="tips_tel">400-108-6670</a>',
   // 标书制作
   bid_document_Introduction_page: '请留下联系方式,我们会尽快联系您!',
-  // 电信行业解决方案 
-  telecom_solution: '请留下您的信息,我们会尽快和您联系'
+  // 电信行业解决方案
+  telecom_solution: '请留下您的信息,我们会尽快和您联系',
 }
 
 // 留资来源(数据库新增字段,记录留资对应的来源,之前未记录的不考虑,新增的source要记录)
@@ -375,6 +379,7 @@ var vNode = {
     },
     getTipStr () {
       var source = this.ajaxParams.source
+      console.log(source)
       // 提示语
       var infoText = ''
       for (var key in tipMap) {
@@ -395,7 +400,7 @@ var vNode = {
           if(source?.toLowerCase().indexOf('supermarket') > -1){
             this.moduleShow.data_requirement = true
             this.moduleShow.email = true
-          }  
+          }
         }
 
         if (source.indexOf('_freeuser') > -1 && infoText.indexOf('【') > -1) {
@@ -425,7 +430,6 @@ var vNode = {
             _that.moduleShow[k] = false
         }
       }
-
       switch (source) {
         case 'article_collection': {
           hideLabel()
@@ -470,7 +474,7 @@ var vNode = {
         case 'h5_DataSupermarket_Customization':
         case 'app_supermarket_details_customization':
         case 'wx_supermarket_details_customization':
-        case 'h5_supermarket_details_customization': 
+        case 'h5_supermarket_details_customization':
         case 'h5_DataSupermarket_IndustryFields':
         case 'app_DataSupermarket_IndustryFields':
         case 'wx_DataSupermarket_IndustryFields':
@@ -1159,7 +1163,7 @@ var vNode = {
                 case 'h5_DataSupermarket_Customization':
                 case 'app_supermarket_details_customization':
                 case 'wx_supermarket_details_customization':
-                case 'h5_supermarket_details_customization': 
+                case 'h5_supermarket_details_customization':
                 case 'h5_DataSupermarket_IndustryFields':
                 case 'app_DataSupermarket_IndustryFields':
                 case 'wx_DataSupermarket_IndustryFields':
@@ -1300,10 +1304,10 @@ var vNode = {
       'h5_supermarket_details_AnalysisCase'
       ]
       if(notit_group_list.includes(source)){
-     
+
         this.notit_group = true
       } else {
-    
+
         this.notit_group = false
       }
     },

+ 7 - 0
src/web/staticres/common-module/public/js/utils.js

@@ -197,6 +197,13 @@ var utils = {
     r = null;
     return context == null || context == '' || context == 'undefined' ? '' : context;
   },
+  // 移除url参数,但是不刷新页面
+  delUrlParam: function (name){
+    var href = window.location.href;
+    const e = eval(`/&?${name}=[^&#]*/g`);
+    href = href.replace(e, '');
+    history.replaceState('','',href);// replaceState方法不会触发页面刷新,只是导致history对象发生变化,地址栏
+  },
   // 取[m, n]随机数
   getRandomNumber: function (min, max) {
     return Math.floor(Math.random() * (max - min + 1) + min);

BIN
src/web/staticres/common-module/task/frame.png


BIN
src/web/staticres/common-module/task/task-app.png


BIN
src/web/staticres/common-module/task/task-bdsjh.png


BIN
src/web/staticres/common-module/task/task-bdyx.png


BIN
src/web/staticres/common-module/task/task-gsmc.png


BIN
src/web/staticres/common-module/task/task-gzh.png


BIN
src/web/staticres/common-module/task/task-gzqy.png


BIN
src/web/staticres/common-module/task/task-gzxm.png


BIN
src/web/staticres/common-module/task/task-wcdy.png


BIN
src/web/staticres/common-module/task/task-xrrw.png


BIN
src/web/staticres/common-module/task/task-ywlx.png


+ 39 - 4
src/web/staticres/common-module/vipsubscribe/js/vip-subscribe-set-template.js

@@ -1,3 +1,23 @@
+// 传入你要获取的参数的名字
+function getParam (name) {
+  var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
+  var r = window.location.search.substr(1).match(reg); //获取url中'?'符后的字符串并正则匹配
+
+  var context = '';
+  if (r != null) context = r[2];
+  // 释放变量
+  reg = null;
+  r = null;
+  return context == null || context == '' || context == 'undefined' ? '' : context;
+}
+// 移除url参数,但是不刷新页面
+function delUrlParam (name){
+  var href = window.location.href;
+  const e = eval(`/&?${name}=[^&#]*[$&]*/g`);
+  href = href.replace(e, '');
+  history.replaceState('','',href);// replaceState方法不会触发页面刷新,只是导致history对象发生变化,地址栏
+}
+
 var subScribeTemplate = `
 <div class="sub-scribe">
 <ul style="border-radius:.16rem;overflow:hidden">
@@ -372,12 +392,12 @@ var subComponent = {
 
                 }else{
                   this_.cansetarea_s=true
-                } 
+                }
               }
-            }) 
+            })
 
           } else { // 非企业授权
-            this_.cansetarea_s=true  
+            this_.cansetarea_s=true
           }
 
         }
@@ -511,6 +531,7 @@ var subComponent = {
                 $('.body-item.keywords .keywords-text').text('请设置关键词')
               } else {
                 $('.body-item.keywords .keywords-text').text('已设置' +arr.length+ '组关键词')
+                this.pointsTaskSuccessTip()
               }
               // $('.body-item.keywords .keywords-text').text(arr.join('、'))
           }
@@ -772,7 +793,7 @@ var subComponent = {
     // 修改地区无次数点击事件
     userNumOver: function (event) {
       if(this.vSwitch=='v' || this.vSwitch=='m'){ //超级订阅或者大会员
-        if(!this.cansetarea_s){ 
+        if(!this.cansetarea_s){
           weui.alert('如需修改区域,请联系企业管理员修改分发设置区域。', {
             title: '不支持修改区域',
             className: 'j-alert',
@@ -932,6 +953,7 @@ var subComponent = {
             // 关键词长度
             if(res.data.keys) {
               $('.body-item.keywords .keywords-text').text('已设置' +res.data.keys.length+ '组关键词')
+              _this.pointsTaskSuccessTip()
             } else {
               $('.body-item.keywords .keywords-text').text('请设置关键词')
             }
@@ -1042,5 +1064,18 @@ var subComponent = {
           isPageHide = true;
       });
     },
+    // 赚剑鱼币任务完成提示
+    pointsTaskSuccessTip: function() {
+      // 获取剑鱼币任务信息
+      var from = getParam('from')
+      if(from === 'task'){
+        var point = getParam('point') || 0
+        weui.toast(`完成订阅关键词设置,获得${point}剑鱼币。`, {
+          duration: 1500,
+          className: 'jy-toast'
+        });
+        delUrlParam('from')
+      }
+    }
   },
 }

BIN
src/web/staticres/commonFunctions/set-account-info.png


BIN
src/web/staticres/commonFunctions/set-identity-info.png


+ 151 - 13
src/web/staticres/frontRouter/pc/fileHistory/js/index-pc.js

@@ -54,11 +54,34 @@ var downFileOfURL = debounce(function (src , name) {
   return downFile(src, name)
 }, 1500)
 
-var vm = new Vue({
+var fileRecorder = new Vue({
   el: '.see-container',
   delimiters: ['{', '}'],
   data () {
     return {
+      userPower: {
+        // 免费用户
+        isFree: false,
+        // 超级订阅(超级订阅默认一定有附件下载权益)
+        vipStatus: 0,
+        // 大会员
+        memberStatus: 0,
+        // 大会员power包含3, 则表示大会员有附件下载权益
+        power: []
+      },
+      // 附件下载相关权益信息
+      accountInfo: {
+        // 权益剩余总数量
+        number: 0,
+        // 剩余购买数量(充值)/number1
+        purchaseNum: 0,
+        // 剩余兑换数量/number2
+        exchangeNum: 0,
+        // 剩余定期投放数量(超级订阅剩余权益个数)/number3
+        grantNum: 0,
+        // 剩余留资数量(免费用户权益个数)/number4
+        freeNum: 0
+      },
       working: false,
       empty: false,
       dateVal: '',
@@ -73,11 +96,42 @@ var vm = new Vue({
         total: 0, // 总页数
         list: [] // 返回的数据
       },
+      kefu: {
+        qr: '',
+        name: ''
+      },
       helpDialog: false,
-      tipDialog: false
+      tipDialog: false,
+      kefuDialog: false,
     }
   },
   computed: {
+    bigmember () {
+      return this.userPower.memberStatus > 0
+    },
+    bigmemberNoPower () {
+      return this.userPower.power.indexOf(3) === -1 && this.bigmember
+    },
+    // 大会员有附件下载包权益
+    bigmemberHasPower () {
+      return this.userPower.power.indexOf(3) > -1 && this.bigmember
+    },
+    // 免费用户或者老超级订阅
+    freeUser () {
+      var oldVip = this.userPower.vipStatus > 0 && !this.userPower.viper
+      return this.userPower.isFree || oldVip
+    },
+    // 超级订阅用户
+    vipUser () {
+      return this.userPower.vipStatus > 0 && this.userPower.viper
+    },
+    showHeaderCard () {
+      // 大会员有附件下载包权益,不显示卡片
+      return !this.bigmemberHasPower
+    },
+    showFreeTip () {
+      return this.accountInfo.freeNum > 0
+    },
     dialogBtnText: function() {
       if (this.points.provin == -1) {
         return '联系客服'
@@ -90,10 +144,43 @@ var vm = new Vue({
     this.years = new Date().getFullYear()
     this.months = parseInt(new Date().getMonth() + 1)
     this.dateVal = new Date()
+    this.getUserPower()
     this.subPoint()
     this.subRecord()
   },
   methods: {
+    getUserPower () {
+      var _this = this
+      $.ajax({
+        type: 'post',
+        url: '/bigmember/use/isAdd',
+        success: function (res) {
+          if (res && res.data) {
+            for (var key in res.data) {
+              _this.$set(_this.userPower, key, res.data[key])
+              _this.calcKefuInfo()
+            }
+          }
+        }
+      })
+    },
+    calcKefuInfo: function () {
+      var customers = this.userPower.customers
+      if (!$.isArray(customers)) {
+        return
+      }
+      var target;
+      for (var i = 0; i < customers.length; i++) {
+        if (customers[i].remark.indexOf('成功') > -1) {
+          target = customers[i]
+          break
+        }
+      }
+      if (target) {
+        this.kefu.qr = target.wxer
+        this.kefu.name = target.remark
+      }
+    },
     cellClick (row, column, cell, event) {
       console.log(row, column, cell, event)
       if (column.label === '附件') {
@@ -118,7 +205,8 @@ var vm = new Vue({
         return
       }
       if (column.label === '公告来源') {
-        location.href = row.articleUrl
+        // location.href = row.articleUrl + '?aside=0'
+        window.open(row.articleUrl)
       }
     },
     indexMethod (index) {
@@ -148,18 +236,10 @@ var vm = new Vue({
         dataType: 'json'
       }).done(res => {
           if (res.error_msg === '' && res.data && res.data.data) {
-            this.points = {
-              total: 0,
-              usage: 0
-            }
             try {
               var tempInfo = res.data.data[0]
-              this.points = {
-                total: tempInfo.number,
-                usage: tempInfo.number
-              }
-              if (this.points.usage > tempInfo.thirtyNum) {
-                this.points.usage = tempInfo.thirtyNum
+              for (var key in tempInfo) {
+                _this.$set(_this.accountInfo, key, tempInfo[key])
               }
             } catch (e) {
               console.warn(e)
@@ -214,6 +294,64 @@ var vm = new Vue({
       this.seeList.list = []
       this.subRecord()
     },
+    goToBuySvip: function () {
+      window.open('/swordfish/page_big_pc/free/svip/buy')
+    },
+    rechargeFilePack: function () {
+      window.open('/swordfish/page_big_pc/free/filePack/buy')
+    },
+    toBuyWithPoint () {
+      console.log('兑换附件下载,跳转工作桌面兑换')
+      if (goTemplateData.inIframe) {
+        try {
+          window.$BRACE.methods.open({
+            route: {
+              link: '/points',
+              appName: 'pointSubApp',
+              appType: 'qiankun'
+            }
+          })
+        } catch (error) {
+          window.open('/swordfish/integral/index')
+        }
+      } else {
+        window.open('/swordfish/integral/index')
+      }
+    },
+    goToFileNumberDetail () {
+      if (goTemplateData.inIframe) {
+        try {
+          window.$BRACE.methods.open({
+            route: {
+              link: '/big/filepack/history',
+              appName: 'bigMemberSubApp',
+              appType: 'qiankun'
+            }
+          })
+        } catch (error) {
+          window.open('/swordfish/page_big_pc/filepack/history')
+        }
+      } else {
+        window.open('/swordfish/page_big_pc/filepack/history')
+      }
+    },
+    doLeaveInfo: function () {
+      vm.isNeedSubmit('pc_mine_member_attach_learnmore',function(){
+        // vm.showSuccess = true
+      })
+    },
+    // 显示专属客服弹窗
+    showZhuanShuKfDialog () {
+      this.kefuDialog = true
+    },
+    concatKf () {
+      if (goTemplateData.inIframe) {
+        window.$BRACE.$emit('open-customer')
+      } else {
+        // 打开客服弹窗
+        checkCustomerService()
+      }
+    },
     detailed (ids) {
       window.open('/swordfish/page_big_pc/unit_portrayal/' + ids, '_blank')
     }

+ 179 - 0
src/web/staticres/frontRouter/pc/seeBuyerHistory/css/index-pc.css

@@ -2,6 +2,44 @@
     display: flex;
     align-items: center;
 }
+
+/* in-iframe */
+.in-iframe .see-container {
+    padding: 26px 24px;
+    min-height: unset;
+}
+.in-iframe .see-header {
+    margin-top: 0;
+}
+.in-iframe .see-header .w1080,
+.in-iframe .see-header .show-total-info-group {
+    width: 100%;
+}
+.in-iframe .see-content table {
+    width: 100%!important;
+}
+.in-iframe .no-data {
+    margin-top: 0;
+    padding: 100px 0;
+    background-color: #fff;
+    border-radius: 8px;
+}
+
+
+.pointer {
+    cursor: pointer;
+}
+
+.j-f-button {
+    padding: 4px 22px;
+    color: #fff;
+    font-size: 14px;
+    line-height: 22px;
+    text-align: center;
+    background-color: #2ABED1;
+    border-radius: 4px;
+}
+
 .see-container {
     line-height: 1;
     padding-top: 64px;
@@ -258,3 +296,144 @@
 .custom-dialog .el-dialog__footer{
   padding-bottom: 32px;
 }
+
+.show-total-info-group {
+    margin-top: 24px;
+    position: relative;
+    padding: 4px;
+    color: #fff;
+    border-radius: 8px;
+    background: linear-gradient(281deg, #14A7D6 3.53%, #1EC2DB 98.32%);
+}
+.show-total-info-group-hd {
+    position: relative;
+    padding: 16px 28px;
+    font-size: 16px;
+    font-weight: 700;
+    line-height: 24px;
+}
+.file-pack-total {
+    font-size: 36px;
+    line-height: 36px;
+}
+.file-unit {
+    font-size: 14px;
+    font-weight: 400;
+    line-height: 22px;
+}
+
+.show-total-info-group-bd {
+    position: relative;
+    color: #1D1D1D;
+    padding: 16px 28px 24px;
+    border-radius: 8px;
+    background: linear-gradient(90deg, #F3FEFF 0%, #DEFBFF 100%);
+    z-index: 2;
+}
+.hd-right-bg {
+    position: absolute;
+    right: -4px;
+    top: -4px;
+    bottom: 0;
+    width: 320px;
+    height: 76px;
+    overflow: hidden;
+    z-index: 1;
+}
+.hd-right-bg img {
+    display: block;
+    width: 100%;
+}
+.content-info-hd {
+    margin-bottom: 8px;
+    padding-bottom: 8px;
+    color: #686868;
+    font-size: 14px;
+    line-height: 22px;
+    border-bottom: 1px dashed #E0E0E0;
+}
+.content-info-hd .strong {
+    color: #1D1D1D;
+    font-size: 18px;
+    font-weight: 700;
+    line-height: 28px;
+}
+
+.content-info-bd {
+    font-size: 14px;
+    line-height: 22px
+}
+.content-info-bd .desc-title {
+    color: #1D1D1D;
+}
+.content-info-bd .desc-text {
+    color: #686868;
+    line-height: 30px;
+}
+.content-info-bd .desc-row.desc-title {
+    margin-bottom: 8px;
+}
+.content-info-bd .j-f-button {
+    margin-left: 16px;
+}
+
+.header-hd {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+}
+.tab-button {
+    display: flex;
+    padding: 8px 16px;
+    justify-content: center;
+    align-items: center;
+    border-radius: 6px;
+    border: 1px solid #E0E0E0;
+    background: #FFF;
+    font-size: 14px;
+    color: #1d1d1d;
+    line-height: 22px;
+}
+
+.kefu-qr-dialog .el-dialog__body {
+    width: 100%;
+    background: url(/common-module/file-pack/images/dialog-bg.png) no-repeat;
+    background-position-y: 100%;
+    background-size: 100%;
+    color: #171826;
+}
+
+.kefu-qr-dialog .content-container {
+    text-align: center;
+}
+.kefu-qr-dialog .img-conatainer {
+    margin: 0 auto;
+    width: 180px;
+}
+.img-conatainer img {
+    display: block;
+    width: 100%;
+}
+.kefu-qr-dialog .content-header {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 14px;
+    line-height: 20px;
+}
+.kefu-qr-dialog .content-footer {
+    font-size: 12px;
+    line-height: 24px;
+}
+.wx-icon {
+    display: inline-block;
+    width: 20px;
+    height: 20px;
+}
+.kefu-qr-dialog .wx-icon {
+    margin-right: 6px;
+}
+.kefu-qr-dialog .wx-icon img {
+    display: block;
+    width: 100%;
+}

BIN
src/web/staticres/images/save-pic-bg.png


BIN
src/web/staticres/images/wx2.png


+ 6 - 0
src/web/staticres/js/ent-search-index-pc.js

@@ -14,6 +14,7 @@ var vm = new Vue({
             searchContent: pageInfo.searchContent,
             tabActive: 'qy',
             filterShow: true,
+            query: {},
             searchTypeList: [
                 {
                     label: '企业名称',
@@ -303,6 +304,7 @@ var vm = new Vue({
         } else {
             this.doSearch()
         }
+        this.getQuery()
         this.initPageData()
         this.initProvinceMapList()
     },
@@ -329,6 +331,10 @@ var vm = new Vue({
         // }
     },
     methods: {
+        getQuery: function () {
+            this.query.from = getParam('from')
+            this.query.point = getParam('point')
+        },
         industryTab: function() {
             $.ajax({
                 type:'POST',

+ 2 - 0
src/web/staticres/js/pc-collect-user-info.js

@@ -202,6 +202,7 @@ function debounce(fn, delay) {
     }, delay)
   }
 }
+
 var vm = new Vue({
   el: '#vue-collect-user-info',
   delimiters: ['@@', '@@'],
@@ -363,6 +364,7 @@ var vm = new Vue({
       sourceTitleMap: {
         pc_article_member_freeuse: '请升级大会员无限制查看标讯、超前项目,优先对接项目负责人,抢占绝对先机!',
         article_attach_freeuser: '请留下联系方式,立即免费体验【附件下载】1次,招标文件/采购清单一键下载,商机更完整!',
+        pc_mine_member_attach_learnmore: '请留下联系方式,我们会尽快联系您!部分招标公告信息等相关文件资料自主下载,帮助企业投标,客户分析、市场挖掘更高效。',
         // ent_portrait_freeuser: '请留下联系方式,立即免费体验【企业中标分析】1次,多维度可视化分析竞争对手!',
         // ent_portrait_winnerNewMsg_freeuser: '请留下联系方式,立即免费体验【企业中标分析】1次,多维度可视化分析竞争对手!',
         // ent_portrait_yearData_freeuser: '请留下联系方式,立即免费体验【企业中标分析】1次,多维度可视化分析竞争对手!',

+ 43 - 9
src/web/staticres/me/js/mail_bind.js

@@ -49,8 +49,24 @@ var vm = new Vue({
     },
     created: function () {
         this.getType()
+        this.getUserInfo()
     },
     methods: {
+        getUserInfo: function () {
+          var _this = this
+          this.getUserInfoLoaded = false
+          $.ajax({
+            type: 'GET',
+            url: '/jypay/user/getAccountInfo?t=' + Date.now(),
+            success: function (res) {
+              if (res.error_code == 0 && res.data) {
+                if(res.data.otherMail) {
+                  _this.info.mail = res.data.otherMail
+                }
+              }
+            }
+          })
+        },
         getType: function () {
             if (location.pathname.indexOf('bind') !== -1) {
                 this.type = 'bind'
@@ -137,19 +153,37 @@ var vm = new Vue({
                 success: function (res) {
                     loading.clear()
                     if (res.error_code == 0 && res.data.state == 1) {
-                        _this.$toast({
-                            message: _this.someText.text + '成功',
-                            duration: 1500,
-                            forbidClick: true,
-                            onClose: function () {
-                                history.back()
-                            }
-                        })
+                       _this.pointsTaskSuccessTip()
                     } else {
                         _this.showToast(res.error_msg)
                     }
                 }
             })
         },
+        // 赚剑鱼币任务完成提示
+        pointsTaskSuccessTip: function () {
+          // 获取剑鱼币任务信息
+          const from =  utils.getParam('from')
+          var point = utils.getParam('point') || 0
+          if(from && from === 'task'){
+            this.$toast({
+              message: `绑定邮箱成功,获得${point}剑鱼币。`,
+              duration: 1500,
+              forbidClick: true,
+              onClose: function () {
+                history.back()
+              }
+            })
+          } else {
+            this.$toast({
+              message: this.someText.text + '成功',
+              duration: 1500,
+              forbidClick: true,
+              onClose: function () {
+                history.back()
+              }
+            })
+          }
+        }
     }
-})
+})

+ 11 - 0
src/web/staticres/me/js/phone_bind.js

@@ -371,6 +371,9 @@ var vm = new Vue({
         bindPhoneSuccess: function (state) {
             var _this = this
             if (state == 1) {
+                if(this.form === 'task'){
+                  _this.pointsTaskSuccessTip()
+                }
                 // 绑定手机号完成后,如果已经填写过公司。则不发送提交公司的请求
                 // 可以直接判断计算属性showEntItem,来判断需不需要填写公司
                 if (_this.showEntItem) {
@@ -397,5 +400,13 @@ var vm = new Vue({
                 })
             }
         },
+      // 赚剑鱼币任务完成提示
+       pointsTaskSuccessTip: function () {
+        // 获取剑鱼币任务信息
+        if(this.from === 'task' && this.type === 'bind'){
+          var point = utils.getParam('point') || 0
+          this.showToast(`绑定手机号成功,获得${point}剑鱼币。`)
+        }
+      }
     }
 })

+ 192 - 95
src/web/staticres/public-pc/js/article-content.js

@@ -4,7 +4,57 @@ if(goTemplateData.params.obj.subtype=="中标"||goTemplateData.params.obj.subtyp
   $('.bid_dev').show()
 }
 $("span[class=winner-point]:last").hide();
+window.filePackAccount = {}
 var keys = goTemplateData.params.obj.purchasing
+
+// 剑鱼币任务完成提示
+var pointTask = {
+  query: {},
+  init: function () {
+    this.getQuery()
+  },
+  getQuery: function () {
+    // {"from":"task","point":"followProject_50"}
+    var r = localStorage.getItem('point-task-query-login-clear')
+    if (r) {
+      this.query = JSON.parse(r)
+    } else {
+      this.query = {}
+    }
+  },
+  clearPointQuery: function () {
+    // 剑鱼币任务:query传参丢失,所以采用localStorage
+    localStorage.removeItem('point-task-query-login-clear')
+  },
+  getPointFromType: function (type) {
+    var from = this.query.from
+    var point = this.query.point
+    if (from !== 'task') return
+    const pointArr = point.split('-')
+    const res = pointArr.find(item => {
+      const r = item.split('_')
+      return r[0] === type
+    })
+    if (res) {
+      return { point: res.split('_')[1] }
+    } else {
+      return { point: '' }
+    }
+  },
+  pointToast: function () {
+    if (this.query.from === 'task') {
+      // toast是单例,会把默认toast覆盖掉
+      const r = this.getPointFromType('followProject')
+      if (r && r.point) {
+        EasyAlert.show('关注项目成功,获得'+r.point+'剑鱼币', { 'max-width': 'unset' }, 2000)
+      }
+      this.clearPointQuery()
+      this.query.from = ''
+    }
+  }
+}
+pointTask.init()
+
 var bidNode = {
   el: '#tab2',
   data: {
@@ -2115,12 +2165,13 @@ function goDownload(url) {
     if (window.freeFile == 0) {
       // 判断有无留过资 且未体验过 - 去留资
       vm.noCallApiFn('article_attach_freeuser', true)
-    } else if (window.freeFile > 0 ){
+    } else if (window.freeFile > 0 || window.filePackAccount.number > 0){
       // 留过资 更新下载次数 进入附件下载页面
       location.href = url
     } else {
       // 免费用户 体验过 下载次数为-1 弹框提醒跳至超级订阅购买页
-      bidVue.$alert('您已经免费解锁过【附件下载】权益1次,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。', '开通超级订阅', {
+      // 您已经免费解锁过【附件下载】权益1次,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。
+      bidVue.$alert('您的免费【附件下载】次数已使用完,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。', '开通超级订阅', {
         showClose:false,
         center: true,
         confirmButtonText: '去开通',
@@ -2249,6 +2300,7 @@ function cjdyDownload (fname) {
           if (!data.r["isExists"]){
             $(".file-count").text($(".file-count").text()-1);
           }
+          getFilePackLastCount()
           location.href = data.r["downUrl"] + '?response-content-type=application/octet-stream'
           //goDownload(data.r["downUrl"])
         }
@@ -2264,119 +2316,169 @@ window.collectSubmitCallback = function (source, data) {
 }
 // 获取附件内容
 function getFileData () {
+  // 获取附件列表
   $.ajax({
     type:'post',
     url:'/bigmember/attachment/get',
     data:{
       infoId:goTemplateData.params.obj._id
-},
-  success:function(data){
-    // TODO 留资判断
-    if(data.data && data.data.attachment !=null && data.data.attachment.length!==0){
-      var html = ''
-      for(var i=0;i<data.data.attachment.length;i++) {
-        // html += "<div class='downs'>"+"<a class='menu_list' style='text-decoration:underline;color: #2CB7CA' onclick='goDownload(\""+data.data.attachment[i].downurl+"\")'>"+(i+1)+"."+data.data.attachment[i].filename+"</a></div>"
-        html += "<div class='downs'>"+"<a class='menu_list' style='word-wrap: break-word;word-break: normal;text-decoration:underline;color: #2CB7CA'>"+(i+1)+"."+data.data.attachment[i].filename+"</a></div>"
+    },
+    success:function(data){
+      // TODO 留资判断
+      if(data.data && data.data.attachment && data.data.attachment.length!==0){
+        var html = ''
+        for(var i=0;i<data.data.attachment.length;i++) {
+          // html += "<div class='downs'>"+"<a class='menu_list' style='text-decoration:underline;color: #2CB7CA' onclick='goDownload(\""+data.data.attachment[i].downurl+"\")'>"+(i+1)+"."+data.data.attachment[i].filename+"</a></div>"
+          html += "<div class='downs'>"+"<a class='menu_list' style='word-wrap: break-word;word-break: normal;text-decoration:underline;color: #2CB7CA'>"+(i+1)+"."+data.data.attachment[i].filename+"</a></div>"
 
-      }
-      if(html!==""){
-        $("#attach-list").show().find(".download-list").html(html)
-      }
-      $(".downs").click(function (){
-        var name = $(this).find('a').text()
-        var fname = name.replace(/^\d+./, '')
-        if(window.isFree){
-          if(window.freeFile == 0){
-            // 判断有无留过资 且未体验过 - 去留资
-            // 弹窗留资弹框,第一个参数为source,第二个是留资成功后是否需要刷新页面 可不传,不传即为不刷新
-            // 不需要再调是否留资接口 只要isAdd接口里返回得对应参数值为0 即为需要留资 直接调noCallApiFn方法弹出弹框即可
-            vm.noCallApiFn('article_attach_freeuser', true)
-          }else if (window.freeFile > 0 ){
-            window.freeFile = -1
-            // 留过资 更新下载次数 进入附件下载页面
-            cjdyDownload(fname)
-          }else {
-            // 免费用户 体验过 下载次数为-1 弹框提醒跳至超级订阅购买页
-            bidVue.$alert('您已经免费解锁过【附件下载】权益1次,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。', '开通超级订阅', {
-              showClose:false,
-              center: true,
-              confirmButtonText: '去开通',
-              customClass: 'custom-alert',
-              showCancelButton: true,
-              confirmButtonClass: 'custom-confirm-btn',
-              cancelButtonClass: 'custom-cancel-btn'
-            }).then(function(){
-              location.href = '/swordfish/page_big_pc/free/svip/buy'
-            }).catch(function(){});
-          }
-        }else{
-          // 付费用户
-          // 大会员用户 有下载权限
-          if (window.memberPower.indexOf(3) > -1) {
-            cjdyDownload(fname)
-            return
-          }
-          // 超级订阅用户
-          if (window.vipStatus > 0) {
-            // 是新超级订阅用户
-            if (window.viper) {
+        }
+        if(html!==""){
+          $("#attach-list").show().find(".download-list").html(html)
+        }
+        $(".downs").click(function (){
+          var name = $(this).find('a').text()
+          var fname = name.replace(/^\d+./, '')
+          if(window.isFree){
+            if(window.freeFile == 0){
+              // 判断有无留过资 且未体验过 - 去留资
+              // 弹窗留资弹框,第一个参数为source,第二个是留资成功后是否需要刷新页面 可不传,不传即为不刷新
+              // 不需要再调是否留资接口 只要isAdd接口里返回得对应参数值为0 即为需要留资 直接调noCallApiFn方法弹出弹框即可
+              vm.noCallApiFn('article_attach_freeuser', true)
+            }else if (window.freeFile > 0 || window.filePackAccount.number > 0){
+              window.filePackAccount.number -= 1
+              if (window.filePackAccount.number <= 1) {
+                window.freeFile = -1
+              }
+              // 留过资 更新下载次数 进入附件下载页面
               cjdyDownload(fname)
-            } else {
-              // 老超级订阅用户 提醒升级
-              bidVue.$alert('对不起,暂无权限,您可升级超级订阅解锁附件下载', '升级超级订阅', {
+            }else {
+              // 免费用户 体验过 下载次数为-1 弹框提醒跳至超级订阅购买页
+              bidVue.$alert('您的免费【附件下载】次数已使用完,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。', '开通超级订阅', {
                 showClose:false,
                 center: true,
-                confirmButtonText: '前往升级',
+                confirmButtonText: '去开通',
                 customClass: 'custom-alert',
                 showCancelButton: true,
                 confirmButtonClass: 'custom-confirm-btn',
                 cancelButtonClass: 'custom-cancel-btn'
               }).then(function(){
-                location.href = '/swordfish/page_big_pc/free/svip/buy?type=upgrade'
+                location.href = '/swordfish/page_big_pc/free/svip/buy'
               }).catch(function(){});
             }
-            return
-          }
-          //  是大会员自定义版本没有下载权限 或 非超级订阅的商机管理用户 (弹框提醒联系客服)
-          if ((window.memberStatus > 0 &&  window.memberPower.indexOf(3) == -1) || (window.vipStatus <=0 && window.entniche)) {
-            bidVue.$alert('对不起,暂无权限,请联系客服', {
-              showClose:false,
-              center: true,
-              confirmButtonText: '我知道了',
-              customClass: 'custom-alert',
-              showCancelButton: true,
-              confirmButtonClass: 'custom-confirm-btn'
-            });
-            return
-          }else if(window.memberStatus > 0 &&  window.memberPower.indexOf(3) == -1){
-            if(window.vipStatus > 0 && window.fileNum >0){
-              $('.super-vip-show').show()
+          }else{
+            // 付费用户
+            // 大会员用户 有下载权限
+            if (window.memberPower.indexOf(3) > -1 || window.filePackAccount.number > 0) {
               cjdyDownload(fname)
+              return
+            }
+            // 超级订阅用户
+            if (window.vipStatus > 0) {
+              // 是新超级订阅用户
+              if (window.viper) {
+                cjdyDownload(fname)
+              } else {
+                // 老超级订阅用户 提醒升级
+                bidVue.$alert('对不起,暂无权限,您可升级超级订阅解锁附件下载', '升级超级订阅', {
+                  showClose:false,
+                  center: true,
+                  confirmButtonText: '前往升级',
+                  customClass: 'custom-alert',
+                  showCancelButton: true,
+                  confirmButtonClass: 'custom-confirm-btn',
+                  cancelButtonClass: 'custom-cancel-btn'
+                }).then(function(){
+                  location.href = '/swordfish/page_big_pc/free/svip/buy?type=upgrade'
+                }).catch(function(){});
+              }
+              return
+            }
+
+            //  是大会员自定义版本没有下载权限 或 非超级订阅的商机管理用户 (弹框提醒联系客服)
+            if ((window.memberStatus > 0 &&  window.memberPower.indexOf(3) == -1) || (window.vipStatus <=0 && window.entniche)) {
+              bidVue.$alert('对不起,暂无权限,请联系客服', {
+                showClose:false,
+                center: true,
+                confirmButtonText: '我知道了',
+                customClass: 'custom-alert',
+                showCancelButton: true,
+                confirmButtonClass: 'custom-confirm-btn'
+              });
+              return
+            }else if(window.memberStatus > 0 &&  window.memberPower.indexOf(3) == -1){
+              if(window.vipStatus > 0 && window.fileNum >0){
+                $('.super-vip-show').show()
+                cjdyDownload(fname)
+              }
             }
           }
-        }
-        // cjdyDownload()
-      })
-      // $(".downs").click(function (){
-      //
-      // })
+          // cjdyDownload()
+        })
+        // $(".downs").click(function (){
+        //
+        // })
+      }
     }
+  });
+}
+
+function getPowerComplete () {
+  getFilePackLastCount()
+  // 附件下载dom, 免费用户需要在getFilePackLastCount函数中再次执行showFileSomeDom
+  showFileSomeDom()
+
+  // 打赏展示情况
+  // 1. 有权限展示
+  // 2. 无权限的非超前项目展示
+  if (window.isFree) {
+    if (!advancedProject && canRead) {
+      $('.reward').show()
+    }
+  } else {
+    $('.reward').show()
   }
-});
 }
 
-// $(".menu_list").click(function (){
-//
-// })
+function getFilePackLastCount () {
+  $.ajax({
+    type:'post',
+    url:'/jypay/resourcePack/account',
+    data:{
+      product:'attachmentDownPack'
+    },
+    success:function(res){
+      if (res && res.data && res.data.data[0]) {
+        try {
+          var item = res.data.data[0]
+          if (item) {
+            window.filePackAccount = item || {}
+          }
+        } catch (error) {
+          console.log(error)
+        }
+      }
+    },
+    complete: function () {
+      showFileSomeDom()
+    }
+  });
+}
 
 // 根据isAdd接口 展示附件部分dom
 function showFileSomeDom () {
   // 免费用户展示可下载一次提示(免费用户且没有体验过附件下载权益的展示)
+  $('.free-download .text').text(window.filePackAccount.number)
   if (window.isFree) {
-    if (window.freeFile == 0) {
+    // 免费用户未留过资。次数为0,则值置为1,点击按钮引导留资
+    if (window.freeFile == 0 && window.filePackAccount.number == 0) {
+      $('.free-download .text').text(1)
+    }
+    if (window.freeFile == 0 || window.filePackAccount.number > 0) {
+      // 展示按钮
       $('.free-download').css('display', 'inline-block')
       $('.free-go-open').hide()
     } else {
+      // 展示引导超级订阅
       $('.free-go-open').css('display', 'inline-block')
       $('.free-download').hide()
     }
@@ -2384,7 +2486,7 @@ function showFileSomeDom () {
   // 新超级订阅用户
   if (window.vipStatus > 0 && window.viper) {
     $('.super-vip-show').show()
-    $('.super-vip-show .file-count').html(window.fileNum)
+    $('.super-vip-show .file-count').html(window.filePackAccount.number)
     $('.recharge-new').unbind("click").bind("click",function(){
       //超级订阅附件下载立即充值页面
       window.open("/swordfish/page_big_pc/free/filePack/buy")
@@ -2531,15 +2633,6 @@ function cancelClaim() {
 }
 $(function() {
   getClaimStatus()
-  // 定时取login.js里isAdd接口返回的用户身份(暴露给window变量) 取到清除定时器
-  var timer = null
-  clearInterval(timer)
-  timer = setInterval(() => {
-    if (window.isLogin) {
-      showFileSomeDom()
-      clearInterval(timer)
-    }
-  }, 1000);
   // 下载提示
   $('.file-icon-help').click(function() {
     bidVue.$alert('点击附件即为下载,系统会扣除当月附件下载个数;每月1号上月余额清零重新计算,请合理使用。',  {
@@ -2551,7 +2644,11 @@ $(function() {
     });
   })
   // 免费下载一次点击
-  $('.free-download').click(function() {
+  $('.free-download').on('click', function() {
+    // 免费用户,留过资,点击则无响应
+    if (window.isFree && window.filePackAccount.number > 0) {
+      return
+    }
     // 弹窗留资弹框,第一个参数为source,第二个是留资成功后是否需要刷新页面 可不传,不传即为不刷新
     // 不需要再调是否留资接口 只要isAdd接口里返回得对应参数值为0 即为需要留资 直接调noCallApiFn方法弹出弹框即可
     // vm.noCallApiFn('article_attach_freeuser', true)

+ 1 - 1
src/web/staticres/public-pc/js/header-nav.js

@@ -104,7 +104,7 @@ function trySelectNav (name) {
         setNavTheme('dark')
       }
       if(window.location.pathname == ('/swordfish/integral/index')){
-        setNavTheme('dark')
+        // setNavTheme('dark')
         $("body").css({
           "height":"auto",
           "overflow":"hidden"

+ 2 - 1
src/web/staticres/tags/js/no-login-detail.js

@@ -1744,7 +1744,8 @@ function goDownload(url) {
       location.href = url
     } else {
       // 免费用户 体验过 下载次数为-1 弹框提醒跳至超级订阅购买页
-      bidVue.$alert('您已经免费解锁过【附件下载】权益1次,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。', '开通超级订阅', {
+      // 您已经免费解锁过【附件下载】权益1次,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。
+      bidVue.$alert('您的免费【附件下载】次数已使用完,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。', '开通超级订阅', {
         showClose:false,
         center: true,
         confirmButtonText: '去开通',

BIN
src/web/staticres/vipsubscribe/image/file-download-overview-bg@2x.png


+ 10 - 0
src/web/staticres/wxtsguide/main.js

@@ -184,6 +184,7 @@ var Guide = {
 			$("body").removeClass("step-3-body");
 		}else if(index == 4){
 			this.saveLSkeywords(true);
+      Guide.pointsTaskSuccessTip()
 			$(".step-3").hide();
 			$(".com-top-two-b").show();
 			$("body").removeClass("step-3-body");
@@ -210,6 +211,15 @@ var Guide = {
 			localStorage.tsGuide_step = index-1;
 		}
 	},
+  // 赚剑鱼币任务完成提示
+  pointsTaskSuccessTip: function () {
+    // 获取剑鱼币任务信息
+    var from = getUrlParam('from')
+    var point = getUrlParam('point') || 0
+    if(from && from === 'task'){
+      JYAlert("关注企业成功,获得" + point + "剑鱼币。")
+    }
+  },
 	appendHaskeywords: function(text){
 		text = $.trim(text);
 		if(this.checkIsMax(true) || text == ""){

+ 96 - 63
src/web/templates/frontRouter/pc/fileHistory/sess/index.html

@@ -18,58 +18,13 @@
   <link href="//cdn-common.jianyu360.com/cdn/lib/element-ui/2.15.7/lib/theme-chalk/index.css" rel="stylesheet" />
   <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/css/ele-reset.css?v={{Msg "seo" "version"}}'>
   <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/css/selector/selector.css?v={{Msg "seo" "version"}}'>
+  <link href='{{Msg "seo" "cdn"}}/css/collect-user-info.css?v={{Msg "seo" "version"}}' rel="stylesheet">
   <link rel="stylesheet" href='{{Msg "seo" "cdn"}}/frontRouter/pc/seeBuyerHistory/css/index-pc.css?v={{Msg "seo" "version"}}'>
   <style>
     .w1080 {
       width: 1080px;
       margin: 0 auto;
     }
-    .show-total-info-group button {
-      width: 132px;
-      height: 36px;
-      background: #FFFFFF;
-      border-radius: 6px 6px 6px 6px;
-      font-size: 16px;
-      font-weight: 400;
-      color: #2CB7CA;
-    }
-    .show-total-info-group {
-      display: flex;
-      flex-direction: row;
-      align-items: center;
-      justify-content: space-between;
-      margin-top: 24px;
-      width: 1080px;
-      min-height: 122px;
-      background: linear-gradient(315deg, #14A7D6 0%, #1EC2DB 99%);
-      font-size: 14px;
-      font-weight: 400;
-      color: rgba(255, 255, 255, 0.9);
-      line-height: 22px;
-      padding: 28px 32px;
-      box-sizing: border-box;
-      border-radius: 6px;
-    }
-    .show-total-info-item > span {
-      display: inline-block;
-      margin-top: 8px;
-      font-size: 14px;
-      font-weight: 400;
-      color: rgba(255, 255, 255, 0.9);
-      line-height: 22px;
-    }
-    .show-total-info-item {
-      font-size: 16px;
-      font-weight: bold;
-      color: #FFFFFF;
-      line-height: 24px;
-      margin-bottom: 8px;
-    }
-    .show-total-info-item .file-pack-total {
-      font-size: 36px;
-      line-height: 36px;
-      padding: 0 8px;
-    }
     .el-table th.el-table__cell>.cell {
       font-size: 14px;
       font-weight: bold;
@@ -111,6 +66,11 @@
     .el-table--enable-row-hover .el-table__body tr:hover>td.el-table__cell {
       background: #F5F5FB;
     }
+    .tab-header-title {
+      font-size: 24px;
+      color: #1D1D1D;
+      line-height: 36px;
+    }
     .tab-title {
       font-size: 18px;
       font-weight: 400;
@@ -122,17 +82,85 @@
 
 <body>
   {{include "/common/pchead.html"}}
-
+  <div id="vue-collect-user-info"></div>
   <section class="see-container" v-cloak>
     <div class="see-header flex w">
       <div class="w1080">
-        <h3 class="tab-title">附件下载包</h3>
-        <div class="show-total-info-group">
-          <div class="show-total-info-item">
-            <div>当月附件下载余额<span class="file-pack-total">{points.total?points.total:0}</span>个</div>
-            <span>注:超级订阅用户每月享有下载10个附件的权限,也可充值附件下载包增加当月附件下载个数;每月1号上月附件下载余额清零重新计算。</span>
+       <div class="header-hd">
+          <h3 class="tab-header-title">附件下载</h3>
+          <div class="header-hd-actions">
+            <button v-if="showHeaderCard" class="tab-button" @click="goToFileNumberDetail">兑换/购买附件下载明细</button>
+          </div>
+       </div>
+        <!-- 大会员且有附件下载权益不展示头部 -->
+        <div class="show-total-info-group" v-show="showHeaderCard">
+          <div class="show-total-info-group-hd">
+            <span class="show-total-info-title">
+              <span>当月附件下载余额</span>
+              <span class="file-pack-total">{ accountInfo.number || 0 }</span>
+              <span class="file-unit">个</span>
+            </span>
+            <div class="hd-right-bg">
+              <img src="/vipsubscribe/image/file-download-overview-bg@2x.png" alt="">
+            </div>
+          </div>
+          <div class="show-total-info-group-bd">
+            <!-- 超级订阅 -->
+            <div class="show-total-info-group-bd-content" v-if="vipUser">
+              <div class="content-info-hd">
+                <span class="strong">您当前是超级订阅用户</span>
+                <span>,您每月享有10个附件下载权益。每月1号上余额清零重新计算。本月剩余{ accountInfo.grantNum || 0 }个权益。</span>
+              </div>
+              <div class="content-info-bd">
+                <p class="desc-row desc-title">不够用这么办?你有以下三种途径补充余额</p>
+                <div class="desc-row">
+                  <p class="desc-title">1. 服务升级</p>
+                  <p class="desc-text">您可购买大会员,获得每个月不限量附件下载。<span class="highlight-text pointer" @click="doLeaveInfo">了解详情></span></p>
+                </div>
+                <div class="desc-row">
+                  <p class="desc-title">2. 充值</p>
+                  <p class="desc-text" v-if="accountInfo.purchaseNum > 0">您购买了附加下载包,当月有效。本月剩余权益{ accountInfo.purchaseNum }个权益。<button class="j-f-button" @click="rechargeFilePack">去充值</button></p>
+                  <p class="desc-text" v-else>您可充值附件下载包增加当月附件下载个数,当月有效。<button class="j-f-button" @click="rechargeFilePack">去充值</button></p>
+                </div>
+                <div class="desc-row">
+                  <p class="desc-title">3. 兑换</p>
+                  <p class="desc-text">您当月剩余剑鱼币兑换附件下载权益{ accountInfo.exchangeNum }个。350剑鱼币可兑换查看一个附件下载权益。兑换后30天内有效。<span class="highlight-text pointer" @click="toBuyWithPoint">去兑换></span></p>
+                </div>
+              </div>
+            </div>
+            <!-- 无权限大会员 -->
+            <div class="show-total-info-group-bd-content" v-if="bigmemberNoPower">
+              <div class="content-info-bd">
+                <p class="desc-row desc-title">不够用这么办?你有以下两种途径补充余额</p>
+                <div class="desc-row">
+                  <p class="desc-title">1. 服务升级</p>
+                  <p class="desc-text">您当前是大会员用户,目前不享有附件下载权益。您可以联系客服进行服务升级后获得。<span class="highlight-text pointer" @click="showZhuanShuKfDialog">联系客服></span></p>
+                </div>
+                <div class="desc-row">
+                  <p class="desc-title">2. 兑换</p>
+                  <p class="desc-text">您当月剩余剑鱼币兑换附件下载权益{ accountInfo.exchangeNum }个。350剑鱼币可兑换查看一个附件下载权益。兑换后30天内有效。<span class="highlight-text pointer" @click="toBuyWithPoint">去兑换></span></p>
+                </div>
+              </div>
+            </div>
+            <!-- 免费用户 -->
+            <div class="show-total-info-group-bd-content" v-if="freeUser">
+              <div class="content-info-hd" v-show="showFreeTip">
+                <span class="strong">您当前是免费用户</span>
+                <span>,可免费下载附件 <span class="highlight-text">{ accountInfo.freeNum }</span> 次</span>
+              </div>
+              <div class="content-info-bd">
+                <p class="desc-row desc-title">不够用这么办?你有以下两种途径补充余额</p>
+                <div class="desc-row">
+                  <p class="desc-title">1. 充值</p>
+                  <p class="desc-text">超级订阅用户每月享有下载10个附件的权限,也可充值附件下载包增加。当月附件下载个数,每月1号上余额清零重新计算。<button class="j-f-button" @click="goToBuySvip">去充值</button></p>
+                </div>
+                <div class="desc-row">
+                  <p class="desc-title">2. 兑换</p>
+                  <p class="desc-text">您当月剩余剑鱼币兑换附件下载权益{ accountInfo.exchangeNum }个。350剑鱼币可兑换查看一个附件下载权益。兑换后30天内有效。<span class="highlight-text pointer" @click="toBuyWithPoint">去兑换></span></p>
+                </div>
+              </div>
+            </div>
           </div>
-          <button onclick="location.href = '/swordfish/page_big_pc/free/filePack/buy'">立即充值</button>
         </div>
       </div>
     </div>
@@ -192,22 +220,25 @@
       </div>
     </div>
     <div class="no-data" v-if="seeList.list == 0 && empty">
-      <el-image src="/images/pc_12.png"></el-image>
+      <el-image src="/common-module/public/image/jy-back.png"></el-image>
       <div class="tip-text">
         <p>暂无数据</p>
       </div>
     </div>
     <el-dialog
-      :visible.sync="helpDialog"
-      :show-close="false"
-      custom-class="custom-dialog"
-      width="380"
+      :visible.sync="kefuDialog"
+      custom-class="custom-dialog kefu-qr-dialog"
+      width="260"
       center>
-      <div>
-        每购买1个省,每月可查看<i>5个</i>采购单位画像,<i>上限为80个</i>,每月1号上月余额清零重新计算。
-      </div>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="helpDialog = false">我知道了</el-button>
+      <div class="content-container">
+        <div class="content-header">
+          <span class="wx-icon"><img src="/images/wx2.png" alt=""></span>
+          <span v-text="kefu.name"></span>
+        </div>
+        <div class="img-conatainer">
+          <img :src="kefu.qr" alt="">
+        </div>
+        <p class="content-footer">微信扫一扫</p>
       </div>
     </el-dialog>
     <el-dialog
@@ -246,6 +277,8 @@
   <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.7/lib/index.js"></script>
   <script src='{{Msg "seo" "cdn"}}/common-module/public/js/china-map-data.js?v={{Msg "seo" "version"}}'></script>
+  <script src='{{Msg "seo" "cdn"}}/common-module/selector/js/static-data.js?v={{Msg "seo" "version"}}'></script>
+  <script src='{{Msg "seo" "cdn"}}/js/pc-collect-user-info.js?v={{Msg "seo" "version"}}'></script>
   <script>
     function closeDialog() {
       $(".dialog").css("display", "none")

+ 50 - 61
src/web/templates/frontRouter/pc/integral/sess/index.html

@@ -14,49 +14,35 @@
     <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"/>
     <!-- S-注入  -->
-    <meta name="importmap-type" content="systemjs-importmap">
+
+    <!-- 高级语法兼容性处理  -->
     <script>
       if (String.prototype.startsWith === 'undefined') {
         String.prototype.startsWith = function (str) {
-          if(str==null||str==""||this.length==0||str.length>this.length)
-            return false;
-          if(this.substr(0,str.length)==str)
-            return true;
-          else
-            return false;
+          if (str==null || str == "" || this.length == 0 || str.length > this.length) {
+            return false
+          }
+          if (this.substr(0,str.length) == str) {
+            return true
+          } else {
+            return false
+          }
         }
       }
-      if (typeof Promise === 'undefined')
+      if (typeof Promise === 'undefined') {
         document.write('<script src="https://cdn-common.jianyu360.com/cdn/lib/bluebird/3.7.2/js/browser/bluebird.core.min.js"><\/script>');
-      if (typeof fetch === 'undefined')
+      }
+      if (typeof fetch === 'undefined') {
         document.write('<script src="//cdn-common.jianyu360.com/cdn/lib/whatwg-fetch/3.4.1/dist/fetch.umd.min.js"><\/script>');
-    </script>
-    <script type="systemjs-importmap">
-      {
-        "imports": {
-          "points": "/page_points_pc/js/app.js?v={{Msg "seo" "points_v"}}",
-          "single-spa": "https://cdn-common.jianyu360.com/cdn/lib/single-spa/4.3.7/lib/system/single-spa.min.js",
-          "vue": "https://cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js",
-          "vue-router": "https://cdn-common.jianyu360.com/cdn/lib/vue-router/3.0.7/dist/vue-router.min.js"
-        }
       }
     </script>
-    <link rel="preload" href="https://cdn-common.jianyu360.com/cdn/lib/single-spa/4.3.7/lib/system/single-spa.min.js" as="script" crossorigin="anonymous" />
-    <link rel="preload" href="https://cdn-common.jianyu360.com/cdn/lib/vue/2.6.11/vue.min.js" as="script" crossorigin="anonymous" />
-    <script src="https://cdn-common.jianyu360.com/cdn/lib/import-map-overrides/2.2.0/dist/import-map-overrides.js"></script>
-    <script src="https://cdn-common.jianyu360.com/cdn/lib/systemjs/6.8.3/dist/system.min.js"></script>
-    <script src="https://cdn-common.jianyu360.com/cdn/lib/systemjs/6.8.3/dist/extras/amd.min.js"></script>
-    <script src="https://cdn-common.jianyu360.com/cdn/lib/systemjs/6.8.3/dist/extras/named-exports.js"></script>
-    <script src="https://cdn-common.jianyu360.com/cdn/lib/systemjs/6.8.3/dist/extras/named-register.min.js"></script>
-    <script src="https://cdn-common.jianyu360.com/cdn/lib/systemjs/6.8.3/dist/extras/use-default.min.js"></script>
-    <script src='{{Msg "seo" "cdn"}}/micro/js/qiankun-common-functions.js?v={{Msg "seo" "version"}}'></script>
     <!-- E-注入  -->
 
     <style>
         .page--points--index .page-container{
           min-height: calc(100vh - 364px);
           box-sizing: border-box;
-          padding-top: 64px;
+          padding-top: 72x;
         }
         .page--points--index .logo{
           width: 130px;
@@ -67,44 +53,47 @@
 {{include "/common/pchead.html"}}
 <!-- S-注入  -->
 <div class="w-box page-container">
-    <div id="single-spa-app"></div>
+    <div id="main-app"></div>
 </div>
-<!-- See https://github.com/joeldenning/import-map-overrides#user-interface  -->
-<import-map-overrides-full show-when-local-storage="overrides-ui"></import-map-overrides-full>
-<!-- E-注入  -->
+<!-- 主应用依赖 -->
+<script src=//cdn-common.jianyu360.com/cdn/lib/url-polyfill/1.1.12/url-polyfill.min.js></script>
+<script src=//cdn-common.jianyu360.com/cdn/lib/qiankun/2.7.0/index.umd.min.js></script>
+<script src='{{Msg "seo" "cdn"}}/micro/js/qiankun-common-functions.js?v={{Msg "seo" "version"}}'></script>
 <script>
-  (function() {
-    Promise.all([System.import('single-spa'), System.import('vue'), System.import('vue-router')]).then(function (modules) {
-      var singleSpa = modules[0];
-      var Vue = modules[1];
-      var VueRouter = modules[2];
-
-      Vue.use(VueRouter)
-
-      singleSpa.registerApplication(
-        'points',
-        () => System.import('points'),
-        location => location.pathname.startsWith('/')
-      )
-
-      singleSpa.start();
-    })
-
-    // 监听single-spa
-    window.addEventListener('single-spa:first-mount', (e) => {
-      var childAppRoot = $('#single-spa-app').children('.home')[0]
-      if (childAppRoot) {
-        var childApp = childAppRoot.__vue__
-        var router = childApp.$router
-        addNotFindPage(router)
+    window.__QIANKUN_ROUTER_BASE = '/swordfish/integral/index'
+    qiankun.registerMicroApps(
+      [
+        {
+          name: 'pointSubApp',
+          entry: '/page_points_pc/index.html',
+          container: '#main-app',
+          activeRule: '/',
+          props: {
+            className: window.parent !== window ? 'in-app' : 'in-web',
+            inject: function (options) {
+              options.Vue.prototype.$BRACE = window.$BRACE
+              if (options.router) {
+                  addNotFindPage(options.router)
+              }
+            }
+          }
+        }
+      ],
+      {
+        beforeLoad: function (app) {
+          console.log('before load', app)
+        },
+        beforeMount: [
+          function (app) {
+            console.log('before mount', app)
+          }
+        ]
       }
-      console.log(
-        'single-spa is about to mount the very first application for the first time',
-      )
+    )
+    qiankun.start({
+      sandbox: false
     })
-  })()
 </script>
-
 <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>

Plik diff jest za duży
+ 99 - 1
src/web/templates/frontRouter/wx/fileRecord/sess/index.html


+ 6 - 14
src/web/templates/pc/biddetail_rec.html

@@ -539,6 +539,11 @@
 									followProjectId = r.data
 									$("#unfollowedProject").css("display","none")
 									$("#followedProject").css("display","")
+                  try {
+                    pointTask.pointToast()
+                  } catch (error) {
+                    console.log(error)
+                  }
 								} else {
 									EasyAlert.show(r.error_msg, { 'max-width': 'unset' }, 1500);
 								}
@@ -1332,7 +1337,7 @@
                 <div id="attach-list" style="margin: 40px 0px;display: none">
                     <div>
                         <span style="font-weight: 400;font-size: 16px">附件下载</span>
-                        <span class="free-download">免费下载1次</span>
+                        <span class="free-download">免费下载<span class="text">1</span>次</span>
                         <span class="super-vip-show" style="display:none;">
             <span class="file-count-tip">本月剩余:  <i class="file-count"></i>个</span>
             <img class="file-icon-help" src="/images/help-b.png" alt="">
@@ -1875,19 +1880,6 @@ var ucbs_source="pc_rec",ucbsId="{{.T.obj.ucbsId}}";
         }
       })
 
-      function getPowerComplete () {
-        // 打赏展示情况
-        // 1. 有权限展示
-        // 2. 无权限的非超前项目展示
-        if (window.isFree) {
-          if (!advancedProject && canRead) {
-            $('.reward').show()
-          }
-        } else {
-          $('.reward').show()
-        }
-      }
-
       function getAjaxAdv () {
         $.ajax({
           type: 'POST',

+ 7 - 7
src/web/templates/weixin/me/security.html

@@ -23,14 +23,14 @@
                 <span class="hd-info-label">微信昵称</span>
                 <span class="hd-info-value ellipsis">${ uInfo.nickname }</span>
             </div>
-            <a class="head-info pd-lr clickable" :href="'/front/account/company/change?name=' + encodeURIComponent(uInfo.company)">
-                <span class="hd-info-label">公司</span>
-                <span class="hd-info-value">
-                    <span class="ellipsis">${ uInfo.company }</span>
-                    <span class="j-icon base-icon icon-arrow-right"></span>
-                </span>
+<!--            <a class="head-info pd-lr clickable" :href="'/front/account/company/change?name=' + encodeURIComponent(uInfo.company)">-->
+<!--                <span class="hd-info-label">公司</span>-->
+<!--                <span class="hd-info-value">-->
+<!--                    <span class="ellipsis">${ uInfo.company }</span>-->
+<!--                    <span class="j-icon base-icon icon-arrow-right"></span>-->
+<!--                </span>-->
 
-            </a>
+<!--            </a>-->
             <div class="bind-tip-text pd-lr">绑定信息</div>
             <ul class="bind-info-list">
                 <li class="bind-info-item pd-lr clickable" @click="phoneBindOrChange">

+ 173 - 91
src/web/templates/weixin/wxinfocontent_rec.html

@@ -1393,7 +1393,8 @@ body .loading_ p span {
                             <span class="concat-kf">联系客服</span>
 							<span class="go-buy-file-pack" style="display: none">立即充值</span>
                             <span class="free-open-tip" style="display: none;">
-                              <span class="down-more-text">下载更多附件</span>
+                              <span class="free-has-num down-more-text" style="display:none;">本月剩余:<em class="file-count"></em>个</span>
+                              <span class="free-no-num down-more-text" style="display: none;">下载更多附件</span>
                               <span class="open-vip-btn">开通超级订阅</span>
                             </span>
                         </div>
@@ -2051,7 +2052,8 @@ function isOpening() {
           window.viper = res.data.viper // 是否是超级订阅老用户 false:老用户 true: 新用户
           window.entniche = res.data.entniche // 商机管理用户
           window.isEntService = res.data.isEntService // 商机管理服务用户
-          window.fileNum = res.data.fileNum // 超级订阅用户可下载附件次数
+          window.memberStatus = res.data.memberStatus // 大会员
+          // window.fileNum = res.data.fileNum // 超级订阅用户可下载附件次数
           //拟建--采购意向
           checkShowDialog()
           //拟建--采购意向
@@ -2087,12 +2089,12 @@ function isOpening() {
             }
           }
           //非大会员或大会员无此功能 且是新超级订阅用户
-          if (res.data && res.data.vipStatus > 0 && res.data.viper&&!window.isMemberAndPower) {
-            $('.file-count-tip').css('display', 'inline-block')
-            $('.go-buy-file-pack').css('display', 'inline-block')
-            $('.icon-help').css('display', 'inline-block')
-            $('.file-count').html(res.data.fileNum)
-          }
+          // if (res.data && res.data.vipStatus > 0 && res.data.viper&&!window.isMemberAndPower) {
+          //   $('.file-count-tip').css('display', 'inline-block')
+          //   $('.go-buy-file-pack').css('display', 'inline-block')
+          //   $('.icon-help').css('display', 'inline-block')
+          //   $('.file-count').html(res.data.fileNum)
+          // }
           setEntServiceInfo(res)
 			},
 			error:function(err) {
@@ -2318,7 +2320,57 @@ function openFileDown (url) {
     }
 
     getCanBiaoInfo()
-
+    // 获取当前用户附件下载数量(用户下载次数判断需要)
+    window.downloadNum = 0
+    function subPoint() {
+      $.ajax({
+        url: '/jypay/resourcePack/account',
+        type: 'POST',
+        contentType: 'application/x-www-form-urlencoded',
+        data: {
+          product: 'attachmentDownPack'
+        },
+        dataType: 'json'
+      }).done(res => {
+        if (res.error_msg === '' && res.data && res.data.data) {
+          try {
+            var downloadNum =  res.data.data[0].number || 0
+            window.downloadNum = downloadNum // 免费用户可下载附件次数
+            window.fileNum = downloadNum // 超级订阅用户可下载附件次数
+            // 免费用户处理
+            if(window.isFree) {
+              // 免费用户且未留资过也未体验过,展示文案(引导留资)
+              if (window.freeFile == 0) {
+                if(downloadNum > 0) {
+                  $('.free-down-text').text('免费用户享有' + downloadNum + '次附件下载权益')
+                } else {
+                  $('.free-down-text').text('免费用户享有1次附件下载权益')
+                }
+              } else {
+                // 免费用户体验过
+                if(downloadNum > 0){
+                  $('.free-has-num').show() // 展示下载次数
+                  $('.free-no-num').hide()
+                } else{
+                  $('.free-has-num').hide() // 隐藏下载次数
+                  $('.free-no-num').show() // 展示下载更多附件
+                }
+              }
+            }
+            //非大会员或大会员无此功能 且是新超级订阅用户
+            if ( window.vipStatus > 0 && window.viper&&!window.isMemberAndPower) {
+              $('.file-count-tip').css('display', 'inline-block')
+              $('.go-buy-file-pack').css('display', 'inline-block')
+              $('.icon-help').css('display', 'inline-block')
+            }
+            // 下载次数
+            $('.file-count').html(downloadNum)
+          } catch (e) {
+            console.warn(e)
+          }
+        }
+      })
+    }
 // 附件下载展示
 function andownload() {
     $.ajax({
@@ -2343,6 +2395,9 @@ function andownload() {
 
                 $('.download-list>ul').append(html)
                 $('.downs').on('click', function(){
+                  var url = $(this).find('a').attr('data-href')
+                  var size = $(this).find('a').attr('date-size')
+                  var fileName = $(this).find('a').text()
                   // 附件下载因微信限制,改为引流到app
                   // vant.Dialog.confirm({
                   //   title: '附件下载提示',
@@ -2355,18 +2410,18 @@ function andownload() {
                   // }).then(() => {
                   //  location.href = '/big/wx/page/open_app?type=article-file-download'
                   // }).catch(() => {})
-
                   //免费用户
                   if(window.isFree){
                     //  留资判断
                     if (window.freeFile==0) {
                       location.href = '/weixin/frontPage/bigmember/free/perfect_info?source=article_attach_freeuser'
                       return
-                    }else if (window.freeFile < 0 ) {
-                      // 免费用户 体验过 下载次数为-1 弹框提醒跳至超级订阅购买页
+                    }else if (window.freeFile < 0 && window.downloadNum <= 0) {
+                      // 免费用户 体验过(freeFile=-1) 剩余下载次数 弹框提醒跳至超级订阅购买页
+                      // 您已经免费解锁过【附件下载】权益1次,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。
                       vant.Dialog.confirm({
                         title: '开通超级订阅',
-                        message: '您已经免费解锁过【附件下载】权益1次,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。',
+                        message: '您的免费【附件下载】次数已使用完,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。',
                         showCancelButton: true,
                         confirmButtonText: '去开通',
                         confirmButtonColor: '#2ABDD1',
@@ -2379,81 +2434,23 @@ function andownload() {
                       })
                       .catch(() => {})
                       return
-                    }else if(window.freeFile>0){
+                    }else {
                       window.freeFile=-1
-                      gotoFilePage($(this).find('a').text())
+                      downloadFileAjax(fileName)
                     }
                   }else{
                     // 付费用户
-                    // 大会员用户 有下载权限
-                    if (window.isMemberAndPower) {
-                      // return location.href = '/big/wx/page/open_app?type=article-file-download'
-                      // if(mySysIsIos()){
-                      //   iosShow(url)
-                      // } else {
-						try {
-							openFileDown($(this).find('a').attr('data-href') || url)
-						} catch (e) {
-							console.log(e)
-							openFileDown(url)
-						}
-					  return
-                      // }
+                    // 大会员用户且有附件下载个数
+                    if (window.memberStatus >0 ) {
+                      downloadFileAjax(fileName)
+                      return
                     }
                     //超级订阅
                     if (window.vipStatus>0){
                       //超级订阅新用户
                       if(window.viper){
-                        $.ajax({
-                            type: 'post',
-                            url: '/jypay/resourcePack/consumePack',
-                            data: {
-                                productName: '附件下载包',
-                                platform: 'WX',
-                                fileName: $(this).find('a').text(),
-                                id: id,
-                                title: title
-                            },
-                            success: function (r) {
-                                if (r&&r.r&&r.r.code&&r.r.code<0&&window.vipStatus>0){
-                                  vant.Dialog.confirm({
-                                    message: '您本月附件下载机会已消耗完毕,如需下载更多附件,请前往充值。',
-                                    showCancelButton: true,
-                                        confirmButtonText: '立即充值',
-                                    confirmButtonColor: '#2ABDD1',
-                                    className: 'custom-dialog',
-                                    width: 303
-
-                                  }).then(() => {
-                                        location.href = '/jy_mobile/common/order/create/filepack?type=0'
-                                  })
-                                  .catch(() => {})
-                                  return
-                                }else if (r && r.m === '' && r.r) {
-                                  var url = r.r.downUrl
-                                  if (url){
-                                    if (!r.r.isExists){
-                                      window.fileNum = window.fileNum - 1;
-                                      $('.file-count').html($('.file-count').text()-1)
-                                    }
-                                    openFileDown(url)
-                                  } else {
-                                      EasyAlert.show('获取附件地址失败');
-                                  }
-                              } else {
-                                  EasyAlert.show(r.m || '获取附件地址失败');
-                              }
-                            }
-                        })
+                        downloadFileAjax(fileName)
                         return
-                        // 次数用完提醒联系客服
-                        //if (window.fileNum<=0){
-
-                        //}else{
-                          //window.fileNum = window.fileNum - 1;
-                         // gotoFilePageOfVip($(this).find('a').text())
-                        //  return
-                        //}
                       }else{
                         //超级订阅老用户  提醒升级
                         vant.Dialog.confirm({
@@ -2471,6 +2468,11 @@ function andownload() {
                         return
                       }
                     }
+                    // 商机管理用户只要有个数就有下载权限
+                    if(window.entniche && window.downloadNum > 0){
+                      downloadFileAjax(fileName)
+                      return
+                    }
                     // 是大会员自定义版本没有下载权限 或 非超级订阅的商机管理用户 (弹框提醒联系客服)
                     var memberNoVip = window.isNoMember == true && !(window.vipStatus >0 && window.viper)
                     if (memberNoVip || (window.vipStatus <=0 && window.entniche)) {
@@ -2480,12 +2482,11 @@ function andownload() {
                         confirmButtonText: '我知道了',
                         confirmButtonColor: '#2ABDD1',
                         width: 303,
-                      }).then(() => {})
+                      }).then(() => {
+                      })
                       return
                     }
                   }
-                  // return location.href = '/big/wx/page/open_app?type=article-file-download'
-                  gotoFilePage($(this).find('a').text())
                 })
                 //if (window.isNoMember) {
                   //向所有用户开放
@@ -2534,6 +2535,70 @@ function gotoFilePage(name){
       })
 }
 
+function downloadFileAjax (fileName, callback) {
+  $.ajax({
+    type: 'post',
+    url: '/jypay/resourcePack/consumePack',
+    data: {
+      productName: '附件下载包',
+      platform: 'WX',
+      fileName: fileName,
+      id: id,
+      title: title
+    },
+    success: function (r) {
+      // 重新加载获取次数
+      subPoint()
+      if (r&&r.r&&r.r.code&&r.r.code<0){
+        // 次数用完提醒
+        if(window.vipStatus>0) {
+          vant.Dialog.confirm({
+            message: '您本月附件下载机会已消耗完毕,如需下载更多附件,请前往充值。',
+            showCancelButton: true,
+            confirmButtonText: '立即充值',
+            confirmButtonColor: '#2ABDD1',
+            className: 'custom-dialog',
+            width: 303
+
+          }).then(() => {
+            location.href = '/jy_mobile/common/order/create/filepack?type=0'
+          })
+            .catch(() => {})
+        } else if(window.isFree) {
+          vant.Dialog.confirm({
+            title: '开通超级订阅',
+            message: '您的免费【附件下载】次数已使用完,暂无免费查看权限。如需查看更多,请开通超级订阅获取更多权限。',
+            showCancelButton: true,
+            confirmButtonText: '去开通',
+            confirmButtonColor: '#2ABDD1',
+            className: 'custom-dialog',
+            width: 303,
+            messageAlign: 'left',
+          }).then(() => {
+            // location.href = '/front/vipsubscribe/vipsubscribe_new'
+            window.location.href="/jy_mobile/common/order/create/svip?type=buy"
+          }).catch(() => {})
+        }
+        return
+      }else if (r && r.m === '' && r.r) {
+        var url = r.r.downUrl
+        if (url){
+          // if (!r.r.isExists){
+          //   window.fileNum = window.fileNum - 1;
+          //   $('.file-count').html($('.file-count').text()-1)
+          // }
+          openFileDown(url)
+        } else {
+          EasyAlert.show('获取附件地址失败');
+        }
+      } else {
+        EasyAlert.show(r.m || '获取附件地址失败');
+      }
+    }
+  })
+}
+
+
     // 免费体验
     $('.free-btn-experience').on('click', function() {
       var sourceKey = 'wx_article_member_freeuse'
@@ -2693,9 +2758,12 @@ $(function(){
             $("#easyalert-mask").remove();
         }
 	});
+    subPoint()
 	if (canRead) {
-		// 有权限查看的才会下载附件
-		andownload()
+      // 有权限查看的才会下载附件
+      setTimeout(function() {
+        andownload()
+      }, 500)
 	}
 	//
 	$(".null-no").click(function(){
@@ -3377,14 +3445,15 @@ $(function(){
             $('#loading').hide()
             if(r.error_code == 0){
               if(sessionStorage){
-    						sessionStorage.followSetReload = "1";
-    					}
-    					followId = r.followId;
-    					EasyAlert.show("已关注,可从“发现-<br>关注的项目”查看<br>或设置提醒日期",{"text-align":"left"});
-    					followFlag = true;
-              jumpFlag = true;
-              $(".follow").addClass('follow_vip')
-    					$(".follow").html('<i class="glyphicon yiguanzhu"></i>已关注');
+                sessionStorage.followSetReload = "1";
+              }
+                followId = r.followId;
+                // EasyAlert.show("已关注,可从“发现-<br>关注的项目”查看<br>或设置提醒日期",{"text-align":"left"});
+                pointsTaskSuccessTip()
+                followFlag = true;
+               jumpFlag = true;
+               $(".follow").addClass('follow_vip')
+               $(".follow").html('<i class="glyphicon yiguanzhu"></i>已关注');
             }else if(r.error_msg.indexOf("10")>-1){
     					EasyAlert.show("最多可关注<br>10个项目!");
     					$(".jycontbottom").toggleClass("hidden");
@@ -3395,6 +3464,19 @@ $(function(){
       });
     }
 	});
+  // 赚剑鱼币任务完成提示
+  function pointsTaskSuccessTip() {
+    // 获取剑鱼币任务信息
+    const from =  utils.getParam('from')
+    var point = utils.getParam('point') || 0
+    if(from && from === 'task'){
+      EasyAlert.show("关注项目成功,<br>获得" + point + "剑鱼币。<br>可从“发现-<br>关注的项目”查看<br>或设置提醒日期",{"text-align":"left"}, 2000);
+      utils.delUrlParam('from')
+    } else {
+      // 普通提示
+      EasyAlert.show("已关注,可从“发现-<br>关注的项目”查看<br>或设置提醒日期",{"text-align":"left"});
+    }
+  }
 	$(".myfollow").click(function(){
     function goMemberFollowPage (url) {
       var objId = {

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików