Forráskód Böngészése

Merge branch 'dev4.5.2' of http://127.0.0.1:8080/qmx/jy into dev4.5.2

wangshan 4 éve
szülő
commit
403394552f

+ 1 - 1
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_renew.js

@@ -340,7 +340,7 @@ var renew = {
             }
             }
             sizeTime = size.period
             sizeTime = size.period
           } else {
           } else {
-            sizeTime = '1个月'
+            sizeTime = '1'
           }
           }
           console.log(upgrade,sizeTime, '新or老')
           console.log(upgrade,sizeTime, '新or老')
             $('.vip-footer.renew .confirm').prop('disabled', true)
             $('.vip-footer.renew .confirm').prop('disabled', true)

+ 1 - 0
src/jfw/modules/app/src/web/templates/frontRouter/portraitRecord/sess/index.html

@@ -44,6 +44,7 @@
               type="year-month"
               type="year-month"
               title="选择日期"
               title="选择日期"
               :formatter="formatter11"
               :formatter="formatter11"
+              :min-date="minDate"
               :max-date="maxTime"
               :max-date="maxTime"
               @confirm="confirmed"
               @confirm="confirmed"
               @cancel="canceled"
               @cancel="canceled"

+ 8 - 8
src/jfw/modules/common/src/qfw/util/jy/subvipPortrait.go

@@ -56,6 +56,14 @@ func (this *BigVipBaseMsg) SubVipPortraitTimesCheck(mysql *mysql.Mysql, entId st
 		return nil
 		return nil
 	}
 	}
 
 
