fangmingyue 2 年之前
父節點
當前提交
a6d01018af
共有 9 個檔案被更改,包括 19161 行新增26 行删除
  1. 19007
    0
      package-lock.json
  2. 8
    7
      package.json
  3. 二進制
      src/assets/image/WeChat.png
  4. 二進制
      src/assets/image/logo.png
  5. 二進制
      src/assets/image/password.png
  6. 二進制
      src/assets/image/user.png
  7. 38
    19
      src/pages/index/index.jsx
  8. 55
    0
      src/pages/index/index.less
  9. 53
    0
      src/routes.js

+ 19007
- 0
package-lock.json
文件差異過大導致無法顯示
查看文件


+ 8
- 7
package.json 查看文件

@@ -35,24 +35,25 @@
35 35
   ],
36 36
   "author": "",
37 37
   "dependencies": {
38
+    "@antmjs/vantui": "^2.3.5",
38 39
     "@babel/runtime": "^7.7.7",
39 40
     "@tarojs/components": "3.5.7",
40 41
     "@tarojs/helper": "3.5.7",
41
-    "@tarojs/plugin-platform-weapp": "3.5.7",
42
+    "@tarojs/plugin-framework-react": "3.5.7",
42 43
     "@tarojs/plugin-platform-alipay": "3.5.7",
43
-    "@tarojs/plugin-platform-tt": "3.5.7",
44
-    "@tarojs/plugin-platform-swan": "3.5.7",
45 44
     "@tarojs/plugin-platform-jd": "3.5.7",
46 45
     "@tarojs/plugin-platform-qq": "3.5.7",
46
+    "@tarojs/plugin-platform-swan": "3.5.7",
47
+    "@tarojs/plugin-platform-tt": "3.5.7",
48
+    "@tarojs/plugin-platform-weapp": "3.5.7",
49
+    "@tarojs/react": "3.5.7",
47 50
     "@tarojs/router": "3.5.7",
48 51
     "@tarojs/runtime": "3.5.7",
49 52
     "@tarojs/shared": "3.5.7",
50 53
     "@tarojs/taro": "3.5.7",
51 54
     "@tarojs/taro-h5": "3.5.7",
52
-    "@tarojs/plugin-framework-react": "3.5.7",
53
-    "@tarojs/react": "3.5.7",
54
-    "react-dom": "^18.0.0",
55
-    "react": "^18.0.0"
55
+    "react": "^18.0.0",
56
+    "react-dom": "^18.0.0"
56 57
   },
