Commit 8eb921e3 authored by 王宝峰's avatar 王宝峰

修复投票详情页面加载不出的问题

parent 2157d1c8
......@@ -173,7 +173,7 @@
// 跳转对应的详情页
toVoteDetail(item) {
console.log("跳转放到投票详情页面---", item)
console.log("跳转放到投票详情页面---")
this.voteObject.activityId = this.activity.activityId
this.voteObject.opusType = this.opusType
// 将当前项目下的项目id传给voteObject
......@@ -184,8 +184,8 @@
this.voteObject.opusBrief = item.opusBrief
this.voteObject.tjtActivityPictureList = item.tjtActivityPictureList
uni.navigateTo({
url: '/pages_vote/tjty_vote_detail/tjty_vote_detail?param=' + encodeURIComponent(JSON
.stringify(this.voteObject)),
// url: '/pages_vote/tjty_vote_detail/tjty_vote_detail?param=' + encodeURIComponent(JSON.stringify(this.voteObject)),
url: '/pages_vote/tjty_vote_detail/tjty_vote_detail?param=' +JSON.stringify(this.voteObject),
})
}
},
......
......@@ -28,6 +28,9 @@
</template>
<script>
import {
mapState
} from 'vuex'
import {
setVoteAxios,
getCurrentVoteAxios
......@@ -47,6 +50,26 @@
opusId: ''
}
},
computed: {
...mapState('m_user', ['userInfo']),
},
onLoad(option) { //option为object类型,会序列化上个页面传递的参数
this.weChatId = this.userInfo.wechatId
console.log("详情页获取的信息:", JSON.parse(option.param))
if (option.param) {
console.log("详情页获取的信息:", JSON.parse(option.param))
this.name = JSON.parse(option.param).productionName
this.votes = JSON.parse(option.param).productionVote
this.projectId = JSON.parse(option.param).projectId
this.activityId = JSON.parse(option.param).activityId
this.productionId = JSON.parse(option.param).productionId
this.bannerList = JSON.parse(option.param).tjtActivityPictureList
this.opusBrief = JSON.parse(option.param).opusBrief
this.opusType = JSON.parse(option.param).opusType
this.opusId = JSON.parse(option.param).productionId
}
},
methods: {
clickImg(imgUrl) {
......@@ -99,26 +122,7 @@
})
}
},
computed: {
...mapState('m_user', ['userInfo']),
},
onLoad(option) { //option为object类型,会序列化上个页面传递的参数
if (option) {
if (option.param) {
console.log("详情页获取的信息:", JSON.parse(decodeURIComponent(option.param)))
this.name = JSON.parse(decodeURIComponent(option.param)).productionName
this.votes = JSON.parse(decodeURIComponent(option.param)).productionVote
this.projectId = JSON.parse(decodeURIComponent(option.param)).projectId
this.activityId = JSON.parse(decodeURIComponent(option.param)).activityId
this.productionId = JSON.parse(decodeURIComponent(option.param)).productionId
this.bannerList = JSON.parse(decodeURIComponent(option.param)).tjtActivityPictureList
this.opusBrief = JSON.parse(decodeURIComponent(option.param)).opusBrief
this.opusType = JSON.parse(decodeURIComponent(option.param)).opusType
this.opusId = JSON.parse(decodeURIComponent(option.param)).productionId
}
this.weChatId = this.userInfo.wechatId
}
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment