forked from myvin/juejin
-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit bb6843e
Showing
209 changed files
with
9,439 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# juejin | ||
掘金第三方版小程序 | ||
|
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,32 @@ | ||
App({ | ||
onLaunch () { | ||
let that = this | ||
wx.getSystemInfo({ | ||
success: function (res) { | ||
that.globalData.systeminfo = res | ||
}, | ||
}) | ||
}, | ||
globalData: { | ||
systeminfo: {}, | ||
config: { | ||
loginRequestUrl: 'https://juejin.im/auth/type/phoneNumber', | ||
notifyRequestUrl: 'https://ufp-api-ms.juejin.im/v1', | ||
bannerRequestUrl: 'https://banner-storage-ms.juejin.im/v1', | ||
timelineRequestUrl: 'https://timeline-merger-ms.juejin.im/v1', | ||
xiaoceRequestUrl: 'https://xiaoce-timeline-api-ms.juejin.im/v1', | ||
xiaoceCacheApiMs: 'https://xiaoce-cache-api-ms.juejin.im/v1', | ||
postStorageApiMsRequestUrl: 'https://post-storage-api-ms.juejin.im/v1', | ||
userLikeWrapperMsRequestUrl: 'https://user-like-wrapper-ms.juejin.im/v1', | ||
// searchMergerMsRequestUrl: 'https://search-merger-ms.juejin.im/v1', | ||
collectionSetMsRequestUrl: 'https://collection-set-ms.juejin.im/v1', | ||
shortMsgMsRequestUrl: 'https://short-msg-ms.juejin.im/v1', | ||
ufpApiMsRequestUrl: 'https://ufp-api-ms.juejin.im/v1', | ||
lccroApiMsRequestUrl: 'https://lccro-api-ms.juejin.im/v1', | ||
entryViewStorageApiMsRequestUrl: 'https://entry-view-storage-api-ms.juejin.im/v1', | ||
goldTagMsRequestUrl: 'https://gold-tag-ms.juejin.im/v1', | ||
userNotificationApiMsRequestUrl: 'https://user-notification-api-ms.juejin.im/v1', | ||
apiRequestUrl: 'https://user-storage-api-ms.juejin.im/v1' | ||
} | ||
}, | ||
}) |
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,74 @@ | ||
{ | ||
"pages": [ | ||
"pages/launch/launch", | ||
"pages/index/index", | ||
"pages/my/my", | ||
"pages/personal/personal", | ||
"pages/setting/setting", | ||
"pages/about/about", | ||
"pages/feidian/feidian", | ||
"pages/login/login", | ||
"pages/search/search", | ||
"pages/xiaoce/xiaoce", | ||
"pages/post/post", | ||
"pages/favorate/favorate", | ||
"pages/readHistory/readHistory", | ||
"pages/collectionSet/collectionSet", | ||
"pages/myPins/myPins", | ||
"pages/feedback/feedback", | ||
"pages/infoCenter/infoCenter", | ||
"pages/entry/entry", | ||
"pages/purchasedXiaoce/purchasedXiaoce", | ||
"pages/originalPost/originalPost", | ||
"pages/sharePost/sharePost", | ||
"pages/articleData/articleData", | ||
"pages/subscribedTag/subscribedTag", | ||
"pages/manageTag/manageTag", | ||
"pages/dynamic/dynamic", | ||
"pages/feidianDetail/feidianDetail" | ||
], | ||
"window": { | ||
"backgroundTextStyle": "dark", | ||
"navigationBarBackgroundColor": "#3281ff", | ||
"navigationBarTitleText": "掘金", | ||
"navigationBarTextStyle": "light" | ||
}, | ||
"tabBar": { | ||
"color": "#abb4bf", | ||
"selectedColor": "#3281ff", | ||
"borderStyle": "white", | ||
"backgroundColor": "#fff", | ||
"list": [ | ||
{ | ||
"pagePath": "pages/index/index", | ||
"text": "主页", | ||
"iconPath": "img/tab_home_normal.png", | ||
"selectedIconPath": "img/tab_home.png" | ||
}, | ||
{ | ||
"pagePath": "pages/search/search", | ||
"text": "搜索", | ||
"iconPath": "img/tab_explore_normal.png", | ||
"selectedIconPath": "img/tab_explore.png" | ||
}, | ||
{ | ||
"pagePath": "pages/feidian/feidian", | ||
"text": "沸点", | ||
"iconPath": "img/tab_feidian_normal.png", | ||
"selectedIconPath": "img/tab_feidian.png" | ||
}, | ||
{ | ||
"pagePath": "pages/xiaoce/xiaoce", | ||
"text": "小册", | ||
"iconPath": "img/tab_xiaoce_normal.png", | ||
"selectedIconPath": "img/tab_xiaoce.png" | ||
}, | ||
{ | ||
"pagePath": "pages/my/my", | ||
"text": "我的", | ||
"iconPath": "img/tab_profile_normal.png", | ||
"selectedIconPath": "img/tab_profile.png" | ||
} | ||
] | ||
} | ||
} |
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,119 @@ | ||
::-webkit-scrollbar { | ||
display: none; | ||
} | ||
page { | ||
-webkit-font-smoothing: antialiased; | ||
font-family: "PingHei","Helvetica Neue","Helvetica","Arial","Verdana","sans-serif"; | ||
font-size: 28rpx; | ||
background: #F4F6F9; | ||
} | ||
.card { | ||
background: #fff; | ||
margin-bottom: 20rpx; | ||
} | ||
.items .item { | ||
height: 90rpx; | ||
padding: 0 40rpx; | ||
border-bottom: 1rpx solid #efefef; | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
.items .item:last-child { | ||
border-bottom: none; | ||
} | ||
.items .item .title { | ||
flex: 1; | ||
font-size: 32rpx; | ||
color: #333; | ||
display: flex; | ||
align-items: center; | ||
} | ||
.items .item image { | ||
width: 42rpx; | ||
height: 42rpx; | ||
margin-right: 40rpx; | ||
} | ||
.items .item .count { | ||
font-size: 24rpx; | ||
color: #abb4bf; | ||
} | ||
.items .item .count.reddot { | ||
height: 30rpx; | ||
line-height: 30rpx; | ||
border-radius: 15rpx; | ||
padding: 0 7px; | ||
background: #ff5959; | ||
color: #fff; | ||
} | ||
.rotate { | ||
-webkit-animation: rotate .8s linear infinite; | ||
animation: rotate .8s linear infinite; | ||
} | ||
@-webkit-keyframes rotate { | ||
0% { | ||
-webkit-transform: rotate(0); | ||
transform: rotate(0) | ||
} | ||
100% { | ||
-webkit-transform: rotate(360deg); | ||
transform: rotate(360deg) | ||
} | ||
} | ||
@keyframes rotate { | ||
0% { | ||
-webkit-transform: rotate(0); | ||
transform: rotate(0) | ||
} | ||
100% { | ||
-webkit-transform: rotate(360deg); | ||
transform: rotate(360deg) | ||
} | ||
} | ||
.hover-class, | ||
.navigator-hover { | ||
background: #f2f2f2 !important; | ||
} | ||
|
||
/* 滑动切换 tab 样式 */ | ||
.top.tabs { | ||
position: relative; | ||
} | ||
.top.tabs .inner { | ||
display: flex; | ||
align-items: center; | ||
background: #3281ff; | ||
color: #fff; | ||
} | ||
.top.tabs .tab { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 50%; | ||
height: 80rpx; | ||
color: #ccc; | ||
transition: 250ms ease-out; | ||
} | ||
.top.tabs .tab.active { | ||
transition: 250ms ease-out; | ||
color: #fff; | ||
} | ||
.top.tabs .bar { | ||
position: absolute; | ||
top: 78rpx; | ||
left: 0; | ||
width: 50%; | ||
height: 2rpx; | ||
background: #fff; | ||
transition: 250ms ease-out; | ||
} | ||
/* 用于滑动 tab 的 swiper 样式 */ | ||
swiper.swiper { | ||
flex: 1; | ||
} | ||
.swiper swiper-item { | ||
overflow: scroll; | ||
} | ||
.swiper scroll-view { | ||
height: 100%; | ||
} |
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,13 @@ | ||
let utils = require('../../utils/utils') | ||
Component({ | ||
properties: { | ||
img: { | ||
type: String, | ||
value: '/img/logo_gray.png', | ||
}, | ||
tip: { | ||
type: String, | ||
value: '这里空空的什么都没有呢...', | ||
}, | ||
}, | ||
}) |
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,3 @@ | ||
{ | ||
"component": true | ||
} |
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,4 @@ | ||
<view class='empty'> | ||
<image src='{{img}}'></image> | ||
<view>{{tip}}</view> | ||
</view> |
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,15 @@ | ||
.empty { | ||
font-size: 28rpx; | ||
color: #999; | ||
min-height: 100vh; | ||
background: #fff; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
.empty image { | ||
width: 150rpx; | ||
height: 120rpx; | ||
margin-bottom: 30rpx; | ||
} |
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,15 @@ | ||
Component({ | ||
properties: { | ||
item: { | ||
type: Object, | ||
value: {} | ||
}, | ||
}, | ||
methods: { | ||
toPostDetail(e) { | ||
wx.navigateTo({ | ||
url: `/pages/post/post?id=${e.currentTarget.dataset.id}`, | ||
}) | ||
}, | ||
}, | ||
}) |
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,7 @@ | ||
{ | ||
"component": true, | ||
"usingComponents": { | ||
"feidianItemTop": "/components/feidianItem/feidianItemTop/feidianItemTop", | ||
"feidianItemBottom": "/components/feidianItem/feidianItemBottom/feidianItemBottom" | ||
} | ||
} |
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,4 @@ | ||
<view class='item' hover-class='hover-class'> | ||
<feidianItemTop item='{{item}}'></feidianItemTop> | ||
<feidianItemBottom item='{{item}}'></feidianItemBottom> | ||
</view> |
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,4 @@ | ||
.item { | ||
background: #fff; | ||
margin-bottom: 20rpx; | ||
} |
8 changes: 8 additions & 0 deletions
8
components/feidianItem/feidianItemBottom/feidianItemBottom.js
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,8 @@ | ||
Component({ | ||
properties: { | ||
item: { | ||
type: Object, | ||
value: {} | ||
}, | ||
}, | ||
}) |
3 changes: 3 additions & 0 deletions
3
components/feidianItem/feidianItemBottom/feidianItemBottom.json
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,3 @@ | ||
{ | ||
"component": true | ||
} |
13 changes: 13 additions & 0 deletions
13
components/feidianItem/feidianItemBottom/feidianItemBottom.wxml
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,13 @@ | ||
<view class='footer'> | ||
<view class='i'> | ||
<image wx:if='{{item.isLiked}}' src='/img/zan_green_feidian3.png'></image> | ||
<image wx:if='{{!item.isLiked}}' src='/img/zan_grey_feidian3.png'></image> | ||
<text>{{item.likedCount || '赞'}}</text> | ||
</view> | ||
<view class='i'> | ||
<image src='/img/fd_reply.png'></image><text>{{item.commentCount || '评论'}}</text> | ||
</view> | ||
<view class='i'> | ||
<image src='/img/fd_share.png'></image> | ||
</view> | ||
</view> |
18 changes: 18 additions & 0 deletions
18
components/feidianItem/feidianItemBottom/feidianItemBottom.wxss
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,18 @@ | ||
.footer { | ||
display: flex; | ||
justify-content: space-around; | ||
align-items: center; | ||
border-top: 1rpx solid #efefef; | ||
height: 80rpx; | ||
color: #999; | ||
font-size: 28rpx; | ||
} | ||
.footer image { | ||
width: 36rpx; | ||
height: 36rpx; | ||
margin-right: 12rpx; | ||
} | ||
.footer .i { | ||
display: flex; | ||
align-items: center; | ||
} |
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,16 @@ | ||
Component({ | ||
properties: { | ||
item: { | ||
type: Object, | ||
value: {} | ||
}, | ||
}, | ||
methods: { | ||
toFeidianDetail (e) { | ||
let id = e.currentTarget.dataset.id | ||
wx.navigateTo({ | ||
url: `/pages/feidianDetail/feidianDetail?msgId=${id}`, | ||
}) | ||
}, | ||
}, | ||
}) |
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,3 @@ | ||
{ | ||
"component": true | ||
} |
Oops, something went wrong.