-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
263 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
<template> | ||
<v-card | ||
class="mx-auto postcard" | ||
:color="backgrouldColor" | ||
max-width="400" | ||
style="border-radius: 10px; color: #fff" | ||
> | ||
<template v-slot:prepend> | ||
<v-icon color="white" style="font-size: 25px">mdi-pin</v-icon> | ||
<h3 style="margin-left: 8px">稿件</h3> | ||
</template> | ||
|
||
<v-card-text class="py-2" style="font-size: 16px; font-weight: bold; line-height: 1.5; word-spacing: 2px"> | ||
{{post.text}} | ||
</v-card-text> | ||
|
||
<!-- 图片显示,横向滑动,圆角 --> | ||
<div style="display: flex; margin-left: 16px; margin-right: 16px; margin-top: 8px; overflow-x: auto; white-space: nowrap;"> | ||
<img | ||
v-for="img in post.images" | ||
:key="img" | ||
:src="img" | ||
style="border-radius: 10px; margin-right: 8px; width: 100px; height: 100px; object-fit: cover" | ||
/> | ||
</div> | ||
|
||
<v-card-actions> | ||
<v-list-item class="w-100"> | ||
<template v-slot:prepend> | ||
<v-avatar | ||
v-if="!post.anon" | ||
color="grey-darken-3" | ||
:image="avatarBaseUrl + post.uin + '&s=100'" | ||
></v-avatar> | ||
<span v-else style="font-size: 36px; margin-right: 16px">🫥</span> | ||
</template> | ||
|
||
<v-list-item-title v-if="!post.anon">{{ post.uin }}</v-list-item-title> | ||
<v-list-item-title v-else>匿名</v-list-item-title> | ||
|
||
<v-list-item-subtitle>{{ post.created_at }}</v-list-item-subtitle> | ||
|
||
<template v-slot:append> | ||
<div class="justify-self-end"> | ||
<!-- <v-icon class="me-1" icon="mdi-heart"></v-icon> | ||
<span class="subheading me-2">256</span> | ||
<span class="me-1">·</span> | ||
<v-icon class="me-1" icon="mdi-share-variant"></v-icon> | ||
<span class="subheading">45</span> --> | ||
<span class="subheading" style="font-weight: bold">{{ post.status }}</span> | ||
</div> | ||
</template> | ||
</v-list-item> | ||
</v-card-actions> | ||
</v-card> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
name: 'PostCard', | ||
props: ['post'], | ||
data() { | ||
return { | ||
backgrouldColor: "", | ||
avatarBaseUrl: "http://q1.qlogo.cn/g?b=qq&nk=" | ||
} | ||
}, | ||
mounted() { | ||
this.backgrouldColor = this.randomColor() | ||
}, | ||
methods: { | ||
randomColor() { | ||
let colors = ["#FFC107", "#42A5F5", "#9CCC65", "#F06292", "#76FF03", "#9E9E9E", "#8D6E63"] | ||
return colors[Math.floor(Math.random() * colors.length)] | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style> | ||
.postcard { | ||
box-shadow: 0px 10px 15px -3px rgba(0,0,0,0.1); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,74 @@ | ||
<template> | ||
|
||
<BottomNavBar v-model="value" @input="go" /> | ||
<BottomNavBar v-model="value" @input="go" /> | ||
|
||
<div style="padding: 16px;"> | ||
|
||
<h1 style="margin-bottom: 16px">🎲 服务</h1> | ||
<div class="rect1" style="background-color: #2196F3;"> | ||
<p style="font-weight: bold;">🗺️ 桂林中学毕业生去向分布图</p> | ||
<a style="font-size: 16px;" @click="go('https://stumap.idoknow.top/')">点击查看</a> | ||
<div> | ||
<p style="font-weight: bold; font-size: 16px">🗺️ 桂林中学毕业生去向分布图</p> | ||
<small style="color: #fff; font-size: 13px">https://stumap.idoknow.top</small> | ||
</div> | ||
<a style="font-size: 16px; cursor:pointer; font-weight: bold;" @click="go('https://stumap.idoknow.top/')">点击查看</a> | ||
</div> | ||
|
||
<iframe style="width: 100%; height: 80%;" v-if="displayInnerWindow !== ''" :src="displayInnerWindow" frameborder="0"></iframe> | ||
|
||
<v-snackbar v-model="snackbar.show" :color="snackbar.color" :timeout="snackbar.timeout"> | ||
{{ snackbar.text }} | ||
</v-snackbar> | ||
</template> | ||
|
||
<script> | ||
import BottomNavBar from '@/components/BottomNavBar.vue' | ||
export default { | ||
components: { | ||
BottomNavBar | ||
}, | ||
data() { | ||
return { | ||
snackbar: { | ||
show: false, | ||
text: '', | ||
color: '' | ||
}, | ||
value: 2, | ||
displayInnerWindow: '', | ||
} | ||
}, | ||
mounted() { | ||
}, | ||
methods: { | ||
toast(text, color = 'error') { | ||
this.snackbar.text = text | ||
this.snackbar.color = color | ||
<p style="text-align: center; margin-top: 16px; color: #c3c3c3">更多服务正在开发...</p> | ||
</div> | ||
|
||
|
||
<v-snackbar v-model="snackbar.show" :color="snackbar.color" :timeout="snackbar.timeout"> | ||
{{ snackbar.text }} | ||
</v-snackbar> | ||
</template> | ||
|
||
<script> | ||
import BottomNavBar from '@/components/BottomNavBar.vue' | ||
export default { | ||
components: { | ||
BottomNavBar | ||
}, | ||
data() { | ||
return { | ||
snackbar: { | ||
show: false, | ||
text: '', | ||
color: '' | ||
}, | ||
value: 2, | ||
displayInnerWindow: '', | ||
} | ||
}, | ||
go(url) { | ||
this.displayInnerWindow = url | ||
} | ||
mounted() { | ||
}, | ||
methods: { | ||
toast(text, color = 'error') { | ||
this.snackbar.text = text | ||
this.snackbar.color = color | ||
}, | ||
go(url) { | ||
// this.displayInnerWindow = url | ||
window.open(url, '_blank') | ||
} | ||
} | ||
</script> | ||
|
||
<style> | ||
} | ||
</script> | ||
|
||
<style> | ||
.rect1 { | ||
padding: 16px; | ||
font-size: 18px; | ||
margin-left: 8px; | ||
border-radius: 5px; | ||
border-radius: 7px; | ||
color: #fff; | ||
margin-top: 8px; | ||
width: 95%; | ||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); | ||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.11); | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
</style> |
Oops, something went wrong.