[baozhangchao] 3 年之前
當前提交
a8d9fd1959

+ 12
- 0
.editorconfig 查看文件

@@ -0,0 +1,12 @@
1
+# http://editorconfig.org
2
+root = true
3
+
4
+[*]
5
+indent_style = space
6
+indent_size = 2
7
+charset = utf-8
8
+trim_trailing_whitespace = true
9
+insert_final_newline = true
10
+
11
+[*.md]
12
+trim_trailing_whitespace = false

+ 7
- 0
.eslintrc 查看文件

@@ -0,0 +1,7 @@
1
+{
2
+  "extends": ["taro/react"],
3
+  "rules": {
4
+    "react/jsx-uses-react": "off",
5
+    "react/react-in-jsx-scope": "off"
6
+  }
7
+}

+ 6
- 0
.gitignore 查看文件

@@ -0,0 +1,6 @@
1
+dist/
2
+deploy_versions/
3
+.temp/
4
+.rn_temp/
5
+node_modules/
6
+.DS_Store

+ 12
- 0
babel.config.js 查看文件

@@ -0,0 +1,12 @@
1
+// babel-preset-taro 更多选项和默认值:
2
+// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
3
+module.exports = {
4
+  presets: [
5
+    ['taro', {
6
+      framework: 'react',
7
+      ts: false
8
+    },
9
+    ]
10
+  ]
11
+}
12
+

+ 9
- 0
config/dev.js 查看文件

@@ -0,0 +1,9 @@
1
+module.exports = {
2
+  env: {
3
+    NODE_ENV: '"development"'
4
+  },
5
+  defineConstants: {
6
+  },
7
+  mini: {},
8
+  h5: {}
9
+}

+ 70
- 0
config/index.js 查看文件

@@ -0,0 +1,70 @@
1
+const config = {
2
+  projectName: 'hospitalGN',
3
+  date: '2022-5-6',
4
+  designWidth: 750,
5
+  deviceRatio: {
6
+    640: 2.34 / 2,
7
+    750: 1,
8
+    828: 1.81 / 2
9
+  },
10
+  sourceRoot: 'src',
11
+  outputRoot: 'dist',
12
+  plugins: [],
13
+  defineConstants: {
14
+  },
15
+  copy: {
16
+    patterns: [
17
+    ],
18
+    options: {
19
+    }
20
+  },
21
+  framework: 'react',
22
+  mini: {
23
+    postcss: {
24
+      pxtransform: {
25
+        enable: true,
26
+        config: {
27
+
28
+        }
29
+      },
30
+      url: {
31
+        enable: true,
32
+        config: {
33
+          limit: 1024 // 设定转换尺寸上限
34
+        }
35
+      },
36
+      cssModules: {
37
+        enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
38
+        config: {
39
+          namingPattern: 'module', // 转换模式,取值为 global/module
40
+          generateScopedName: '[name]__[local]___[hash:base64:5]'
41
+        }
42
+      }
43
+    }
44
+  },
45
+  h5: {
46
+    publicPath: '/',
47
+    staticDirectory: 'static',
48
+    postcss: {
49
+      autoprefixer: {
50
+        enable: true,
51
+        config: {
52
+        }
53
+      },
54
+      cssModules: {
55
+        enable: false, // 默认为 false,如需使用 css modules 功能,则设为 true
56
+        config: {
57
+          namingPattern: 'module', // 转换模式,取值为 global/module
58
+          generateScopedName: '[name]__[local]___[hash:base64:5]'
59
+        }
60
+      }
61
+    }
62
+  }
63
+}
64
+
65
+module.exports = function (merge) {
66
+  if (process.env.NODE_ENV === 'development') {
67
+    return merge({}, config, require('./dev'))
68
+  }
69
+  return merge({}, config, require('./prod'))
70
+}

+ 18
- 0
config/prod.js 查看文件

