瀏覽代碼

Merge branch 'dev4.6.2.1' of http://192.168.3.207:8080/qmx/jy into dev4.6.2.1

zhangyuhan 3 年之前
父節點
當前提交
6bf11dffe8

+ 6 - 1
src/jfw/modules/app/src/web/staticres/jyapp/big-member/js/unit_portrayal.js

@@ -399,7 +399,12 @@ var vNode = {
                       that.chartLoading = false;
                       that.initChartData('', res.data)
                   } else {
-                    that.getSectionChartData('a')
+                    // that.getSectionChartData('a')
+                    if (that.reqCount < 5) {
+                      that.getChartData()
+                    } else {
+                      that.chartLoading = false;
+                    }
                   }
                 }
             },

+ 1 - 1
src/jfw/modules/bigmember/src/entity/portrait.go

@@ -238,7 +238,7 @@ func (this *Portrait) BuyerPortraitData(screen *PortraitScreen, flag string) (ma
 	}
 	buyerPortraitData := map[string]interface{}{}
 	if screen.IsEmptySearch() { //空查询读缓存
-		buyerPortraitData = TryFunc(GetPortraitCache, screen.Ent, "buyer", 2)
+		buyerPortraitData = TryFunc(GetPortraitCache, screen.Ent, "buyer", 5)
 	} else {
 		Screen_Thread <- true
 		res, err := GetBuyerPortraitData(screen)

+ 3 - 3
src/jfw/modules/bigmember/src/entity/portrait_screen.go

@@ -83,11 +83,11 @@ func (ps *PortraitScreen) PareMatchType(isBidding ...bool) (items []string) {
 	} else { //project表
 		for _, t := range strings.Split(ps.MatchRange, ",") {
 			if t == "buyer" {
-				items = append(items, "buyer")
+				items = append(items, "mbuyer")
 			} else if t == "winner" {
-				items = append(items, "winner")
+				items = append(items, "mwinner")
 			} else if t == "agency" {
-				items = append(items, "agency")
+				items = append(items, "magency")
 			} else if t == "purchasing" {
 				items = append(items, []string{"purchasing", "projectname.pname"}...)
 			}

+ 3 - 4
src/jfw/modules/publicapply/src/subscribePush/entity/setting.go

@@ -38,9 +38,6 @@ func (this *SubscribeSet) SetAreaAndIndustry() *FuncResult {
 
 //
 func freeSet(area map[string]interface{}, industry []string, userId string) *FuncResult {
-	if len(area) == 0 {
-		return &FuncResult{false, errors.New("地区参数异常"), nil}
-	}
 	//isfirst:是否第一次设置地区;ppb:是否购买省级订阅包; areacount:省份订阅包购买的省份数量-1:全国 无限制调整
 	isfirst, ppb, areacount := IsCanSet(userId, area)
 	//购买省份订阅包 已调整地区次数
@@ -49,12 +46,14 @@ func freeSet(area map[string]interface{}, industry []string, userId string) *Fun
 	ym := fmt.Sprint(time.Now().Year()) + "-" + fmt.Sprint(time.Now().Month())
 	if ppb {
 		ppnum = redis.GetInt(jy.PowerCacheDb, fmt.Sprintf(jy.UserUpdateAreaKey, userId, ym))
+	} else if len(area) == 0 {
+		return &FuncResult{false, errors.New("地区参数异常"), nil}
 	}
 	//免费用户未购买省份订阅包 按年算
 	year := fmt.Sprint(time.Now().Year())
 	//免费用户 已调整地区次数
 	fpnum := redis.GetInt(jy.PowerCacheDb, fmt.Sprintf(jy.UserUpdateAreaKey, userId, year))
-	// log.Println(len(area), "pnum:", pnum)
+	// log.Println(len(area), "fpnum:", fpnum, "ppnum:", ppnum)
 	//第一次设置地区 || 购买全国  不扣次数
 	var issetredis = areacount > -1 && !isfirst
 	if issetredis {

+ 8 - 2
src/jfw/modules/subscribepay/src/entity/areaPack.go

@@ -3,6 +3,7 @@ package entity
 import (
 	"encoding/json"
 	"fmt"
+	"jfw/modules/common/src/qfw/util/jy"
 	"log"
 	qutil "qfw/util"
 	"time"
@@ -201,9 +202,14 @@ func (this *AreaPackFilter) Power(userid string, startime, endtime time.Time) bo
 		setMap["o_jy.l_areaStart_p"] = startime.Unix()
 		setMap["o_jy.o_area_p"] = this.Area
 	}
-	return util.MQFW.UpdateById("user", userid, map[string]interface{}{
+	if util.MQFW.UpdateById("user", userid, map[string]interface{}{
 		"$set": setMap,
-	})
+	}) {
+		//清除 用户权限缓存
+		jy.ClearBigVipUserPower(userid)
+		return true
+	}
+	return false
 }
 
 //获取产品id

+ 8 - 2
src/web/staticres/big-member/js/unit_portrayal.js

@@ -394,11 +394,17 @@ var vNode = {
             data:storageSet ? Object.assign(data, storageSet) : data,
             success:function(res) {
                 if(res.error_code == 0) {
+                  that.reqCount++;
                   if(res.data && Object.keys(res.data).length > 0) {
                       that.chartLoading = false;
                       that.initChartData('', res.data)
                   } else {
-                    that.getSectionChartData('a')
+                    // that.getSectionChartData('a')
+                    if (that.reqCount < 5) {
+                      that.getChartData()
+                    } else {
+                      that.chartLoading = false;
+                    }
                   }
                 }
             },
@@ -415,7 +421,7 @@ var vNode = {
             url:'/bigmember/portrait/buyer/getData',
             data:{
               buyer: decodeURIComponent(utils.getParam('entName')),
-              flag: type
+              flag: type //先a再b再c
             },
             success:function(res) {
                 if(res.error_code == 0) {

+ 6 - 4
src/web/staticres/common-module/collection/js/history-project.js

@@ -153,8 +153,9 @@ var hisproComponent = {
       if(!utils.isWeiXinBrowser) {
         e.preventDefault()
         try {
-          if(tel.indexOf('、') > -1) {
-            tel = tel.split('、')[0]
+          var f = /[^\s\、,,;;./。??]+(?=[\s\、,,;;./。??])/g
+          if(tel.match(f)) {
+            tel = tel.match(f)[0]
           }
           JyObj.callPhone(tel);
         } catch (error) {
@@ -172,8 +173,9 @@ var hisproComponent = {
     },
     // 联系方式取第一个
     formatTel: function (tel) {
-      if(tel.indexOf('、') > -1) {
-        tel = tel.split('、')[0]
+      var f = /[^\s\、,,;;./。??]+(?=[\s\、,,;;./。??])/g
+      if(tel.match(f)) {
+        tel = tel.match(f)[0]
       }
       return tel
     }