1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <template>
- <view class="dljt-page-box">
- <MtaNavbar></MtaNavbar>
- <view class="dljt-container-box" >
- <view class="dljt-page-title">校园动态</view>
- <view class="dljt-page-content-box">
- <view class="dljt-breadcrumb-box">
- <view class="breadcrumb-text"></view>
- <icon class="breadcrumb-jt"></icon>
- <view class="breadcrumb-active"></view>
- </view>
-
- <MtaScrollViewVue :refreshFn="getList">
- <template v-slot="{ list }">
- <view class="list-item-box" v-for="item in list" :key="item.id" @click="handleClick(item)">
- <img class="list-img" :src="item.cover"/>
- <view class="list-time-box" >
- <view class="time-data">{{formatDateToYearMonthDay(item.createTime)[1]}}</view>
- <view class="time-year">{{formatDateToYearMonthDay(item.createTime)[0]}}</view>
- </view>
- <view class="list-right-box">
- <view class="list-name">{{item.title}}</view>
- <view class="list-line"></view>
- <view class="list-content" v-html="getStringByHtml3(item.content)"> </view>
- </view>
- </view>
- </template>
- </MtaScrollViewVue>
- </view>
- </view>
-
- <!-- 底部导航 -->
- <MtaFooter></MtaFooter>
- <MtaTabBar></MtaTabBar>
- </view>
- </template>
- <script setup>
- import {
- ref,
- reactive
- } from "vue";
- import {
- onLoad
- } from "@dcloudio/uni-app"
- import * as httpApi from "@/api/common.js"
- import MtaScrollViewVue from "@/components/MtaScrollView/MtaScrollView.vue";
- import {formatDateToYearMonthDay,getStringByHtml3}from"@/utils/common.js"
- import MtaFooter from "@/components/MtaFooter.vue"
- import MtaTabBar from "@/components/MtaTabBar/MtaTabBar.vue";
-
- const data = reactive({
- list: '',
- total: '',
- page: 1,
- size: 5
- })
-
- onLoad(() => {
- })
-
- function handleClick(data) {
- console.log('data',data);
- uni.navigateTo({
- url: `/pages/dqgzDangjiangongzuoInfo/dqgzDangjiangongzuoInfo?id=${data.id}`
- })
- }
-
- function getList(data) {
- return httpApi.getDangjianGongzuoList(data)
- }
-
- function pageInit() {
- httpApi.getDangjianGongzuoList({page: data.page,size:data.size}).then(res => {
- data.list = res.data.data;
- data.total = res.data.total;
- })
- }
- </script>
- <style>
- </style>
|