@@ -0,0 +1,18 @@
1
+module.exports = {
2
+  env: {
3
+    NODE_ENV: '"production"'
4
+  },
5
+  defineConstants: {
6
+  },
7
+  mini: {},
8
+  h5: {
9
+    /**
10
+     * 如果h5端编译后体积过大,可以使用webpack-bundle-analyzer插件对打包体积进行分析。
11
+     * 参考代码如下:
12
+     * webpackChain (chain) {
13
+     *   chain.plugin('analyzer')
14
+     *     .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
15
+     * }
16
+     */
17
+  }
18
+}

+ 10
- 0
jsconfig.json 查看文件

@@ -0,0 +1,10 @@
1
+{
2
+  "compilerOptions": {
3
+    "baseUrl": ".",
4
+    "paths": {
5
+      "@/*": [
6
+        "./src/*"
7
+      ]
8
+    }
9
+  }
10
+}

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


+ 61
- 0
package.json 查看文件

@@ -0,0 +1,61 @@
1
+{
2
+  "name": "hospitalGN",
3
+  "version": "1.0.0",
4
+  "private": true,
5
+  "description": "灌南县",
6
+  "templateInfo": {
7
+    "name": "default",
8
+    "typescript": false,
9
+    "css": "less"
10
+  },
11
+  "scripts": {
12
+    "build:weapp": "taro build --type weapp",
13
+    "build:swan": "taro build --type swan",
14
+    "build:alipay": "taro build --type alipay",
15
+    "build:tt": "taro build --type tt",
16
+    "build:h5": "taro build --type h5",
17
+    "build:rn": "taro build --type rn",
18
+    "build:qq": "taro build --type qq",
19
+    "build:jd": "taro build --type jd",
20
+    "build:quickapp": "taro build --type quickapp",
21
+    "dev:weapp": "npm run build:weapp -- --watch",
22
+    "dev:swan": "npm run build:swan -- --watch",
23
+    "dev:alipay": "npm run build:alipay -- --watch",
24
+    "dev:tt": "npm run build:tt -- --watch",
25
+    "dev:h5": "npm run build:h5 -- --watch",
26
+    "dev:rn": "npm run build:rn -- --watch",
27
+    "dev:qq": "npm run build:qq -- --watch",
28
+    "dev:jd": "npm run build:jd -- --watch",
29
+    "dev:quickapp": "npm run build:quickapp -- --watch"
30
+  },
31
+  "browserslist": [
32
+    "last 3 versions",
33
+    "Android >= 4.1",
34
+    "ios >= 8"
35
+  ],
36
+  "author": "",
37
+  "dependencies": {
38
+    "@antmjs/vantui": "^1.9.2",
39
+    "@babel/runtime": "^7.7.7",
40
+    "@tarojs/components": "3.3.6",
41
+    "@tarojs/react": "3.3.6",
42
+    "@tarojs/runtime": "3.3.6",
43
+    "@tarojs/taro": "3.3.6",
44
+    "react": "^17.0.0",
45
+    "react-dom": "^17.0.0"
46
+  },
47
+  "devDependencies": {
48
+    "@babel/core": "^7.8.0",
49
+    "@tarojs/mini-runner": "3.3.6",
50
+    "@tarojs/webpack-runner": "3.3.6",
51
+    "@types/react": "^17.0.2",
52
+    "@types/webpack-env": "^1.13.6",
53
+    "babel-preset-taro": "3.3.6",
54
+    "eslint": "^6.8.0",
55
+    "eslint-config-taro": "3.3.6",
56
+    "eslint-plugin-import": "^2.12.0",
57
+    "eslint-plugin-react": "^7.8.2",
58
+    "eslint-plugin-react-hooks": "^4.2.0",
59
+    "stylelint": "9.3.0"
60
+  }
61
+}

+ 13
- 0
project.config.json 查看文件

@@ -0,0 +1,13 @@
1
+{
2
+  "miniprogramRoot": "./dist",
3
+  "projectname": "hospitalGN",
4
+  "description": "灌南县",
5
+  "appid": "wx06a7372d48d56843",
6
+  "setting": {
7
+    "urlCheck": true,
8
+    "es6": false,
9
+    "postcss": false,
10
+    "minified": false
11
+  },
12
+  "compileType": "miniprogram"
13
+}

+ 9
- 0
project.tt.json 查看文件

