Browse Source

Merge branch 'master' of http://git.ycjcjy.com/civilized_city/miniapp

Your Name 2 years ago
parent
commit
4218771257

+ 2
- 2
src/app.config.js View File

@@ -1,6 +1,6 @@
1 1
 export default defineAppConfig({
2 2
   pages: [
3
-    'pages/index/index',
3
+    'pages/login/index',
4 4
     'pages/home/index',
5 5
     'pages/index3/index',
6 6
     'pages/index4/index',
@@ -11,7 +11,7 @@ export default defineAppConfig({
11 11
   tabBar: {
12 12
     list: [
13 13
       {
14
-        "pagePath": "pages/index/index",
14
+        "pagePath": "pages/login/index",
15 15
         "text": "首页"
16 16
       },
17 17
       {

+ 0
- 47
src/pages/index/index.jsx View File

@@ -1,47 +0,0 @@
1
-import { Component } from 'react'
2
-import { View, Input, Image } from '@tarojs/components'
3
-import { Form, 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';
7
-import WeChat from '../../assets/image/WeChat.png';
8
-import './index.less'
9
-
10
-export default (props) => {
11
-  return (
12
-    <View className='index'>
13
-      <View className='index-2'>
14
-        <Image className='img-1'
15
-          src={logo}
16
-        />
17
-      </View>
18
-      <View className='index-txt'>欢迎登录霍山文明创城</View>
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
-        <Button
27
-          className='btn-1'
28
-        >
29
-          忘记密码?
30
-        </Button>
31
-        <Button
32
-          type='primary'
33
-          className='btn-2'
34
-        >
35
-          登录
36
-        </Button>
37
-      </Form>
38
-      <View className='index-txt2'>——其他登录方式——</View>
39
-      <View className='index-4'>
40
-        <Image className='img-3'
41
-          src={WeChat}
42
-        />
43
-      </View>
44
-      <View className='index-txt3'>微信登录</View>
45
-    </View>
46
-  )
47
-}

+ 0
- 77
src/pages/index/index.less View File

@@ -1,77 +0,0 @@
1
-.index {
2
-  margin-top: 60px;
3
-  .index-2 {
4
-    width: 235px;
5
-    height: 235px;
6
-    margin: 0 auto;
7
-    .img-1 {
8
-      width: 235px;
9
-      height: 235px;
10
-    }
11
-  }
12
-  .index-txt {
13
-    text-align: center;
14
-    margin-bottom: 100px;
15
-  }
16
-  .form {
17
-    width: 620px;
18
-    .index-3 {
19
-      display: flex;
20
-      border-bottom: 1px solid #e9eaea;
21
-      width: 600px;
22
-      margin: 26px auto;
23
-      padding-bottom: 30px;
24
-      margin-top: 60px;
25
-      .img-2 {
26
-        margin-right: 30px;
27
-        width: 42px;
28
-        height: 44px;
29
-      }
30
-      .input-1 {
31
-        color: rgb(174, 174, 174);
32
-        margin-left: 15px;
33
-        padding-left: 20px;
34
-        flex-direction: column;
35
-        border-left: 1px solid black;
36
-      }
37
-    }
38
-    .btn-1 {
39
-      width: 190px;
40
-      height: 66px;
41
-      font-size: 28px;
42
-      color: #1a7565;
43
-      float: right;
44
-      margin-right: 72px;
45
-      margin-bottom: 104px;
46
-    }
47
-    .btn-2 {
48
-      width: 666px;
49
-      margin: 80px auto;
50
-      background-color: rgb(26, 117, 100);
51
-      color: #fff;
52
-    }
53
-  }
54
-  .index-txt2 {
55
-    font-size: 30px;
56
-    color: rgb(174, 174, 174);
57
-    margin: 10px auto;
58
-    text-align: center;
59
-    margin-top: 110px;
60
-  }
61
-  .index-4 {
62
-    width: 100px;
63
-    height: 100px;
64
-    margin: 0 auto;
65
-    .img-3 {
66
-      width: 100px;
67
-      height: 100px;
68
-      margin-top: 8px;
69
-    }
70
-  }
71
-  .index-txt3 {
72
-    font-size: 25px;
73
-    color: rgb(174, 174, 174);
74
-    text-align: center;
75
-    margin: 30px auto;
76
-  }
77
-}

+ 18
- 0
src/pages/login/components/Bottom.jsx View File

@@ -0,0 +1,18 @@
1
+import React from 'react';
2
+import { View, Image } from '@tarojs/components';
3
+import WeChat from '../../../assets/image/WeChat.png';
4
+import style from './bottom.module.less';
5
+
6
+export default (props) => {
7
+  return (
8
+    <View>
9
+      <View className={style['txt-box2']}>——其他登录方式——</View>
10
+      <View className={style['img-box2']}>
11
+        <Image className={style['img-wechat']}
12
+          src={WeChat}
13
+        />
14
+      </View>
15
+      <View className={style['wechat-login']}>微信登录</View>
16
+    </View>
17
+  )
18
+}

+ 30
- 0
src/pages/login/components/Form.jsx View File

@@ -0,0 +1,30 @@
1
+import React from 'react';
2
+import { View, Image, Input } from '@tarojs/components';
3
+import { Form, Button } from '@antmjs/vantui'
4
+import user from '../../../assets/image/user.png';
5
+import password from '../../../assets/image/password.png';
6
+import style from './form.module.less';
7
+
8
+export default (props) => {
9
+  return (
10
+    <Form className={style.form}>
11
+      <View className={style['input-box']}>
12
+        <Image src={user} className={style['img-icon']} />账号<Input className={style.input} placeholder='请输入您的登录账号' />
13
+      </View>
14
+      <View className={style['input-box']}>
15
+        <Image src={password} className={style['img-icon']} />密码<Input className={style.input} placeholder='请输入您的登录密码' />
16
+      </View>
17
+      <View
18
+        className={style['forget-pwd']}
19
+      >
20
+        忘记密码?
21
+      </View>
22
+      <Button
23
+        type='primary'
24
+        className={style.submit}
25
+      >
26
+        登录
27
+      </Button>
28
+    </Form>
29
+  )
30
+}

+ 18
- 0
src/pages/login/components/Head.jsx View File

@@ -0,0 +1,18 @@
1
+import React from 'react';
2
+import { View, Image } from '@tarojs/components';
3
+import logo from '../../../assets/image/logo.png';
4
+import style from './head.module.less';
5
+
6
+export default (props) => {
7
+  return (
8
+    <View>
9
+      <View className={style['img-box']}>
10
+        <Image className={style['img-logo']}
11
+          src={logo}
12
+        />
13
+      </View>
14
+      <View className={style['txt-box']}>欢迎登录霍山文明创城</View>
15
+    </View>
16
+  )
17
+
18
+}

+ 23
- 0
src/pages/login/components/bottom.module.less View File

@@ -0,0 +1,23 @@
1
+.txt-box2 {
2
+  font-size: 30px;
3
+  color: rgb(174, 174, 174);
4
+  margin: 10px auto;
5
+  text-align: center;
6
+  margin-top: 100px;
7
+}
8
+.img-box2 {
9
+  width: 100px;
10
+  height: 100px;
11
+  margin: 0 auto;
12
+  .img-wechat {
13
+    width: 100px;
14
+    height: 100px;
15
+    margin-top: 8px;
16
+  }
17
+}
18
+.wechat-login {
19
+  font-size: 25px;
20
+  color: rgb(174, 174, 174);
21
+  text-align: center;
22
+  margin: 12px auto;
23
+}

+ 36
- 0
src/pages/login/components/form.module.less View File

@@ -0,0 +1,36 @@
1
+.form {
2
+  width: 620px;
3
+  .input-box {
4
+    display: flex;
5
+    border-bottom: 1px solid #e9eaea;
6
+    width: 600px;
7
+    margin: 26px auto;
8
+    padding-bottom: 30px;
9
+    margin-top: 60px;
10
+    .img-icon {
11
+      margin-right: 30px;
12
+      width: 42px;
13
+      height: 44px;
14
+    }
15
+    .input {
16
+      color: rgb(174, 174, 174);
17
+      margin-left: 15px;
18
+      padding-left: 20px;
19
+      flex-direction: column;
20
+      border-left: 1px solid black;
21
+    }
22
+  }
23
+  .forget-pwd {
24
+    font-size: 28px;
25
+    color: var(--main-bg-color);
26
+    float: right;
27
+    margin-right: 72px;
28
+    margin-bottom: 104px;
29
+  }
30
+  .submit {
31
+    width: 666px;
32
+    margin: 80px auto;
33
+    background-color: var(--main-bg-color);
34
+    color: #fff;
35
+  }
36
+}

+ 13
- 0
src/pages/login/components/head.module.less View File

@@ -0,0 +1,13 @@
1
+.img-box {
2
+  width: 235px;
3
+  height: 235px;
4
+  margin: 0 auto;
5
+  .img-logo {
6
+    width: 235px;
7
+    height: 235px;
8
+  }
9
+}
10
+.txt-box {
11
+  text-align: center;
12
+  margin-bottom: 90px;
13
+}

src/pages/index/index.config.js → src/pages/login/index.config.js View File

@@ -1,3 +1,3 @@
1 1
 export default definePageConfig({
2
-  navigationBarTitleText: '首页'
2
+  navigationBarTitleText: '登录'
3 3
 })

+ 19
- 0
src/pages/login/index.jsx View File

@@ -0,0 +1,19 @@
1
+import Page from '@/layouts/index';
2
+import { View } from '@tarojs/components';
3
+import Head from "./components/Head";
4
+import Form from "./components/Form";
5
+import Bottom from "./components/Bottom";
6
+import './index.less'
7
+
8
+export default (props) => {
9
+  return (
10
+    <Page className='index'>
11
+      <View className='login-box'>
12
+        <Head />
13
+        <Form />
14
+        <Bottom />
15
+      </View>
16
+    </Page>
17
+
18
+  )
19
+}

+ 3
- 0
src/pages/login/index.less View File

@@ -0,0 +1,3 @@
1
+.login-box {
2
+  margin-top: 60px;
3
+}

+ 2
- 2
src/routes.js View File

@@ -5,8 +5,8 @@ const routes = [
5 5
    *  Tab 页面
6 6
    *********************************/
7 7
   {
8
-    name: '首页',
9
-    page: 'pages/index/index',
8
+    name: '登录',
9
+    page: 'pages/login/index',
10 10
     pkg: 'main',
11 11
     isTab: true,
12 12
     type: 'main',