Browse Source

科室选择

[baozhangchao] 3 years ago
parent
commit
8a06086934

+ 1
- 0
package.json View File

41
     "@tarojs/react": "3.3.6",
41
     "@tarojs/react": "3.3.6",
42
     "@tarojs/runtime": "3.3.6",
42
     "@tarojs/runtime": "3.3.6",
43
     "@tarojs/taro": "3.3.6",
43
     "@tarojs/taro": "3.3.6",
44
+    "dayjs": "^1.11.1",
44
     "react": "^17.0.0",
45
     "react": "^17.0.0",
45
     "react-dom": "^17.0.0"
46
     "react-dom": "^17.0.0"
46
   },
47
   },

+ 5
- 1
src/app.js View File

1
 import { Component } from 'react'
1
 import { Component } from 'react'
2
+import { View } from '@tarojs/components';
2
 import '@antmjs/vantui/lib/index.less';
3
 import '@antmjs/vantui/lib/index.less';
3
 import './app.less'
4
 import './app.less'
4
 
5
 
14
 
15
 
15
   // this.props.children 是将要会渲染的页面
16
   // this.props.children 是将要会渲染的页面
16
   render () {
17
   render () {
17
-    return this.props.children
18
+    return <View className='index'>
19
+      {this.props.children}
20
+    </View>
21
+
18
   }
22
   }
19
 }
23
 }
20
 
24
 

BIN
src/assets/barcodeimg.png View File


+ 25
- 0
src/pages/DepartmentSelection/index.jsx View File

1
+import { View, Text } from "@tarojs/components"
2
+import { useEffect, useState } from "react"
3
+import Taro, { useDidShow } from "@tarojs/taro"
4
+import { Button } from "@antmjs/vantui"
5
+
6
+// import BottomMoadl from '@/components/BottomMoadl/index'
7
+
8
+
9
+
10
+
11
+
12
+
13
+import './style.less'
14
+
15
+export default (props) => {
16
+
17
+
18
+
19
+  return (
20
+    <View className='page-index'>
21
+
22
+
23
+    </View>
24
+  )
25
+}

+ 59
- 0
src/pages/DepartmentSelection/style.less View File