@@ -0,0 +1,9 @@
1
+{
2
+  "miniprogramRoot": "./",
3
+  "projectname": "hospitalGN",
4
+  "appid": "touristappid",
5
+  "setting": {
6
+    "es6": false,
7
+    "minified": false
8
+  }
9
+}

+ 12
- 0
src/app.config.js 查看文件

@@ -0,0 +1,12 @@
1
+export default {
2
+  pages: [
3
+    'pages/index/index',
4
+    'pages/setUserInfo/index',
5
+  ],
6
+  window: {
7
+    backgroundTextStyle: 'light',
8
+    navigationBarBackgroundColor: '#fff',
9
+    navigationBarTitleText: 'WeChat',
10
+    navigationBarTextStyle: 'black'
11
+  }
12
+}

+ 21
- 0
src/app.js 查看文件

@@ -0,0 +1,21 @@
1
+import { Component } from 'react'
2
+import '@antmjs/vantui/lib/index.less';
3
+import './app.less'
4
+
5
+class App extends Component {
6
+
7
+  componentDidMount () { }
8
+
9
+  componentDidShow () { }
10
+
11
+  componentDidHide () { }
12
+
13
+  componentDidCatchError () { }
14
+
15
+  // this.props.children 是将要会渲染的页面
16
+  render () {
17
+    return this.props.children
18
+  }
19
+}
20
+
21
+export default App

+ 0
- 0
src/app.less 查看文件


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


+ 19
- 0
src/index.html 查看文件

@@ -0,0 +1,19 @@
1
+<!DOCTYPE html>
2
+<html>
3
+<head>
4
+  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
5
+  <meta content="width=device-width,initial-scale=1,user-scalable=no" name="viewport">
6
+  <meta name="apple-mobile-web-app-capable" content="yes">
7
+  <meta name="apple-touch-fullscreen" content="yes">
8
+  <meta name="format-detection" content="telephone=no,address=no">
9
+  <meta name="apple-mobile-web-app-status-bar-style" content="white">
10
+  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" >
11
+  <title></title>
12
+  <script>
13
+    !function(n){function e(){var e=n.document.documentElement,t=e.getBoundingClientRect().width;e.style.fontSize=t>=640?"40px":t<=320?"20px":t/320*20+"px"}n.addEventListener("resize",(function(){e()})),e()}(window);
14
+  </script>
15
+</head>
16
+<body>
17
+  <div id="app"></div>
18
+</body>
19
+</html>

+ 7
- 0
src/pages/index/index.config.js 查看文件

@@ -0,0 +1,7 @@
1
+export default {
2
+  navigationBarTitleText: '身份码',
3
+  disableScroll: true,
4
+  usingComponents: {
5
+  }
6
+
7
+}

+ 69
- 0
src/pages/index/index.jsx 查看文件

@@ -0,0 +1,69 @@
1
+import { View, Text, Button } from '@tarojs/components'
2
+import { useEffect, useRef, useState } from 'react'
3
+
4
+// import userBck from '../../assets/userBck.png'
5
+
6
+
7
+import './style.less'
8
+
9
+
10
+
11
+export default (props) => {
12
+
13
+  const [showTime, setShowTime] = useState("")
14
+  const timer = useRef();
15
+  useEffect(() => {
16
+    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();
27
+
28
+      setShowTime(times)
29
+    }, 1000)
30
+    return () => {
31
+      clearInterval(timer.current);
32
+    };
33
+
34
+  }, [])
35
+
36
+  const goUserInfo = () => {
37
+
38
+    // 跳转到目的页面,在当前页面打开
39
+    // Taro.redirectTo({
40
+    //   url: '/pages/setUserInfo/index'
41
+    // })
42
+
43
+  }
44
+
45
+
46
+
47
+  return (
48
+    <View className='index-UserQRcode'>
49
+      {/* <Text>Hello world!</Text> */}
50
+      {/* <View className='index-UserQRcode-headerInfo' style={{ backgroundImage: `url(${userBck})` }}> */}
51
+      <View className='index-UserQRcode-headerInfo' >
52
+        <View className='index-UserQRcode-headerInfo-User'>
53
+          <View className='index-UserQRcode-headerInfo-User-NameInfo'>姓名:鲍张抄</View>
54
+          <View className='index-UserQRcode-headerInfo-User-setNameInfo'>+修改信息</View>
55
+        </View>
56
+        <View className='index-UserQRcode-headerInfo-UserID'>身份证:320888800110023011</View>
57
+      </View>
58
+      <View className='index-UserQRcode-cententQR'>
59
+        <View className='index-UserQRcode-cententQR-Times'>
60
+          {showTime}
61
+        </View>
62
+      </View>
63
+    </View>
64
+  )
65
+}
66
+
67
+
68
+
69
+

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

