Răsfoiți Sursa

提交代码

xgwangman 4 ani în urmă
părinte
comite
a827fdf8d8

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

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

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

@@ -48,6 +48,7 @@ var vm = new Vue({
       dValue: '',
       pShow: false,
       curDate: '',
+      minDate: '',
       maxTime: '',
       points: [],
       years: '',
@@ -71,6 +72,7 @@ var vm = new Vue({
       this.months = parseInt(new Date().getMonth() + 1)
       this.dValue = this.years + '年' + this.months + '月'
       this.curDate = new Date()
+      this.minDate = new Date(2021, 0)
       this.maxTime = new Date(this.years, this.months - 1)
       this.subPoint()
       this.onLoad()
@@ -90,15 +92,10 @@ var vm = new Vue({
       }).done(res => {
         if (res.error_code == 0) {
           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.$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() {
       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({
           message: '每订购1个省,可查看50个企业画像/月。',
           className: 'pro-log',
@@ -169,10 +175,8 @@ var vm = new Vue({
           confirmButtonColor: '#2ABED1',
           confirmButtonText: '我知道了',
           closeOnClickOverlay: true
-        }).then(() => {
-          // location.href = '/jyapp/vipsubscribe/toSubVipSetPage'
         })
-      } else {
+      } else if (_this.points.provin !== -1) { // 用户未订阅全国
         this.$dialog.alert({
           message: '每订购1个省,可查看50个企业画像/月。 您当前订阅了' + `<span style="color:#2ABED1">${_this.points.provin}</span>` + '个省,如需更多权益,请订购更多省份。',
           className: 'pro-log',
@@ -207,7 +211,7 @@ var vm = new Vue({
         location.href = '/weixin/frontPage/collection/sess/ent_portrait?eId=' + ids + '&svip=1'
     },
     contractPerson() {
-      location.href = '/big/wx/page/customer'
+      location.href = '400-108-6670'
     },
     setBook() {
       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: '',
       pShow: false,
       curDate: '',
+      minDate: '',
       maxTime: '',
       points: [],
       years: '',
@@ -71,6 +72,7 @@ var vm = new Vue({
       this.months = parseInt(new Date().getMonth() + 1)
       this.dValue = this.years + '年' + this.months + '月'
       this.curDate = new Date()
+      this.minDate = new Date(2021, 0)
       this.maxTime = new Date(this.years, this.months - 1)
       this.subPoint()
       this.onLoad()
@@ -90,15 +92,10 @@ var vm = new Vue({
       }).done(res => {
         if (res.error_code == 0) {
           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.$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() {
       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({
           message: '每订购1个省,可查看50个企业画像/月。',
           className: 'pro-log',
@@ -169,10 +175,8 @@ var vm = new Vue({
           confirmButtonColor: '#2ABED1',
           confirmButtonText: '我知道了',
           closeOnClickOverlay: true
-        }).then(() => {
-          // location.href = '/jyapp/vipsubscribe/toSubVipSetPage'
         })
-      } else {
+      } else if (_this.points.provin !== -1) { // 用户未订阅全国
         this.$dialog.alert({
           message: '每订购1个省,可查看50个企业画像/月。 您当前订阅了' + `<span style="color:#2ABED1">${_this.points.provin}</span>` + '个省,如需更多权益,请订购更多省份。',
           className: 'pro-log',
@@ -207,7 +211,7 @@ var vm = new Vue({
         location.href = '/jyapp/big/page/ent_portrait?eId=' + ids + '&svip=1'
     },
     contractPerson() {
-      location.href = '/jyapp/free/customer'
+      location.href = '/jyapp/jylab/mainSearch'
     },
     setBook() {
       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) {
                         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,
                             abbr1: getShortName(v.company_name).substring(0,2),
                             abbr2: getShortName(v.company_name).substring(2,4),
@@ -106,8 +106,7 @@ var vm = new Vue({
                             statusWord: v.company_status,
                             checked: false
                         }
-                        this.seeList.list.push(arrs)
-                    })
+                    }))
                 }
             })
         },

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