Browse Source

Merge branch 'feature/v4.8.72' of https://jygit.jydev.jianyu360.cn/qmx/jy into feature/v4.8.72

wangchuanjin 1 năm trước cách đây
mục cha
commit
ebf998751e
60 tập tin đã thay đổi với 1229 bổ sung896 xóa
  1. 9 0
      src/jfw/front/front.go
  2. 20 9
      src/jfw/front/login.go
  3. 20 0
      src/jfw/front/org_structure.go
  4. 10 0
      src/jfw/front/pcIndex.go
  5. 50 10
      src/jfw/modules/app/src/app/front/login.go
  6. 35 2
      src/jfw/modules/app/src/web/staticres/jyapp/me/js/phone_bind.js
  7. 69 43
      src/jfw/modules/app/src/web/templates/frontRouter/fileRecord/sess/index.html
  8. 3 1
      src/jfw/modules/bigmember/src/config.json
  9. 7 5
      src/jfw/modules/bigmember/src/config/config.go
  10. 2 2
      src/jfw/modules/bigmember/src/entity/followProject.go
  11. 4 4
      src/jfw/modules/bigmember/src/go.mod
  12. 8 8
      src/jfw/modules/bigmember/src/go.sum
  13. 13 2
      src/jfw/modules/bigmember/src/service/follow/enterprise.go
  14. 17 3
      src/jfw/modules/bigmember/src/service/follow/project.go
  15. 2 2
      src/jfw/modules/publicapply/src/identity/service/service.go
  16. 24 1
      src/jfw/modules/publicapply/src/subscribePush/entity/keyWords.go
  17. 7 7
      src/jfw/modules/subscribepay/src/baseApi.json
  18. 9 9
      src/jfw/modules/subscribepay/src/config.json
  19. 1 1
      src/jfw/modules/subscribepay/src/config.yaml
  20. 4 5
      src/jfw/modules/subscribepay/src/config/config.go
  21. 16 9
      src/jfw/modules/subscribepay/src/entity/basePack.go
  22. 20 18
      src/jfw/modules/subscribepay/src/entity/commonApi.go
  23. 13 15
      src/jfw/modules/subscribepay/src/entity/resourcePackStruct.go
  24. 1 1
      src/jfw/modules/subscribepay/src/go.mod
  25. 26 8
      src/jfw/modules/subscribepay/src/service/basePack.go
  26. 8 10
      src/jfw/modules/subscribepay/src/service/resourcePack.go
  27. 24 0
      src/jfw/modules/subscribepay/src/service/userAccountInfo.go
  28. 1 1
      src/jfw/modules/subscribepay/src/util/db.go
  29. 1 0
      src/jfw/modules/weixin/src/config.json
  30. 59 50
      src/jfw/modules/weixin/src/go.mod
  31. 184 441
      src/jfw/modules/weixin/src/go.sum
  32. 16 2
      src/jfw/modules/weixin/src/wx/wx.go
  33. 34 1
      src/web/staticres/common-module/big-member/js/high_set.js
  34. 16 21
      src/web/staticres/common-module/file-pack/js/index-wx.js
  35. 16 21
      src/web/staticres/common-module/file-pack/js/index.js
  36. BIN
      src/web/staticres/common-module/task/frame.png
  37. BIN
      src/web/staticres/common-module/task/task-app.png
  38. BIN
      src/web/staticres/common-module/task/task-bdsjh.png
  39. BIN
      src/web/staticres/common-module/task/task-bdyx.png
  40. BIN
      src/web/staticres/common-module/task/task-gsmc.png
  41. BIN
      src/web/staticres/common-module/task/task-gzh.png
  42. BIN
      src/web/staticres/common-module/task/task-gzqy.png
  43. BIN
      src/web/staticres/common-module/task/task-gzxm.png
  44. BIN
      src/web/staticres/common-module/task/task-wcdy.png
  45. BIN
      src/web/staticres/common-module/task/task-xrrw.png
  46. BIN
      src/web/staticres/common-module/task/task-ywlx.png
  47. BIN
      src/web/staticres/commonFunctions/set-account-info.png
  48. BIN
      src/web/staticres/commonFunctions/set-identity-info.png
  49. 6 0
      src/web/staticres/css/pc/index.css
  50. 121 11
      src/web/staticres/frontRouter/pc/fileHistory/js/index-pc.js
  51. 135 0
      src/web/staticres/frontRouter/pc/seeBuyerHistory/css/index-pc.css
  52. BIN
      src/web/staticres/images/save-pic-bg.png
  53. BIN
      src/web/staticres/images/wx2.png
  54. 2 0
      src/web/staticres/js/pc-collect-user-info.js
  55. 1 1
      src/web/staticres/public-pc/js/header-nav.js
  56. BIN
      src/web/staticres/vipsubscribe/image/file-download-overview-bg@2x.png
  57. 78 53
      src/web/templates/frontRouter/pc/fileHistory/sess/index.html
  58. 49 60
      src/web/templates/frontRouter/pc/integral/sess/index.html
  59. 68 41
      src/web/templates/frontRouter/wx/fileRecord/sess/index.html
  60. 20 18
      src/web/templates/pc/index.html

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

