丰都投票界面已完成

This commit is contained in:
aixianling
2022-12-29 14:35:15 +08:00
parent 4d46463aad
commit 6217856c27
7 changed files with 314 additions and 25 deletions

View 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>