|
@@ -4,12 +4,6 @@ var vNode = {
|
|
|
data: {
|
|
|
sessStorageKey: '$data-ent_follow',
|
|
|
searchEntName: '',
|
|
|
- conf: {
|
|
|
- // 我关注的企业最大个数
|
|
|
- maxLength: 500,
|
|
|
- showAllInfo: true,
|
|
|
- powerLoaded: false
|
|
|
- },
|
|
|
listInfo: {
|
|
|
// 首次请求是否完成
|
|
|
firstLoaded: false,
|
|
@@ -24,10 +18,7 @@ var vNode = {
|
|
|
entFollowList: []
|
|
|
},
|
|
|
created: function () {
|
|
|
- var recover = this.recover()
|
|
|
- if (!recover) {
|
|
|
- this.getPowerInfo()
|
|
|
- }
|
|
|
+ this.recover()
|
|
|
},
|
|
|
mounted: function () {
|
|
|
$(this.$refs.jList).scrollTop(this.listInfo.scrollTop)
|
|
@@ -49,27 +40,6 @@ var vNode = {
|
|
|
}
|
|
|
return !!$data
|
|
|
},
|
|
|
- // 获取权限信息
|
|
|
- getPowerInfo: function () {
|
|
|
- var _this = this
|
|
|
- $.ajax({
|
|
|
- type: 'GET',
|
|
|
- url: '/bigmember/use/isAdd',
|
|
|
- success: function (res) {
|
|
|
- if (res.error_code == 0) {
|
|
|
- _this.conf.powerLoaded = true
|
|
|
- // if (res.data && res.data.memberStatus > 0) {
|
|
|
- // _this.conf.showAllInfo = true
|
|
|
- // }
|
|
|
- } else {
|
|
|
- _this.$toast(res.error_msg)
|
|
|
- }
|
|
|
- },
|
|
|
- error: function (error) {
|
|
|
- console.log(error)
|
|
|
- }
|
|
|
- })
|
|
|
- },
|
|
|
// 搜索联想
|
|
|
searchEnt: utils.debounce(function () {
|
|
|
var _this = this
|
|
@@ -89,14 +59,6 @@ var vNode = {
|
|
|
if (res.error_code == 0) {
|
|
|
if (res.data) {
|
|
|
_this.entList = res.data
|
|
|
- // for (var index in res.data) {
|
|
|
- // var item = res.data[index]
|
|
|
- // _this.entList.push({
|
|
|
- // entId: item.entId,
|
|
|
- // entName: item.entName,
|
|
|
- // follow: !!item.isFollow
|
|
|
- // })
|
|
|
- // }
|
|
|
}
|
|
|
} else {
|
|
|
_this.$toast(res.error_msg)
|
|
@@ -135,9 +97,6 @@ var vNode = {
|
|
|
|
|
|
// 加载状态结束
|
|
|
_this.listInfo.loading = false
|
|
|
- // if (res.data.followMax) {
|
|
|
- // _this.conf.maxLength = res.data.followMax
|
|
|
- // }
|
|
|
|
|
|
// 列表赋值
|
|
|
_this.entFollowList = _this.entFollowList.concat(res)
|
|
@@ -177,7 +136,7 @@ var vNode = {
|
|
|
this.listInfo.scrollTop = $(this.$refs.jList).scrollTop()
|
|
|
sessionStorage.setItem(this.sessStorageKey, JSON.stringify(this.$data))
|
|
|
}
|
|
|
- location.href = './ent_portrait?eId=' + encodeURIComponent(item.entId)
|
|
|
+ location.href = '/jyapp/big/page/ent_portrait?eId=' + encodeURIComponent(item.entId) + '&svip=1'
|
|
|
|
|
|
},
|
|
|
formatArea: function (item) {
|
|
@@ -196,18 +155,8 @@ var vNode = {
|
|
|
},
|
|
|
toEntDetail: function (item) {
|
|
|
sessionStorage.setItem(this.sessStorageKey, JSON.stringify(this.$data))
|
|
|
- location.href = './ent_portrait?eId=' + encodeURIComponent(item.entId)
|
|
|
+ location.href = '/jyapp/big/page/ent_portrait?eId=' + encodeURIComponent(item.entId) + '&svip=1'
|
|
|
},
|
|
|
- // 调整列表底部到按钮距离
|
|
|
- // adjustAddButtonPadding: function () {
|
|
|
- // var refs = this.$refs
|
|
|
- // var keyListUl = $(refs.jList).find('.follow-list')
|
|
|
- // if (this.entFollowList.length < this.conf.maxLength) {
|
|
|
- // keyListUl.css({
|
|
|
- // 'padding-bottom': '2.2rem'
|
|
|
- // })
|
|
|
- // }
|
|
|
- // },
|
|
|
}
|
|
|
}
|
|
|
var vueComponent = new Vue(vNode)
|