@@ -1142,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", userid, 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" {

+ 20 - 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,15 @@ func (l *Login) Login() error {
 						if ok {
 							result["userInfo"] = userInfo
 							go anonymousLogin(l.Session(), l.Cookie("JYTrustedId"))
+							fmt.Println("##############")
+							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 {

+ 10 - 0
src/jfw/front/pcIndex.go

@@ -91,10 +91,20 @@ func (m *PcIndex) NewSordfish(flag string) error {
 	m.T["shareid"] = se.EncodeString(shareid)
 	m.T["activestart"] = config.ActiveConfig.DoubleEleven.Active_Start
 	m.T["activeend"] = config.ActiveConfig.DoubleEleven.Active_End
+	m.T["userCard"] = "f"
 	regex, _ := regexp.Compile("(Android|Mobile)")
 	var isLogin bool
 	if util.ObjToString(m.GetSession("userId")) != "" {
 		isLogin = true
+		userPower := jy.GetBigVipUserBaseMsg(m.Session(), *config.Middleground)
+		switch {
+		case userPower.Status > 0:
+			m.T["userCard"] = "m"
+		case userPower.VipStatus > 0:
+			m.T["userCard"] = "v"
+		case userPower.EntnicheStatus > 0:
+			m.T["userCard"] = "e"
+		}
 	}
 	if ispc == 0 && len(regex.FindAllString(m.Header("User-Agent"), -1)) > 0 {
 		m.T["s_m_openid"] = util.ObjToString(m.GetSession("s_m_openid"))

+ 50 - 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("userId")), 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("userId")), 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
 			}()

+ 35 - 2
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: {
@@ -42,7 +42,9 @@ var vm = new Vue({
         },
         conf: {
             phoneReg: /^1[3-9]\d{9}$/
-        }
+        },
+      // 剑鱼币任务信息
+      pointTaskInfo: {}
     },
     computed: {
         someText: function () {
@@ -106,6 +108,10 @@ var vm = new Vue({
         if (this.mode === 'mergeBind') {
             this.needShowEntItem = false
         }
+        // 获取剑鱼币任务信息
+        if(this.from === 'task' && this.type === 'bind'){
+          this.getPointsTask()
+        }
     },
 
     mounted: function () {
@@ -437,6 +443,9 @@ var vm = new Vue({
                 this.setPhone(function (state) {
                     _this.bindPhoneSuccess(state)
                 })
+                if(this.form === 'task'){
+                  this.pointsTaskSuccessTip()
+                }
             } else {
                 console.log('更换手机号...')
                 this.setPhone(function () {
@@ -467,6 +476,30 @@ var vm = new Vue({
                 // location.replace('/jyapp/free/login?back=index&flag=quit')
                 // location.replace('/jyapp/jylab/mainSearch')
             })
+        },
+        // 获取剑鱼币数据
+        getPointsTask: function() {
+          var _this = this
+          $.ajax({
+            type: 'POST',
+            url: '/jyActivity/task',
+            success: function (res) {
+              if (res.error_code == 0 && res.data) {
+                var arr = res.data.taskType === 1 ? res.data.limitedTask : res.data.newbieTask
+                var infoArr = arr.filter(function(item) {
+                  return item.type === 'bindPhone'
+                })
+                _this.pointTaskInfo = infoArr.length > 0 ? infoArr[0] : {}
+              } else {
+                _this.pointTaskInfo = {point: 0}
+              }
+            }
+          })
+        },
+        // 赚剑鱼币任务完成提示
+        pointsTaskSuccessTip () {
+          var point = this.pointTaskInfo.point || 0
+          this.showToast(`绑定手机号成功,获得${point}剑鱼币。`)
         }
     }
 })

+ 69 - 43
src/jfw/modules/app/src/web/templates/frontRouter/fileRecord/sess/index.html

@@ -245,64 +245,90 @@
                 <div class="t-bg flex" style="min-height:3.28rem;">
                     <span class="view-detail" @click="viewDetail">兑换/购买附件下载明细<em class="j-icon icon-arrow-right"></em></span>
                     <div class="nums">
-                        <span v-if="points.total>=0">{points.total}</span>个
-<!--                        <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/portraitRecord/image/help-p.png?v={{Msg "seo" "version"}}' @click="helpTiped" alt="">-->
-                    </div>
+                        <span v-if="points.total>=0">{points.total}</span>个</div>
                     <div class="btns flex">
                         <span>当月附件下载余额</span>
-                        <!-- <van-button round type="primary"  @click="setBook">立即充值</van-button>-->
                     </div>
                 </div>
-                <div  class="rights-box" :class="{'subscribe-box': showSubscribeBox }">
-                    <div class="subscribe-title" v-if="showSubscribeBox">
-                        <template v-if="userPower.vipStatus > 0">
-                            <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/subscribe-icon.png?v={{Msg "seo" "version"}}' alt="">
-                            <span>
-                                <strong>您当前是超级订阅用户</strong>,您每月享有 <em>10</em> 个附件下载权益。每月1号上余额清零重新计算。本月剩余 <em>{ accountInfo.number3 || 0} </em> 个权益。
-                            </span>
-                       </template>
-                        <span class="free-title" v-if="userPower.isFree">
-                            <strong>您当前是免费用户</strong>,可免费下载附件 <em>{ accountInfo.number4 || 0}</em> 次。
+                <!--大会员且没有附件下载权益-->
+                <div  class="rights-box" v-if="userPower.memberStatus > 0">
+                    <div class="box-container">
+                        <div class="box-title">不够用这么办?你有以下两种途径补充余额</div>
+                        <div class="box-content">
+                            <!-- 大会员-->
+                            <div class="p-row upgrade-row">
+                                <p class="row-top">
+                                    <span>1、服务升级</span>
+                                    <span class="handle-text"   @click="consultKf">咨询客服 <em class="j-icon icon-arrow-right"></em></span>
+                                </p>
+                                <p>您当前是大会员用户,目前不享有附件下载权益。您可以联系客服进行服务升级后获得。</p>
+                            </div>
+                            <div class="p-row exchange-row">
+                                <p class="row-top">
+                                    <span>2、兑换</span>
+                                    <span class="handle-text"  @click="exchangeHandle">去兑换 <em class="j-icon icon-arrow-right"></em></span>
+                                </p>
+                                <p>您当月剩余剑鱼币兑换附件下载权益 <em class="highlight-color">{ accountInfo.exchangeNum || 0 }</em> 个。</p>
+                                <p><em>350</em> 剑鱼币可兑换查看一个附件下载权益。兑换后30天内有效。</p>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <!-- 超级订阅且有附件下载权益-->
+                <div  class="rights-box subscribe-box" v-else-if="userPower.vipStatus > 0">
+                    <div class="subscribe-title">
+                        <img src='{{Cdns .Host "seo" "cdn"|SafeUrl}}/common-module/collection/image/subscribe-icon.png?v={{Msg "seo" "version"}}' alt="">
+                        <span>
+                            <strong>您当前是超级订阅用户</strong>,您每月享有 <em>10</em> 个附件下载权益。每月1号上余额清零重新计算。本月剩余 <em>{ accountInfo.grantNum || 0} </em> 个权益。
+                        </span>
+                    </div>
+                    <div class="box-container">
+                        <div class="box-title">不够用这么办?你有以下两种途径补充余额</div>
+                        <div class="box-content">
+                            <div class="p-row upgrade-row">
+                                <p class="row-top">
+                                    <span>1、服务升级</span>
+                                    <span class="handle-text" @click="knowMore">了解详情 <em class="j-icon icon-arrow-right"></em></span>
+                                </p>
+                                <p>您可购买大会员,获得每个月不限量附件下载。</p>
+                            </div>
+                            <div class="p-row recharge-row">
+                                <p class="row-top">
+                                 <span>2、充值</span><span class="handle-text" @click="setBook">去充值 <em class="j-icon icon-arrow-right"></em></span>
+                                </p>
+                                <p>您购买了附加下载包,当月有效。本月剩余权益 <em class="highlight-color">{ accountInfo.purchaseNum || 0 }</em> 个权益。</p>
+                            </div>
+                            <div class="p-row exchange-row">
+                                <p class="row-top">
+                                    <span>3、兑换</span><span class="handle-text"  @click="exchangeHandle">去兑换 <em class="j-icon icon-arrow-right"></em></span>
+                                </p>
+                                <p>您当月剩余剑鱼币兑换附件下载权益 <em class="highlight-color">{ accountInfo.exchangeNum || 0 }</em> 个。</p>
+                                <p><em>350</em> 剑鱼币可兑换查看一个附件下载权益。兑换后30天内有效。</p>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <!--免费用户-->
+                <div  class="rights-box" :class="{'subscribe-box': accountInfo.freeNum > 0 }" v-else-if="userPower.isFree">
+                    <div class="subscribe-title" v-if="accountInfo.freeNum > 0">
+                        <span class="free-title">
+                            <strong>您当前是免费用户</strong>,可免费下载附件 <em>{ accountInfo.freeNum || 0}</em> 次。
                         </span>
                     </div>
                     <div class="box-container">
                         <div class="box-title">不够用这么办?你有以下两种途径补充余额</div>
                         <div class="box-content">
-                            <template v-if="!userPower.isFree">
-                                <!-- 大会员-->
-                                <div class="p-row upgrade-row" v-if="userPower.memberStatus > 0">
-                                    <p class="row-top">
-                                        <span><em>1</em>、服务升级</span>
-                                        <span class="handle-text"   @click="consultKf">咨询客服 <em class="j-icon icon-arrow-right"></em></span>
-                                    </p>
-                                    <p>您当前是大会员用户,目前不享有附件下载权益。您可以联系客服进行服务升级后获得。</p>
-                                </div>
-                                <!--非大会员-->
-                                <div class="p-row upgrade-row" v-else>
-                                    <p class="row-top">
-                                        <span><em>1</em>、服务升级</span>
-                                        <span class="handle-text" @click="knowMore">了解详情 <em class="j-icon icon-arrow-right"></em></span>
-                                    </p>
-                                    <p>您可购买大会员,获得每个月不限量附件下载。</p>
-                                </div>
-                            </template>
-                            <!-- 仅是超级订阅或者免费用户(部分用户即是超级订阅又是大会员,优先按照大会员展示)-->
-                            <div class="p-row recharge-row" v-if="(userPower.isFree || userPower.vipStatus > 0) && userPower.memberStatus <= 0">
+                            <div class="p-row recharge-row">
                                 <p class="row-top">
-                                    <span>
-                                        <em>{userPower.isFree ? 1 : 2}</em>、充值</span><span class="handle-text" @click="setBook">去充值 <em class="j-icon icon-arrow-right"></em>
-                                    </span>
+                                    <span>1、充值</span><span class="handle-text" @click="setBook">去充值 <em class="j-icon icon-arrow-right"></em></span>
                                 </p>
-                                <p>您购买了附加下载包,当月有效。本月剩余权益 <em class="highlight-color">{ accountInfo.number1 || 0 }</em> 个权益。</p>
+                                <p>超级订阅用户每月享有下载10个附件的权限,也可充值附件下载包增加当月附件下载个数,每月1号上余额清零重新计算。</p>
                             </div>
                             <div class="p-row exchange-row">
                                 <p class="row-top">
-                                    <span>
-                                        <em>{ (userPower.memberStatus > 0 || userPower.isFree) ? 2 : 3  }</em>
-                                        、兑换</span><span class="handle-text"  @click="exchangeHandle">去兑换 <em class="j-icon icon-arrow-right"></em>
-                                    </span>
+                                    <span>2、兑换</span><span class="handle-text"  @click="exchangeHandle">去兑换 <em class="j-icon icon-arrow-right"></em></span>
                                 </p>
-                                <p>您当月剩余剑鱼币兑换附件下载权益 <em class="highlight-color">{ accountInfo.number2 || 0 }</em> 个。</p>
+                                <p>您当月剩余剑鱼币兑换附件下载权益 <em class="highlight-color">{ accountInfo.exchangeNum || 0 }</em> 个。</p>
                                 <p><em>350</em> 剑鱼币可兑换查看一个附件下载权益。兑换后30天内有效。</p>
                             </div>
                         </div>

+ 3 - 1
src/jfw/modules/bigmember/src/config.json

@@ -180,5 +180,7 @@
   "potentialCount": 1000,
   "newDataTime": 1685606275,
   "projectCount": 5000,
-  "portraitStartTime": 2018
+  "portraitStartTime": 2018,
+  "nsq": "192.168.3.240:4260",
+  "nsq_topic": "jy_event"
 }

+ 7 - 5
src/jfw/modules/bigmember/src/config/config.go

@@ -65,11 +65,13 @@ type config struct {
 		Details  string `json:"details"`
 		ListPage string `json:"listPage"`
 	} `json:"claim"`
-	ContextOldVipLimit int64 `json:"contextOldVipLimit"` //超级订阅部分用户:--- 超前项目权限
-	PotentialCount     int   `json:"potentialCount"`     //潜在客户 潜在竞争对手数据量
-	NewDataTime        int64 `json:"newDataTime"`        // 用于周边月报区分是否为新数据 、配置为p350发版的时间
-	ProjectCount       int   `json:"projectCount"`       //画像和报告项目明细最大数量
-	PortraitStartTime  int   `json:"portraitStartTime"`
+	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"`
 }
 
 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", userId, 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", userId, 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 - 2
src/jfw/modules/publicapply/src/identity/service/service.go

@@ -128,7 +128,7 @@ func (f *Identity) Edit() {
 			if entName != "" {
 				err := jy.Publish(Mgo_Log, Config.Nsq, Config.NsqTopic, "task", userId, "", map[string]interface{}{
 					"code":       "1010",
-					"type":       "improveEntInfo",
+					"types":      "improveEntInfo",
 					"baseUserId": util.Int64All(f.GetSession("base_user_id")),
 				})
 				if err != nil {
@@ -138,7 +138,7 @@ func (f *Identity) Edit() {
 			if entBusinessType != "" {
 				err := jy.Publish(Mgo_Log, Config.Nsq, Config.NsqTopic, "task", userId, "", map[string]interface{}{
 					"code":       "1011",
-					"type":       "improveBusiness",
+					"types":      "improveBusiness",
 					"baseUserId": util.Int64All(f.GetSession("base_user_id")),
 				})
 				if err != nil {

+ 24 - 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 == keywordsIndex {
+				//设置关键词送积分
+				jy.Publish(db.Mgo_Log, config.Config.Nsq, config.Config.NsqTopic, "task", userId, 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,17 @@ func AddKeyWords(types, userId, classIndex, className, keywordsIndex, keywordNam
 			"$set": saveData,
 		})
 		SetLog(userId, types, positionType, session)
+		//判断是新增
+		if keywordCount == "" || keywordCount == keywordsIndex {
+			//设置关键词送积分
+			jy.Publish(db.Mgo_Log, config.Config.Nsq, config.Config.NsqTopic, "task", userId, 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"
   }
 }

+ 9 - 9
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,

+ 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 - 5
src/jfw/modules/subscribepay/src/config/config.go

@@ -1,18 +1,17 @@
 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"
+	"time"
 
 	qutil "app.yhyue.com/moapp/jybase/common"
 	. "app.yhyue.com/moapp/jybase/date"
 	"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 {

+ 16 - 9
src/jfw/modules/subscribepay/src/entity/basePack.go

@@ -26,7 +26,7 @@ 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)
@@ -140,7 +140,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 +161,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 +184,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 +210,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 +236,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 +255,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 +267,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 +308,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 {

+ 20 - 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 余额接口【数据流量包、附件下载包。。】
@@ -90,24 +89,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                 //资源名称
@@ -123,7 +126,6 @@ type UseBalanceStruct struct {
 	Session          *httpsession.Session
 }
 
-//
 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,
@@ -167,7 +169,7 @@ func (this *UseBalanceStruct) UseBalance() (map[string]interface{}, error) {
 	return resMap, err
 }
 
-//流水
+// 流水
 type FindRecordStruct struct {
 	AccountId    string //账户标识
 	UserId       string //用户标识
@@ -181,7 +183,7 @@ type FindRecordStruct struct {
 
 }
 
-//定义结构体
+// 定义结构体
 func InitFindRecord(userId, resourceType, queryTime, platform string, pageSize, pageNum, state int) *FindRecordStruct {
 	if pageSize == 0 {
 		pageSize = 10
@@ -249,7 +251,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}, //账户标识*

+ 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 {

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

@@ -204,6 +204,13 @@ func (this *UserAccount) MailSet(doType string) {
 			}) {
 				return nil, DBUPDATE_ERROR
 			}
+			jy.Publish(util.Mgo_log, config.Config.Nsq, config.Config.Nsq_Topic, "task", userId, jy.Jyweb_node2, map[string]interface{}{
+				"code":       1009,
+				"types":      "bindMail",
+				"num":        50,
+				"baseUserId": this.GetSession("base_user_id"),
+				"positionId": this.GetSession("positionId"),
+			})
 			this.Session().Del(mailAuthPassSessionKey)
 		}
 		return map[string]interface{}{
@@ -408,6 +415,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 +451,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
 )

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 184 - 441
src/jfw/modules/weixin/src/go.sum


+ 16 - 2
src/jfw/modules/weixin/src/wx/wx.go

@@ -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":      "bindWx",
+			"num":        50,
+			"baseUserId": (*m)[0]["base_user_id"],
+		})
 		return false
 	}
 	//需要进行绑定
@@ -996,6 +1004,12 @@ func WxBind(code, openId string, w ResponseWriter, newUnionId string) bool {
 				},
 			}
 			tools.MQFW.UpdateById("user", userId, &update1)
+			jy.Publish(tools.MGLOG, nsqPath, nsq_topic, "task", bindUserId, jy.Jyweb_node2, map[string]interface{}{
+				"code":       1008, //绑定手机号任务
+				"types":      "bindWx",
+				"num":        50,
+				"baseUserId": (*m)[0]["base_user_id"],
+			})
 			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))

+ 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

+ 16 - 21
src/web/staticres/common-module/file-pack/js/index-wx.js

@@ -109,14 +109,14 @@ var vm = new Vue({
       },
       // 附件下载相关权益信息
       accountInfo: {
-        // 购买数量(充值)
-        number1: 0,
+        // 充值数量
+        purchaseNum: 0,
         // 兑换数量
-        number2: 0,
-        // 定期投放数量(超级订阅剩余权益个数
-        number3: 0,
-        // 留资数量(免费用户权益个数)
-        number4: 0
+        exchangeNum: 0,
+        // 超级订阅剩余权益个数
+        grantNum: 0,
+        // 免费数量(免费用户权益个数)
+        freeNum: 0
       },
       kfDialogShow: false,
       // 二维码
@@ -127,10 +127,6 @@ var vm = new Vue({
     // 大会员是否拥有附件下载权益
     hasDownloadPower () {
       return this.userPower.power.indexOf(3) > -1
-    },
-    // 展示外层边框(权益)(非大会员、免费用户且有免费权益、或者为超级订阅)
-    showSubscribeBox () {
-      return (this.userPower.vipStatus > 0 || (this.userPower.isFree && this.accountInfo.number4)) && this.userPower.memberStatus <= 0
     }
   },
   created: function () {
@@ -188,7 +184,15 @@ var vm = new Vue({
     },
     // 兑换明细
     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
@@ -375,15 +379,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']
     }
   }
 })

+ 16 - 21
src/web/staticres/common-module/file-pack/js/index.js

@@ -83,14 +83,14 @@ var vm = new Vue({
       },
       // 附件下载相关权益信息
       accountInfo: {
-        // 购买数量(充值)
-        number1: 0,
+        // 充值数量
+        purchaseNum: 0,
         // 兑换数量
-        number2: 0,
-        // 定期投放数量(超级订阅剩余权益个数
-        number3: 0,
-        // 留资数量(免费用户权益个数)
-        number4: 0
+        exchangeNum: 0,
+        // 超级订阅剩余权益个数
+        grantNum: 0,
+        // 免费数量(免费用户权益个数)
+        freeNum: 0
       },
       kfDialogShow: false,
       // 二维码
@@ -104,10 +104,6 @@ var vm = new Vue({
     // 大会员是否拥有附件下载权益
     hasDownloadPower () {
       return this.userPower.power.indexOf(3) > -1
-    },
-    // 展示外层边框(权益)(非大会员、免费用户且有免费权益、或者为超级订阅)
-    showSubscribeBox () {
-      return (this.userPower.vipStatus > 0 || (this.userPower.isFree && this.accountInfo.number4)) && this.userPower.memberStatus <= 0
     }
   },
   created: function () {
@@ -217,7 +213,15 @@ var vm = new Vue({
     },
     // 兑换明细
     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
@@ -410,15 +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']
     }
   }
 })

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


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


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


+ 6 - 0
src/web/staticres/css/pc/index.css

@@ -1834,6 +1834,9 @@ text-align: center;
   margin-top: 10px;
   height: 22px;
 }
+.jy-index .jy-index-strategy .strategy-content .strate_content .strate_c_list a {
+  font-size: 14px;
+}
 .jy-index-strategy .strategy-content .strate_content .strate_c_list a{
   color: #686868;
   text-decoration: none;
@@ -1841,6 +1844,9 @@ text-align: center;
 .jy-index-strategy .strategy-content .strate_content .strate_c_list a:hover{
   color: #2CB7CA;
 }
+.jy-index .jy-index-strategy .strategy-content .strate_content .strate_l_r_c_date {
+  font-size: 12px;
+}
 .jy-index-strategy .strategy-content .strate_content .strate_l_r_c_date{
   color: #999999;
   min-width: 50px;

+ 121 - 11
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: '',
@@ -78,6 +101,32 @@ var vm = new Vue({
     }
   },
   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 +139,25 @@ 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])
+            }
+          }
+        }
+      })
+    },
     cellClick (row, column, cell, event) {
       console.log(row, column, cell, event)
       if (column.label === '附件') {
@@ -148,18 +212,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 +270,60 @@ 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
+      })
+    },
+    concatKf () {
+      if (goTemplateData.inIframe) {
+        window.$BRACE.$emit('open-customer')
+      } else {
+        // 打开客服弹窗
+        checkCustomerService()
+      }
+    },
     detailed (ids) {
       window.open('/swordfish/page_big_pc/unit_portrayal/' + ids, '_blank')
     }

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

