Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 412cd6a

Browse files
committed
修改日签功能
1 parent e1a8adb commit 412cd6a

13 files changed

Lines changed: 638 additions & 229 deletions

File tree

App.js

Lines changed: 17 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import MineScreen from './src/navPages/MineScreen';
99
import StatiScreen from './src/navPages/StatiScreen';
1010
import showSayingList from './src/sayings/ShowSayingList'
1111
import setSaying from './src/sayings/SetSaying'
12+
import testPage from './testPage'
1213

1314

1415
const Tab = createBottomTabNavigator();
@@ -22,39 +23,27 @@ function SayingStackScreen(){
2223
component={MineScreen} options={{headerShown:false}}/>
2324
<sayingStack.Screen name="sayinglist"
2425
component={showSayingList}
25-
options={{
26-
headerTitleStyle:{
27-
alignSelf:'center',
28-
textAlign: 'center',
29-
flex:1,
30-
},
31-
title:"我的日签",
32-
// headerTitle:(
33-
// <View style={{}}><Text style={{textAlign:"center"}}>我的日签</Text></View>
34-
// ),
35-
36-
// headerTitle: props => <LogoTitle {...props} />,
37-
headerRight: () => (
38-
// <Button
39-
// onPress={() => alert('This is a button!')}
40-
// title="Info"
41-
// color="#fff"
42-
// />
43-
<View>
44-
<Image source=""></Image>
45-
</View>
46-
),
47-
}}/>
26+
options={{ headerShown: false }}
27+
/>
4828
<sayingStack.Screen name="setsaying"
49-
component={setSaying}
50-
options={{
51-
title:"编辑日签"
52-
}}/>
29+
component={setSaying} options={{ headerShown:false }}/>
5330
</sayingStack.Navigator>
5431
);
5532
}
5633

5734

35+
const testStack=createStackNavigator();
36+
function testStackScreen(){
37+
return (
38+
<testStack.Navigator>
39+
<testStack.Screen name="home"
40+
component={StatiScreen} />
41+
<testStack.Screen name="test"
42+
component={testPage} />
43+
</testStack.Navigator>
44+
);
45+
}
46+
5847
export default function App() {
5948
console.log("aaaaaaaaaaaaaaaaaaaaa");
6049
return (
@@ -130,7 +119,7 @@ export default function App() {
130119
}}
131120
>
132121
<Tab.Screen name="习惯" component={CustomScreen} options={{ headerShown: false }} />
133-
<Tab.Screen name="统计" component={StatiScreen} options={{ headerShown: false }}/>
122+
<Tab.Screen name="统计" component={testStackScreen} options={{ headerShown: false }}/>
134123
<Tab.Screen name="日记" component={DiaryScreen} options={{ headerShown: false }} />
135124
<Tab.Screen name="我的" component={SayingStackScreen} options={{ headerShown: false }}/>
136125
</Tab.Navigator>

img/add1.png

2.99 KB
Loading

img/add2.png

7.91 KB
Loading

img/back1.png

3.77 KB
Loading

img/send1.png

9.09 KB
Loading

src/data/randomsaying.json

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
[
2+
{
3+
"id":1,
4+
"content":"人生而自由,却无往不在枷锁之中。"
5+
},
6+
{
7+
"id":2,
8+
"content":"大风吹着我和山岗,我的面前有一万座村庄,我的身后有一万座村庄,千灯万盏,我只有一轮月亮。"
9+
10+
},
11+
{
12+
"id":3,
13+
"content":"家人闲坐,灯火可亲。"
14+
15+
},
16+
{
17+
"id":4,
18+
"content":"一定要爱着点什么,恰似草木对光阴的钟情。"
19+
20+
},
21+
{
22+
"id":5,
23+
"content":"有人说故事像说着自己,有人说着自己像故事。"
24+
},
25+
{
26+
"id":6,
27+
"content":"愿少年,乘风破浪,他日毋忘化雨功。"
28+
},
29+
{
30+
"id":7,
31+
"content":".美,多少要包含一点偶然。"
32+
},
33+
{
34+
"id":8,
35+
"content":"一个人要兴旺发达,得有那么一点精气神。"
36+
37+
},
38+
{
39+
"id":9,
40+
"content":"我们有过各种创伤,但我们今天应该快活。"
41+
42+
},
43+
{
44+
"id":10,
45+
"content":"四处走走,你会热爱这个世界。"
46+
47+
},
48+
{
49+
"id":11,
50+
"content":"从此无心爱良夜,任他明月下西楼。"
51+
},
52+
{
53+
"id":12,
54+
"content":"什么时候开始行动都不晚。"
55+
},
56+
{
57+
"id":13,
58+
"content":"怕什么真理无穷,进一寸有进一寸的欢喜。"
59+
},
60+
{
61+
"id":14,
62+
"content":"你没有如期归来,而这正是离别的意义。"
63+
64+
},
65+
{
66+
"id":15,
67+
"content":"祝你万事胜意。"
68+
69+
},
70+
{
71+
"id":16,
72+
"content":"欲买桂花同载酒,终不似,少年游。"
73+
74+
},
75+
{
76+
"id":17,
77+
"content":"目击众神死亡的草原上野花一片,远在远方的风比远方更远。"
78+
},
79+
{
80+
"id":18,
81+
"content":"热爱可抵岁月漫长。"
82+
},
83+
{
84+
"id":19,
85+
"content":"不要温和地走进那个良夜。"
86+
},
87+
{
88+
"id":20,
89+
"content":"你可以铿锵有力,但不要仗势叫嚣。"
90+
91+
},
92+
{
93+
"id":21,
94+
"content":"有一天,我看见过四十三次日落。"
95+
96+
},
97+
{
98+
"id":22,
99+
"content":"值得你做的事情,值得你做好。"
100+
101+
},
102+
{
103+
"id":23,
104+
"content":"在世间,本就是各人下雪,各人有各人的隐晦和皎洁。"
105+
},
106+
{
107+
"id":24,
108+
"content":"人之所以伤心,是因为看得不够远。"
109+
},
110+
{
111+
"id":25,
112+
"content":"离群索居者,不是野兽,便是神灵。"
113+
114+
},
115+
{
116+
"id":26,
117+
"content":"活在这珍贵的世间,太阳强烈,水波温柔。"
118+
119+
},
120+
{
121+
"id":27,
122+
"content":"愿无岁月可回首,且以深情度余生。"
123+
},
124+
{
125+
"id":28,
126+
"content":"你没经历过我的苦,就不要劝我大度。"
127+
},
128+
{
129+
"id":29,
130+
"content":"山不过来,我就过去。"
131+
},
132+
{
133+
"id":30,
134+
"content":"但行好事,莫问前程。"
135+
136+
}
137+
]
138+
139+

0 commit comments

Comments
 (0)