1
+.orders-listBox-RihtboxBoxOrderViewText:before {
2
+  content: "";
3
+  display: block;
4
+  position: absolute;
5
+  width: 100%;
6
+  bottom: -10px;
7
+  left: 0;
8
+  border-bottom: 20px dotted rgb(255, 255, 255);
9
+}
10
+
11
+.orders-listBox-RihtboxBoxOrderViewText {
12
+  width: 85vw;
13
+  margin: 35px auto 44px auto;
14
+  padding: 62px 30px 93px 30px;
15
+  background: #ffffff;
16
+  box-shadow: 0px 4px 40px 0px rgba(0, 0, 0, 0.12);
17
+  border-radius: 40px 40px 0px 0px;
18
+  position: relative;
19
+
20
+  .View-LiftTextTop {
21
+    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
22
+    padding-bottom: 20px;
23
+    padding-top: 0;
24
+  }
25
+  View:nth-child(6) {
26
+    padding-bottom: 40px;
27
+
28
+    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
29
+  }
30
+  > View {
31
+    padding: 15px 0;
32
+    font-size: 32px;
33
+    font-weight: bold;
34
+    color: #666666;
35
+    > Text {
36
+      color: #222222;
37
+    }
38
+
39
+    .feiyongStyle {
40
+      justify-content: space-between;
41
+      display: flex;
42
+      color: #222222;
43
+      &-charges {
44
+        background: linear-gradient(180deg, #fa7878 0%, #b61515 100%);
45
+        -webkit-background-clip: text;
46
+        -webkit-text-fill-color: transparent;
47
+      }
48
+      &-stateStyle {
49
+      }
50
+    }
51
+  }
52
+}
53
+
54
+.BottomtBut {
55
+  width: 99vw;
56
+  position: absolute;
57
+  bottom: 5vh;
58
+  display: flex;
59
+}

+ 15
- 17
src/pages/index/index.jsx View File

1
-import { View, Text, Button } from '@tarojs/components'
1
+import { View, Text, Image } from '@tarojs/components'
2
 import { useEffect, useRef, useState } from 'react'
2
 import { useEffect, useRef, useState } from 'react'
3
-
3
+import dayjs from 'dayjs'
4
+import { Icon } from "@antmjs/vantui";
5
+import Taro from '@tarojs/taro';
4
 // import userBck from '../../assets/userBck.png'
6
 // import userBck from '../../assets/userBck.png'
7
+import barcodeimg from '../../assets/barcodeimg.png'
5
 
8
 
6
 
9
 
7
 import './style.less'
10
 import './style.less'
12
 
15
 
13
   const [showTime, setShowTime] = useState("")
16
   const [showTime, setShowTime] = useState("")
14
   const timer = useRef();
17
   const timer = useRef();
18
+  const userId = '320888800110023011';
15
   useEffect(() => {
19
   useEffect(() => {
16
     setInterval(() => {
20
     setInterval(() => {
17
-      const ymd = new Date()
18
-      const time = ymd.toTimeString().slice(0, 8)
19
-      var year = ymd.getFullYear();
20
-      var month = ymd.getMonth();
21
-      var day = ymd.getDate();
22
-      const times = `${year}-${month}-${day} ${time}`
23
-      // //获取时分秒
24
-      // var h = time.getHours();
25
-      // var m = time.getMinutes();
26
-      // var s = time.getSeconds();
21
+      const times = dayjs(new Date().getTime()).format('YYYY-MM-DD HH:mm:ss');
27
 
22
 
28
       setShowTime(times)
23
       setShowTime(times)
29
     }, 1000)
24
     }, 1000)
36
   const goUserInfo = () => {
31
   const goUserInfo = () => {
37
 
32
 
38
     // 跳转到目的页面,在当前页面打开
33
     // 跳转到目的页面,在当前页面打开
39
-    // Taro.redirectTo({
40
-    //   url: '/pages/setUserInfo/index'
41
-    // })
34
+    Taro.redirectTo({
35
+      url: '/pages/setUserInfo/index'
36
+    })
42
 
37
 
43
   }
38
   }
44
 
39
 
51
       <View className='index-UserQRcode-headerInfo' >
46
       <View className='index-UserQRcode-headerInfo' >
52
         <View className='index-UserQRcode-headerInfo-User'>
47
         <View className='index-UserQRcode-headerInfo-User'>
53
           <View className='index-UserQRcode-headerInfo-User-NameInfo'>姓名:鲍张抄</View>
48
           <View className='index-UserQRcode-headerInfo-User-NameInfo'>姓名:鲍张抄</View>
54
-          <View className='index-UserQRcode-headerInfo-User-setNameInfo'>+修改信息</View>
49
+          <View onClick={goUserInfo} className='index-UserQRcode-headerInfo-User-setNameInfo'><Icon name='edit' />修改信息</View>
55
         </View>
50
         </View>
56
-        <View className='index-UserQRcode-headerInfo-UserID'>身份证:320888800110023011</View>
51
+        <View className='index-UserQRcode-headerInfo-UserID'>身份证:{userId.replace(/^(\d{6})\d+(\d{4})$/, "$1******$2")}</View>
57
       </View>
52
       </View>
58
       <View className='index-UserQRcode-cententQR'>
53
       <View className='index-UserQRcode-cententQR'>
59
         <View className='index-UserQRcode-cententQR-Times'>
54
         <View className='index-UserQRcode-cententQR-Times'>
60
           {showTime}
55
           {showTime}
61
         </View>
56
         </View>
57
+        <View className='index-UserQRcode-cententQR-Barcode'>
58
+          <Image src={barcodeimg} />
59
+        </View>
62
       </View>
60
       </View>
63
     </View>
61
     </View>
64
   )
62
   )

+ 17
- 2
src/pages/index/style.less View File

1
 .index-UserQRcode {
1
 .index-UserQRcode {
2
   width: 100vw;
2
   width: 100vw;
3
+  height: 100vh;
3
   margin: 0 auto;
4
   margin: 0 auto;
5
+  background-color: #f2f1f6;
6
+
4
   &-headerInfo {
7
   &-headerInfo {
5
     color: white;
8
     color: white;
6
     height: 35vh;
9
     height: 35vh;
30
 
33
 
31
   &-cententQR {
34
   &-cententQR {
32
     width: 95%;
35
     width: 95%;
33
-    height: 40vh;
34
-    box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.12);
36
+    height: 65vh;
37
+    // box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.12);
35
     border-radius: 15px;
38
     border-radius: 15px;
36
     background-color: white;
39
     background-color: white;
37
     margin: 0 auto;
40
     margin: 0 auto;
38
     position: relative;
41
     position: relative;
39
     top: -15vh;
42
     top: -15vh;
40
     &-Times {
43
     &-Times {
44
+      padding-top: 3vh;
41
       text-align: center;
45
       text-align: center;
42
       font-weight: 800;
46
       font-weight: 800;
43
       font-size: 8vw;
47
       font-size: 8vw;
44
     }
48
     }
49
+    &-Barcode {
50
+      width: 80%;
51
+      height: 18vh;
52
+      margin: 0 auto;
53
+      position: relative;
54
+      top: 30%;
55
+      > Image {
56
+        width: 100%;
57
+        height: 100%;
58
+      }
59
+    }
45
   }
60
   }
46
 }
61
 }