@@ -2,6 +2,43 @@
     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;
+}
+
+
+.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 +295,101 @@
 .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;
+}

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


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


+ 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: ['@@', '@@'],
@@ -402,6 +403,7 @@ var vm = new Vue({
         'activity_free_plan': '请完善信息,免费获取200剑鱼币',
         super_membership_day: '请留下联系方式,我们会尽快联系您体验大会员全部功能!',
         peugeot_supplier_regist:'请完善您的个人信息,抢先对接采购单位',
+        pc_mine_member_attach_learnmore: '请留下联系方式,我们会尽快联系您!部分招标公告信息等相关文件资料自主下载,帮助企业投标,客户分析、市场挖掘更高效。',
         peugeot_view_infor: '请留下联系方式,我们会尽快联系您体验大会员全部功能!'
       },
       isRefresh: false, // 留完资是否需要刷新页面

+ 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"

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


+ 78 - 53
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;
@@ -122,17 +77,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-title">附件下载</h3>
+          <div class="header-hd-actions">
+            <button 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="concatKf">联系客服></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>
@@ -246,6 +269,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")

+ 49 - 60
src/web/templates/frontRouter/pc/integral/sess/index.html

@@ -14,42 +14,28 @@
     <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>
@@ -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>

+ 68 - 41
src/web/templates/frontRouter/wx/fileRecord/sess/index.html

@@ -253,63 +253,90 @@
                 <div class="t-bg flex">
                     <div class="nums">
                         <span v-if="points.total>=0">{points.total}</span>个
-<!--                        <img src='{{Msg "seo" "cdn"}}/common-module/portraitRecord/image/help-p.png?v={{Msg "seo" "version"}}' @click="helpTiped" alt="">-->
                     </div>
                     <div class="btns flex">
                         <span>当月附件下载余额</span>
-<!--                        <van-button round type="primary"  @click="setBook">立即充值</van-button>-->
                     </div>
                 </div>
-                <div  class="rights-box" :class="{'subscribe-box': showSubscribeBox }">
-                    <div class="subscribe-title" v-if="showSubscribeBox">
-                        <template v-if="userPower.vipStatus > 0">
-                            <img src='{{Msg "seo" "cdn"}}/common-module/collection/image/subscribe-icon.png?v={{Msg "seo" "version"}}' alt="">
-                            <span>
-                                <strong>您当前是超级订阅用户</strong>,您每月享有 <em>10</em> 个附件下载权益。每月1号上余额清零重新计算。本月剩余 <em>{ accountInfo.number3 || 0} </em> 个权益。
-                            </span>
-                        </template>
-                        <span class="free-title" v-if="userPower.isFree">
-                            <strong>您当前是免费用户</strong>,可免费下载附件 <em>{ accountInfo.number4 || 0}</em> 次。
+                <!--大会员且没有附件下载权益-->
+                <div  class="rights-box" v-if="userPower.memberStatus > 0">
+                    <div class="box-container">
+                        <div class="box-title">不够用这么办?你有以下两种途径补充余额</div>
+                        <div class="box-content">
+                            <!-- 大会员-->
+                            <div class="p-row upgrade-row">
+                                <p class="row-top">
+                                    <span>1、服务升级</span>
+                                    <span class="handle-text"   @click="consultKf">咨询客服 <em class="j-icon icon-arrow-right"></em></span>
+                                </p>
+                                <p>您当前是大会员用户,目前不享有附件下载权益。您可以联系客服进行服务升级后获得。</p>
+                            </div>
+                            <div class="p-row exchange-row">
+                                <p class="row-top">
+                                    <span>2、兑换</span>
+                                    <span class="handle-text"  @click="exchangeHandle">去兑换 <em class="j-icon icon-arrow-right"></em></span>
+                                </p>
+                                <p>您当月剩余剑鱼币兑换附件下载权益 <em class="highlight-color">{ accountInfo.exchangeNum || 0 }</em> 个。</p>
+                                <p><em>350</em> 剑鱼币可兑换查看一个附件下载权益。兑换后30天内有效。</p>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <!-- 超级订阅且有附件下载权益-->
+                <div  class="rights-box subscribe-box" v-else-if="userPower.vipStatus > 0">
+                    <div class="subscribe-title">
+                        <img src='{{Msg "seo" "cdn"}}/common-module/collection/image/subscribe-icon.png?v={{Msg "seo" "version"}}' alt="">
+                        <span>
+                            <strong>您当前是超级订阅用户</strong>,您每月享有 <em>10</em> 个附件下载权益。每月1号上余额清零重新计算。本月剩余 <em>{ accountInfo.grantNum || 0} </em> 个权益。
                         </span>
                     </div>
                     <div class="box-container">
                         <div class="box-title">不够用这么办?你有以下两种途径补充余额</div>
                         <div class="box-content">
-                            <template v-if="!userPower.isFree">
-                                <!-- 大会员-->
-                                <div class="p-row upgrade-row" v-if="userPower.memberStatus > 0">
-                                    <p class="row-top">
-                                        <span><em>1</em>、服务升级</span>
-                                        <span class="handle-text"   @click="consultKf">咨询客服 <em class="j-icon icon-arrow-right"></em></span>
-                                    </p>
-                                    <p>您当前是大会员用户,目前不享有附件下载权益。您可以联系客服进行服务升级后获得。</p>
-                                </div>
-                                <!--非大会员-->
-                                <div class="p-row upgrade-row" v-else>
-                                    <p class="row-top">
-                                        <span><em>1</em>、服务升级</span>
-                                        <span class="handle-text" @click="knowMore">了解详情 <em class="j-icon icon-arrow-right"></em></span>
-                                    </p>
-                                    <p>您可购买大会员,获得每个月不限量附件下载。</p>
-                                </div>
-                            </template>
-                            <!-- 仅是超级订阅或者免费用户(部分用户即是超级订阅又是大会员,优先按照大会员展示)-->
-                            <div class="p-row recharge-row" v-if="(userPower.isFree || userPower.vipStatus) && userPower.memberStatus <= 0">
+                            <div class="p-row upgrade-row">
+                                <p class="row-top">
+                                    <span>1、服务升级</span>
+                                    <span class="handle-text" @click="knowMore">了解详情 <em class="j-icon icon-arrow-right"></em></span>
+                                </p>
+                                <p>您可购买大会员,获得每个月不限量附件下载。</p>
+                            </div>
+                            <div class="p-row recharge-row">
+                                <p class="row-top">
+                                    <span>2、充值</span><span class="handle-text" @click="setBook">去充值 <em class="j-icon icon-arrow-right"></em></span>
+                                </p>
+                                <p>您购买了附加下载包,当月有效。本月剩余权益 <em class="highlight-color">{ accountInfo.purchaseNum || 0 }</em> 个权益。</p>
+                            </div>
+                            <div class="p-row exchange-row">
+                                <p class="row-top">
+                                    <span>3、兑换</span><span class="handle-text"  @click="exchangeHandle">去兑换 <em class="j-icon icon-arrow-right"></em></span>
+                                </p>
+                                <p>您当月剩余剑鱼币兑换附件下载权益 <em class="highlight-color">{ accountInfo.exchangeNum || 0 }</em> 个。</p>
+                                <p><em>350</em> 剑鱼币可兑换查看一个附件下载权益。兑换后30天内有效。</p>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <!--免费用户-->
+                <div  class="rights-box" :class="{'subscribe-box': accountInfo.freeNum > 0 }" v-else-if="userPower.isFree">
+                    <div class="subscribe-title" v-if="accountInfo.freeNum > 0">
+                        <span class="free-title">
+                            <strong>您当前是免费用户</strong>,可免费下载附件 <em>{ accountInfo.freeNum || 0}</em> 次。
+                        </span>
+                    </div>
+                    <div class="box-container">
+                        <div class="box-title">不够用这么办?你有以下两种途径补充余额</div>
+                        <div class="box-content">
+                            <div class="p-row recharge-row">
                                 <p class="row-top">
-                                    <span>
-                                        <em>{userPower.isFree ? 1 : 2}</em>、充值</span><span class="handle-text" @click="setBook">去充值 <em class="j-icon icon-arrow-right"></em>
-                                    </span>
+                                    <span>1、充值</span><span class="handle-text" @click="setBook">去充值 <em class="j-icon icon-arrow-right"></em></span>
                                 </p>
-                                <p>您购买了附加下载包,当月有效。本月剩余权益 <em class="highlight-color">{ accountInfo.number1 || 0 }</em> 个权益。</p>
+                                <p>超级订阅用户每月享有下载10个附件的权限,也可充值附件下载包增加当月附件下载个数,每月1号上余额清零重新计算。</p>
                             </div>
                             <div class="p-row exchange-row">
                                 <p class="row-top">
-                                    <span>
-                                        <em>{ (userPower.memberStatus > 0 || userPower.isFree) ? 2 : 3  }</em>
-                                        、兑换</span><span class="handle-text"  @click="exchangeHandle">去兑换 <em class="j-icon icon-arrow-right"></em>
-                                    </span>
+                                    <span>2、兑换</span><span class="handle-text"  @click="exchangeHandle">去兑换 <em class="j-icon icon-arrow-right"></em></span>
                                 </p>
-                                <p>您当月剩余剑鱼币兑换附件下载权益 <em class="highlight-color">{ accountInfo.number2 || 0 }</em> 个。</p>
+                                <p>您当月剩余剑鱼币兑换附件下载权益 <em class="highlight-color">{ accountInfo.exchangeNum || 0 }</em> 个。</p>
                                 <p><em>350</em> 剑鱼币可兑换查看一个附件下载权益。兑换后30天内有效。</p>
                             </div>
                         </div>

+ 20 - 18
src/web/templates/pc/index.html

@@ -596,10 +596,12 @@
           <div class="app-btn" id="app-btn">立即预约演示</div>
         </div>
       </div>
+      {{ if ne .T.userCard "m"}}
       <!-- 底部广告位 -->
       <div class="pc-index-bottom">
         <img class="bottom-member-ad" adv_name="PC首页广告位-底部" src="" alt="底部广告位">
       </div>
+      {{ end }}
       {{include "/common/friend-link.html"}}
       {{include "/common/pcbottom.html"}}
 		</section>
@@ -1035,24 +1037,24 @@
   {{end}}
 
   // 首页活动弹窗迁移至工作桌面首页,此处活动弹窗不再展示
-  // var showDay = localStorage.tc;
-  // if(adv_img!=""){
-  //   if(localStorage.tc === undefined){
-  //     $("#index_tc").css("display","block");
-  //     $("#close2x").css("display","block");
-  //     $(".tans").css("display","block");
-  //   }else{
-  //     if(showDay != day){
-  //       $("#index_tc").css("display","block");
-  //       $("#close2x").css("display","block");
-  //       $(".tans").css("display","block");
-  //     }else{
-  //       $("#index_tc").css("display","none");
-  //       $("#close2x").css("display","none");
-  //       $(".tans").css("display","none");
-  //     }
-  //   }
-  // }
+  var showDay = localStorage.tc;
+  if(adv_img!=""){
+    if(localStorage.tc === undefined){
+      $("#index_tc").css("display","block");
+      $("#close2x").css("display","block");
+      $(".tans").css("display","block");
+    }else{
+      if(showDay != day){
+        $("#index_tc").css("display","block");
+        $("#close2x").css("display","block");
+        $(".tans").css("display","block");
+      }else{
+        $("#index_tc").css("display","none");
+        $("#close2x").css("display","none");
+        $(".tans").css("display","none");
+      }
+    }
+  }
 
   // 首页底部广告位
   {{$bottom:=(Ad "jy_pc_index_bottom" -1 .Host)}}

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác