丰都投票界面已完成
This commit is contained in:
57
src/project/fengdu/AppVote/voteDetail.vue
Normal file
57
src/project/fengdu/AppVote/voteDetail.vue
Normal file
@@ -0,0 +1,57 @@
|
||||
<template>
|
||||
<section class="voteDetail">
|
||||
<u-parse :html="detail.endDisplay"/>
|
||||
<AiBottomBtn background="#fff">
|
||||
<div flex class="pad-l32 pad-r16 pad-b16 pad-t16">
|
||||
<AiHighlight class="fill color-999" content="当前票数:@v" value="21345" color="#FF6900"/>
|
||||
<div class="text circle mar-l16" @click="handleVote">投票</div>
|
||||
</div>
|
||||
</AiBottomBtn>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import AiHighlight from "../../../components/AiHighlight";
|
||||
|
||||
export default {
|
||||
name: "voteDetail",
|
||||
components: {AiHighlight},
|
||||
appName: "投票详情",
|
||||
data() {
|
||||
return {
|
||||
detail: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getDetail() {
|
||||
this.$http.post("/app/vote/detail", null, {}).then(res => {
|
||||
if (res?.data) {
|
||||
this.detail = res.data
|
||||
document.title = this.detail.name
|
||||
}
|
||||
})
|
||||
},
|
||||
handleVote() {
|
||||
if (!this.user.token) {//未登录,获取openId和token
|
||||
this.$http.get("/app/appdvcpconfig/getMpAppid", {withoutToken: true}).then(res => {
|
||||
if (res?.code == 0 && res?.data) {
|
||||
this.getCode({scope: "snsapi_userinfo", appid: res.data})
|
||||
}
|
||||
})
|
||||
} else {//已登录,直接投票
|
||||
|
||||
}
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
this.getDetail()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.voteDetail {
|
||||
background: #F3F6F9;
|
||||
min-height: 100vh;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user