Skip to content

Commit

Permalink
fix(info): 校园资讯的图片上传至图床
Browse files Browse the repository at this point in the history
  • Loading branch information
Tong030905 committed Aug 5, 2023
1 parent 9c434e4 commit a9efdcd
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 24 deletions.
Binary file removed src/assets/fy-card.jpg
Binary file not shown.
Binary file removed src/assets/fy-logo.png
Binary file not shown.
Binary file removed src/assets/fy.jpg
Binary file not shown.
Binary file removed src/assets/jh-logo-1.png
Binary file not shown.
3 changes: 0 additions & 3 deletions src/assets/x.svg

This file was deleted.

6 changes: 3 additions & 3 deletions src/components/FixedQuickView/InformationQuickView/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ const currentPost = ref<{ type: string; content: string }>({
const updateCurrentPost = () => {
const information = serviceStore.information.informationList;
const announcement = serviceStore.announcement.announcements;
const info_time = new Date(information[information.length - 1].publish_time).getTime();
const announcement_time = new Date(announcement[announcement.length - 1].publishTime).getTime();
const infoTime = new Date(information[information.length - 1].publish_time).getTime();
const announcementTime = new Date(announcement[announcement.length - 1].publishTime).getTime();
if (information.length !== 0) {
if (info_time > announcement_time) {
if (infoTime > announcementTime) {
currentPost.value = {
type: "information",
content: information[information.length - 1].content.replace(
Expand Down
2 changes: 1 addition & 1 deletion src/pages/announcement/InformationCard/index.module.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import "@/style/theme";

.container{
background-image: url('~@/assets/fy-card.jpg');
background-image: url("https://api.cnpatrickstar.com/img/e3dd45da-f2ea-4f72-85d9-bdfbfa3c42a4.jpg");
background-size: 100% 100%;
}

Expand Down
23 changes: 10 additions & 13 deletions src/pages/announcement/InformationCard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,21 @@ const Author = "\"For You\"工程";
<view :class="styles.title">{{ props.source.title }}</view>
</view>
<view :class="styles.content">{{ props.source.content.replace(/\\n/g, '\n') }}</view>
<view :class="styles.img_container" v-if="props.source.image_1 !== null">
<image :src="props.source.image_1" alt="Card Image" :class="styles.image" mode="aspectFit"></image>
<view :class="styles.img_container" v-if="props.source.img1">
<image :src="props.source.img1" alt="Card Image" :class="styles.image" mode="aspectFit"></image>
</view>
<view :class="styles.img_container" v-if="props.source.image_2 !== null">
<image :src="props.source.image_2" alt="Card Image" :class="styles.image" mode="aspectFit"></image>
<view :class="styles.img_container" v-if="props.source.img2">
<image :src="props.source.img2" alt="Card Image" :class="styles.image" mode="aspectFit"></image>
</view>
<view :class="styles.img_container" v-if="props.source.image_3 !== null">
<image :src="props.source.image_3" alt="Card Image" :class="styles.image" mode="aspectFit"></image>
<view :class="styles.img_container" v-if="props.source.img3">
<image :src="props.source.img3" alt="Card Image" :class="styles.image" mode="aspectFit"></image>
</view>
<view :class="styles.link" @tap="handleClickLink" v-if="props.source.link !==null">点击跳转相关规定</view>
<view :class="styles.link" @tap="handleClickLink" v-if="props.source.link">点击跳转相关规定</view>
<template #footer>
<view :class="styles.logo_container">
<image src="@/assets/fy-logo.png" alt="logo_fy" :class="styles.logo_fy" mode="aspectFit"></image>
<image
:src="require('@/assets/x.svg')"
style="margin: 4px 0; width: 100% ;height: 100%;"
/>
<image src="@/assets/jh-logo-1.png" alt="logo_jh" :class="styles.logo_jh" mode="aspectFit"></image>
<image src="https://img.cnpatrickstar.com/5eb88a00-1d66-49af-8c75-ff651a077503.png" alt="logo_fy" :class="styles.logo_fy" mode="aspectFit"></image>
<view :class="styles.x">X</view>
<image src="https://img.cnpatrickstar.com/2633992f-415a-4b6b-b54e-f24adaca7d42.png" alt="logo_jh" :class="styles.logo_jh" mode="aspectFit"></image>
</view>
<view :class="styles.publisher">信息来源: {{ props.source.publisher }}</view>
<view :class="styles['publish-time']">发布时间: {{ timeFormat(props.source.publish_time) }}</view>
Expand Down
1 change: 0 additions & 1 deletion src/services/api/apiList.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Information } from './../../types/Information';
const api = {
user: {
login: {
Expand Down
6 changes: 3 additions & 3 deletions src/types/Information.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface Information {
/** 截止时间 用于控制是否显示在首页卡片上 */
end_time: string;
link: string;
image_1: string;
image_2: string;
image_3: string;
img1: string;
img2: string;
img3: string;
}

0 comments on commit a9efdcd

Please sign in to comment.