postingInitialState.js
980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
* # postingInitialState.js
*
*
*/
'use strict';
/**
* ## Import immutable record
*/
import Immutable, {List, Record} from 'immutable';
/**
* ## InitialState
*
* The fields we're concerned with
*/
let InitialState = Record({
canSubmit: false, // 是否可以点击发送button
boards: new (Record({
isFetching: false,
error: null,
list: List(),
})),
userState: new (Record({
isFetching: false,
error: null,
forbidNickname: 'N',
forbidSpeaking: 'N',
})),
post: new (Record({
title: '',
content: '',
sectionId: 0,
sectionName: '',
assets: List(),
})),
postState: new (Record({
isPosting: false, // 是否正在上传
error: null,
showProcess: false,
status: 0, // 0 - 未发布,1 - 发布中,2 - 发布成功,3 - 发布失败
stage: 0, // 0 - 图片上传,1 - 帖子上传
uploadedImageCount: 0, // 已上传图片数量
uploadedImagePercent: 0, // 已上传图片百分比
})),
});
export default InitialState;