|
@@ -92,12 +92,15 @@ export default {
|
|
|
},
|
|
|
// 刚开始隐藏项目摘要和tab切换
|
|
|
proShow: false,
|
|
|
- ptid: this.$route.path.split('/')[this.$route.path.split('/').length - 2], // 项目加密id
|
|
|
- sid: this.$route.path.split('/')[this.$route.path.split('/').length - 1] // 信息加密id
|
|
|
+ ptid: '', // 项目加密id
|
|
|
+ sid: '' // 信息加密id
|
|
|
}
|
|
|
},
|
|
|
computed: {},
|
|
|
created () {
|
|
|
+ const { ptid, sid } = this.$route.query
|
|
|
+ if (ptid) this.ptid = encodeURIComponent(ptid)
|
|
|
+ if (sid) this.sid = encodeURIComponent(sid)
|
|
|
this.getBaseInfo()
|
|
|
},
|
|
|
mounted () {},
|
|
@@ -120,8 +123,8 @@ export default {
|
|
|
if (res.error_code === 0 && res.data) {
|
|
|
if (res.data.s_subscopeclass) {
|
|
|
res.data.s_subscopeclass = this.initIndustryData(res.data.s_subscopeclass.split(','))
|
|
|
- console.log(res.data.s_subscopeclass)
|
|
|
}
|
|
|
+ this.ptid = res.data.id
|
|
|
this.baseInfo = res.data
|
|
|
this.getEntIsFollow(res.data.infoid)
|
|
|
} else {
|
|
@@ -130,7 +133,6 @@ export default {
|
|
|
},
|
|
|
// 处理数据为行业选择页面所需格式
|
|
|
initIndustryData (data) {
|
|
|
- console.log(data)
|
|
|
var arr = []
|
|
|
var obj = {}
|
|
|
if (data) {
|
|
@@ -184,10 +186,8 @@ export default {
|
|
|
},
|
|
|
// 关注项目
|
|
|
entFollow () {
|
|
|
- console.log()
|
|
|
if (this.follow.type === 0) {
|
|
|
addFollow({ sid: this.baseInfo.infoid }).then(res => {
|
|
|
- console.log(res)
|
|
|
if (res.data) {
|
|
|
this.follow.classActive = 'icon_heart_red'
|
|
|
this.follow.text = '已关注'
|
|
@@ -196,7 +196,6 @@ export default {
|
|
|
})
|
|
|
} else {
|
|
|
cancelFollow({ sid: this.baseInfo.infoid }).then(res => {
|
|
|
- console.log(res)
|
|
|
if (res.data && res.data === 'success') {
|
|
|
this.follow.classActive = 'icon_heart_gray'
|
|
|
this.follow.text = '关注'
|
|
@@ -215,6 +214,7 @@ export default {
|
|
|
// this.proShow = true
|
|
|
if (item.scope.length === 0) {
|
|
|
this.$message.error('采购内容不能为全部')
|
|
|
+ this.$refs.isChildData.isClick = false
|
|
|
return
|
|
|
}
|
|
|
this.loading = true
|