diff --git a/src/assets/icons/iconfont.css b/src/assets/icons/iconfont.css
index f8f157e..7f9a7b0 100644
--- a/src/assets/icons/iconfont.css
+++ b/src/assets/icons/iconfont.css
@@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 4414354 */
- src: url('iconfont.woff2?t=1707288951155') format('woff2'),
- url('iconfont.woff?t=1707288951155') format('woff'),
- url('iconfont.ttf?t=1707288951155') format('truetype');
+ src: url('iconfont.woff2?t=1707791197944') format('woff2'),
+ url('iconfont.woff?t=1707791197944') format('woff'),
+ url('iconfont.ttf?t=1707791197944') format('truetype');
}
.iconfont {
@@ -13,6 +13,10 @@
-moz-osx-font-smoothing: grayscale;
}
+.icon-gengduo-2:before {
+ content: "\e641";
+}
+
.icon-xiangji:before {
content: "\e672";
}
diff --git a/src/assets/icons/iconfont.js b/src/assets/icons/iconfont.js
index 813bb0f..f887cd2 100644
--- a/src/assets/icons/iconfont.js
+++ b/src/assets/icons/iconfont.js
@@ -1 +1 @@
-window._iconfont_svg_string_4414354='',function(o){var l=(l=document.getElementsByTagName("script"))[l.length-1],c=l.getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var i,a,h,t,s,d=function(l,c){c.parentNode.insertBefore(l,c)};if(c&&!o.__iconfont__svg__cssinject__){o.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(l){console&&console.log(l)}}i=function(){var l,c=document.createElement("div");c.innerHTML=o._iconfont_svg_string_4414354,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(l=document.body).firstChild?d(c,l.firstChild):l.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),i()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(h=i,t=o.document,s=!1,v(),t.onreadystatechange=function(){"complete"==t.readyState&&(t.onreadystatechange=null,e())})}function e(){s||(s=!0,h())}function v(){try{t.documentElement.doScroll("left")}catch(l){return void setTimeout(v,50)}e()}}(window);
\ No newline at end of file
+window._iconfont_svg_string_4414354='',function(o){var l=(l=document.getElementsByTagName("script"))[l.length-1],c=l.getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var i,a,h,t,s,d=function(l,c){c.parentNode.insertBefore(l,c)};if(c&&!o.__iconfont__svg__cssinject__){o.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(l){console&&console.log(l)}}i=function(){var l,c=document.createElement("div");c.innerHTML=o._iconfont_svg_string_4414354,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(l=document.body).firstChild?d(c,l.firstChild):l.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(a=function(){document.removeEventListener("DOMContentLoaded",a,!1),i()},document.addEventListener("DOMContentLoaded",a,!1)):document.attachEvent&&(h=i,t=o.document,s=!1,m(),t.onreadystatechange=function(){"complete"==t.readyState&&(t.onreadystatechange=null,e())})}function e(){s||(s=!0,h())}function m(){try{t.documentElement.doScroll("left")}catch(l){return void setTimeout(m,50)}e()}}(window);
\ No newline at end of file
diff --git a/src/assets/icons/iconfont.json b/src/assets/icons/iconfont.json
index c86f586..8653adf 100644
--- a/src/assets/icons/iconfont.json
+++ b/src/assets/icons/iconfont.json
@@ -5,6 +5,13 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
+ {
+ "icon_id": "1311988",
+ "name": "更多",
+ "font_class": "gengduo-2",
+ "unicode": "e641",
+ "unicode_decimal": 58945
+ },
{
"icon_id": "658053",
"name": "相机",
diff --git a/src/assets/icons/iconfont.ttf b/src/assets/icons/iconfont.ttf
index 7ba74e1..201fc37 100644
Binary files a/src/assets/icons/iconfont.ttf and b/src/assets/icons/iconfont.ttf differ
diff --git a/src/assets/icons/iconfont.woff b/src/assets/icons/iconfont.woff
index e3e6a4e..8b8545c 100644
Binary files a/src/assets/icons/iconfont.woff and b/src/assets/icons/iconfont.woff differ
diff --git a/src/assets/icons/iconfont.woff2 b/src/assets/icons/iconfont.woff2
index ebd5eb9..79fb732 100644
Binary files a/src/assets/icons/iconfont.woff2 and b/src/assets/icons/iconfont.woff2 differ
diff --git a/src/store/index.ts b/src/store/index.ts
index 673e609..3ef6c4a 100644
--- a/src/store/index.ts
+++ b/src/store/index.ts
@@ -61,6 +61,15 @@ export const useStore = defineStore('user', {
localStorage.setItem("LongToken", longToken)
localStorage.setItem("isAutoLogin", "true")
},
+ getUserLongToken () {
+ if (sessionStorage.getItem("LongToken") !== null) {
+ this.longToken = sessionStorage.getItem("LongToken") as string
+ }
+ else if (localStorage.getItem("LongToken") !== null) {
+ this.longToken = localStorage.getItem("LongToken") as string
+ }
+ return this.longToken
+ },
loginOut () {
localStorage.removeItem("UserId")
diff --git a/src/views/home/announced.vue b/src/views/home/announced.vue
index cfd974b..828888c 100644
--- a/src/views/home/announced.vue
+++ b/src/views/home/announced.vue
@@ -1,9 +1,14 @@
-
+
\ No newline at end of file
diff --git a/src/views/home/home.vue b/src/views/home/home.vue
index f2b3409..8fa2e54 100644
--- a/src/views/home/home.vue
+++ b/src/views/home/home.vue
@@ -151,32 +151,33 @@ onMounted(() => {
.section-bottom {
width: 100%;
padding: 0 2% 0;
+ margin-bottom: 20px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
- margin-bottom: 20px;
.recommend {
- max-width: 740px;
+ width: 790px;
height: 780px;
margin-right: 10px;
}
.right {
+ width: 400px;
height: 780px;
display: flex;
flex-direction: column;
.rank {
- width: 450px;
+ max-width: 400px;
height: 520px;
background-color: #fff;
margin-bottom: 10px;
}
.announced {
- width: 450px;
+ max-width: 400px;
height: 250px;
background-color: #fff;
}
@@ -193,4 +194,32 @@ onMounted(() => {
}
}
}
+
+@media screen and (max-width: 1000px){
+
+ .section-top {
+ width: 100%;
+ }
+ .section-bottom {
+ width: 100%;
+ padding: 0;
+ margin: 0;
+
+ display: flex;
+ flex-direction: column;
+
+ .recommend {
+ width: 100%;
+ margin-right: 0;
+ }
+
+ .rank {
+ width: 100%;
+ }
+
+ .announced {
+ width: 100%;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/views/home/rank.vue b/src/views/home/rank.vue
index 76edc8b..967ab40 100644
--- a/src/views/home/rank.vue
+++ b/src/views/home/rank.vue
@@ -7,7 +7,7 @@
\ No newline at end of file
diff --git a/src/views/home/show-recommend.vue b/src/views/home/show-recommend.vue
new file mode 100644
index 0000000..ccad4ce
--- /dev/null
+++ b/src/views/home/show-recommend.vue
@@ -0,0 +1,265 @@
+
+
+
+
+
+
+
+
+
+
+
+
{{ post.userName }}
+
:
+
{{ post.text }}
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/posts/posts.vue b/src/views/posts/posts.vue
index 9d1dd53..ec7a1ce 100644
--- a/src/views/posts/posts.vue
+++ b/src/views/posts/posts.vue
@@ -84,9 +84,12 @@ import popup from '@/views/home/popup.vue'
import { ref, onMounted } from 'vue'
import { getOtherPosts } from './utils'
import { post } from '@/utils/request'
+import { useStore } from '@/store/index'
import type { responseGetOtherPosts } from './utils'
+import { errorMsg } from '@/utils/message'
const isPopup = ref(false)
+const store = useStore()
const postsList = ref({
posts: []
})
@@ -96,7 +99,11 @@ onMounted(async () => {
})
const likePost = (thisPost: any) => {
- //还需要判断用户是否登录,只有登录才可以点赞
+ const longToken = store.getUserLongToken()
+ if (!longToken) {
+ errorMsg('请先登录')
+ return
+ }
post('/relation/createRelation', {
toId: thisPost.postId,
toType: 4,