|
@@ -387,7 +387,7 @@ var vNode = {
|
|
getEntGroupList () {
|
|
getEntGroupList () {
|
|
var _this = this
|
|
var _this = this
|
|
$.ajax({
|
|
$.ajax({
|
|
- url: '/bigmember/follow/ent/labelGroupList',
|
|
|
|
|
|
+ url: '/bigmember/follow/ent/labelGroup',
|
|
type: 'POST',
|
|
type: 'POST',
|
|
data: {
|
|
data: {
|
|
type: 'get'
|
|
type: 'get'
|
|
@@ -396,8 +396,8 @@ var vNode = {
|
|
if (res.error_code === 0) {
|
|
if (res.error_code === 0) {
|
|
_this.groupingList = res.data || []
|
|
_this.groupingList = res.data || []
|
|
_this.showGroupingDialog = true
|
|
_this.showGroupingDialog = true
|
|
- if(!this.entInfo.follow) {
|
|
|
|
- this.$refs.portrayalGrouping.setState(['默认分组'])
|
|
|
|
|
|
+ if(!_this.entInfo.follow) {
|
|
|
|
+ _this.$refs.portrayalGrouping.setState(['默认分组'])
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
if(!res?.data?.status) {
|
|
if(!res?.data?.status) {
|
|
@@ -866,19 +866,21 @@ var vNode = {
|
|
},
|
|
},
|
|
changeGroupState: function (type) {
|
|
changeGroupState: function (type) {
|
|
console.log(type);
|
|
console.log(type);
|
|
-
|
|
|
|
- this.setGroupState = type
|
|
|
|
- this.showGroupingDialog = true
|
|
|
|
- const followedGroup = this.entInfo.followedGroup
|
|
|
|
- let groupList = []
|
|
|
|
- const isManyGroup = followedGroup.includes(',')
|
|
|
|
- groupList = isManyGroup ? followedGroup.split(',') : [followedGroup]
|
|
|
|
- if(!groupList.includes('默认分组')) {
|
|
|
|
- this.$refs.portrayalGrouping.setState(groupList)
|
|
|
|
- }
|
|
|
|
|
|
+ this.getEntGroupList()
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
+ this.setGroupState = type
|
|
|
|
+ this.showGroupingDialog = true
|
|
|
|
+ const followedGroup = this.entInfo.followedGroup
|
|
|
|
+ let groupList = []
|
|
|
|
+ const isManyGroup = followedGroup.includes(',')
|
|
|
|
+ groupList = isManyGroup ? followedGroup.split(',') : [followedGroup]
|
|
|
|
+ if(!groupList.includes('默认分组')) {
|
|
|
|
+ this.$refs.portrayalGrouping.setState(groupList)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
},
|
|
},
|
|
// 查询企业是否存在和企业关注状态
|
|
// 查询企业是否存在和企业关注状态
|
|
- getEntFollowState: function () {
|
|
|
|
|
|
+ getEntFollowState: function (callback) {
|
|
var _this = this
|
|
var _this = this
|
|
_this.entInfo.followSearchFinish = false
|
|
_this.entInfo.followSearchFinish = false
|
|
$.ajax({
|
|
$.ajax({
|
|
@@ -895,6 +897,7 @@ var vNode = {
|
|
_this.entInfo.entExist = !!res.data.isShow
|
|
_this.entInfo.entExist = !!res.data.isShow
|
|
_this.entInfo.followedGroup = res.data.followedGroup
|
|
_this.entInfo.followedGroup = res.data.followedGroup
|
|
_this.entInfo.info = res.data.info
|
|
_this.entInfo.info = res.data.info
|
|
|
|
+ callback && callback(res.data)
|
|
} else {
|
|
} else {
|
|
_this.entInfo.entExist = false
|
|
_this.entInfo.entExist = false
|
|
}
|
|
}
|
|
@@ -909,9 +912,9 @@ var vNode = {
|
|
},
|
|
},
|
|
changeFollowState: function (state) {
|
|
changeFollowState: function (state) {
|
|
var _this = this
|
|
var _this = this
|
|
- if (this.entInfo.follow) {
|
|
|
|
|
|
+ if (_this.entInfo.follow) {
|
|
if(!state) {
|
|
if(!state) {
|
|
- this.$dialog.confirm({
|
|
|
|
|
|
+ _this.$dialog.confirm({
|
|
title: '提示信息',
|
|
title: '提示信息',
|
|
message: '取消对“' + _this.entInfo.name + '”的关注?',
|
|
message: '取消对“' + _this.entInfo.name + '”的关注?',
|
|
confirmButtonColor: '#2cb7ca'
|
|
confirmButtonColor: '#2cb7ca'
|
|
@@ -926,7 +929,49 @@ var vNode = {
|
|
}
|
|
}
|
|
|
|
|
|
} else {
|
|
} else {
|
|
- this.getEntGroupList()
|
|
|
|
|
|
+ this.getEntFollowState((res) => {
|
|
|
|
+ const { surplus, used } = res.info
|
|
|
|
+ const monitorEntNum = surplus + used // 可监控企业总数
|
|
|
|
+ let limit = this.powerInfo.memberStatus > 0 || this.powerInfo.entniche
|
|
|
|
+ // 1.超出可监控企业数量
|
|
|
|
+ if (used <= 0) {
|
|
|
|
+ // 大会员或商机管理用户
|
|
|
|
+ if (limit) {
|
|
|
|
+ this.$dialog({
|
|
|
|
+ width: 303,
|
|
|
|
+ className: 'monitor-dialog',
|
|
|
|
+ title: '监控企业个数已达上限',
|
|
|
|
+ message: '您最多可监控'+monitorEntNum+'个企业,可联系客服,申请监控更多企业',
|
|
|
|
+ messageAlign:'center',
|
|
|
|
+ confirmButtonText: '联系客服',
|
|
|
|
+ confirmButtonColor: '#2ABED1',
|
|
|
|
+ showConfirmButton: true,
|
|
|
|
+ showCancelButton: true,
|
|
|
|
+ cancelButtonText: '返回',
|
|
|
|
+ // cancelButtonColor: '#5F5E64'
|
|
|
|
+ }).then(() =>{
|
|
|
|
+ if(utils.$envs.inWX){
|
|
|
|
+ window.location.href = '/big/wx/page/customer'
|
|
|
|
+ } else{
|
|
|
|
+ window.location.href = '/jyapp/free/customer'
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ // 非大会员非商机管理用户,进入留资页面
|
|
|
|
+ let href_
|
|
|
|
+ if(utils.$envs.inWX){
|
|
|
|
+ href_ = '/weixin/frontPage/bigmember/free/perfect_info?source=' + this.sourceLimitMap.wx
|
|
|
|
+ }else if(utils.$envs.inApp){
|
|
|
|
+ href_ = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + this.sourceLimitMap.app
|
|
|
|
+ }else if(utils.$envs.inH5){
|
|
|
|
+ href_ = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + + this.sourceLimitMap.h5
|
|
|
|
+ }
|
|
|
|
+ window.location.href = href_
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.getEntGroupList()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
// this.changeFollowStateRequest()
|
|
// this.changeFollowStateRequest()
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -1091,7 +1136,25 @@ var vNode = {
|
|
if (res.data === 'success' || res.data.status) {
|
|
if (res.data === 'success' || res.data.status) {
|
|
_this.entInfo.follow = !_this.entInfo.follow
|
|
_this.entInfo.follow = !_this.entInfo.follow
|
|
_this.getEntFollowState()
|
|
_this.getEntFollowState()
|
|
- _this.no_monitor(res.data)
|
|
|
|
|
|
+ if(utils.$envs.inApp && JyObj.checkNoticePermission()!=1 && res.data.status){
|
|
|
|
+ this.$dialog({
|
|
|
|
+ width: 303,
|
|
|
|
+ className: 'monitor-dialog',
|
|
|
|
+ title: '监控成功',
|
|
|
|
+ message: '您可前往“工作台-商机-企业情报监控”查看企业最新动态。为保证您能及时获取新增监控信息推送,请前往开启推送提醒。',
|
|
|
|
+ messageAlign:'center',
|
|
|
|
+ confirmButtonText: '去开启',
|
|
|
|
+ confirmButtonColor: '#2ABED1',
|
|
|
|
+ showConfirmButton: true,
|
|
|
|
+ showCancelButton: true,
|
|
|
|
+ cancelButtonText: '暂不开启',
|
|
|
|
+ // cancelButtonColor: '#5F5E64'
|
|
|
|
+ }).then(() =>{
|
|
|
|
+ // 展开监控菜单 active:4
|
|
|
|
+ window.location.href = location.origin + '/jy_mobile/push/pushsetting?active=4'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
return _this.showToast(res.error_msg || '监控失败')
|
|
return _this.showToast(res.error_msg || '监控失败')
|
|
}
|
|
}
|
|
@@ -1110,92 +1173,38 @@ var vNode = {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- no_monitor (data){
|
|
|
|
- if(utils.$envs.inApp && JyObj.checkNoticePermission()!=1 && data.status){
|
|
|
|
- this.$dialog({
|
|
|
|
- width: 303,
|
|
|
|
- className: 'monitor-dialog',
|
|
|
|
- title: '监控成功',
|
|
|
|
- message: '您可前往“工作台-商机-企业情报监控”查看企业最新动态。为保证您能及时获取新增监控信息推送,请前往开启推送提醒。',
|
|
|
|
- messageAlign:'center',
|
|
|
|
- confirmButtonText: '去开启',
|
|
|
|
- confirmButtonColor: '#2ABED1',
|
|
|
|
- showConfirmButton: true,
|
|
|
|
- showCancelButton: true,
|
|
|
|
- cancelButtonText: '暂不开启',
|
|
|
|
- // cancelButtonColor: '#5F5E64'
|
|
|
|
- }).then(() =>{
|
|
|
|
- // 展开监控菜单 active:4
|
|
|
|
- window.location.href = location.origin + '/jy_mobile/push/pushsetting?active=4'
|
|
|
|
- })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- if(!this.powerInfo.isFree && !data.msg_open && data.status){
|
|
|
|
|
|
+ lookMore (){
|
|
|
|
+ if(this.powerInfo.memberStatus > 0 || this.powerInfo.entniche){
|
|
this.$dialog({
|
|
this.$dialog({
|
|
width: 303,
|
|
width: 303,
|
|
className: 'monitor-dialog',
|
|
className: 'monitor-dialog',
|
|
- title: '监控成功',
|
|
|
|
- message: '您可前往“工作台-商机-业主监控”查看业主最新招标动态。为保证您能及时获取新增监控信息推送,请前往开启推送提醒。',
|
|
|
|
- messageAlign:'center',
|
|
|
|
- confirmButtonText: '去开启',
|
|
|
|
- confirmButtonColor: '#2ABED1',
|
|
|
|
- showConfirmButton: true,
|
|
|
|
- showCancelButton: true,
|
|
|
|
- cancelButtonText: '暂不开启',
|
|
|
|
- // cancelButtonColor: '#5F5E64'
|
|
|
|
- }).then(() =>{
|
|
|
|
- // 展开监控菜单 active:4
|
|
|
|
- window.location.href = location.origin + '/jy_mobile/push/pushsetting?active=4'
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- } else if(!this.powerInfo.isFree && data.msg_open && data.status){
|
|
|
|
- this.$toast({
|
|
|
|
- duration: 2000,
|
|
|
|
- message: '监控成功,您可前往“工作台-商机-企业情报监控”查看'
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
- }else if(!this.powerInfo.isFree && data.limit_status === 1){
|
|
|
|
- let href_
|
|
|
|
- if(utils.$envs.inWX){
|
|
|
|
- href_ = '/weixin/frontPage/bigmember/free/perfect_info?source=' + this.sourceLimitMap.wx
|
|
|
|
- }else if(utils.$envs.inApp){
|
|
|
|
- href_ = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + this.sourceLimitMap.app
|
|
|
|
- }else if(utils.$envs.inH5){
|
|
|
|
- href_ = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + + this.sourceLimitMap.h5
|
|
|
|
- }
|
|
|
|
- window.location.href = href_
|
|
|
|
- } else if(!this.powerInfo.isFree && data.limit_status === 2){
|
|
|
|
- this.$dialog({
|
|
|
|
- width: 303,
|
|
|
|
- className: 'monitor-dialog',
|
|
|
|
- title: '监控企业个数已达上限',
|
|
|
|
- message: '您最多可监控'+data.limit_count+'个企业,可联系客服,申请监控更多企业',
|
|
|
|
|
|
+ title: `申请监控更多企业`,
|
|
|
|
+ message: `您可联系客服,申请升级产品套餐,监控更多企业`,
|
|
messageAlign:'center',
|
|
messageAlign:'center',
|
|
confirmButtonText: '联系客服',
|
|
confirmButtonText: '联系客服',
|
|
confirmButtonColor: '#2ABED1',
|
|
confirmButtonColor: '#2ABED1',
|
|
showConfirmButton: true,
|
|
showConfirmButton: true,
|
|
showCancelButton: true,
|
|
showCancelButton: true,
|
|
- cancelButtonText: '返回',
|
|
|
|
- // cancelButtonColor: '#5F5E64'
|
|
|
|
|
|
+ cancelButtonText: '我再想想',
|
|
|
|
+ // cancelButtonColor: '#2ABED1'
|
|
}).then(() =>{
|
|
}).then(() =>{
|
|
if(utils.$envs.inWX){
|
|
if(utils.$envs.inWX){
|
|
- window.location.href = '/big/wx/page/customer'
|
|
|
|
- } else{
|
|
|
|
- window.location.href = '/jyapp/free/customer'
|
|
|
|
- }
|
|
|
|
|
|
+ window.location.href = '/big/wx/page/customer'
|
|
|
|
+ } else{
|
|
|
|
+ window.location.href = '/jyapp/free/customer'
|
|
|
|
+ }
|
|
})
|
|
})
|
|
- }else if(this.powerInfo.isFree){
|
|
|
|
|
|
+ }else{
|
|
let href_
|
|
let href_
|
|
if(utils.$envs.inWX){
|
|
if(utils.$envs.inWX){
|
|
- href_ = '/weixin/frontPage/bigmember/free/perfect_info?source=' + this.sourceLimitMap.wx
|
|
|
|
|
|
+ href_ = '/weixin/frontPage/bigmember/free/perfect_info?source=' + this.sourceMap.wx
|
|
}else if(utils.$envs.inApp){
|
|
}else if(utils.$envs.inApp){
|
|
- href_ = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + this.sourceLimitMap.app
|
|
|
|
|
|
+ href_ = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + this.sourceMap.app
|
|
}else if(utils.$envs.inH5){
|
|
}else if(utils.$envs.inH5){
|
|
- href_ = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + this.sourceLimitMap.h5
|
|
|
|
|
|
+ href_ = '/jyapp/frontPage/bigmember/free/perfect_info?source=' + this.sourceMap.h5
|
|
}
|
|
}
|
|
window.location.href = href_
|
|
window.location.href = href_
|
|
}
|
|
}
|
|
-
|
|
|
|
},
|
|
},
|
|
// 赚剑鱼币任务完成提示
|
|
// 赚剑鱼币任务完成提示
|
|
pointsTaskSuccessTip: function() {
|
|
pointsTaskSuccessTip: function() {
|