+	//校验本月次数是否使用完
+	useKey := fmt.Sprintf(PortraitRecordTimes, this.Uid, int(now.Month()))
+
+	useCount := redis.GetInt(PowerCacheDb, useKey)
+	if useCount >= fullCount {
+		return fmt.Errorf("本月次数已使用完")
+	}
+
 	//并发控制
 	//并发控制
 	if redis.Incr(PowerCacheDb, fmt.Sprintf(UsePortraitVisited, this.Uid, int(now.Month()), entId)) == 1 {
 	if redis.Incr(PowerCacheDb, fmt.Sprintf(UsePortraitVisited, this.Uid, int(now.Month()), entId)) == 1 {
 		_ = redis.SetExpire(PowerCacheDb, fmt.Sprintf(UsePortraitVisited, this.Uid, int(now.Month()), entId), 60*60*5)
 		_ = redis.SetExpire(PowerCacheDb, fmt.Sprintf(UsePortraitVisited, this.Uid, int(now.Month()), entId), 60*60*5)
@@ -65,14 +73,6 @@ func (this *BigVipBaseMsg) SubVipPortraitTimesCheck(mysql *mysql.Mysql, entId st
 			fullCount = this.Vip_BuySet.AreaCount * OneAreaTimes
 			fullCount = this.Vip_BuySet.AreaCount * OneAreaTimes
 		}
 		}
 
 
-		//校验本月次数是否使用完
-		useKey := fmt.Sprintf(PortraitRecordTimes, this.Uid, int(now.Month()))
-
-		useCount := redis.GetInt(PowerCacheDb, useKey)
-		if useCount >= fullCount {
-			return fmt.Errorf("本月次数已使用完")
-		}
-
 		//新增使用记录
 		//新增使用记录
 		if mysql.Insert(PortraitRecordTable, map[string]interface{}{
 		if mysql.Insert(PortraitRecordTable, map[string]interface{}{
 			"user_id":     this.Uid,
 			"user_id":     this.Uid,

+ 17 - 13
src/web/staticres/common-module/portraitRecord/js/index-wx.js

@@ -48,6 +48,7 @@ var vm = new Vue({
       dValue: '',
       dValue: '',
       pShow: false,
       pShow: false,
       curDate: '',
       curDate: '',
+      minDate: '',
       maxTime: '',
       maxTime: '',
       points: [],
       points: [],
       years: '',
       years: '',
@@ -71,6 +72,7 @@ var vm = new Vue({
       this.months = parseInt(new Date().getMonth() + 1)
       this.months = parseInt(new Date().getMonth() + 1)
       this.dValue = this.years + '年' + this.months + '月'
       this.dValue = this.years + '年' + this.months + '月'
       this.curDate = new Date()
       this.curDate = new Date()
+      this.minDate = new Date(2021, 0)
       this.maxTime = new Date(this.years, this.months - 1)
       this.maxTime = new Date(this.years, this.months - 1)
       this.subPoint()
       this.subPoint()
       this.onLoad()
       this.onLoad()
@@ -90,15 +92,10 @@ var vm = new Vue({
       }).done(res => {
       }).done(res => {
         if (res.error_code == 0) {
         if (res.error_code == 0) {
           this.points = res.data
           this.points = res.data
-          if (res.data.provin === -1 && res.data.total == 0) {
+          if (res.data.provin === -1 && res.data.usage == res.data.total) { // 用户订阅全国且机会用完
             this.contracted = true
             this.contracted = true
-            this.$dialog.alert({
-              message: '每订购1个省,可查看50个企业画像/月。 您订购全国的企业画像查看权限已用完,如需更多权益,请联系客服。',
-              className: 'pro-log',
-              messageAlign: 'left',
-              confirmButtonColor: '#2ABED1',
-              confirmButtonText: '我知道了'
-            })
+          } else {
+            this.contracted = false
           }
           }
         }
         }
       })
       })
@@ -161,7 +158,16 @@ var vm = new Vue({
     },
     },
     helpTiped() {
     helpTiped() {
       let _this = this
       let _this = this
-      if (_this.points.provin === -1&&_this.points.usage !== _this.points.total) {
+      if (_this.points.provin === -1 && _this.points.usage == _this.points.total) { // 用户订阅全国且机会用完
+        this.contracted = true
+        this.$dialog.alert({
+          message: '每订购1个省,可查看50个企业画像/月。您当前订阅全国,查看机会已经消耗完毕。如需更多权益,请联系客服。',
+          className: 'pro-log',
+          messageAlign: 'left',
+          confirmButtonColor: '#2ABED1',
+          confirmButtonText: '我知道了'
+        })
+      } else if (_this.points.usage !== _this.points.total) { // 订阅全国和非订阅全国的次数未用完时
         this.$dialog.alert({
         this.$dialog.alert({
           message: '每订购1个省,可查看50个企业画像/月。',
           message: '每订购1个省,可查看50个企业画像/月。',
           className: 'pro-log',
           className: 'pro-log',
@@ -169,10 +175,8 @@ var vm = new Vue({
           confirmButtonColor: '#2ABED1',
           confirmButtonColor: '#2ABED1',
           confirmButtonText: '我知道了',
           confirmButtonText: '我知道了',
           closeOnClickOverlay: true
           closeOnClickOverlay: true
-        }).then(() => {
-          // location.href = '/jyapp/vipsubscribe/toSubVipSetPage'
         })
         })
-      } else {
+      } else if (_this.points.provin !== -1) { // 用户未订阅全国
         this.$dialog.alert({
         this.$dialog.alert({
           message: '每订购1个省,可查看50个企业画像/月。 您当前订阅了' + `<span style="color:#2ABED1">${_this.points.provin}</span>` + '个省,如需更多权益,请订购更多省份。',
           message: '每订购1个省,可查看50个企业画像/月。 您当前订阅了' + `<span style="color:#2ABED1">${_this.points.provin}</span>` + '个省,如需更多权益,请订购更多省份。',
           className: 'pro-log',
           className: 'pro-log',
@@ -207,7 +211,7 @@ var vm = new Vue({
         location.href = '/weixin/frontPage/collection/sess/ent_portrait?eId=' + ids + '&svip=1'
         location.href = '/weixin/frontPage/collection/sess/ent_portrait?eId=' + ids + '&svip=1'
     },
     },
     contractPerson() {
     contractPerson() {
-      location.href = '/big/wx/page/customer'
+      location.href = '400-108-6670'
     },
     },
     setBook() {
     setBook() {
       location.href = '/front/vipsubscribe/toSubVipSetPage'
       location.href = '/front/vipsubscribe/toSubVipSetPage'

+ 17 - 13
src/web/staticres/common-module/portraitRecord/js/index.js

@@ -48,6 +48,7 @@ var vm = new Vue({
       dValue: '',
       dValue: '',
       pShow: false,
       pShow: false,
       curDate: '',
       curDate: '',
+      minDate: '',
       maxTime: '',
       maxTime: '',
       points: [],
       points: [],
       years: '',
       years: '',
@@ -71,6 +72,7 @@ var vm = new Vue({
       this.months = parseInt(new Date().getMonth() + 1)
       this.months = parseInt(new Date().getMonth() + 1)
       this.dValue = this.years + '年' + this.months + '月'
       this.dValue = this.years + '年' + this.months + '月'
       this.curDate = new Date()
       this.curDate = new Date()
+      this.minDate = new Date(2021, 0)
       this.maxTime = new Date(this.years, this.months - 1)
       this.maxTime = new Date(this.years, this.months - 1)
       this.subPoint()
       this.subPoint()
       this.onLoad()
       this.onLoad()
@@ -90,15 +92,10 @@ var vm = new Vue({
       }).done(res => {
       }).done(res => {
         if (res.error_code == 0) {
         if (res.error_code == 0) {
           this.points = res.data
           this.points = res.data
-          if (res.data.provin === -1 && res.data.total == 0) {
+          if (res.data.provin === -1 && res.data.usage == res.data.total) { // 用户订阅全国且机会用完
             this.contracted = true
             this.contracted = true
-            this.$dialog.alert({
-              message: '每订购1个省,可查看50个企业画像/月。 您订购全国的企业画像查看权限已用完,如需更多权益,请联系客服。',
-              className: 'pro-log',
-              messageAlign: 'left',
-              confirmButtonColor: '#2ABED1',
-              confirmButtonText: '我知道了'
-            })
+          } else {
+            this.contracted = false
           }
           }
         }
         }
       })
       })
@@ -161,7 +158,16 @@ var vm = new Vue({
     },
     },
     helpTiped() {
     helpTiped() {
       let _this = this
       let _this = this
-      if (_this.points.provin === -1&&_this.points.usage !== _this.points.total) {
+      if (_this.points.provin === -1 && _this.points.usage == _this.points.total) { // 用户订阅全国且机会用完
+        this.contracted = true
+        this.$dialog.alert({
+          message: '每订购1个省,可查看50个企业画像/月。您当前订阅全国,查看机会已经消耗完毕。如需更多权益,请联系客服。',
+          className: 'pro-log',
+          messageAlign: 'left',
+          confirmButtonColor: '#2ABED1',
+          confirmButtonText: '我知道了'
+        })
+      } else if (_this.points.usage !== _this.points.total) { // 订阅全国和非订阅全国的次数未用完时
         this.$dialog.alert({
         this.$dialog.alert({
           message: '每订购1个省,可查看50个企业画像/月。',
           message: '每订购1个省,可查看50个企业画像/月。',
           className: 'pro-log',
           className: 'pro-log',
@@ -169,10 +175,8 @@ var vm = new Vue({
           confirmButtonColor: '#2ABED1',
           confirmButtonColor: '#2ABED1',
           confirmButtonText: '我知道了',
           confirmButtonText: '我知道了',
           closeOnClickOverlay: true
           closeOnClickOverlay: true
-        }).then(() => {
-          // location.href = '/jyapp/vipsubscribe/toSubVipSetPage'
         })
         })
-      } else {
+      } else if (_this.points.provin !== -1) { // 用户未订阅全国
         this.$dialog.alert({
         this.$dialog.alert({
           message: '每订购1个省,可查看50个企业画像/月。 您当前订阅了' + `<span style="color:#2ABED1">${_this.points.provin}</span>` + '个省,如需更多权益,请订购更多省份。',
           message: '每订购1个省,可查看50个企业画像/月。 您当前订阅了' + `<span style="color:#2ABED1">${_this.points.provin}</span>` + '个省,如需更多权益,请订购更多省份。',
           className: 'pro-log',
           className: 'pro-log',
@@ -207,7 +211,7 @@ var vm = new Vue({
         location.href = '/jyapp/big/page/ent_portrait?eId=' + ids + '&svip=1'
         location.href = '/jyapp/big/page/ent_portrait?eId=' + ids + '&svip=1'
     },
     },
     contractPerson() {
     contractPerson() {
-      location.href = '/jyapp/free/customer'
+      location.href = '/jyapp/jylab/mainSearch'
     },
     },
     setBook() {
     setBook() {
       location.href = '/jyapp/vipsubscribe/toSubVipSetPage'
       location.href = '/jyapp/vipsubscribe/toSubVipSetPage'

+ 3 - 4
src/web/staticres/frontRouter/pc/seeHistory/js/index-pc.js

@@ -90,8 +90,8 @@ var vm = new Vue({
                     if (res.data.total) {
                     if (res.data.total) {
                         this.seeList.total = res.data.total
                         this.seeList.total = res.data.total
                     }
                     }
-                    res.data.list.forEach(v => {
-                        const arrs = {
+                    this.seeList.list = this.seeList.list.concat(res.data.list.map(function (v) {
+                        return {
                             name: v.company_name,
                             name: v.company_name,
                             abbr1: getShortName(v.company_name).substring(0,2),
                             abbr1: getShortName(v.company_name).substring(0,2),
                             abbr2: getShortName(v.company_name).substring(2,4),
                             abbr2: getShortName(v.company_name).substring(2,4),
@@ -106,8 +106,7 @@ var vm = new Vue({
                             statusWord: v.company_status,
                             statusWord: v.company_status,
                             checked: false
                             checked: false
                         }
                         }
-                        this.seeList.list.push(arrs)
-                    })
+                    }))
                 }
                 }
             })
             })
         },
         },

+ 1 - 1
src/web/staticres/vipsubscribe/js/vip_renew.js

@@ -341,7 +341,7 @@ var renew = {
               }
               }
               sizeTime = size.period
               sizeTime = size.period
             } else {
             } else {
-              sizeTime = '1个月'
+              sizeTime = '1'
             }
             }
             console.log(upgrade,sizeTime, '新or老')
             console.log(upgrade,sizeTime, '新or老')
             //支付请求
             //支付请求

+ 2 - 1
src/web/templates/frontRouter/wx/portraitRecord/sess/index.html

@@ -41,7 +41,7 @@
               <van-button round type="primary" v-else @click="setBook">订阅设置</van-button>
               <van-button round type="primary" v-else @click="setBook">订阅设置</van-button>
             </div>
             </div>
           </div>
           </div>
-          <div class="p1-date">
+          <div class="p1-date" style="background: #F5F6F7;">
             <div class="d-box flex">
             <div class="d-box flex">
               使用记录
               使用记录
               <van-field v-model="dValue" @click="usedHised" placeholder="显示图标" right-icon="play" readonly/>
               <van-field v-model="dValue" @click="usedHised" placeholder="显示图标" right-icon="play" readonly/>
@@ -57,6 +57,7 @@
               type="year-month"
               type="year-month"
               title="选择日期"
               title="选择日期"
               :formatter="formatter11"
               :formatter="formatter11"
+              :min-date="minDate"
               :max-date="maxTime"
               :max-date="maxTime"
               @confirm="confirmed"
               @confirm="confirmed"
               @cancel="canceled"
               @cancel="canceled"

+ 8 - 4
src/web/templates/pc/supsearch.html

@@ -1424,6 +1424,11 @@ $(function(){
   $(document).click(function() {
   $(document).click(function() {
     $('.custom-select').css("border-color", '#e0e0e0').children('.icon-arrow').removeClass('up')
     $('.custom-select').css("border-color", '#e0e0e0').children('.icon-arrow').removeClass('up')
     $('.custom-select').siblings().hide()
     $('.custom-select').siblings().hide()
+
+    // 隐藏标签添加弹框
+    if (!$('.tags-box').is(':hidden')){
+      $('.tags-box').hide()
+    }
   })
   })
   // 全选
   // 全选
   $('.custom-checkbox.check-all').on('change', function() {
   $('.custom-checkbox.check-all').on('change', function() {
@@ -1519,9 +1524,8 @@ $(function(){
     var hasVipIcon = $(this).siblings().hasClass('icon-vip'); // 有无点击付费的搜索范围
     var hasVipIcon = $(this).siblings().hasClass('icon-vip'); // 有无点击付费的搜索范围
     // 如果是老用户(版本更新前注册的用户)可以使用中标企业搜索范围
     // 如果是老用户(版本更新前注册的用户)可以使用中标企业搜索范围
     // 不是付费用户引导去付费
     // 不是付费用户引导去付费
-    console.log($(this).text() === '中标企业',isOld)
     if (!vipState && hasVipIcon) {
     if (!vipState && hasVipIcon) {
-      if($(this).text() == '中标企业' && isOld) {
+      if($(this).text().indexOf('中标企业')> -1 && isOld) {
         var typeArr = selectType ? selectType.split(',') : []
         var typeArr = selectType ? selectType.split(',') : []
         var isChecked = $(this).hasClass('checkbox-checked')
         var isChecked = $(this).hasClass('checkbox-checked')
         if(isChecked) {
         if(isChecked) {
@@ -1538,9 +1542,9 @@ $(function(){
           selectType = typeArr.toString()
           selectType = typeArr.toString()
           beforeSubmit();
           beforeSubmit();
         }
         }
-        return true
+      } else{
+        openVipDialog('搜索范围')
       }
       }
-      openVipDialog('搜索范围')
       return
       return
     }
     }