mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-09 02:46:48 +08:00
feat:合并
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-12-11 16:57:58
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-12-11 21:21:16
|
||||
* @LastEditTime: 2022-12-12 13:42:24
|
||||
* @FilePath: /fe-stu/src/api/api.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
@@ -39,7 +39,7 @@ export const DISCUSS_SUBMIT_REVIEW_LIST = '/discussSubmit/queryDiscussSubmitAndR
|
||||
export const COMMENT_LIST = '/comment/list'
|
||||
|
||||
|
||||
export const VOTE_DETAIL2 = ballotId => `/vote/queryStemByStemId?ballotId=${ballotId} post`
|
||||
export const VOTE_DETAIL2 = voteId => `/vote/queryVoteAndVoteStemDetailByVoteId?voteId=${voteId} post`
|
||||
export const COMMENT_ADD = '/comment post'
|
||||
export const COMMENT_PRAISE = '/comment/praise post'
|
||||
export const COMMENT_COLLECTION = '/comment/collection post'
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- 面包屑导航 -->
|
||||
<div class="debateTitle">【投票】{{ dataInfo?.ballotName }}</div>
|
||||
<div class="debateTitle">【投票】{{ dataInfo?.voteName }}</div>
|
||||
<!-- 详细信息 -->
|
||||
<div class="detailinfo">
|
||||
<div class="detail">
|
||||
@@ -24,8 +24,7 @@
|
||||
<div class="left">
|
||||
<div class="title">
|
||||
<img
|
||||
width="20px"
|
||||
height="20px"
|
||||
style="width: 20px; height: 20px"
|
||||
src="../../assets/image/yuan.png"
|
||||
/>
|
||||
<div class="text">参与情况</div>
|
||||
@@ -34,29 +33,40 @@
|
||||
<!-- <div style="display: flex; align-items: center"></div> -->
|
||||
<div class="all">
|
||||
<div class="item allbox1">
|
||||
<!-- <div class="item1" style="color: #089dff">
|
||||
{{ data.accessCnt }}
|
||||
</div> -->
|
||||
<div class="item1" style="color: #089dff">
|
||||
{{
|
||||
dataInfo.numberOfInvolved || dataInfo.numberOfInvolved == 0
|
||||
? dataInfo.numberOfInvolved
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div class="item2">参与数</div>
|
||||
</div>
|
||||
<div class="item allbox2">
|
||||
<!-- <div class="item1" style="color: #387df7">
|
||||
{{ data.voteCnt }}
|
||||
</div> -->
|
||||
<div class="item1" style="color: #387df7">
|
||||
{{
|
||||
dataInfo.votesTotal || dataInfo.votesTotal == 0
|
||||
? dataInfo.votesTotal
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div class="item2">总票数</div>
|
||||
</div>
|
||||
<div class="item allbox3">
|
||||
<!-- <div class="item1" style="color: #00c6ff">
|
||||
{{ data.viewCnt }}
|
||||
</div> -->
|
||||
<div class="item1" style="color: #00c6ff">
|
||||
{{
|
||||
dataInfo.numberOfBrowse || dataInfo.numberOfBrowse == 0
|
||||
? dataInfo.numberOfBrowse
|
||||
: "-"
|
||||
}}
|
||||
</div>
|
||||
<div class="item2">浏览数</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="title">
|
||||
<img
|
||||
width="20px"
|
||||
height="20px"
|
||||
style="width: 20px; height: 20px"
|
||||
src="../../assets/image/yuan.png"
|
||||
/>
|
||||
<div class="text">参与投票</div>
|
||||
@@ -65,10 +75,10 @@
|
||||
|
||||
<div class="join">
|
||||
<div
|
||||
v-for="(item, index) in dataInfo?.voteStemVoList"
|
||||
v-for="(item, index) in dataInfo.ballotVo?.voteStemVoList"
|
||||
:key="index"
|
||||
>
|
||||
<div>
|
||||
<div class="stem">
|
||||
<div>{{ item.orderNumber }}、</div>
|
||||
<div>{{ item.voteStemName }}</div>
|
||||
</div>
|
||||
@@ -89,26 +99,25 @@
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<div class="timebox clearfix">
|
||||
<!-- <div class="innertime">
|
||||
<div class="innertime">
|
||||
{{
|
||||
data.detail?.voteStartTime
|
||||
dataInfo?.voteStartTime
|
||||
}} 至 {{
|
||||
data.detail?.voteEndTime
|
||||
dataInfo?.voteEndTime
|
||||
}}
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="endtime clearfix">
|
||||
<div class="endtimetext">
|
||||
距离结束还有
|
||||
<!-- <span class="te">{{
|
||||
<span class="te">{{
|
||||
parseInt(
|
||||
dayjs(data.detail?.voteEndTime).diff(dayjs(), "minute") /
|
||||
60
|
||||
dayjs(dataInfo?.voteEndTime).diff(dayjs(), "minute") / 60
|
||||
)
|
||||
}}</span
|
||||
> 小时 <span class="te">{{
|
||||
dayjs(data.detail?.voteEndTime).diff(dayjs(), "minute") % 60
|
||||
dayjs(dataInfo?.voteEndTime).diff(dayjs(), "minute") % 60
|
||||
}}</span
|
||||
> 分钟 -->
|
||||
> 分钟
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -123,10 +132,12 @@
|
||||
<div class="box"></div>
|
||||
</div>
|
||||
<div class="explain clearfix">
|
||||
<!-- <div
|
||||
<div
|
||||
class="explaincontent"
|
||||
v-html="data.detail?.voteExplain"
|
||||
></div> -->
|
||||
v-html="
|
||||
dataInfo?.voteExplain ? dataInfo?.voteExplain : '暂无说明'
|
||||
"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -154,10 +165,10 @@ import { watch, reactive, toRefs } from "vue";
|
||||
// });
|
||||
// let { votedetail } = toRefs(state);
|
||||
const {
|
||||
query: { ballotId = 3 },
|
||||
query: { voteId = 136 },
|
||||
} = useRoute();
|
||||
//获取基本信息
|
||||
const { data: dataInfo } = useRequest(VOTE_DETAIL2(ballotId));
|
||||
const { data: dataInfo } = useRequest(VOTE_DETAIL2(voteId));
|
||||
console.log("dataInfo", dataInfo);
|
||||
// watch(dataInfo, () => {
|
||||
// if (dataInfo._rawValue) {
|
||||
@@ -417,8 +428,15 @@ console.log("dataInfo", dataInfo);
|
||||
// background: #f5f6f7;
|
||||
// border-radius: 8px;
|
||||
margin-top: 32px;
|
||||
margin-left: 21px;
|
||||
flex: 1;
|
||||
|
||||
.stem {
|
||||
display: flex;
|
||||
font-size: 16px;
|
||||
font-weight: 500;
|
||||
color: #333330;
|
||||
line-height: 38px;
|
||||
}
|
||||
.imgcontent {
|
||||
display: flex;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user