57 58
   "devDependencies": {
58 59
     "@babel/core": "^7.8.0",

二進制
src/assets/image/WeChat.png 查看文件


二進制
src/assets/image/logo.png 查看文件


二進制
src/assets/image/password.png 查看文件


二進制
src/assets/image/user.png 查看文件


+ 38
- 19
src/pages/index/index.jsx 查看文件

@@ -1,24 +1,43 @@
1 1
 import { Component } from 'react'
2
-import { View, Text } from '@tarojs/components'
2
+import { View, Text, Input, Image } from '@tarojs/components'
3
+import { Form, FormItem, Button } from '@antmjs/vantui'
4
+import logo from '../../assets/image/logo.png';
5
+import user from '../../assets/image/user.png';
6
+import password from '../../assets/image/password.png';
3 7
 import './index.less'
4 8
 
5
-export default class Index extends Component {
6
-
7
-  componentWillMount () { }
8
-
9
-  componentDidMount () { }
10
-
11
-  componentWillUnmount () { }
12
-
13
-  componentDidShow () { }
14
-
15
-  componentDidHide () { }
16
-
17
-  render () {
18
-    return (
19
-      <View className='index'>
20
-        <Text>Hello world!</Text>
9
+export default (props) => {
10
+  return (
11
+    <View className='index'>
12
+      <View className='index-2'>
13
+        <Image className='img-1'
14
+          src={logo}
15
+        />
21 16
       </View>
22
-    )
23
-  }
17
+
18
+      <Text className='txt-1'>欢迎登录霍山文明创建</Text>
19
+      <Form className='form'>
20
+        <View className='index-3'>
21
+          <Image src={user} className='img-2' />账号<Input className='input-1' placeholder='请输入您的登录账号' />
22
+        </View>
23
+        <View className='index-3'>
24
+          <Image src={password} className='img-2' />密码<Input className='input-1' placeholder='请输入您的登录密码' />
25
+        </View>
26
+        {/* <FormItem label='账号' className='item'>
27
+            <Input className='input-1' placeholder='请输入您的登录账号' />
28
+          </FormItem>
29
+          <FormItem label='证件'>
30
+            <Input placeholder='请输入您的登录密码' />
31
+          </FormItem> */}
32
+        <Button
33
+          type='primary'
34
+          className='btn'
35
+        >
36
+          登录
37
+        </Button>
38
+      </Form>
39
+      <Text className='txt-2'>——其他登录方式——</Text>
40
+      <Text className='txt-3'>微信登录</Text>
41
+    </View>
42
+  )
24 43
 }

+ 55
- 0
src/pages/index/index.less 查看文件

@@ -0,0 +1,55 @@
1
+.index {
2
+  .index-2 {
3
+    width: 235px;
4
+    height: 235px;
5
+    margin: 0 auto;
6
+  }
7
+  .img-1 {
8
+    width: 235px;
9
+    height: 235px;
10
+  }
11
+  .txt-1 {
12
+    display: block;
13
+    width: 320px;
14
+    margin: 10px auto;
15
+    margin-bottom: 80px;
16
+  }
17
+  .form {
18
+    width: 620px;
19
+    .index-3 {
20
+      display: flex;
21
+      margin-bottom: 26px;
22
+      .img-2 {
23
+        margin-left: 100px;
24
+        margin-right: 30px;
25
+        width: 42px;
26
+        height: 44px;
27
+      }
28
+      .input-1 {
29
+        margin-left: 15px;
30
+        flex-direction: column;
31
+        border-left: 1px solid black;
32
+      }
33
+    }
34
+    .btn {
35
+      width: 600px;
36
+      margin: 80px auto;
37
+      background-color: rgb(26, 117, 100);
38
+      color: #fff;
39
+    }
40
+  }
41
+  .txt-2 {
42
+    font-size: 30px;
43
+    color: rgb(174, 174, 174);
44
+    display: block;
45
+    width: 330px;
46
+    margin: 10px auto;
47
+  }
48
+  .txt-3 {
49
+    font-size: 25px;
50
+    color: rgb(174, 174, 174);
51
+    display: block;
52
+    width: 100px;
53
+    margin: 10px auto;
54
+  }
55
+}

+ 53
- 0
src/routes.js 查看文件

@@ -0,0 +1,53 @@
1
+
2
+const routes = [
3
+
4
+  /**********************************
5
+   *  Tab 页面
6
+   *********************************/
7
+  {
8
+    name: '首页',
9
+    page: 'pages/index/index',
10
+    pkg: 'main',
11
+    isTab: true,
12
+    type: 'main',
13
+    shortcut: {
14
+      chat: false,
15
+      consultant: true,
16
+    },
17
+    // auth: ['phone', 'avatar']
18
+  },
19
+]
20
+
21
+/**
22
+ * 获取 app pages 列表
23
+ */
24
+function getPages () {
25
+  const grp = routes.reduce((g, r) => {
26
+    const { pkg, page } = r
27
+    const pg = g[pkg] || []
28
+
29
+    return Object.assign(g, {
30
+      [`${pkg}`]: pg.concat(page),
31
+    })
32
+  }, {});
33
+
34
+  const pages = grp.main;
35
+  const subPackages = Object.keys(grp).filter(x => x !== 'main').reduce(((pkg, key) => {
36
+    return pkg.concat({
37
+      root: key,
38
+      pages: grp[key],
39
+    })
40
+  }), [])
41
+
42
+
43
+  return {
44
+    pages,
45
+    subPackages,
46
+  }
47
+}
48
+
49
+// eslint-disable-next-line import/no-commonjs
50
+module.exports = {
51
+  routes,
52
+  getPages,
53
+};