@@ -0,0 +1,46 @@
1
+.index-UserQRcode {
2
+  width: 100vw;
3
+  margin: 0 auto;
4
+  &-headerInfo {
5
+    color: white;
6
+    height: 35vh;
7
+    background: no-repeat, center center;
8
+    background-size: 100% 100%;
9
+    background-color: #5575ee;
10
+    padding: 0 7vw 0 7vw;
11
+
12
+    &-User {
13
+      display: flex;
14
+      justify-content: space-between;
15
+      letter-spacing: 1vw;
16
+
17
+      &-NameInfo {
18
+        font-weight: 600;
19
+        font-size: 5vw;
20
+        margin: 5vw 0 3vw 0;
21
+      }
22
+      &-setNameInfo {
23
+        margin: 5vw 0 3vw 0;
24
+      }
25
+    }
26
+    &-UserID {
27
+      letter-spacing: 0.3vw;
28
+    }
29
+  }
30
+
31
+  &-cententQR {
32
+    width: 95%;
33
+    height: 40vh;
34
+    box-shadow: 0px 8px 38px 0px rgba(0, 0, 0, 0.12);
35
+    border-radius: 15px;
36
+    background-color: white;
37
+    margin: 0 auto;
38
+    position: relative;
39
+    top: -15vh;
40
+    &-Times {
41
+      text-align: center;
42
+      font-weight: 800;
43
+      font-size: 8vw;
44
+    }
45
+  }
46
+}

+ 8
- 0
src/pages/setUserInfo/index.config.js 查看文件

@@ -0,0 +1,8 @@
1
+
2
+export default {
3
+  navigationBarTitleText: '个人信息',
4
+  disableScroll: true,
5
+  usingComponents: {
6
+  }
7
+
8
+}

+ 25
- 0
src/pages/setUserInfo/index.jsx 查看文件

@@ -0,0 +1,25 @@
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/setUserInfo/style.less 查看文件

@@ -0,0 +1,59 @@
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
+}

+ 28
- 0
src/utils/TimeFormate.js 查看文件

@@ -0,0 +1,28 @@
1
+// //日期格式化
2
+// function getDateByStr (dtStr) {
3
+//   if (!dtStr) return undefined;
4
+
5
+//   const t = dtStr.split(/[-T :]/);
6
+//   return new Date(t[0], t[1] - 1, t[2], t[3] || 0, t[4] || 0, t[5] || 0)
7
+// }
8
+
9
+// export default function formatTimes (dt, fmt) {
10
+//   if (!dt) return dt;
11
+
12
+//   // 解决苹果手机不能正常初始化的问题
13
+//   const date = typeof dt === 'string' ? getDateByStr(dt) : new Date(dt);
14
+
15
+//   var o = {
16
+//     "M+": date.getMonth() + 1, //月份
17
+//     "d+": date.getDate(), //日
18
+//     "h+": date.getHours(), //小时
19
+//     "m+": date.getMinutes(), //分
20
+//     "s+": date.getSeconds(), //秒
21
+//     "q+": Math.floor((date.getMonth() + 3) / 3), //季度
22
+//     "S": date.getMilliseconds() //毫秒
23
+//   };
24
+//   if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
25
+//   for (var k in o)
26
+//     if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
27
+//   return fmt;
28
+// };

+ 10733
- 0
yarn.lock
文件差異過大導致無法顯示
查看文件