接口初始化 第一版

This commit is contained in:
yuping
2022-11-21 19:33:15 +08:00
parent 039042f607
commit d53c2920ed
20 changed files with 421 additions and 680 deletions

View File

@@ -62,7 +62,7 @@
<div class="imgone" style="margin-right: 10px"></div>
<div class="imgone"></div>
</div>
<!-- todo #投票任务 参与投票下面这段文字是固定的么-->
<!-- todo #投票任务 参与投票下面这段文字是固定的么-->
<div class="ontitle">
通过对各级人员的软件平台培训使其能够了解如何运用乾元坤和智能信息管理系统来提升企业管理水平最大限度发挥软件产品在企业中的作用;
<br/>
@@ -98,13 +98,16 @@
</div>
<div class="timebox clearfix">
<div class="innertime">
{{data.detail?.voteStartTime
{{
data.detail?.voteStartTime
}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ data.detail?.voteEndTime }}
</div>
<div class="endtime clearfix">
<div class="endtimetext">
距离结束还有&nbsp;&nbsp;
<span class="te">{{parseInt(dayjs(data.detail?.voteEndTime).diff(dayjs(),'minute')/60)}}</span>&nbsp;&nbsp; 小时&nbsp;&nbsp;<span class="te">{{dayjs(data.detail?.voteEndTime).diff(dayjs(),'minute')%60}}</span>&nbsp;&nbsp;分钟
<span class="te">{{ parseInt(dayjs(data.detail?.voteEndTime).diff(dayjs(), 'minute') / 60) }}</span>&nbsp;&nbsp;
小时&nbsp;&nbsp;<span
class="te">{{ dayjs(data.detail?.voteEndTime).diff(dayjs(), 'minute') % 60 }}</span>&nbsp;&nbsp;分钟
</div>
</div>
</div>
@@ -129,45 +132,17 @@
</div>
</template>
<script>
import {reactive, toRefs, ref} from "vue";
import axios from 'axios';
<script setup>
import {useRequest} from "@/api/request";
import {ROUTER_CHAPTER_LIST, ROUTER_LIST, TASK_VOTE_DETAIL} from "@/api/api";
import dayjs from "dayjs";
export default {
name: "balloT",
setup() {
const {data} = useRequest(TASK_VOTE_DETAIL, {})
const state = reactive({
activeName: "first",
});
const test = ref({
activeName: "first",
});
const testAsync = () => {
axios({url: ROUTER_CHAPTER_LIST})
.then(res => {
console.log("login", res.data);
})
.catch(err =>
console.error(err)
)
}
const handleClick = (tab, event) => {
console.log(tab, event);
};
return {
...toRefs(state),
test,
handleClick,
testAsync,
dayjs,
data
};
},
const {data} = useRequest(TASK_VOTE_DETAIL, {})
const handleClick = (tab, event) => {
console.log(tab, event);
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->