According to the reaction of enthusiastic people,
npm install
npm run serve
This project is replicated based on the content of the IOS side of Zhihu Daily from April to May 2022. It is for learning reference only and is not used for profit.
It is divided into two parts: pages and components
This page is the home page, and the address is '/' in the routing component. Contains headContent.vue (top) swipe.vue (news list) newsList.vue (news list)
headContent.vue Click on the avatar to jump to swipe.vue (sidebar)
swipe.vue and newsList.vue jump to newsDetail.vue (news details page)
This page is a sidebar, you can enter my favorites collect.vue
This page is a favorite, which contains several favorite contents. Click to enter newsDetail.vue (News Details Page)
It can be accessed in various ways, including newsMenu.vue (function bar) and share.vue (share page)
newsMenu.vue contains four functions: likes, collections, comments, and sharing. Comments will jump to comment.vue share and trigger share.vue
Comment page, including long comments and short comments, click on the bottom to jump to the writeComment.vue page
You can write comments on the writeComment.vue page, click Post and jump back to comment.vue
Display of dates, display of avatars and jump pages, no difficulty
Handwritten carousel diagrams realize automatic (switching every 4S) and left and right swipe switching
News list, swiping down will show news content from the past few days, using element-ui's infinite scrolling component
Click the Favorites button on the page, and the corresponding news content will appear on my Favorites page, refresh without losing
You can click to like, collect and share comments, and don't lose it after refreshing.
After clicking, the sharing page pops up, and the background behind it turns gray. Click on the background or click Cancel and the sharing page disappears.
Show comments, like comments, refresh and exit without disappearing
Select some more important implementations for explanation
Use v-infinite-scroll in element-ui to pull down to the bottom to trigger the news of past dates to obtain news of past dates Use this.date.setDate(this.date.getDate() - 1) to calculate dates
...
On the basis of existing projects, add backend functions and do it after you have learned node.js