|
@@ -141,7 +141,11 @@ var vNode = {
|
|
|
isSC: 0, //0未收藏 1收藏
|
|
|
idx: [],
|
|
|
list: [],
|
|
|
- entParams: {}
|
|
|
+ entParams: {},
|
|
|
+ // 用户是否登录
|
|
|
+ isLogin: false,
|
|
|
+ // 是否是免费用户
|
|
|
+ isFree: false
|
|
|
}
|
|
|
},
|
|
|
created: function () {
|
|
@@ -158,6 +162,8 @@ var vNode = {
|
|
|
this.entInfo.id = eId
|
|
|
this.entInfo.name = ''
|
|
|
this.restore = this.reStoreState()
|
|
|
+ // 判断用户是否登录
|
|
|
+ this.getUserSimpleInfo()
|
|
|
this.getPowerInfo()
|
|
|
if (!this.restore) {
|
|
|
// 获取企业基本信息
|
|
@@ -660,7 +666,7 @@ var vNode = {
|
|
|
getEntBaseInfo: function () {
|
|
|
var _this = this
|
|
|
let urls = ''
|
|
|
- if (_this.powerInfo.memberStatus <= 0 || _this.svip) {
|
|
|
+ if (_this.powerInfo.memberStatus <= 0 || _this.svip || _this.isFree || !_this.isLogin) {
|
|
|
urls = '/bigmember/portrait/subVipPortrait/entDetail'
|
|
|
} else {
|
|
|
urls = '/bigmember/portrait/ent/detail'
|
|
@@ -724,6 +730,10 @@ var vNode = {
|
|
|
},
|
|
|
changeFollowState: function () {
|
|
|
var _this = this
|
|
|
+ if(!this.isLogin) {
|
|
|
+ window.location.href = "/jyapp/free/login?to=back";
|
|
|
+ return
|
|
|
+ }
|
|
|
if (this.entInfo.follow) {
|
|
|
this.$dialog.confirm({
|
|
|
title: '提示信息',
|
|
@@ -799,7 +809,7 @@ var vNode = {
|
|
|
}
|
|
|
}
|
|
|
_this.conf.isMember = res.data.memberStatus
|
|
|
- _this.conf.arr = res.data.power
|
|
|
+ _this.conf.arr = res.data.power || []
|
|
|
_this.conf.vipStatus = res.data.vipStatus
|
|
|
// 新版超级订阅用户获取访问量
|
|
|
if (res.data.viper && (_this.conf.isMember <= 0 || res.data.power.indexOf(4) == -1)) {
|
|
@@ -811,6 +821,7 @@ var vNode = {
|
|
|
}
|
|
|
//免费用户体验权限
|
|
|
if (res.data.isFree) {
|
|
|
+ _this.isFree = true
|
|
|
if (res.data.freeEntPort == 0) {
|
|
|
_this.canFreeExp = true
|
|
|
} else {
|
|
@@ -848,6 +859,21 @@ var vNode = {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 判断当前用户是登录
|
|
|
+ getUserSimpleInfo() {
|
|
|
+ const _this = this
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: '/jypay/user/getSimpleData',
|
|
|
+ success: function (res) {
|
|
|
+ if(res && res.userId) {
|
|
|
+ _this.isLogin = true
|
|
|
+ }
|
|
|
+ },error:function (e) {
|
|
|
+ _this.isLogin = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 修改企业关注状态
|
|
|
changeFollowStateRequest: function () {
|
|
|
var _this = this
|