Skip to content

Commit 2ebd98d

Browse files
committed
update config info
1 parent 32b0ff4 commit 2ebd98d

File tree

13 files changed

+57
-25
lines changed

13 files changed

+57
-25
lines changed

README.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,40 @@
11
## react-native-cnblogs
2-
This is the cnblogs.com mobile client powered by react-native. since i can't afford to buy an apple mechine, this client can just run on android.
32

4-
## Screen Shot
3+
This is based on the react-native implementation of the cnblogs.com's mobile client, because I have no money to buy expensive Apple computer, the current version only supports android platform. if you have any comments or suggestions, welcome feedback.
54

6-
![home page ](http://123.56.135.166/cnblog/public/img/screenshot/main.jpg?v=2.0.2)
5+
## some screenshot
76

8-
![detail page](http://123.56.135.166/cnblog/public/img/screenshot/detail.jpg?v=2.0.2)
7+
![login page ](http://123.56.135.166/cnblog/public/img/screenshot_new/login.png)
98

10-
![author page](http://123.56.135.166/cnblog/public/img/screenshot/search.jpg?v=2.0.2)
9+
![home page ](http://123.56.135.166/cnblog/public/img/screenshot_new/home.png)
1110

12-
![comment page](http://123.56.135.166/cnblog/public/img/screenshot/comment.jpg?v=2.0.2)
11+
![user page ](http://123.56.135.166/cnblog/public/img/screenshot_new/user.png)
1312

14-
![offline page](http://123.56.135.166/cnblog/public/img/screenshot/offline.jpg?v=2.0.2)
13+
![detail page](http://123.56.135.166/cnblog/public/img/screenshot_new/post.png)
1514

16-
![search page](http://123.56.135.166/cnblog/public/img/screenshot/author.jpg?v=2.0.2)
15+
![comment page](http://123.56.135.166/cnblog/public/img/screenshot_new/comment.png)
1716

18-
## Download
17+
![drawer page](http://123.56.135.166/cnblog/public/img/screenshot_new/drawer.png)
18+
19+
![question page](http://123.56.135.166/cnblog/public/img/screenshot_new/question.png)
20+
21+
## download
1922
> qrcode:
2023
21-
![search page](http://123.56.135.166/cnblog/public/img/qrcode/cnblogs_qrcode_2.0.1.jpg)
24+
![download qrcode](http://123.56.135.166/cnblog/public/img/qrcode/cnblogs_qrcode_2.0.1.jpg)
2225

23-
or you can access the download link: http://fir.im/togayther
26+
or you can access the following apk download link: http://fir.im/togayther
2427

25-
## How to run
26-
note: if you behind GFW, strongly recommend that you work with a vpn.
28+
## how to run
29+
note: if you behind GFW, strongly recommend that you work with vpn.
2730

2831
>* config your react-native environment: https://facebook.github.io/react-native/docs/getting-started.html
2932
>* git clone https://github.com/togayther/react-native-cnblogs.git
3033
>* npm install
31-
>* react-native-vector-icons & react-native-code-push, you need follow its doc to integrate it into android.
34+
>* react-native-vector-icons & react-native-code-push & react-native-toast, you need to refer to their documentation to integrate them into your project
35+
>* connect physical device or turn on the android emulator
3236
>* react-native run-android
33-
>* good luck and enjoy.
37+
>* good luck and enjoy
3438
3539
## License
3640
This project is available under the MIT license.

screenshot/comment.png

46.6 KB
Loading

screenshot/drawer.png

29.9 KB
Loading

screenshot/home.png

30.9 KB
Loading

screenshot/login.png

11.1 KB
Loading

screenshot/offline.png

28.4 KB
Loading

screenshot/post.png

54.3 KB
Loading

screenshot/question.png

23.5 KB
Loading

screenshot/user.png

15.1 KB
Loading

source/config/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ export const postCategory = {
3030
};
3131

3232
export const authData = {
33-
pubKey : "-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCp0wHYbg/NOPO3nzMD3dndwS0MccuMeXCHgVlGOoYyFwLdS24Im2e7YyhB0wrUsyYf0/nhzCzBK8ZC9eCWqd0aHbdgOQT6CuFQBMjbyGYvlVYU2ZP7kG9Ft6YV6oc9ambuO7nPZh+bvXH0zDKfi02prknrScAKC0XhadTHT3Al0QIDAQAB\n-----END PUBLIC KEY-----",
34-
clientId: "cdfb6ec8-e78d-4c70-82df-7b1651a98808",
35-
clientSecret: "TFgkwiEVDBGZwPncPL9b5a9_z7E2pipUPFHo9OWIeOXkGTImxr_-LQBMw9_gQLX94Faqkbs9VbL_CKk-"
33+
pubKey : "", //cnblogs官方申请rsa加密公钥
34+
clientId: "", //cnblogs官方申请clientId
35+
clientSecret: "" //cnblogs官方申请clientSecret
3636
};
3737

3838
export const pageSize = 10;

source/view/offline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class OfflinePage extends Component {
112112
)
113113
}
114114
return (
115-
<HintMessage />
115+
<HintMessage message={ ' - 暂无离线记录 - ' }/>
116116
);
117117
}
118118

source/view/postComment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class PostCommentPage extends Component {
122122
)
123123
}
124124
return(
125-
<HintMessage />
125+
<HintMessage message=" - 暂无回复记录 - "/>
126126
);
127127
}
128128

source/view/questionAdd.js

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
View,
44
Text,
55
Image,
6+
Alert,
67
TextInput,
78
StyleSheet,
89
ScrollView,
@@ -25,18 +26,31 @@ const navTitle = "博问发布";
2526
const backgroundImageSource = getImageSource(15);
2627
const category = postCategory.question;
2728

29+
const questionAddEnabled = false;
30+
2831
class QuestionAddPage extends Component {
2932

3033
constructor (props) {
3134
super(props);
3235
this.state = {
33-
questionTitle:'有没有好用的博客园第三方客户端?',
34-
questionContent:'如题,求推荐。顺便借鉴一些东西。',
35-
questionTags:'tags',
36-
questionFlags:'20'
36+
questionTitle:'',
37+
questionContent:'',
38+
questionTags:'',
39+
questionFlags:'',
40+
pending: false
3741
}
3842
}
3943

44+
componentDidFocus(){
45+
Alert.alert(
46+
'系统提示',
47+
'博问的发布还有一点儿问题没有解决',
48+
[
49+
{text: '好的', onPress: () => null }
50+
]
51+
)
52+
}
53+
4054
questionValidator(){
4155
let questionTitle = this.state.questionTitle,
4256
questionContent = this.state.questionContent,
@@ -63,6 +77,9 @@ class QuestionAddPage extends Component {
6377
}
6478

6579
onQuestionSendPress(){
80+
if(questionAddEnabled === false){
81+
return;
82+
}
6683
const questionData = this.questionValidator();
6784
if(questionData){
6885
this.setState({ pending: true });
@@ -120,6 +137,7 @@ class QuestionAddPage extends Component {
120137
ref="txtTitle"
121138
maxLength = { 80 }
122139
multiline = { true }
140+
editable = { questionAddEnabled }
123141
style={ [ComponentStyles.textarea, styles.text_title] }
124142
placeholder={'请输入博问标题...'}
125143
placeholderTextColor={ StyleConfig.color_dark }
@@ -144,6 +162,7 @@ class QuestionAddPage extends Component {
144162
ref="txtContent"
145163
maxLength = { 1000 }
146164
multiline = { true }
165+
editable = { questionAddEnabled }
147166
style={ [ComponentStyles.textarea, styles.text_content] }
148167
placeholder={'请输入博问详情...'}
149168
placeholderTextColor={ StyleConfig.color_gray }
@@ -169,8 +188,9 @@ class QuestionAddPage extends Component {
169188
maxLength = { 5 }
170189
multiline = { false }
171190
keyboardType='numeric'
191+
editable = { questionAddEnabled }
172192
style={ [ComponentStyles.input] }
173-
placeholder={'请输入悬赏积分,不输入则默认为0'}
193+
placeholder={'请输入悬赏积分,留空则默认为0'}
174194
placeholderTextColor={ StyleConfig.color_gray }
175195
underlineColorAndroid = { 'transparent' }
176196
onChangeText = {(val)=>this.setState({questionFlags: val})}
@@ -239,6 +259,14 @@ class QuestionAddPage extends Component {
239259
)
240260
}
241261

262+
renderPending(){
263+
if(this.state.pending === true){
264+
return (
265+
<Spinner style={ ComponentStyles.pending_container }/>
266+
)
267+
}
268+
}
269+
242270
render() {
243271
return (
244272
<View style={ ComponentStyles.container }>

0 commit comments

Comments
 (0)