李志伟 3 anos atrás
pai
commit
4f690982ee

+ 2
- 1
src/app.config.js Ver arquivo

@@ -1,6 +1,7 @@
1 1
 export default {
2 2
   pages: [
3
-    'pages/index/index'
3
+    'pages/index/index',
4
+    'pages/test/index',
4 5
   ],
5 6
   window: {
6 7
     backgroundTextStyle: 'light',

+ 8
- 0
src/components/Card/index.jsx Ver arquivo

@@ -0,0 +1,8 @@
1
+
2
+import './style.less'
3
+
4
+export default (props) => {
5
+
6
+    return <view className='card'>{props.children}</view>
7
+
8
+}

+ 6
- 0
src/components/Card/style.less Ver arquivo

@@ -0,0 +1,6 @@
1
+.card {
2
+    width: 100%;
3
+    background: #FFFFFF;
4
+    box-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.08);
5
+    border-radius: 24px;
6
+}

+ 13
- 1
src/pages/index/tabs/Guide.jsx Ver arquivo

@@ -1,7 +1,19 @@
1
+import Taro from '@tarojs/taro'
1 2
 import React from 'react'
3
+import Card from '@/components/Card'
2 4
 
3 5
 export default (props) => {
6
+
7
+  const handleClick = () => {
8
+    Taro.navigateTo({ url: '/pages/test/index' })
9
+  }
10
+
4 11
   return (
5
-    <view>入住指引</view>
12
+    <view onClick={handleClick}>
13
+      <Card>
14
+
15
+      入住指引
16
+      </Card>
17
+    </view>
6 18
   )
7 19
 }

+ 4
- 1
src/pages/index/tabs/Mine.jsx Ver arquivo

@@ -2,6 +2,9 @@ import React from 'react'
2 2
 
3 3
 export default (props) => {
4 4
   return (
5
-    <view>个人中心</view>
5
+    <view>
6
+      <button openType='getPhoneNumber'>个人中心</button>
7
+
8
+    </view>
6 9
   )
7 10
 }

+ 4
- 0
src/pages/test/index.config.js Ver arquivo

@@ -0,0 +1,4 @@
1
+export default {
2
+    navigationBarTitleText: '测试页',
3
+    navigationStyle: 'custom',
4
+  }

+ 10
- 0
src/pages/test/index.jsx Ver arquivo

@@ -0,0 +1,10 @@
1
+
2
+import CustomNav from '@/components/CustomNav'
3
+
4
+export default (props) => {
5
+  return (
6
+    <view>
7
+      <CustomNav title='测试页' />
8
+    </view>
9
+  )
10
+}