Browse Source

Merge branch 'feature/v4.7.55' of ssh://192.168.3.207:10022/qmx/jy into feature/v4.7.55

wangchuanjin 2 năm trước cách đây
mục cha
commit
6774b13f60

+ 20 - 0
src/jfw/modules/app/src/web/staticres/jyapp/vipsubscribe/js/vip_index_new.js

@@ -187,6 +187,8 @@ var subNode = new Vue({
               _this.arrowShow = true
               sessionStorage.setItem('switch-product', 'supervip')
               $('.update_renew').show()
+              // 获取企业信息--用于判断是否是企业分配的超级订阅
+              _this.getEntInfo()
               $('.super-title').show();
               _this.subInfoAjax = '/subscribepay/vipsubscribe/getSubBuyMsg?t=' + new Date().getTime()
             } else {
@@ -215,6 +217,24 @@ var subNode = new Vue({
         }
       })
     },
+    // 获取当前账户所属的企业信息
+    getEntInfo: function () {
+      var _this = this
+      $.ajax({
+        url: '/entbase/ent/entinfo?t=' + Date.now(),
+        type: 'POST',
+        async: false,
+        success: function (res) {
+          if (res) {
+            const data =  res.data || {}
+            // 企业分配的超级订阅不展示“续费”、“升级”入口
+            if(data.vip_power === 1){
+              $('.update_renew').hide()
+            }
+          }
+        }
+      })
+    },
     // 点击广告跳转超级订阅落地页
     toPaySupSub: function () {
       if (this.vSwitch === 'f') {

+ 18 - 1
src/web/staticres/common-module/portraitRecord/js/index-wx.js

@@ -341,7 +341,24 @@ var vm = new Vue({
     },
     setBook() {
       if(this.ptype == 1) {
-        this.usedDialog()
+        const _this = this
+        // 当前用户企业信息接口
+        $.ajax({
+          url: '/entbase/ent/entinfo?t=' + Date.now(),
+          type: 'POST',
+          async: false,
+          success: function (res) {
+            if (res) {
+              const data =  res.data || {}
+              // 企业分配的超级订阅,直接进入充值采购单位画像包页面,不再提示选择充值方式。
+              if(data.vip_power === 1){
+                location.href = '/jy_mobile/common/order/create/buyerpack?type=1'
+              } else{
+                _this.usedDialog()
+              }
+            }
+          }
+        })
       } else {
         // location.href = '/front/vipsubscribe/upgradePage'
         location.href = '/jy_mobile/common/order/create/svip?type=upgrade'

+ 18 - 1
src/web/staticres/common-module/portraitRecord/js/index.js

@@ -342,7 +342,24 @@ var vm = new Vue({
     },
     setBook () {
       if (this.ptype == 1) {
-        this.usedDialog()
+        const _this = this
+        // 当前用户企业信息接口
+        $.ajax({
+          url: '/entbase/ent/entinfo?t=' + Date.now(),
+          type: 'POST',
+          async: false,
+          success: function (res) {
+            if (res) {
+              const data =  res.data || {}
+              // 企业分配的超级订阅,直接进入充值采购单位画像包页面,不再提示选择充值方式。
+              if(data.vip_power === 1){
+                location.href = '/jy_mobile/common/order/create/buyerpack?type=1'
+              } else{
+                _this.usedDialog()
+              }
+            }
+          }
+        })
       } else {
         //跳转清除旧套餐缓存,防止计算价格出错
         sessionStorage.removeItem('vipSub_oldBuySet')

+ 20 - 1
src/web/staticres/vipsubscribe/js/vip_index_new.js

@@ -48,7 +48,6 @@ var subNode = new Vue({
             type: 'POST',
             async: false,
             success: function (res) {
-              console.log(res)
               if (res) {
                 _this.infoRoot = res.data
                 // 多个身份才显示切换按钮
@@ -141,6 +140,8 @@ var subNode = new Vue({
                           getDataWitXHR(sum)
                         }
                       })
+                      // 获取用户企业信息
+                      _this.getEntInfo()
                       // try {
                       //   window.getDataWitXHR()
                       // } catch (error) {
@@ -210,6 +211,24 @@ var subNode = new Vue({
                   }
                 }
             })
+        },
+        // 获取当前账户所属的企业信息
+        getEntInfo: function () {
+          var _this = this
+          $.ajax({
+            url: '/entbase/ent/entinfo?t=' + Date.now(),
+            type: 'POST',
+            async: false,
+            success: function (res) {
+              if (res) {
+                const data =  res.data || {}
+                // 企业分配的超级订阅不展示“续费”、“升级”入口
+                if(data.vip_power === 1){
+                  $('.update_renew').hide()
+                }
+              }
+            }
+          })
         }
     }
 })