123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168 |
- <template>
- <Container
- title="首页"
- :showBack="false"
- :scrollStyle="{
- paddingLeft: 0,
- paddingRight: 0,
- }"
- >
- <view class="home">
- <!-- 倒计时 -->
- <view class="time">
- <view>倒计时</view>
- <view>151天</view>
- </view>
- <!-- 轮播图 -->
- <swiper class="swiper" circular autoplay>
- <swiper-item>
- <view class="swiper-item">A</view>
- </swiper-item>
- <swiper-item>
- <view class="swiper-item">B</view>
- </swiper-item>
- <swiper-item>
- <view class="swiper-item">C</view>
- </swiper-item>
- </swiper>
- <!-- 公告 -->
- <view class="notice">
- <view class="title">公告</view>
- <view>这是公告</view>
- </view>
- <!-- 2025新大纲 -->
- <view class="new_outline">
- <uni-section title="基础用法" type="line">
- <view class="p-20">
- <uni-segmented-control
- :flex="false"
- :current="current"
- :values="items"
- style-type="text"
- @clickItem="(e) => (current = e.currentIndex)"
- />
- <!-- 执业药师 -->
- <view v-if="current === 0" class="grid">
- <view v-for="item in 7" class="flex" @click="clickClass">
- <view class="bg-red"></view>
- <view> 执业药师{{ item }} </view>
- </view>
- </view>
- <!-- 药学职称 -->
- <view v-if="current === 1" class="grid"
- ><view v-for="item in 7" class="flex" @click="clickClass">
- <view class="bg-red"></view>
- <view> 药学职称{{ item }} </view>
- </view></view
- >
- </view>
- </uni-section>
- </view>
- </view>
- <uni-section title="往年真题" type="line">
- <!-- 往年真题 -->
- <view class="grid-3">
- <view v-for="item in 7" class="flex">
- <view class="bg-red"></view>
- <view> 执业药师{{ item }} </view>
- </view>
- </view>
- </uni-section>
- </Container>
- </template>
- <script setup>
- import { ref } from "vue";
- import Container from "../../components/Container/Container.vue";
- import { router } from "../../utils/router";
- const current = ref(0);
- const items = ref(["标签1", "标签2"]);
- const clickClass = () => {
- router.push({
- url: '/pages/regulations/index'
- })
- }
- </script>
- <style scoped lang="scss">
- .home {
- display: flex;
- flex-direction: column;
- gap: 20rpx;
- .time {
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 80rpx;
- }
- .swiper {
- height: 320rpx;
- border: 1rpx solid #000000;
- width: 100%;
- .swiper-item {
- display: block;
- height: 320rpx;
- line-height: 320rpx;
- text-align: center;
- background-color: red;
- }
- }
- .notice {
- display: flex;
- align-items: center;
- gap: 20rpx;
- padding-left: 26rpx;
- }
- .new_outline {
- border: 1rpx solid #000000;
- }
- }
- .title {
- font-family: "PingFang SC, PingFang SC";
- font-weight: 700;
- font-size: 32rpx;
- color: #000000;
- }
- .p-20 {
- padding: 0 30rpx 30rpx;
- display: flex;
- flex-direction: column;
- gap: 20rpx;
- }
- .grid {
- display: grid;
- grid-template-columns: repeat(4, 1fr);
- gap: 20rpx;
- }
- .grid-3 {
- display: grid;
- grid-template-columns: repeat(3, 1fr);
- gap: 20rpx;
- height: 100%;
- }
- .flex {
- display: flex;
- flex-direction: column;
- gap: 20rpx;
- align-items: center;
- justify-content: center;
- }
- .bg-red {
- width: 149rpx;
- height: 80rpx;
- background: #d9d9d9;
- }
- </style>
|