zlisen il y a 4 ans
révision
e33dbd7980
97 fichiers modifiés avec 23588 ajouts et 0 suppressions
  1. 12
    0
      .editorconfig
  2. 3
    0
      .eslintrc.js
  3. 6
    0
      .gitignore
  4. 10
    0
      babel.config.js
  5. 14
    0
      config/dev.js
  6. 76
    0
      config/index.js
  7. 18
    0
      config/prod.js
  8. 19400
    0
      package-lock.json
  9. 65
    0
      package.json
  10. 26
    0
      project.config.json
  11. 24
    0
      src/actions/user.js
  12. 22
    0
      src/app.config.js
  13. 33
    0
      src/app.js
  14. 57
    0
      src/app.scss
  15. BIN
      src/assets/deleteicon.png
  16. BIN
      src/assets/editicon.png
  17. BIN
      src/assets/icon.png
  18. BIN
      src/assets/locationicon.png
  19. BIN
      src/assets/menuicon.png
  20. BIN
      src/assets/more.png
  21. BIN
      src/assets/radio.png
  22. BIN
      src/assets/upload.png
  23. BIN
      src/assets/uploadicon.png
  24. BIN
      src/assets/usericon.png
  25. 12
    0
      src/compents/container/index.jsx
  26. 6
    0
      src/compents/container/index.scss
  27. 57
    0
      src/compents/tab/index.jsx
  28. 29
    0
      src/compents/tab/index.scss
  29. 50
    0
      src/compents/tags/index.jsx
  30. 20
    0
      src/compents/tags/index.scss
  31. 2
    0
      src/constants/user.js
  32. 19
    0
      src/index.html
  33. 13
    0
      src/layout/index.jsx
  34. 4
    0
      src/pages/account/edit/index.config.js
  35. 159
    0
      src/pages/account/edit/index.jsx
  36. 50
    0
      src/pages/account/edit/index.scss
  37. 4
    0
      src/pages/account/index.config.js
  38. 124
    0
      src/pages/account/index.jsx
  39. 54
    0
      src/pages/account/index.scss
  40. 97
    0
      src/pages/adminUser/index.jsx
  41. 27
    0
      src/pages/adminUser/index.scss
  42. 92
    0
      src/pages/customer/index.js
  43. 5
    0
      src/pages/customer/index.scss
  44. 53
    0
      src/pages/customer/register/index.jsx
  45. 44
    0
      src/pages/customer/register/register.scss
  46. 93
    0
      src/pages/guide/index.jsx
  47. 88
    0
      src/pages/guide/index.scss
  48. 4
    0
      src/pages/house/add/index.config.js
  49. 64
    0
      src/pages/house/add/index.jsx
  50. 53
    0
      src/pages/house/add/index.scss
  51. 4
    0
      src/pages/house/addnewhouse/index.config.js
  52. 176
    0
      src/pages/house/addnewhouse/index.jsx
  53. 50
    0
      src/pages/house/addnewhouse/index.scss
  54. 4
    0
      src/pages/house/household/index.config.js
  55. 73
    0
      src/pages/house/household/index.jsx
  56. 34
    0
      src/pages/house/household/index.scss
  57. 5
    0
      src/pages/house/index.config.js
  58. 69
    0
      src/pages/house/index.jsx
  59. 53
    0
      src/pages/house/index.scss
  60. 73
    0
      src/pages/house/list/index.jsx
  61. 52
    0
      src/pages/house/list/index.scss
  62. 31
    0
      src/pages/index/compents/register.jsx
  63. 31
    0
      src/pages/index/compents/register.scss
  64. 4
    0
      src/pages/index/index.config.js
  65. 100
    0
      src/pages/index/index.jsx
  66. 15
    0
      src/pages/index/index.scss
  67. 4
    0
      src/pages/label/edit/index.config.js
  68. 130
    0
      src/pages/label/edit/index.jsx
  69. 50
    0
      src/pages/label/edit/index.scss
  70. 4
    0
      src/pages/label/index.config.js
  71. 137
    0
      src/pages/label/index.jsx
  72. 54
    0
      src/pages/label/index.scss
  73. 110
    0
      src/pages/landlord/index.jsx
  74. 35
    0
      src/pages/landlord/index.scss
  75. 4
    0
      src/pages/map/index.config.js
  76. 99
    0
      src/pages/map/index.jsx
  77. 50
    0
      src/pages/map/index.scss
  78. 4
    0
      src/pages/material/index.config.js
  79. 192
    0
      src/pages/material/index.jsx
  80. 58
    0
      src/pages/material/index.scss
  81. 117
    0
      src/pages/recommend/index.jsx
  82. 80
    0
      src/pages/recommend/index.scss
  83. 8
    0
      src/pages/share/index.config.js
  84. 125
    0
      src/pages/share/index.jsx
  85. 50
    0
      src/pages/share/index.scss
  86. 4
    0
      src/pages/wifi/index.config.js
  87. 99
    0
      src/pages/wifi/index.jsx
  88. 50
    0
      src/pages/wifi/index.scss
  89. 31
    0
      src/reducers/guide.js
  90. 10
    0
      src/reducers/index.js
  91. 27
    0
      src/reducers/page.js
  92. 30
    0
      src/reducers/user.js
  93. 0
    0
      src/route/index.js
  94. 28
    0
      src/store/index.js
  95. 182
    0
      src/util/req.js
  96. 48
    0
      src/util/request.js
  97. 5
    0
      src/util/userRole.js

+ 12
- 0
.editorconfig Voir le fichier

@@ -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

+ 3
- 0
.eslintrc.js Voir le fichier

@@ -0,0 +1,3 @@
1
+module.exports = {
2
+  'extends': ['taro/react']
3
+}

+ 6
- 0
.gitignore Voir le fichier

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

+ 10
- 0
babel.config.js Voir le fichier

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

+ 14
- 0
config/dev.js Voir le fichier

@@ -0,0 +1,14 @@
1
+
2
+module.exports = {
3
+  env: {
4
+    NODE_ENV: '"development"'
5
+  },
6
+  defineConstants: {
7
+    HOST: '"http://localhost:7080"',
8
+    WSS_HOST: '"ws://localhost:7080"',
9
+    // OSS_PATH: "https://njcj.oss-cn-shanghai.aliyuncs.com/",
10
+    // OSS_FAST_PATH: "https://njcj.oss-accelerate.aliyuncs.com/",
11
+  },
12
+  weapp: {},
13
+  h5: {}
14
+};

+ 76
- 0
config/index.js Voir le fichier

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

+ 18
- 0
config/prod.js Voir le fichier

@@ -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
+}

+ 19400
- 0
package-lock.json
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 65
- 0
package.json Voir le fichier

@@ -0,0 +1,65 @@
1
+{
2
+  "name": "shigongliApp",
3
+  "version": "1.0.0",
4
+  "private": true,
5
+  "description": "十公里小程序",
6
+  "templateInfo": {
7
+    "name": "taro-ui",
8
+    "typescript": false,
9
+    "css": "sass"
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
+    "@babel/runtime": "^7.7.7",
39
+    "@tarojs/cli": "3.0.13",
40
+    "@tarojs/components": "3.0.13",
41
+    "@tarojs/react": "3.0.13",
42
+    "@tarojs/runtime": "3.0.13",
43
+    "@tarojs/taro": "3.0.13",
44
+    "lodash": "4.17.15",
45
+    "react": "^16.10.0",
46
+    "react-dom": "^16.10.0",
47
+    "react-redux": "^7.2.2",
48
+    "redux": "^4.0.5",
49
+    "taro-ui": "^3.0.0-alpha.3"
50
+  },
51
+  "devDependencies": {
52
+    "@babel/core": "^7.8.0",
53
+    "@tarojs/mini-runner": "3.0.13",
54
+    "@tarojs/webpack-runner": "3.0.13",
55
+    "@types/webpack-env": "^1.13.6",
56
+    "babel-preset-taro": "3.0.13",
57
+    "eslint": "^6.8.0",
58
+    "eslint-config-taro": "3.0.13",
59
+    "stylelint": "9.3.0",
60
+    "@types/react": "^16.0.0",
61
+    "eslint-plugin-react": "^7.8.2",
62
+    "eslint-plugin-import": "^2.12.0",
63
+    "eslint-plugin-react-hooks": "^1.6.1"
64
+  }
65
+}

+ 26
- 0
project.config.json Voir le fichier

@@ -0,0 +1,26 @@
1
+{
2
+	"miniprogramRoot": "dist/",
3
+	"projectname": "shigongliApp",
4
+	"description": "十公里小程序",
5
+	"appid": "wx06a7372d48d56843",
6
+	"setting": {
7
+		"urlCheck": true,
8
+		"es6": false,
9
+		"postcss": false,
10
+		"preloadBackgroundData": false,
11
+		"minified": false,
12
+		"newFeature": true,
13
+		"autoAudits": false,
14
+		"coverView": true,
15
+		"showShadowRootInWxmlPanel": false,
16
+		"scopeDataCheck": false,
17
+		"useCompilerModule": false
18
+	},
19
+	"compileType": "miniprogram",
20
+	"simulatorType": "wechat",
21
+	"simulatorPluginLibVersion": {},
22
+	"condition": {},
23
+	"useExtendedLib": {
24
+		"weui": true
25
+	  }
26
+}

+ 24
- 0
src/actions/user.js Voir le fichier

@@ -0,0 +1,24 @@
1
+import {
2
+  ADD,
3
+  MINUS
4
+} from '../constants/user'
5
+
6
+export const add = () => {
7
+  return {
8
+    type: ADD
9
+  }
10
+}
11
+export const minus = () => {
12
+  return {
13
+    type: MINUS
14
+  }
15
+}
16
+
17
+// 异步的action
18
+export function asyncAdd () {
19
+  return dispatch => {
20
+    setTimeout(() => {
21
+      dispatch(add())
22
+    }, 2000)
23
+  }
24
+}

+ 22
- 0
src/app.config.js Voir le fichier

@@ -0,0 +1,22 @@
1
+export default {
2
+  pages: [
3
+    'pages/index/index',
4
+    'pages/house/index',
5
+    'pages/map/index',
6
+    'pages/wifi/index',
7
+    'pages/share/index',
8
+    'pages/house/addnewhouse/index',
9
+    'pages/house/household/index',
10
+    'pages/account/index',
11
+    'pages/account/edit/index',
12
+    'pages/material/index',
13
+    'pages/label/index',
14
+    'pages/label/edit/index',
15
+  ],
16
+  window: {
17
+    backgroundTextStyle: 'light',
18
+    navigationBarBackgroundColor: '#fff',
19
+    navigationBarTitleText: 'WeChat',
20
+    navigationBarTextStyle: 'black'
21
+  }
22
+}

+ 33
- 0
src/app.js Voir le fichier

@@ -0,0 +1,33 @@
1
+
2
+import 'taro-ui/dist/style/index.scss'
3
+import React, { Component } from 'react'
4
+import { Provider } from 'react-redux'
5
+
6
+import configStore from './store'
7
+
8
+import './app.scss'
9
+
10
+const store = configStore()
11
+
12
+class App extends Component {
13
+  componentDidMount () {}
14
+
15
+  componentDidShow () {}
16
+
17
+  componentDidHide () {}
18
+
19
+  componentDidCatchError () {}
20
+
21
+  // 在 App 类中的 render() 函数没有实际作用
22
+  // 请勿修改此函数
23
+  render () {
24
+    return (
25
+      <Provider store={store}>
26
+        {this.props.children}
27
+      </Provider>
28
+    )
29
+  }
30
+}
31
+
32
+export default App
33
+

+ 57
- 0
src/app.scss Voir le fichier

@@ -0,0 +1,57 @@
1
+page {
2
+   background-color: #f4f4f4;
3
+   letter-spacing: 4px;
4
+
5
+
6
+}
7
+.page-container {
8
+   padding: 0 41.3px 0;
9
+   width: 667.33px;
10
+ 
11
+   
12
+ 
13
+ 
14
+   color: #181818;
15
+ }
16
+
17
+
18
+ .title{
19
+   color: #7b7b7b;
20
+   font-size: 30px;
21
+   font-weight: 500;
22
+   margin-left: 40px;
23
+ }
24
+
25
+
26
+ .inputstyle {
27
+   // padding:13.33px;
28
+   &-view {
29
+     margin: 50px 0 0;
30
+ 
31
+     &-card {
32
+       // height: 106px;
33
+       // line-height: 106px;
34
+       padding: 0 40px;
35
+       // color:#181818;
36
+       font-size: 24px;
37
+       // font-weight: 600;
38
+       margin-top: 26.67px;
39
+       border-radius: 30px;
40
+       border-radius: 20px;
41
+       .input{
42
+         font-size: 28px;
43
+         padding:30px 0;
44
+         line-height: 106px;
45
+         // color: red;
46
+       }
47
+       .placeholderinput{
48
+         // line-height: 106px;
49
+         color: #d2d2d2;
50
+         font-size: 28px;
51
+       }
52
+     }
53
+     
54
+     // style={{width:'48.4rpx',height:'48.4rpx'}}
55
+   }
56
+ 
57
+ }

BIN
src/assets/deleteicon.png Voir le fichier


BIN
src/assets/editicon.png Voir le fichier


BIN
src/assets/icon.png Voir le fichier


BIN
src/assets/locationicon.png Voir le fichier


BIN
src/assets/menuicon.png Voir le fichier


BIN
src/assets/more.png Voir le fichier


BIN
src/assets/radio.png Voir le fichier


BIN
src/assets/upload.png Voir le fichier


BIN
src/assets/uploadicon.png Voir le fichier


BIN
src/assets/usericon.png Voir le fichier


+ 12
- 0
src/compents/container/index.jsx Voir le fichier

@@ -0,0 +1,12 @@
1
+import React from 'react'
2
+import './index.scss'
3
+
4
+const container = (props) => {
5
+    const { className,children, ...prop } = props
6
+    // let { className, ...prop } = props
7
+// console.log(props,prop)
8
+    return  <view className={`container,${className}`} {...prop} >{children}</view>;
9
+    // <view className={`container,${className}`} props >{children}</view>;
10
+}
11
+
12
+export default container

+ 6
- 0
src/compents/container/index.scss Voir le fichier

@@ -0,0 +1,6 @@
1
+.container{
2
+ 
3
+    background-color: #fff;
4
+    border-radius: 56px;
5
+    padding: 40px;
6
+}

+ 57
- 0
src/compents/tab/index.jsx Voir le fichier

@@ -0,0 +1,57 @@
1
+import React, { useEffect, useState } from 'react'
2
+import Taro from "@tarojs/taro";
3
+import { useSelector } from 'react-redux'
4
+import { View, Image } from '@tarojs/components'
5
+import uploadicon from '../../assets/uploadicon.png'
6
+import roleList from '../../util/userRole'
7
+import './index.scss'
8
+
9
+const getColor = (role) => {
10
+    switch (role) {
11
+        case roleList.landlord: return '#274291'
12
+        case roleList.adminuser: return '#274291'
13
+        // landlord: 'landlord',
14
+        case roleList.customer: return '#fed12f'
15
+    }
16
+}
17
+
18
+
19
+const tab = (props) => {
20
+
21
+    const user = useSelector(state => state.user)
22
+
23
+    const { value, pageState, color, ...prop } = props
24
+
25
+    const [state, setState] = useState(1)
26
+    console.log(props)
27
+    useEffect(() => {
28
+
29
+    }, [])
30
+    //  &-on{
31
+    //     color: #fed12f;
32
+    // }${props.className}
33
+    return <View className='tab'>
34
+        {value.length == 1 && <View className={`tab,tab1,${props.className}`} style={{ backgroundColor: getColor(user.role) ,color}}   onClick={() => props.onClick('2')}>{value[0]}
35
+        </View>}
36
+        {value.length == 2 && <View className={`tab,tab2,${props.className}`} style={{ display: 'flex', }}>
37
+            <View style={{ width: '50%' }} style={pageState == '2' ? { color: getColor(user.role), width: '50%' } : { width: '50%' }} onClick={props.onClick[0]}>{value[0]}</View>
38
+            <View style={{ width: '50%' }} style={pageState == '3' ? { color: getColor(user.role), width: '50%' } : { width: '50%' }} onClick={props.onClick[1]}>{value[1]}</View>
39
+        </View>}
40
+        {/* {value==1&&<View className={`tab,tab1,${props.className}`} onClick={()=>props.onClick(2)}>onClick={props.onClick[0]('2')}
41
+            开启旅程
42
+        </View>}
43
+        {value!=1&&<View className={`tab,tab2,${props.className}`}  style={{display: 'flex',}}>
44
+            <View style={{width:'50%'}} style={value=='guide'||value==2 ?{color: getColor(user.role),width:'50%'}:{width:'50%'}}  onClick={()=>props.onClick('guide')}>入住指引</View>
45
+            <View style={{width:'50%'}} style={value=='recommend' ?{color: getColor(user.role),width:'50%'}:{width:'50%'}} c onClick={()=>props.onClick('recommend')}>房东推荐</View>
46
+        </View>} */}
47
+        {/* {value==1&&<View className={`tab,tab1,${props.className}`} style={{background:getColor(user.role),color:'#ffffff'} } onClick={()=>Taro.navigateTo({ url: "/pages/house/add/index" })}>
48
+           +新增房源
49
+        </View>}
50
+        {value!=1&&<View className={`tab,tab2,${props.className}`}  style={{display: 'flex',}}>
51
+            <View style={{width:'50%'}} style={value=='guide'||value==2 ?{color: getColor(user.role),width:'50%'}:{width:'50%'}}  onClick={()=>props.onClick('guide')}>入住指引</View>
52
+            <View style={{width:'50%'}} style={value=='recommend' ?{color: getColor(user.role),width:'50%'}:{width:'50%'}} c onClick={()=>props.onClick('recommend')}>房东推荐</View>
53
+        </View>} */}
54
+    </View>
55
+};
56
+
57
+export default tab

+ 29
- 0
src/compents/tab/index.scss Voir le fichier

@@ -0,0 +1,29 @@
1
+.tab{
2
+    
3
+    position:absolute;
4
+    bottom: 0;
5
+    width: 100%;
6
+    height: 173.33px;
7
+    border-radius:40px 40px 0 0;
8
+    text-align: center;
9
+    line-height: 173px;
10
+    z-index:999;
11
+
12
+
13
+    .tab1 {
14
+        background-color: #274291;
15
+        font-size: 44px;
16
+        font-weight: 600;
17
+        letter-spacing: 14px;
18
+    }
19
+
20
+    .tab2 {
21
+        background-color: #ffffff;
22
+        font-size: 34px;
23
+        color: #d2d2d2;
24
+        font-weight: 500;
25
+       
26
+    }
27
+
28
+    
29
+}

+ 50
- 0
src/compents/tags/index.jsx Voir le fichier

@@ -0,0 +1,50 @@
1
+import React, { useEffect, useState } from 'react'
2
+import Taro from "@tarojs/taro";
3
+import { useSelector } from 'react-redux'
4
+import { View, Text } from '@tarojs/components'
5
+import roleList from '../../util/userRole'
6
+import './index.scss'
7
+import { set } from 'lodash';
8
+
9
+const getColor = (role) => {
10
+    switch (role) {
11
+        case roleList.landlord: return '#274291'
12
+        case roleList.adminuser: return '#274291'
13
+        // landlord: 'landlord',
14
+        case roleList.customer: return '#fed12f'
15
+    }
16
+}
17
+
18
+
19
+const tags = (props) => {
20
+
21
+    const user = useSelector(state => state.user)
22
+
23
+    const { value, list, onChange, ...prop } = props
24
+
25
+    const [state, setState] = useState(1)
26
+    const [key,setKey] = useState(value)
27
+    console.log(props)
28
+    useEffect(() => {
29
+
30
+    }, [])
31
+   const onClick = (item) =>{
32
+
33
+       setKey(item.id)
34
+       onChange(item)
35
+   }
36
+    return <View className='tags'>
37
+        <View className='at-row at-row--wrap' style={{marginTop:'10rpx'}}>
38
+            {
39
+                list.map((item)=>{
40
+                   return <View className='at-col at-col-4 ' >
41
+                       <View className={`tags-btn tags-btn${item.id===key?'-on':''}`} onClick={()=>onClick(item)} >{item.name}</View>
42
+                       </View>
43
+                })
44
+            }
45
+
46
+        </View>
47
+    </View>
48
+};
49
+
50
+export default tags

+ 20
- 0
src/compents/tags/index.scss Voir le fichier

@@ -0,0 +1,20 @@
1
+.tags{
2
+    
3
+
4
+
5
+   &-btn{
6
+       background-color: #ffffff;
7
+       color: #acacac;
8
+       margin: 10px;
9
+       font-size: 22px;
10
+       height: 50px;
11
+       line-height: 50px;
12
+       border-radius: 25px;
13
+       &-on {
14
+        background-color: #274291;
15
+        color: #ffffff;
16
+       }
17
+   }
18
+
19
+    
20
+}

+ 2
- 0
src/constants/user.js Voir le fichier

@@ -0,0 +1,2 @@
1
+export const ADD = 'ADD'
2
+export const MINUS = 'MINUS'

+ 19
- 0
src/index.html Voir le fichier

@@ -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(x){function w(){var v,u,t,tes,s=x.document,r=s.documentElement,a=r.getBoundingClientRect().width;if(!v&&!u){var n=!!x.navigator.appVersion.match(/AppleWebKit.*Mobile.*/);v=x.devicePixelRatio;tes=x.devicePixelRatio;v=n?v:1,u=1/v}if(a>=640){r.style.fontSize="40px"}else{if(a<=320){r.style.fontSize="20px"}else{r.style.fontSize=a/320*20+"px"}}}x.addEventListener("resize",function(){w()});w()}(window);
14
+  </script>
15
+</head>
16
+<body>
17
+  <div id="app"></div>
18
+</body>
19
+</html>

+ 13
- 0
src/layout/index.jsx Voir le fichier

@@ -0,0 +1,13 @@
1
+import React from 'react';
2
+import { View, ScrollView } from '@tarojs/components'
3
+
4
+const Layout = ({ children }) => {
5
+    return <ScrollView scrollY style={{ height: 'calc(100vh - 162rpx)' }} >
6
+        <View className='page-container' >
7
+            {children}
8
+        </View>
9
+    </ScrollView>
10
+}
11
+
12
+
13
+export default Layout;

+ 4
- 0
src/pages/account/edit/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+  navigationBarTitleText: '首页',
3
+  
4
+}

+ 159
- 0
src/pages/account/edit/index.jsx Voir le fichier

@@ -0,0 +1,159 @@
1
+import React, { useEffect, useMemo, useState } from 'react'
2
+import Taro from "@tarojs/taro";
3
+import { useSelector } from 'react-redux'
4
+import { View, Input, Text, Image, Form } from '@tarojs/components'
5
+import Layout from '../../../layout/index'
6
+import Tab from '../../../compents/tab/index'
7
+import Container from '../../../compents/container/index'
8
+import locationicon from '../../../assets/locationicon.png'
9
+import uploadicon from '../../../assets/uploadicon.png'
10
+import './index.scss'
11
+
12
+const index = (props) => {
13
+
14
+    const page = useSelector(state => state.page)
15
+
16
+    const user = useSelector(state => state.user)
17
+
18
+    const [userRole, setUserRole] = useState('1')
19
+    const [pageState, setPageState] = useState('1')
20
+    const [list, setList] = useState([])
21
+    useEffect(() => {
22
+
23
+        console.log(page, 'page')
24
+        setList([
25
+            {
26
+                name: 'zhou',
27
+                phone: '177'
28
+            },
29
+            {
30
+                name: 'zhou',
31
+                phone: '177'
32
+            },
33
+            {
34
+                name: 'zhou',
35
+                phone: '177'
36
+            }
37
+        ])
38
+    }, [])
39
+
40
+
41
+    const onTabClick = (e) => {
42
+        console.log(e, '111')
43
+        setUserRole(e)
44
+    }
45
+
46
+    const onRegisterChange = (e) => {
47
+        console.log(e, '111')
48
+    }
49
+    const onSave = () => {
50
+        console.log(333)
51
+
52
+        Taro.showModal({
53
+            title: '修改成功',
54
+            content: '点击确认按钮,返回上级菜单',
55
+            showCancel: false,
56
+            success: function (res) {
57
+                if (res.confirm) {
58
+                    console.log('用户点击确定')
59
+
60
+                    Taro.navigateBack({
61
+                        delta: 1
62
+                    })
63
+                } else if (res.cancel) {
64
+                    console.log('用户点击取消')
65
+                }
66
+            }
67
+        })
68
+    }
69
+
70
+    const onChooseLocation = () => {
71
+        console.log(333)
72
+        wx.chooseLocation({
73
+            success: (res) => {
74
+                console.log(res)
75
+            }
76
+        })
77
+    }
78
+    const formSubmit = (e) => {
79
+        console.log(e, 'formSubmit')
80
+    }
81
+
82
+    const formReset = () => {
83
+        console.log('formReset')
84
+    }
85
+
86
+    return <View className='addnewhouse'>
87
+
88
+
89
+        {/* <Form onSubmit={this.formSubmit} onReset={this.formReset} >
90
+        <View className='example-body'>
91
+          <Switch name='switch' className='form-switch'></Switch>
92
+        </View>
93
+      </Form> */}
94
+
95
+        <Layout>
96
+            <Form onSubmit={formSubmit} onReset={formReset}>
97
+                <View className='inputstyle-view'>
98
+                    <Text className='title'>系统账号</Text>
99
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
100
+                        <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
101
+                    </Container>
102
+                </View>
103
+                <View className='inputstyle-view'>
104
+                    <Text className='title'>姓名</Text>
105
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
106
+                        <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
107
+                    </Container>
108
+                </View>
109
+                <View className='inputstyle-view'>
110
+                    <Text className='title'>电话</Text>
111
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
112
+                        <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
113
+                    </Container>
114
+                </View>
115
+                <View className='inputstyle-view'>
116
+                    <Text className='title'>微信号</Text>
117
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
118
+                        <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
119
+                    </Container>
120
+                </View>
121
+                <View className='inputstyle-view'>
122
+                    <Text className='title'>房源数</Text>
123
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
124
+                        <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
125
+                    </Container>
126
+                </View>
127
+                <View className='inputstyle-view'>
128
+                    <Text className='title'>logo</Text>
129
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
130
+                        <Image className='guide-view-img' mode='widthFix' onClick={() => wx.chooseImage({
131
+                            count: 1,
132
+                            sizeType: ['original', 'compressed'],
133
+                            sourceType: ['album',],
134
+                            success: (res) => {
135
+                                // tempFilePath可以作为img标签的src属性显示图片
136
+
137
+                                console.log(res)
138
+                                // const tempFilePaths = res.tempFilePaths
139
+                                // setImgurl(tempFilePaths[0])
140
+                            }
141
+                        })} src={uploadicon || "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1657471424,2319316184&fm=26&gp=0.jpg"}></Image>
142
+                        {/* <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' /> */}
143
+                    </Container>
144
+                </View>
145
+            </Form>
146
+
147
+        </Layout>
148
+        <Tab className='addhousetab' pageState='3' value={['取消', '确认修改']} onClick={[(e) => Taro.navigateBack({
149
+                        delta: 1
150
+                    }), () => onSave()]}></Tab>
151
+
152
+
153
+
154
+
155
+
156
+    </View>
157
+}
158
+
159
+export default index

+ 50
- 0
src/pages/account/edit/index.scss Voir le fichier

@@ -0,0 +1,50 @@
1
+.map {
2
+  // padding:13.33px;
3
+  &-view {
4
+    margin: 50px 0 0;
5
+
6
+    &-card {
7
+      // height: 106px;
8
+      // line-height: 106px;
9
+      padding: 0 40px;
10
+      // color:#181818;
11
+      font-size: 24px;
12
+      // font-weight: 600;
13
+      margin-top: 26.67px;
14
+      border-radius: 30px;
15
+      border-radius: 20px;
16
+      .input{
17
+        font-size: 28px;
18
+        padding:30px 0;
19
+        line-height: 106px;
20
+        // color: red;
21
+      }
22
+      .placeholderinput{
23
+        // line-height: 106px;
24
+        color: #d2d2d2;
25
+        font-size: 28px;
26
+      }
27
+    }
28
+    &-icon {
29
+      margin-left: 40px;
30
+      // padding: 20px 30px;
31
+      // color:#181818;
32
+      width: 150px;
33
+      height: 106.67px;
34
+      // font-size: 36px;
35
+      // // font-weight: 600;
36
+      margin-top: 26.67px;
37
+      border-radius: 20px;
38
+      background-color: #274291;
39
+      padding: 0;
40
+      text-align: center;
41
+      line-height:120.67px;
42
+      .icon {
43
+        
44
+        // width: 100%;
45
+      }
46
+    }
47
+    // style={{width:'48.4rpx',height:'48.4rpx'}}
48
+  }
49
+
50
+}

+ 4
- 0
src/pages/account/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+
3
+  
4
+}

+ 124
- 0
src/pages/account/index.jsx Voir le fichier

@@ -0,0 +1,124 @@
1
+import React, { useEffect, useMemo, useState, useRef } from 'react'
2
+import Taro from '@tarojs/taro'
3
+import './index.scss'
4
+import { View, Text, Input, Image } from '@tarojs/components'
5
+import ContainerLayout from '../../compents/container/index'
6
+import Tab from '../../compents/tab/index'
7
+import Layout from '../../layout/index'
8
+
9
+const house = (props) => {
10
+
11
+  const [list, setList] = useState([])
12
+  const [radioHouse, setRadioHouse] = useState()
13
+
14
+  const ref = useRef();
15
+  useEffect(() => {
16
+    ref.current = 3;
17
+  });
18
+
19
+
20
+
21
+  const radioHouseState = useMemo(() => props.radioHouseState, [props.radioHouseState])
22
+  wx.setNavigationBarTitle({
23
+    title: '民宿房源管理'
24
+  })
25
+  console.log(props, radioHouseState)
26
+  useEffect(() => {
27
+    setList([
28
+      {
29
+        id: 1,
30
+        name: 'zhou',
31
+        phone: '177',
32
+        user: {
33
+          name: '张三',
34
+          phone: '17777777777',
35
+          wxid: 'hhh',
36
+          number: '3'
37
+        }
38
+      },
39
+      {
40
+        id: 2,
41
+        name: 'zhou',
42
+        phone: '177',
43
+        user: {
44
+          name: '张三',
45
+          phone: '17777777777',
46
+          wxid: 'hhh',
47
+          number: '3',
48
+          user: {
49
+            name: '张三',
50
+            phone: '17777777777',
51
+            wxid: 'hhh',
52
+            number: '3'
53
+          }
54
+        }
55
+      },
56
+      {
57
+        id: 3,
58
+        name: 'zhou',
59
+        phone: '177',
60
+        user: {
61
+          name: '张三',
62
+          phone: '17777777777',
63
+          wxid: 'hhh',
64
+          number: '3',
65
+          user: {
66
+            name: '张三',
67
+            phone: '17777777777',
68
+            wxid: 'hhh',
69
+            number: '3'
70
+          }
71
+        }
72
+      }
73
+    ])
74
+  }, [])
75
+
76
+  const onDelete = () => {
77
+    Taro.showModal({
78
+      title: '确定删除该老板账号吗',
79
+      content: '确定后,该老板房源信息将一并删除',
80
+      cancelColor:'#d2d2d2',
81
+                confirmColor:"#274191",
82
+      success: function (res) {
83
+        if (res.confirm) {
84
+          console.log('用户点击确定')
85
+
86
+         
87
+        } else if (res.cancel) {
88
+          console.log('用户点击取消')
89
+        }
90
+      }
91
+    })
92
+  }
93
+
94
+
95
+
96
+
97
+  return <View className='account'>
98
+    <Layout>
99
+      {list.map((x, index) => {
100
+        return <View className='account-view'>
101
+          <Text className='account-view-title'>房源编号:{index + 1}</Text>
102
+          <ContainerLayout className='account-view-card'>
103
+            <View className='top' onClick={() => { if (!radioHouseState) Taro.navigateTo({ url: `/pages/house/index?=${x.id}` }) }}>
104
+              <View>姓名:{x.user.name}</View>
105
+              <View>电话:{x.user.name}</View>
106
+              <View>微信号:{x.user.name}</View>
107
+              <View>房源数:{x.user.name}</View>
108
+            </View>
109
+            <View className='bottom'>
110
+              <Text onClick={() => { Taro.navigateTo({ url: `/pages/account/edit/index?=${x.id}` }) }}>编辑</Text>
111
+              <Text onClick={onDelete}>删除</Text>
112
+            </View>
113
+          </ContainerLayout>
114
+
115
+        </View>
116
+
117
+      })}
118
+    </Layout>
119
+    {/* onClick={(e)=>(e) */}
120
+    <Tab value={['+新增名宿老板账号']} color='#ffffff' onClick={() => { Taro.navigateTo({ url: `/pages/account/edit/index` }) }} ></Tab>
121
+  </View>
122
+}
123
+
124
+export default house

+ 54
- 0
src/pages/account/index.scss Voir le fichier

@@ -0,0 +1,54 @@
1
+.account {
2
+
3
+  // padding: 13.33px 0;
4
+  &-view {
5
+    margin: 40px 0 0;
6
+
7
+    // padding: 0;
8
+    &-title {
9
+      color: #7b7b7b;
10
+      font-size: 30px;
11
+      font-weight: 500;
12
+      margin-left: 40px;
13
+
14
+    }
15
+
16
+    &-card {
17
+      padding: 0;
18
+      color: #181818;
19
+      font-size: 24px;
20
+      font-weight: 600;
21
+      margin-top: 26.67px;
22
+      position: relative;
23
+
24
+      &-radio {
25
+          width: 50px;
26
+          height: 50px;
27
+        background-color: #274291;
28
+        text-align: center;
29
+        line-height: 50px;
30
+        position: absolute;
31
+        border-radius: 25px;
32
+        top: -12.5px;
33
+        right: -12.5px;
34
+      }
35
+
36
+      .top {
37
+        padding: 40px 40px;
38
+        border-bottom: 1px solid #f4f4f4;
39
+        line-height: 32px;
40
+        font-weight: 500;
41
+        // font-size: ;
42
+        // min-height: 120px;
43
+      }
44
+
45
+      .bottom {
46
+        display: flex;
47
+        justify-content: space-around;
48
+        padding: 20px
49
+      }
50
+
51
+
52
+    }
53
+  }
54
+}

+ 97
- 0
src/pages/adminUser/index.jsx Voir le fichier

@@ -0,0 +1,97 @@
1
+import React, { useEffect, useMemo, useState } from 'react'
2
+import Taro, { } from "@tarojs/taro";
3
+import { useSelector } from 'react-redux'
4
+import { View, Text, Image } from '@tarojs/components'
5
+import Layout from '../../layout/index'
6
+import ContainerLayout from '../../compents/container/index'
7
+import usericon from '../../assets/usericon.png'
8
+import editicon from '../../assets/editicon.png'
9
+import upload from '../../assets/upload.png'
10
+import menuicon from '../../assets/menuicon.png'
11
+
12
+import './index.scss'
13
+import { xor } from 'lodash';
14
+
15
+const menuList = [{
16
+  title: '名宿老板账号管理',
17
+  icon: usericon,
18
+  url: '/pages/account/index'
19
+}, {
20
+  title: '素材编辑与查询',
21
+  icon: editicon,
22
+  url: '/pages/material/index'
23
+}, {
24
+  title: '素材批量录入',
25
+  icon: upload,
26
+  url: '33'
27
+}, {
28
+  title: '素材标签管理',
29
+  icon: menuicon,
30
+  url: '/pages/label/index'
31
+}]
32
+
33
+const index = (props) => {
34
+
35
+  const page = useSelector(state => state.page)
36
+
37
+  const user = useSelector(state => state.user)
38
+  const [isOpened, setIsOpened] = useState(false)
39
+  const [userRole, setUserRole] = useState('1')
40
+  const [pageState, setPageState] = useState('1')
41
+  const [list, setList] = useState([])
42
+  const [radioHouseData, setRadioHouseData] = useState()
43
+  const [radioHouseState, setRadioHouseState] = useState(false)
44
+
45
+  useEffect(() => {
46
+
47
+
48
+  }, [])
49
+
50
+
51
+
52
+  const handleClose = () => {
53
+    setIsOpened(false)
54
+  }
55
+  const onTabClick = (e) => {
56
+    console.log(e, '111')
57
+    setUserRole(e)
58
+
59
+  }
60
+
61
+  const onRegisterChange = (e) => {
62
+    console.log(e, '111')
63
+  }
64
+  const onClick = (row) => {
65
+
66
+
67
+    Taro.navigateTo({ url: row.url })
68
+
69
+
70
+
71
+  }
72
+
73
+
74
+  return <View className='adminUser'>
75
+
76
+
77
+
78
+
79
+    <Layout>
80
+      {menuList.map((row) => {
81
+        return <ContainerLayout className='adminUser-menu' onClick={() => onClick(row)}>
82
+          <Text>{row.title}</Text>
83
+          <View className='adminUser-menu-img' >
84
+            <Image className='image' src={row.icon}></Image>
85
+          </View>
86
+
87
+        </ContainerLayout>
88
+      })}
89
+    </Layout>
90
+
91
+
92
+
93
+
94
+  </View>
95
+}
96
+
97
+export default index

+ 27
- 0
src/pages/adminUser/index.scss Voir le fichier

@@ -0,0 +1,27 @@
1
+.adminUser{
2
+  
3
+  &-menu{
4
+    margin-top: 40px;
5
+    padding: 60px;
6
+    font-size: 32px;
7
+    font-weight: 600;
8
+    border-radius: 50px;
9
+    position: relative;
10
+    &-img{
11
+      background-color:#274291 ;
12
+      position: absolute;
13
+      width: 60px;
14
+      height: 60px;
15
+      right: 40px;
16
+      top: 50px;
17
+      border-radius: 30px;
18
+      text-align: center;
19
+      line-height: 70px;
20
+      .image{
21
+        margin-top: 15px;
22
+        width: 30px;
23
+        height: 30px;
24
+      }
25
+    }
26
+  }
27
+}

+ 92
- 0
src/pages/customer/index.js Voir le fichier

@@ -0,0 +1,92 @@
1
+import React, { useEffect, useMemo, useState } from 'react'
2
+import { useSelector } from 'react-redux'
3
+import { View, ScrollView } from '@tarojs/components'
4
+import  Layout from '../../layout/index'
5
+import Tab from '../../compents/tab/index'
6
+import Register from './register/index'
7
+import Guide from '../guide/index'
8
+import Recommend from '../recommend/index'
9
+// import HouseLIst from '../house/list'
10
+
11
+import './index.scss'
12
+
13
+const index = (props) => {
14
+
15
+  const page = useSelector(state => state.page)
16
+
17
+  const user = useSelector(state => state.user)
18
+
19
+  const [userRole, setUserRole] = useState('1')
20
+  const [pageState, setPageState] = useState('2')
21
+  const [list, setList] = useState([])
22
+  useEffect(() => {
23
+
24
+    console.log(page,'page')
25
+    setList([
26
+      {
27
+        name: 'zhou',
28
+        phone: '177'
29
+      },
30
+      {
31
+        name: 'zhou',
32
+        phone: '177'
33
+      },
34
+      {
35
+        name: 'zhou',
36
+        phone: '177'
37
+      }
38
+    ])
39
+  }, [])
40
+
41
+
42
+  const onTabClick = (e) => {
43
+    console.log(e, '111')
44
+    setUserRole(e)
45
+  }
46
+
47
+  const onRegisterChange = (e) => {
48
+    console.log(e, '111')
49
+  }
50
+
51
+ 
52
+  return <View className='index'>
53
+
54
+
55
+     <View>
56
+
57
+    <Layout>
58
+    {pageState=='1'&&<Register></Register>  }
59
+    {pageState=='2'&&<Guide></Guide>  }
60
+    {pageState=='3'&&<Recommend></Recommend>  }
61
+    </Layout>
62
+    {pageState=='1' &&<Tab value={['开启旅程']} onClick={(e)=>setPageState(e)}></Tab>}
63
+    {pageState!='1' &&<Tab value={['入住指引','房东推荐']} pageState={pageState} onClick={[(e) => setPageState('2'),(e) => setPageState('3')]}></Tab>}
64
+
65
+    </View>
66
+
67
+
68
+
69
+      {/* userRole={userRole} list={list} onChange={(e) => onRegisterChange(e)} */}
70
+
71
+        {/* {userRole == 1 ? <Register userRole={userRole} list={list} onChange={(e) => onRegisterChange(e)}></Register> :
72
+          <View>
73
+            {(userRole == 'guide' || userRole == 2) && <Guide userRole={userRole}/>}
74
+            {userRole == 'recommend' && <Recommend userRole={userRole}/>}
75
+          </View>
76
+        }
77
+        {userRole == 2 ? <Register userRole={userRole} list={list} onChange={(e) => onRegisterChange(e)}></Register> :
78
+          <View>
79
+            {(userRole == 'guide' || userRole == 2) && <Guide userRole={userRole}/>}
80
+            {userRole == 'recommend' && <Recommend userRole={userRole}/>}
81
+          </View>
82
+        }
83
+     <HouseLIst userRole={userRole} list={list} onChange={(e) => onRegisterChange(e)}></HouseLIst>  */}
84
+       
85
+        
86
+      
87
+      {/* value={userRole} onClick={(e) => onTabClick(e)*/}
88
+    
89
+  </View>
90
+}
91
+
92
+export default index

+ 5
- 0
src/pages/customer/index.scss Voir le fichier

@@ -0,0 +1,5 @@
1
+.page-container {
2
+
3
+
4
+  color: #181818;
5
+}

+ 53
- 0
src/pages/customer/register/index.jsx Voir le fichier

@@ -0,0 +1,53 @@
1
+import React, { useEffect, useState } from 'react'
2
+import './register.scss'
3
+import { View, Text, Input } from '@tarojs/components'
4
+import ContainerLayout from '../../../compents/container/index'
5
+import { AtInput }  from 'taro-ui'
6
+
7
+const register = (props) => {
8
+
9
+    // const {list,onChange}= props
10
+
11
+    const [list, setList] = useState([])
12
+    useEffect(() => {
13
+  
14
+    //   console.log(page,'page')
15
+      setList([
16
+        {
17
+          name: 'zhou',
18
+          phone: '177'
19
+        },
20
+        {
21
+          name: 'zhou',
22
+          phone: '177'
23
+        },
24
+        {
25
+          name: 'zhou',
26
+          phone: '177'
27
+        },
28
+        {
29
+            name: 'zhou',
30
+            phone: '177'
31
+          }
32
+      ])
33
+    }, [])
34
+    // const onChange =
35
+//  onChange={onChange}
36
+//  onChange={onChange}
37
+    return <View className='register'>
38
+        {list.map((x, index) => {
39
+            return <View className='register-user'>
40
+                <Text>入住人{index + 1}</Text>
41
+                <ContainerLayout className='register-user-from'>
42
+                    <AtInput className='register-user-from-input' title='姓名' type='text'   />
43
+                    <AtInput className='register-user-from-input'  title='电话' type='text'   />
44
+                </ContainerLayout>
45
+
46
+            </View>
47
+
48
+        })}
49
+
50
+    </View>
51
+}
52
+
53
+export default register

+ 44
- 0
src/pages/customer/register/register.scss Voir le fichier

@@ -0,0 +1,44 @@
1
+.register{
2
+    padding: 13.33px 0;
3
+    &-user{
4
+        padding-top: 40px;
5
+        Text {
6
+            
7
+            color: #7b7b7b;
8
+            font-size: 30px;
9
+            font-weight: 500;
10
+            margin-left: 40px;
11
+        }
12
+        &-from{
13
+            // height: 300px;
14
+            padding: 37.33px 40px;
15
+            margin-top: 26.67px;
16
+            &-input{
17
+                margin: 16px 0 26.67px;
18
+                // height:54px;
19
+                line-height: 54px;
20
+                font-size: 24px;
21
+            }
22
+
23
+            .at-input {
24
+                // margin-left: 0;
25
+                background: #f4f4f4;
26
+                padding: 16px 0;
27
+                // height: 60px;
28
+                border-radius: 20px;
29
+                font-size: 24px;
30
+                border-bottom: none;
31
+
32
+                &::after{
33
+                    border:none
34
+                }
35
+              }
36
+            .at-input__title{
37
+                text-align: center;
38
+                color: #cccccc;
39
+                font-size: 24px;
40
+                line-height: 54px
41
+            }
42
+        }
43
+    }
44
+}

+ 93
- 0
src/pages/guide/index.jsx Voir le fichier

@@ -0,0 +1,93 @@
1
+import React, { useState } from 'react'
2
+import Taro from '@tarojs/taro'
3
+import { View, Text, Image } from '@tarojs/components'
4
+import ContainerLayout from '../../compents/container/index'
5
+import icon from '../../assets/icon.png'
6
+import './index.scss'
7
+import userRloe from '../../util/userRole'
8
+import { useSelector } from 'react-redux'
9
+
10
+const guide = (props) => {
11
+
12
+    const user = useSelector(state => state.user)
13
+    // const guide = useSelector(state => state.guide)
14
+
15
+    const { value, ...prop } = props
16
+    console.log(guide,'guide')
17
+    const [state, setState] = useState(1)
18
+
19
+    const [imgurl, setImgurl] = useState('')
20
+
21
+    const onToMap = (type) => {
22
+        if (user.role == userRloe.customer) return
23
+        console.log(type)
24
+        switch (type){
25
+            case 'house':Taro.navigateTo({ url: `/pages/map/index?type=${type}` }); break;
26
+            case 'park':Taro.navigateTo({ url: `/pages/map/index?type=${type}` }); break;
27
+            case 'wifi':Taro.navigateTo({ url: `/pages/wifi/index?type=${type}` }); break;
28
+            case 'image':{
29
+                wx.chooseImage({
30
+                count: 1,
31
+                sizeType: ['original', 'compressed'],
32
+                sourceType: ['album',],
33
+                success: (res)=> {
34
+                  // tempFilePath可以作为img标签的src属性显示图片
35
+                
36
+                  console.log(res)
37
+                  const tempFilePaths = res.tempFilePaths
38
+                    setImgurl(tempFilePaths[0])
39
+                }
40
+              }); break;}
41
+        }
42
+        // Taro.navigateTo({ url: `/pages/map/index?type=${type}` })
43
+    }
44
+    // 
45
+    return <View className='guide'>
46
+        <View className='guide-view'>
47
+            <Text className='guide-view-info'>房屋位置</Text>
48
+            <ContainerLayout className='guide-view-layout' style={{ display: 'flex', justifyContent: 'space-between' }} onClick={() => onToMap('house')}>
49
+                <View  >
50
+                    <View className='guide-view-layout-text1' >南京市 浦口</View>
51
+                    <View className='guide-view-layout-text2'>秦淮区仙鹤街</View>
52
+                </View>
53
+                {user.role == userRloe.customer && <View style={{ float: 'right' }}>
54
+                    <Image className='icon' src={icon} />
55
+                    <View className='icontext'>去这里</View>
56
+                </View>}
57
+            </ContainerLayout>
58
+        </View>
59
+        <View className='guide-view'>
60
+            <Text className='guide-view-info'>停车位置</Text>
61
+            <ContainerLayout className='guide-view-layout' style={{ display: 'flex', justifyContent: 'space-between' }} onClick={() => onToMap('park')}>
62
+                <View  >
63
+                    <View className='guide-view-layout-text1' >南京市 浦口</View>
64
+                    <View className='guide-view-layout-text2'>秦淮区仙鹤街</View>
65
+                </View>
66
+                {user.role == userRloe.customer && <View style={{ float: 'right' }}>
67
+                    <Image className='icon' src={icon} />
68
+                    <View className='icontext'>去这里</View>
69
+                </View>}
70
+            </ContainerLayout>
71
+        </View>
72
+        <View className='guide-view'>
73
+            <Text className='guide-view-info'>wifi信息</Text>
74
+            <ContainerLayout className='guide-view-layout guide-view-wifi' onClick={() => onToMap('wifi')}>
75
+                <View>
76
+                    <Text>名称:</Text><Text>{4324}</Text>
77
+                </View>
78
+                <View>
79
+                    <Text>密码:</Text><Text>{23423}</Text>
80
+                </View>
81
+            </ContainerLayout>
82
+        </View>
83
+        <View className='guide-view'>
84
+            <Text className='guide-view-info'>其他指引</Text>
85
+            {/* <ContainerLayout className='guide-view-layout guide-view-img'> */}
86
+            <Image className='guide-view-img' mode='widthFix' onClick={() => onToMap('image')} src={imgurl||"https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1657471424,2319316184&fm=26&gp=0.jpg"}></Image>
87
+            {/* </ContainerLayout> */}
88
+        </View>
89
+
90
+    </View>
91
+};
92
+
93
+export default guide

+ 88
- 0
src/pages/guide/index.scss Voir le fichier

@@ -0,0 +1,88 @@
1
+.guide {
2
+  &-view {
3
+    margin: 40px 0 0;
4
+
5
+    &-info {
6
+      color: #7b7b7b;
7
+      font-size: 30px;
8
+      font-weight: 500;
9
+      margin-left: 40px;
10
+    }
11
+
12
+    &-layout {
13
+      // padding: 80px 60px;
14
+      padding: 0 0 40px;
15
+
16
+      margin: 26.67px 0 40px;
17
+
18
+      &-text1 {
19
+        color: #181818;
20
+        font-size: 28px;
21
+        font-weight: 550;
22
+        margin: 40px 40px 0;
23
+      }
24
+
25
+      &-text2 {
26
+        color: #7b7b7b;
27
+        font-size: 24px;
28
+        // font-weight: 600;
29
+        margin: 10px 40px 0;
30
+      }
31
+    }
32
+
33
+    &-wifi {
34
+      padding: 30px 40px;
35
+      font-size: 24px;
36
+      color: #7b7b7b;
37
+      line-height: 32px;
38
+    }
39
+
40
+    &-img {
41
+      // width: 100%;
42
+      // height: 100%;
43
+      margin-top: 26.667px;
44
+      width: 100%;
45
+      height: 100%;
46
+      border-radius: 40px;
47
+
48
+    }
49
+  }
50
+
51
+  .icon {
52
+    width: 40px;
53
+    height: 40px;
54
+    margin: 48px 40px 0;
55
+  }
56
+
57
+  .icontext {
58
+    color: #181818;
59
+    font-size: 22px;
60
+    text-align: center;
61
+    // font-weight: 600;
62
+    // margin: 20px 60px 80px;
63
+  }
64
+}
65
+
66
+// .register{
67
+//     &-user{
68
+//         margin: 60px 0 0;
69
+//         Text {
70
+//             color: #7b7b7b;
71
+//             font-size: 34px;
72
+//             font-weight: 500;
73
+//         }
74
+//         &-from{
75
+//             // height: 300px;
76
+//             padding: 80px 60px;
77
+//             margin-top: 40px;
78
+//             &-input{
79
+//                 margin: 40px 0;
80
+//                 // 
81
+//             }
82
+//             .at-input__title{
83
+//                 text-align: center;
84
+//                 color: #cccccc;
85
+//             }
86
+//         }
87
+//     }
88
+// }

+ 4
- 0
src/pages/house/add/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+
3
+  
4
+}

+ 64
- 0
src/pages/house/add/index.jsx Voir le fichier

@@ -0,0 +1,64 @@
1
+import React, { useEffect, useMemo, useState } from 'react'
2
+import { useSelector } from 'react-redux'
3
+import { View, ScrollView } from '@tarojs/components'
4
+import Tab from '../../../compents/tab/index'
5
+import Guide from '../../guide/index'
6
+import Recommend from '../../recommend/index'
7
+import './index.scss'
8
+
9
+const houseadd = (props) => {
10
+
11
+  const user = useSelector(state => state.user)
12
+
13
+  const [userRole, setUserRole] = useState('guide')
14
+  const [pageState, SetPageState] = useState('1')
15
+  const [list, setList] = useState([])
16
+  useEffect(() => {
17
+    setList([
18
+      {
19
+        name: 'zhou',
20
+        phone: '177'
21
+      },
22
+      {
23
+        name: 'zhou',
24
+        phone: '177'
25
+      },
26
+      {
27
+        name: 'zhou',
28
+        phone: '177'
29
+      }
30
+    ])
31
+  }, [])
32
+
33
+
34
+  const onTabClick = (e) => {
35
+    console.log(e, '111')
36
+    setUserRole(e)
37
+  }
38
+
39
+  const onRegisterChange = (e) => {
40
+    console.log(e, '111')
41
+  }
42
+
43
+
44
+  return <View className='index'>
45
+    <ScrollView scrollY style={{ height: 'calc(100vh - 180rpx)' }} >
46
+    <View className='page-container' >
47
+        <View className='house-add'>
48
+        
49
+
50
+
51
+            <View>
52
+              {userRole == 'guide' && <Guide userRole={userRole} />}
53
+              {userRole == 'recommend' && <Recommend userRole={userRole} />}
54
+            </View>
55
+
56
+        </View>
57
+
58
+      </View>
59
+    </ScrollView>
60
+    <Tab value={userRole} onClick={(e) => onTabClick(e)}></Tab>
61
+  </View>
62
+}
63
+
64
+export default houseadd

+ 53
- 0
src/pages/house/add/index.scss Voir le fichier

@@ -0,0 +1,53 @@
1
+.houselist{
2
+    &-view{
3
+        margin: 60px 0 0;
4
+        // padding: 0;
5
+        &-title {
6
+            color: #7b7b7b;
7
+            font-size: 45px;
8
+            font-weight: 500;
9
+            margin-left: 60px;
10
+            
11
+        }
12
+        &-card{
13
+            padding: 0;
14
+            color:#181818;
15
+            font-size: 36px;
16
+            font-weight: 600;
17
+            margin-top: 40px;
18
+            .top{
19
+                padding: 62px 60px;
20
+                border-bottom: 1px solid  #f4f4f4;
21
+                min-height: 120px;
22
+            }
23
+            .bottom{
24
+                 display: flex;
25
+                 justify-content: space-around;
26
+                 padding:30px
27
+            }
28
+         
29
+
30
+        }
31
+        
32
+        &-from{
33
+            // height: 300px;
34
+            padding: 80px 60px;
35
+            margin-top: 40px;
36
+            &-input{
37
+                margin: 36px 0 40px;
38
+                height:102px;
39
+                line-height: 102px;
40
+                font-size: 42px;
41
+            }
42
+            // &-input:nth-child(2){
43
+                // margin-bottom: 36px;
44
+            // }
45
+            .at-input__title{
46
+                text-align: center;
47
+                color: #cccccc;
48
+                font-size: 36px;
49
+                line-height: 102px;
50
+            }
51
+        }
52
+    }
53
+}

+ 4
- 0
src/pages/house/addnewhouse/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+
3
+  
4
+}

+ 176
- 0
src/pages/house/addnewhouse/index.jsx Voir le fichier

@@ -0,0 +1,176 @@
1
+import React, { useEffect, useMemo, useState } from 'react'
2
+import Taro from "@tarojs/taro";
3
+import { useSelector } from 'react-redux'
4
+import { View, Input, Text, Image, Form } from '@tarojs/components'
5
+import Layout from '../../../layout/index'
6
+import Tab from '../../../compents/tab/index'
7
+import Container from '../../../compents/container/index'
8
+import locationicon from '../../../assets/locationicon.png'
9
+import uploadicon from '../../../assets/uploadicon.png'
10
+import './index.scss'
11
+
12
+const index = (props) => {
13
+
14
+    const page = useSelector(state => state.page)
15
+
16
+    const user = useSelector(state => state.user)
17
+
18
+    const [userRole, setUserRole] = useState('1')
19
+    const [pageState, setPageState] = useState('1')
20
+    const [list, setList] = useState([])
21
+    useEffect(() => {
22
+
23
+        console.log(page, 'page')
24
+        setList([
25
+            {
26
+                name: 'zhou',
27
+                phone: '177'
28
+            },
29
+            {
30
+                name: 'zhou',
31
+                phone: '177'
32
+            },
33
+            {
34
+                name: 'zhou',
35
+                phone: '177'
36
+            }
37
+        ])
38
+    }, [])
39
+
40
+
41
+    const onTabClick = (e) => {
42
+        console.log(e, '111')
43
+        setUserRole(e)
44
+    }
45
+
46
+    const onRegisterChange = (e) => {
47
+        console.log(e, '111')
48
+    }
49
+    const onSave = () => {
50
+        console.log(333)
51
+
52
+        Taro.showModal({
53
+            title: '修改成功',
54
+            content: '点击确认按钮,返回上级菜单',
55
+            showCancel: false,
56
+            success: function (res) {
57
+                if (res.confirm) {
58
+                    console.log('用户点击确定')
59
+
60
+                    Taro.navigateBack({
61
+                        delta: 1
62
+                    })
63
+                } else if (res.cancel) {
64
+                    console.log('用户点击取消')
65
+                }
66
+            }
67
+        })
68
+    }
69
+
70
+    const onChooseLocation = () => {
71
+        console.log(333)
72
+        wx.chooseLocation({
73
+            success: (res) => {
74
+                console.log(res)
75
+            }
76
+        })
77
+    }
78
+    const formSubmit = (e) => {
79
+        console.log(e, 'formSubmit')
80
+    }
81
+
82
+    const formReset = () => {
83
+        console.log('formReset')
84
+    }
85
+
86
+    return <View className='addnewhouse'>
87
+
88
+
89
+        {/* <Form onSubmit={this.formSubmit} onReset={this.formReset} >
90
+        <View className='example-body'>
91
+          <Switch name='switch' className='form-switch'></Switch>
92
+        </View>
93
+      </Form> */}
94
+
95
+        <Layout>
96
+            <Form onSubmit={formSubmit} onReset={formReset}>
97
+                <View className='inputstyle-view'>
98
+                    <Text className='title'>民宿名称</Text>
99
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
100
+                        <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' />
101
+                    </Container>
102
+                </View>
103
+                <View className='inputstyle-view'>
104
+                    <Text className='title'>房屋名称</Text>
105
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
106
+                        <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' />
107
+                    </Container>
108
+                </View>
109
+                <View className='inputstyle-view'>
110
+                    <Text className='title'>位置形象</Text>
111
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
112
+                        <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' />
113
+                    </Container>
114
+                </View>
115
+                <View className='inputstyle-view'>
116
+                    <Text className='title'>当前地址</Text>
117
+                    <View style={{ display: 'flex' }}>
118
+                        <Container className='inputstyle-view-card' style={{ width: '100%', borderRadius: '20rpx', padding: '0 40rpx' }}>
119
+                            <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' />
120
+
121
+                        </Container>
122
+                        <Container className='map-view-icon' onClick={onChooseLocation}>
123
+                            <Image className='icon' mode='widthFix' style={{ width: '100%' }} style={{ width: '40rpx' }} src={locationicon} />
124
+
125
+                        </Container>
126
+                    </View>
127
+                </View>
128
+                <View className='inputstyle-view'>
129
+                    <Text className='title'>具体地址</Text>
130
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
131
+                        <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' />
132
+                    </Container>
133
+                </View>
134
+                <View className='inputstyle-view'>
135
+                    <Text className='title'>WiFi名称</Text>
136
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
137
+                        <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' />
138
+                    </Container>
139
+                </View>
140
+                <View className='inputstyle-view'>
141
+                    <Text className='title'>WiFi密码</Text>
142
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
143
+                        <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' />
144
+                    </Container>
145
+                </View>
146
+                <View className='inputstyle-view'>
147
+                    <Text className='title'>其他指引</Text>
148
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
149
+                        <Image className='guide-view-img' mode='widthFix' onClick={() => wx.chooseImage({
150
+                            count: 1,
151
+                            sizeType: ['original', 'compressed'],
152
+                            sourceType: ['album',],
153
+                            success: (res) => {
154
+                                // tempFilePath可以作为img标签的src属性显示图片
155
+
156
+                                console.log(res)
157
+                                // const tempFilePaths = res.tempFilePaths
158
+                                // setImgurl(tempFilePaths[0])
159
+                            }
160
+                        })} src={uploadicon || "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1657471424,2319316184&fm=26&gp=0.jpg"}></Image>
161
+                        {/* <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' /> */}
162
+                    </Container>
163
+                </View>
164
+            </Form>
165
+
166
+        </Layout>
167
+        <Tab className='addhousetab' pageState='3' value={['取消', '确认新增']} onClick={[(e) => setPageState('2'), () => formSubmit()]}></Tab>
168
+
169
+
170
+
171
+
172
+
173
+    </View>
174
+}
175
+
176
+export default index

+ 50
- 0
src/pages/house/addnewhouse/index.scss Voir le fichier

@@ -0,0 +1,50 @@
1
+.map {
2
+  // padding:13.33px;
3
+  &-view {
4
+    margin: 50px 0 0;
5
+
6
+    &-card {
7
+      // height: 106px;
8
+      // line-height: 106px;
9
+      padding: 0 40px;
10
+      // color:#181818;
11
+      font-size: 24px;
12
+      // font-weight: 600;
13
+      margin-top: 26.67px;
14
+      border-radius: 30px;
15
+      border-radius: 20px;
16
+      .input{
17
+        font-size: 28px;
18
+        padding:30px 0;
19
+        line-height: 106px;
20
+        // color: red;
21
+      }
22
+      .placeholderinput{
23
+        // line-height: 106px;
24
+        color: #d2d2d2;
25
+        font-size: 28px;
26
+      }
27
+    }
28
+    &-icon {
29
+      margin-left: 40px;
30
+      // padding: 20px 30px;
31
+      // color:#181818;
32
+      width: 150px;
33
+      height: 106.67px;
34
+      // font-size: 36px;
35
+      // // font-weight: 600;
36
+      margin-top: 26.67px;
37
+      border-radius: 20px;
38
+      background-color: #274291;
39
+      padding: 0;
40
+      text-align: center;
41
+      line-height:120.67px;
42
+      .icon {
43
+        
44
+        // width: 100%;
45
+      }
46
+    }
47
+    // style={{width:'48.4rpx',height:'48.4rpx'}}
48
+  }
49
+
50
+}

+ 4
- 0
src/pages/house/household/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+
3
+  
4
+}

+ 73
- 0
src/pages/house/household/index.jsx Voir le fichier

@@ -0,0 +1,73 @@
1
+import React, { useEffect, useMemo, useState,useRef } from 'react'
2
+import Taro from '@tarojs/taro'
3
+import './index.scss'
4
+import { View, Text, Input,Image } from '@tarojs/components'
5
+import ContainerLayout from '../../../compents/container/index'
6
+import radio from '../../../assets/radio.png'
7
+import Layout from '../../../layout/index'
8
+const house = (props) => {
9
+
10
+  const [list, setList] = useState([])
11
+  const [radioHouse, setRadioHouse] = useState()
12
+  
13
+    const ref = useRef();
14
+    useEffect(() => {
15
+      ref.current = 3;
16
+    });
17
+  
18
+  
19
+
20
+  const radioHouseState = useMemo(()=>props.radioHouseState,[props.radioHouseState])
21
+  wx.setNavigationBarTitle({
22
+    title: '民宿房源管理'
23
+  })
24
+console.log(props,radioHouseState)
25
+  useEffect(() => {
26
+    setList([
27
+      {
28
+        id:1,
29
+        name: 'zhou',
30
+        phone: '177'
31
+      },
32
+      {
33
+        id:2,
34
+        name: 'zhou',
35
+        phone: '177'
36
+      },
37
+      {
38
+        id:3,
39
+        name: 'zhou',
40
+        phone: '177'
41
+      }
42
+    ])
43
+  }, [])
44
+
45
+  const onShare = () => {
46
+    Taro.navigateTo({ url: "/pages/share/index" })
47
+  }
48
+
49
+
50
+
51
+  return <View className='household'>
52
+
53
+    <Layout>
54
+      <View className='household-text'>vjoaphepionvodashvoia</View>
55
+    {list.map((x, index) => {
56
+      return <View className='household-view'>
57
+
58
+        <Text className='household-view-title'>入住日期:{index + 1}</Text>
59
+        <ContainerLayout className='household-view-card'>
60
+         
61
+         暂无入住人信息    
62
+        </ContainerLayout>
63
+
64
+      </View>
65
+
66
+    })}
67
+    </Layout>
68
+   
69
+   
70
+  </View>
71
+}
72
+
73
+export default house

+ 34
- 0
src/pages/house/household/index.scss Voir le fichier

@@ -0,0 +1,34 @@
1
+.household {
2
+
3
+  &-text{
4
+    padding:40px 40px;
5
+    text-align: center;
6
+  }
7
+  &-view {
8
+    margin: 40px 0 0;
9
+
10
+    // padding: 0;
11
+    &-title {
12
+      color: #7b7b7b;
13
+      font-size: 30px;
14
+      font-weight: 500;
15
+      margin-left: 40px;
16
+
17
+    }
18
+
19
+    &-card {
20
+      // padding: 0;
21
+      color: #fff;
22
+      font-size: 28px;
23
+      // font-weight: 600;
24
+      margin-top: 26.67px;
25
+      position: relative;
26
+      min-height: 150px;
27
+
28
+ text-align: center;
29
+background-color:#274291;
30
+
31
+
32
+    }
33
+  }
34
+}

+ 5
- 0
src/pages/house/index.config.js Voir le fichier

@@ -0,0 +1,5 @@
1
+// export default {
2
+//     navigationStyle: "custom"
3
+    
4
+//   }
5
+  

+ 69
- 0
src/pages/house/index.jsx Voir le fichier

@@ -0,0 +1,69 @@
1
+import React, { useEffect, useMemo, useState } from 'react'
2
+import { useSelector } from 'react-redux'
3
+import { View, ScrollView } from '@tarojs/components'
4
+import Layout from '../../layout/index'
5
+import Tab from '../../compents/tab/index'
6
+import Guide from '../guide/index'
7
+import Recommend from '../recommend/index'
8
+
9
+// import HouseLIst from '../house/list'
10
+
11
+import './index.scss'
12
+
13
+const house = (props) => {
14
+
15
+    const page = useSelector(state => state.page)
16
+
17
+    const user = useSelector(state => state.user)
18
+
19
+    const [userRole, setUserRole] = useState('1')
20
+    const [pageState, setPageState] = useState('2')
21
+    const [list, setList] = useState([])
22
+    useEffect(() => {
23
+
24
+        console.log(page, 'page')
25
+        setList([
26
+            {
27
+                name: 'zhou',
28
+                phone: '177'
29
+            },
30
+            {
31
+                name: 'zhou',
32
+                phone: '177'
33
+            },
34
+            {
35
+                name: 'zhou',
36
+                phone: '177'
37
+            }
38
+        ])
39
+    }, [])
40
+
41
+
42
+    const onTabClick = (e) => {
43
+        console.log(e, '111')
44
+        setUserRole(e)
45
+    }
46
+
47
+    const onRegisterChange = (e) => {
48
+        console.log(e, '111')
49
+    }
50
+
51
+
52
+    return <View className='index'>
53
+
54
+
55
+        <View >
56
+
57
+            <Layout>
58
+                {pageState == '2' && <Guide></Guide>}
59
+                {pageState == '3' && <Recommend></Recommend>}
60
+            </Layout>
61
+            {pageState != '1' && <Tab value={['入住指引', '房东推荐']} pageState={pageState} onClick={[(e) => setPageState('2'),(e) => setPageState('3')]}></Tab>}
62
+
63
+        </View>
64
+
65
+
66
+    </View>
67
+}
68
+
69
+export default house

+ 53
- 0
src/pages/house/index.scss Voir le fichier

@@ -0,0 +1,53 @@
1
+.house{
2
+    &-view{
3
+        margin: 60px 0 0;
4
+        // padding: 0;
5
+        &-title {
6
+            color: #7b7b7b;
7
+            font-size: 45px;
8
+            font-weight: 500;
9
+            margin-left: 60px;
10
+            
11
+        }
12
+        &-card{
13
+            padding: 0;
14
+            color:#181818;
15
+            font-size: 36px;
16
+            font-weight: 600;
17
+            margin-top: 40px;
18
+            .top{
19
+                padding: 62px 60px;
20
+                border-bottom: 1px solid  #f4f4f4;
21
+                min-height: 120px;
22
+            }
23
+            .bottom{
24
+                 display: flex;
25
+                 justify-content: space-around;
26
+                 padding:30px
27
+            }
28
+         
29
+
30
+        }
31
+        
32
+        &-from{
33
+            // height: 300px;
34
+            padding: 80px 60px;
35
+            margin-top: 40px;
36
+            &-input{
37
+                margin: 36px 0 40px;
38
+                height:102px;
39
+                line-height: 102px;
40
+                font-size: 42px;
41
+            }
42
+            // &-input:nth-child(2){
43
+                // margin-bottom: 36px;
44
+            // }
45
+            .at-input__title{
46
+                text-align: center;
47
+                color: #cccccc;
48
+                font-size: 36px;
49
+                line-height: 102px;
50
+            }
51
+        }
52
+    }
53
+}

+ 73
- 0
src/pages/house/list/index.jsx Voir le fichier

@@ -0,0 +1,73 @@
1
+import React, { useEffect, useMemo, useState,useRef } from 'react'
2
+import Taro from '@tarojs/taro'
3
+import './index.scss'
4
+import { View, Text, Input,Image } from '@tarojs/components'
5
+import ContainerLayout from '../../../compents/container/index'
6
+import radio from '../../../assets/radio.png'
7
+
8
+const house = (props) => {
9
+
10
+  const [list, setList] = useState([])
11
+  const [radioHouse, setRadioHouse] = useState()
12
+  
13
+    const ref = useRef();
14
+    useEffect(() => {
15
+      ref.current = 3;
16
+    });
17
+  
18
+  
19
+
20
+  const radioHouseState = useMemo(()=>props.radioHouseState,[props.radioHouseState])
21
+  wx.setNavigationBarTitle({
22
+    title: '民宿房源管理'
23
+  })
24
+console.log(props,radioHouseState)
25
+  useEffect(() => {
26
+    setList([
27
+      {
28
+        id:1,
29
+        name: 'zhou',
30
+        phone: '177'
31
+      },
32
+      {
33
+        id:2,
34
+        name: 'zhou',
35
+        phone: '177'
36
+      },
37
+      {
38
+        id:3,
39
+        name: 'zhou',
40
+        phone: '177'
41
+      }
42
+    ])
43
+  }, [])
44
+
45
+  const onShare = () => {
46
+    Taro.navigateTo({ url: "/pages/share/index" })
47
+  }
48
+
49
+
50
+
51
+  return <View className='houselist'>
52
+    {list.map((x, index) => {
53
+      return <View className='houselist-view'>
54
+        <Text className='houselist-view-title'>房源编号:{index + 1}</Text>
55
+        <ContainerLayout className='houselist-view-card'>
56
+          {radioHouseState&&<View className='houselist-view-card-radio' onClick={()=>{ props.onChange(x),setRadioHouse(x.id)}}>
57
+            {radioHouse==x.id&&<Image src={radio} style={{width:'30rpx',height:'20rpx'}}></Image>}
58
+          </View>}
59
+          <View className='top' onClick={() => {if(!radioHouseState) Taro.navigateTo({ url: `/pages/house/index?=${x.id}`  })}}>福娃给v阿萨v不会让发到付</View>
60
+          <View className='bottom'>
61
+            <Text onClick={() => {if(!radioHouseState) Taro.navigateTo({ url: `/pages/house/household/index?id=${x.id}` })}}>查看入住人</Text>
62
+            <Text onClick={onShare}>分享链接</Text>
63
+          </View>
64
+        </ContainerLayout>
65
+        
66
+      </View>
67
+
68
+    })}
69
+   
70
+  </View>
71
+}
72
+
73
+export default house

+ 52
- 0
src/pages/house/list/index.scss Voir le fichier

@@ -0,0 +1,52 @@
1
+.houselist {
2
+
3
+  // padding: 13.33px 0;
4
+  &-view {
5
+    margin: 40px 0 0;
6
+
7
+    // padding: 0;
8
+    &-title {
9
+      color: #7b7b7b;
10
+      font-size: 30px;
11
+      font-weight: 500;
12
+      margin-left: 40px;
13
+
14
+    }
15
+
16
+    &-card {
17
+      padding: 0;
18
+      color: #181818;
19
+      font-size: 24px;
20
+      font-weight: 600;
21
+      margin-top: 26.67px;
22
+      position: relative;
23
+
24
+      &-radio {
25
+          width: 50px;
26
+          height: 50px;
27
+        background-color: #274291;
28
+        text-align: center;
29
+        line-height: 50px;
30
+        position: absolute;
31
+        border-radius: 25px;
32
+        top: -12.5px;
33
+        right: -12.5px;
34
+      }
35
+
36
+      .top {
37
+        padding: 60px 40px;
38
+        border-bottom: 1px solid #f4f4f4;
39
+        line-height: 32px;
40
+        // min-height: 120px;
41
+      }
42
+
43
+      .bottom {
44
+        display: flex;
45
+        justify-content: space-around;
46
+        padding: 20px
47
+      }
48
+
49
+
50
+    }
51
+  }
52
+}

+ 31
- 0
src/pages/index/compents/register.jsx Voir le fichier

@@ -0,0 +1,31 @@
1
+import React, { useEffect, useState } from 'react'
2
+import './register.scss'
3
+import { View, Text, Input } from '@tarojs/components'
4
+import ContainerLayout from '../../../compents/container/index'
5
+import { AtInput }  from 'taro-ui'
6
+
7
+const register = (props) => {
8
+
9
+    const {list,onChange}= props
10
+
11
+
12
+    // const onChange =
13
+ 
14
+
15
+    return <View className='register'>
16
+        {list.map((x, index) => {
17
+            return <View className='register-user'>
18
+                <Text>入住人{index + 1}</Text>
19
+                <ContainerLayout className='register-user-from'>
20
+                    <AtInput className='register-user-from-input' onChange={onChange} title='姓名' type='text'   />
21
+                    <AtInput className='register-user-from-input' onChange={onChange} title='电话' type='text'   />
22
+                </ContainerLayout>
23
+
24
+            </View>
25
+
26
+        })}
27
+
28
+    </View>
29
+}
30
+
31
+export default register

+ 31
- 0
src/pages/index/compents/register.scss Voir le fichier

@@ -0,0 +1,31 @@
1
+.register{
2
+    &-user{
3
+        margin: 60px 0 0;
4
+        Text {
5
+            color: #7b7b7b;
6
+            font-size: 45px;
7
+            font-weight: 500;
8
+            margin-left: 60px;
9
+        }
10
+        &-from{
11
+            // height: 300px;
12
+            padding: 80px 60px;
13
+            margin-top: 40px;
14
+            &-input{
15
+                margin: 36px 0 40px;
16
+                height:102px;
17
+                line-height: 102px;
18
+                font-size: 42px;
19
+            }
20
+            // &-input:nth-child(2){
21
+                // margin-bottom: 36px;
22
+            // }
23
+            .at-input__title{
24
+                text-align: center;
25
+                color: #cccccc;
26
+                font-size: 36px;
27
+                line-height: 102px;
28
+            }
29
+        }
30
+    }
31
+}

+ 4
- 0
src/pages/index/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+  navigationBarTitleText: '首页',
3
+  
4
+}

+ 100
- 0
src/pages/index/index.jsx Voir le fichier

@@ -0,0 +1,100 @@
1
+import React, { useEffect, useMemo, useState } from 'react'
2
+import { useSelector } from 'react-redux'
3
+import { View, ScrollView } from '@tarojs/components'
4
+import Tab from '../../compents/tab/index'
5
+import Customer from '../customer/index'
6
+import Landlord from '../landlord/index'
7
+import AdminUser from '../adminUser/index'
8
+import Guide from '../guide/index'
9
+import Recommend from '../recommend/index'
10
+import HouseLIst from '../house/list'
11
+import roleList from '../../util/userRole'
12
+import './index.scss'
13
+import request from '../../util/request'
14
+const index = (props) => {
15
+
16
+  const page = useSelector(state => state.page)
17
+
18
+  const user = useSelector(state => state.user)
19
+
20
+  const [userRole, setUserRole] = useState('1')
21
+  const [pageState, SetPageState] = useState('1')
22
+  const [list, setList] = useState([])
23
+  useEffect(() => {
24
+
25
+    console.log(page,'page')
26
+    setList([
27
+      {
28
+        name: 'zhou',
29
+        phone: '177'
30
+      },
31
+      {
32
+        name: 'zhou',
33
+        phone: '177'
34
+      },
35
+      {
36
+        name: 'zhou',
37
+        phone: '177'
38
+      }
39
+    ])
40
+
41
+    // fetch({ url: API_CARDS_LIST, payload })
42
+
43
+    request({
44
+      url:'/api/taHouseSurround',
45
+      method: 'get',
46
+      // params:{
47
+      //   id:3,
48
+
49
+      //   b:3
50
+      // }
51
+    })
52
+
53
+
54
+  }, [])
55
+
56
+
57
+  const onTabClick = (e) => {
58
+    console.log(e, '111')
59
+    setUserRole(e)
60
+  }
61
+
62
+  const onRegisterChange = (e) => {
63
+    console.log(e, '111')
64
+  }
65
+
66
+
67
+
68
+ 
69
+  return <View className='index'>
70
+    {/* <ScrollView scrollY style={{ height: 'calc(100vh - 180rpx)' }} >
71
+
72
+   
73
+      <View className='page-container' > */}
74
+
75
+      {user.role==roleList.customer&&<Customer></Customer>  }
76
+      {user.role==roleList.landlord&&<Landlord></Landlord>  }
77
+      {user.role==roleList.adminuser&&<AdminUser></AdminUser>  }
78
+        {/* {userRole == 1 ? <Register userRole={userRole} list={list} onChange={(e) => onRegisterChange(e)}></Register> :
79
+          <View>userRole={userRole} list={list} onChange={(e) => onRegisterChange(e)}
80
+            {(userRole == 'guide' || userRole == 2) && <Guide userRole={userRole}/>}
81
+            {userRole == 'recommend' && <Recommend userRole={userRole}/>}
82
+          </View>
83
+        }
84
+        {userRole == 2 ? <Register userRole={userRole} list={list} onChange={(e) => onRegisterChange(e)}></Register> :
85
+          <View>
86
+            {(userRole == 'guide' || userRole == 2) && <Guide userRole={userRole}/>}
87
+            {userRole == 'recommend' && <Recommend userRole={userRole}/>}
88
+          </View>
89
+        }
90
+     <HouseLIst userRole={userRole} list={list} onChange={(e) => onRegisterChange(e)}></HouseLIst>  */}
91
+       
92
+        
93
+      
94
+      {/* </View>
95
+    </ScrollView>
96
+    <Tab value={userRole} onClick={(e) => onTabClick(e)}></Tab> */}
97
+  </View>
98
+}
99
+
100
+export default index

+ 15
- 0
src/pages/index/index.scss Voir le fichier

@@ -0,0 +1,15 @@
1
+// .page-container {
2
+//   padding: 0 62px 40px;
3
+//   width: 1001px;
4
+
5
+//   .at-input {
6
+//     // margin-left: 0;
7
+//     background: #f4f4f4;
8
+//     height: 102px;
9
+//     border-radius: 10px;
10
+//     font-size: 36px;
11
+//   }
12
+
13
+
14
+//   color: #181818;
15
+// }

+ 4
- 0
src/pages/label/edit/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+
3
+  
4
+}

+ 130
- 0
src/pages/label/edit/index.jsx Voir le fichier

@@ -0,0 +1,130 @@
1
+import React, { useEffect, useMemo, useState } from 'react'
2
+import Taro from "@tarojs/taro";
3
+import { useSelector } from 'react-redux'
4
+import { View, Input, Text, Image, Form } from '@tarojs/components'
5
+import Layout from '../../../layout/index'
6
+import Tab from '../../../compents/tab/index'
7
+import Container from '../../../compents/container/index'
8
+import locationicon from '../../../assets/locationicon.png'
9
+import uploadicon from '../../../assets/uploadicon.png'
10
+import './index.scss'
11
+
12
+const index = (props) => {
13
+
14
+    const page = useSelector(state => state.page)
15
+
16
+    const user = useSelector(state => state.user)
17
+
18
+    const [userRole, setUserRole] = useState('1')
19
+    const [pageState, setPageState] = useState('1')
20
+    const [list, setList] = useState([])
21
+    useEffect(() => {
22
+
23
+        console.log(page, 'page')
24
+        setList([
25
+            {
26
+                name: 'zhou',
27
+                phone: '177'
28
+            },
29
+            {
30
+                name: 'zhou',
31
+                phone: '177'
32
+            },
33
+            {
34
+                name: 'zhou',
35
+                phone: '177'
36
+            }
37
+        ])
38
+    }, [])
39
+
40
+
41
+    const onTabClick = (e) => {
42
+        console.log(e, '111')
43
+        setUserRole(e)
44
+    }
45
+
46
+    const onRegisterChange = (e) => {
47
+        console.log(e, '111')
48
+    }
49
+    const onSave = () => {
50
+        console.log(333)
51
+
52
+        Taro.showModal({
53
+            title: '修改成功',
54
+            content: '点击确认按钮,返回上级菜单',
55
+            showCancel: false,
56
+            success: function (res) {
57
+                if (res.confirm) {
58
+                    console.log('用户点击确定')
59
+
60
+                    Taro.navigateBack({
61
+                        delta: 1
62
+                    })
63
+                } else if (res.cancel) {
64
+                    console.log('用户点击取消')
65
+                }
66
+            }
67
+        })
68
+    }
69
+
70
+    const onChooseLocation = () => {
71
+        console.log(333)
72
+        wx.chooseLocation({
73
+            success: (res) => {
74
+                console.log(res)
75
+            }
76
+        })
77
+    }
78
+    const formSubmit = (e) => {
79
+        console.log(e, 'formSubmit')
80
+    }
81
+
82
+    const formReset = () => {
83
+        console.log('formReset')
84
+    }
85
+
86
+    return <View className='addnewhouse'>
87
+
88
+
89
+        {/* <Form onSubmit={this.formSubmit} onReset={this.formReset} >
90
+        <View className='example-body'>
91
+          <Switch name='switch' className='form-switch'></Switch>
92
+        </View>
93
+      </Form> */}
94
+
95
+        <Layout>
96
+            <Form onSubmit={formSubmit} onReset={formReset}>
97
+                <View className='inputstyle-view'>
98
+                    <Text className='title'>标签组编号</Text>
99
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
100
+                        <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
101
+                    </Container>
102
+                </View>
103
+                <View className='inputstyle-view'>
104
+                    <Text className='title'>标签组名称</Text>
105
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
106
+                        <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
107
+                    </Container>
108
+                </View>
109
+                <View className='inputstyle-view'>
110
+                    <Text className='title'>标签数量</Text>
111
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
112
+                        <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
113
+                    </Container>
114
+                </View>
115
+           
116
+            </Form>
117
+
118
+        </Layout>
119
+        <Tab className='addhousetab' pageState='3' value={['取消', '确认修改']} onClick={[(e) => Taro.navigateBack({
120
+                        delta: 1
121
+                    }), () => onSave()]}></Tab>
122
+
123
+
124
+
125
+
126
+
127
+    </View>
128
+}
129
+
130
+export default index

+ 50
- 0
src/pages/label/edit/index.scss Voir le fichier

@@ -0,0 +1,50 @@
1
+.map {
2
+  // padding:13.33px;
3
+  &-view {
4
+    margin: 50px 0 0;
5
+
6
+    &-card {
7
+      // height: 106px;
8
+      // line-height: 106px;
9
+      padding: 0 40px;
10
+      // color:#181818;
11
+      font-size: 24px;
12
+      // font-weight: 600;
13
+      margin-top: 26.67px;
14
+      border-radius: 30px;
15
+      border-radius: 20px;
16
+      .input{
17
+        font-size: 28px;
18
+        padding:30px 0;
19
+        line-height: 106px;
20
+        // color: red;
21
+      }
22
+      .placeholderinput{
23
+        // line-height: 106px;
24
+        color: #d2d2d2;
25
+        font-size: 28px;
26
+      }
27
+    }
28
+    &-icon {
29
+      margin-left: 40px;
30
+      // padding: 20px 30px;
31
+      // color:#181818;
32
+      width: 150px;
33
+      height: 106.67px;
34
+      // font-size: 36px;
35
+      // // font-weight: 600;
36
+      margin-top: 26.67px;
37
+      border-radius: 20px;
38
+      background-color: #274291;
39
+      padding: 0;
40
+      text-align: center;
41
+      line-height:120.67px;
42
+      .icon {
43
+        
44
+        // width: 100%;
45
+      }
46
+    }
47
+    // style={{width:'48.4rpx',height:'48.4rpx'}}
48
+  }
49
+
50
+}

+ 4
- 0
src/pages/label/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+
3
+  
4
+}

+ 137
- 0
src/pages/label/index.jsx Voir le fichier

@@ -0,0 +1,137 @@
1
+import React, { useEffect, useMemo, useState, useRef } from 'react'
2
+import Taro from '@tarojs/taro'
3
+import './index.scss'
4
+import { View, Text, Input, Image } from '@tarojs/components'
5
+import ContainerLayout from '../../compents/container/index'
6
+import Tab from '../../compents/tab/index'
7
+import Layout from '../../layout/index'
8
+
9
+const house = (props) => {
10
+
11
+  const [list, setList] = useState([])
12
+  const [radioHouse, setRadioHouse] = useState()
13
+
14
+  const ref = useRef();
15
+  useEffect(() => {
16
+    ref.current = 3;
17
+  });
18
+
19
+
20
+
21
+  const radioHouseState = useMemo(() => props.radioHouseState, [props.radioHouseState])
22
+  wx.setNavigationBarTitle({
23
+    title: '民宿房源管理'
24
+  })
25
+  console.log(props, radioHouseState)
26
+  useEffect(() => {
27
+    setList([
28
+      {
29
+        id: 1,
30
+        name: 'zhou',
31
+        phone: '177',
32
+        user: {
33
+          name: '张三',
34
+          phone: '17777777777',
35
+          wxid: 'hhh',
36
+          number: '3'
37
+        }
38
+      },
39
+      {
40
+        id: 2,
41
+        name: 'zhou',
42
+        phone: '177',
43
+        user: {
44
+          name: '张三',
45
+          phone: '17777777777',
46
+          wxid: 'hhh',
47
+          number: '3',
48
+          user: {
49
+            name: '张三',
50
+            phone: '17777777777',
51
+            wxid: 'hhh',
52
+            number: '3'
53
+          }
54
+        }
55
+      },
56
+      {
57
+        id: 3,
58
+        name: 'zhou',
59
+        phone: '177',
60
+        user: {
61
+          name: '张三',
62
+          phone: '17777777777',
63
+          wxid: 'hhh',
64
+          number: '3',
65
+          user: {
66
+            name: '张三',
67
+            phone: '17777777777',
68
+            wxid: 'hhh',
69
+            number: '3'
70
+          }
71
+        }
72
+      }
73
+    ])
74
+  }, [])
75
+
76
+  const onDelete = (row) => {
77
+    Taro.showModal({
78
+      title: '确定删除该标签组吗?',
79
+      content: row.user.name,
80
+      cancelColor:'#d2d2d2',
81
+                confirmColor:"#274191",
82
+      success: function (res) {
83
+        if (res.confirm) {
84
+          console.log('用户点击确定')
85
+          Taro.showModal({
86
+            title: `改标签组有${row.user.number}个标签仍在使用。请先清空标签,再删除标签组`,
87
+   showCancel:false,
88
+            // cancelColor:'#d2d2d2',
89
+                      confirmColor:"#274191",
90
+            success: function (res) {
91
+              if (res.confirm) {
92
+                console.log('用户点击确定')
93
+      
94
+               
95
+              } else if (res.cancel) {
96
+                console.log('用户点击取消')
97
+              }
98
+            }
99
+          })
100
+         
101
+        } else if (res.cancel) {
102
+          console.log('用户点击取消')
103
+        }
104
+      }
105
+    })
106
+  }
107
+
108
+
109
+
110
+
111
+  return <View className='account'>
112
+    <Layout>
113
+      {list.map((x, index) => {
114
+        return <View className='account-view'>
115
+          <Text className='account-view-title'>标签组编号:{index + 1}</Text>
116
+          <ContainerLayout className='account-view-card'>
117
+            <View className='top' onClick={() => { if (!radioHouseState) Taro.navigateTo({ url: `/pages/house/index?=${x.id}` }) }}>
118
+              <View>标签组名称:{x.user.name}</View>
119
+              <View>房源数:{x.user.name}</View>
120
+
121
+            </View>
122
+            <View className='bottom'>
123
+              <Text onClick={() => { Taro.navigateTo({ url: `/pages/label/edit/index?=${x.id}` }) }}>编辑</Text>
124
+              <Text onClick={()=>onDelete(x)}>删除</Text>
125
+            </View>
126
+          </ContainerLayout>
127
+
128
+        </View>
129
+
130
+      })}
131
+    </Layout>
132
+    {/* onClick={(e)=>(e) */}
133
+    <Tab value={['+新增标签组']} color='#ffffff' onClick={() => { Taro.navigateTo({ url: `/pages/label/edit/index` }) }} ></Tab>
134
+  </View>
135
+}
136
+
137
+export default house

+ 54
- 0
src/pages/label/index.scss Voir le fichier

@@ -0,0 +1,54 @@
1
+.account {
2
+
3
+  // padding: 13.33px 0;
4
+  &-view {
5
+    margin: 40px 0 0;
6
+
7
+    // padding: 0;
8
+    &-title {
9
+      color: #7b7b7b;
10
+      font-size: 30px;
11
+      font-weight: 500;
12
+      margin-left: 40px;
13
+
14
+    }
15
+
16
+    &-card {
17
+      padding: 0;
18
+      color: #181818;
19
+      font-size: 24px;
20
+      font-weight: 600;
21
+      margin-top: 26.67px;
22
+      position: relative;
23
+
24
+      &-radio {
25
+          width: 50px;
26
+          height: 50px;
27
+        background-color: #274291;
28
+        text-align: center;
29
+        line-height: 50px;
30
+        position: absolute;
31
+        border-radius: 25px;
32
+        top: -12.5px;
33
+        right: -12.5px;
34
+      }
35
+
36
+      .top {
37
+        padding: 40px 40px;
38
+        border-bottom: 1px solid #f4f4f4;
39
+        line-height: 32px;
40
+        font-weight: 500;
41
+        // font-size: ;
42
+        // min-height: 120px;
43
+      }
44
+
45
+      .bottom {
46
+        display: flex;
47
+        justify-content: space-around;
48
+        padding: 20px
49
+      }
50
+
51
+
52
+    }
53
+  }
54
+}

+ 110
- 0
src/pages/landlord/index.jsx Voir le fichier

@@ -0,0 +1,110 @@
1
+import React, { useEffect, useMemo, useState } from 'react'
2
+import Taro, {  } from "@tarojs/taro";
3
+import { useSelector } from 'react-redux'
4
+import { View, ScrollView, Button } from '@tarojs/components'
5
+import Layout from '../../layout/index'
6
+import Tab from '../../compents/tab/index'
7
+// import Register from './register/index'
8
+import Guide from '../guide/index'
9
+import Recommend from '../recommend/index'
10
+import HouseLIst from '../house/list/index'
11
+import { AtFloatLayout } from "taro-ui"
12
+import './index.scss'
13
+
14
+const index = (props) => {
15
+
16
+  const page = useSelector(state => state.page)
17
+
18
+  const user = useSelector(state => state.user)
19
+  const [isOpened, setIsOpened] = useState(false)
20
+  const [userRole, setUserRole] = useState('1')
21
+  const [pageState, setPageState] = useState('1')
22
+  const [list, setList] = useState([])
23
+  const [radioHouseData, setRadioHouseData] = useState()
24
+  const [radioHouseState, setRadioHouseState] = useState(false)
25
+ 
26
+  useEffect(() => {
27
+
28
+    console.log(page, 'page')
29
+    setList([
30
+      {
31
+        name: 'zhou',
32
+        phone: '177'
33
+      },
34
+      {
35
+        name: 'zhou',
36
+        phone: '177'
37
+      },
38
+      {
39
+        name: 'zhou',
40
+        phone: '177'
41
+      }
42
+    ])
43
+  }, [])
44
+
45
+
46
+
47
+  const handleClose = () => {
48
+    setIsOpened(false)
49
+  }
50
+  const onTabClick = (e) => {
51
+    console.log(e, '111')
52
+    setUserRole(e)
53
+    
54
+  }
55
+
56
+  const onRegisterChange = (e) => {
57
+    console.log(e, '111')
58
+  }
59
+  const onCopy = (e) => {
60
+    
61
+    console.log(radioHouseData, '111')
62
+    if(radioHouseData.id){
63
+      Taro.navigateTo({ url: '/pages/house/addnewhouse/index?id=radioHouseData.id'})
64
+      // Taro.showModal({
65
+      //   title: '修改成功',
66
+      //   content: '点击确认按钮,返回上级菜单',
67
+      //   showCancel:false,
68
+      //   success: function (res) {
69
+      //     if (res.confirm) {
70
+      //       console.log('用户点击确定')
71
+
72
+      //       Taro.navigateTo({ url: '/pages/house/addnewhouse/index?id=radioHouseData.id'})
73
+      //     } else if (res.cancel) {
74
+      //       console.log('用户点击取消')
75
+      //     }
76
+      //   }
77
+      // })
78
+     
79
+    } 
80
+ 
81
+  }
82
+
83
+  
84
+  return <View className='index'>
85
+
86
+
87
+    <View>
88
+
89
+      <Layout>
90
+        {pageState == '1' && <HouseLIst  radioHouseState={radioHouseState} onChange={(e) => setRadioHouseData(e)}></HouseLIst>}
91
+      </Layout>
92
+      {!isOpened && <Tab className='addhousetab' value={['+添加房源']} onClick={(e) => setIsOpened(true)}></Tab>}
93
+      {/* {pageState!='1' &&<Tab value={['入住指引','房东推荐']} pageState={pageState} onClick={(e)=>setPageState(e)}></Tab>} */}
94
+      {radioHouseState && <Tab pageState='3' value={['取消', '确认复制']} onClick={[(e) => { setRadioHouseState(false), setIsOpened(false) },()=>onCopy()]}></Tab>}
95
+    </View>
96
+
97
+
98
+
99
+    <AtFloatLayout isOpened={isOpened} onClose={() => handleClose()} style={{ zIndex: '1000' }}>
100
+      <View className='floatmodel' >
101
+        <View onClick={() => Taro.navigateTo({ url: '/pages/house/addnewhouse/index' })}>新增房源</View>
102
+        <View onClick={() => { setIsOpened(false); setRadioHouseState(true) }}>复制房源</View>
103
+        <View style={{ color: '#d2d2d2' }} onClick={()=>setIsOpened(false)}>取消</View>
104
+      </View>
105
+
106
+    </AtFloatLayout>
107
+  </View>
108
+}
109
+
110
+export default index

+ 35
- 0
src/pages/landlord/index.scss Voir le fichier

@@ -0,0 +1,35 @@
1
+.page-container {
2
+
3
+
4
+  color: #181818;
5
+}
6
+
7
+
8
+.index {
9
+  .addhousetab {
10
+    color: #fff;
11
+  }
12
+}
13
+
14
+.floatmodel {
15
+  height: 500px;
16
+  display: flex;
17
+  flex-direction: column;
18
+  justify-content: space-around;
19
+  align-items: center;
20
+  font-size: 32px;
21
+}
22
+
23
+.at-float-layout__container {
24
+  min-height: 100px;
25
+  color: #274291;
26
+  font-weight: 600;
27
+  border-radius: 50px 50px 0 0;
28
+}
29
+
30
+.at-float-layout {
31
+  .layout-page {
32
+    padding: 0;
33
+  }
34
+
35
+}

+ 4
- 0
src/pages/map/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+
3
+  
4
+}

+ 99
- 0
src/pages/map/index.jsx Voir le fichier

@@ -0,0 +1,99 @@
1
+import React, { useEffect, useMemo, useState } from 'react'
2
+import Taro from "@tarojs/taro";
3
+import { useSelector } from 'react-redux'
4
+import { View, Input, Text, Image } from '@tarojs/components'
5
+import Layout from '../../layout/index'
6
+import Tab from '../../compents/tab/index'
7
+import Container from '../../compents/container/index'
8
+import locationicon from '../../assets/locationicon.png'
9
+import './index.scss'
10
+
11
+const index = (props) => {
12
+
13
+    const page = useSelector(state => state.page)
14
+
15
+    const user = useSelector(state => state.user)
16
+
17
+    const [userRole, setUserRole] = useState('1')
18
+    const [pageState, setPageState] = useState('1')
19
+    const [list, setList] = useState([])
20
+    useEffect(() => {
21
+
22
+        console.log(page, 'page')
23
+        setList([
24
+            {
25
+                name: 'zhou',
26
+                phone: '177'
27
+            },
28
+            {
29
+                name: 'zhou',
30
+                phone: '177'
31
+            },
32
+            {
33
+                name: 'zhou',
34
+                phone: '177'
35
+            }
36
+        ])
37
+    }, [])
38
+
39
+
40
+    const onTabClick = (e) => {
41
+        console.log(e, '111')
42
+        setUserRole(e)
43
+    }
44
+
45
+    const onRegisterChange = (e) => {
46
+        console.log(e, '111')
47
+    }
48
+    const onChooseLocation = () => {
49
+        console.log(333)
50
+        wx.chooseLocation({
51
+            success:(res)=>{
52
+                console.log(res)
53
+            }
54
+        })
55
+    }
56
+    
57
+
58
+    return <View className='map'>
59
+
60
+
61
+
62
+
63
+        <Layout>
64
+            <View className='map-view'>
65
+                <Text className='title'>位置信息</Text>
66
+                <Container className='map-view-card'>
67
+                <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' />
68
+                </Container>
69
+            </View>
70
+            <View className='map-view' >
71
+                <Text className='title'>当前地址</Text>
72
+                <View style={{ display: 'flex' }}>
73
+                <Container className='map-view-card' style={{ width: '100%' }}>
74
+                    <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' />
75
+
76
+                </Container>
77
+                <Container className='map-view-icon' onClick={onChooseLocation}>
78
+                    <Image className='icon' mode='widthFix' style={{ width: '100%' }} style={{width: '40rpx'}} src={locationicon} />
79
+
80
+                </Container>
81
+                </View>
82
+            </View>
83
+            <View className='map-view'>
84
+                <Text className='title'>具体地址</Text>
85
+                <Container className='map-view-card'>
86
+                <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' />
87
+                </Container>
88
+            </View>
89
+        </Layout>
90
+        {pageState == '1' && <Tab className='addhousetab' pageState='3' value={['取消', '保存修改']} onClick={[(e) => setPageState('2'), (e) => setPageState('3')]}></Tab>}
91
+
92
+
93
+
94
+
95
+
96
+    </View>
97
+}
98
+
99
+export default index

+ 50
- 0
src/pages/map/index.scss Voir le fichier

@@ -0,0 +1,50 @@
1
+.map {
2
+  // padding:13.33px;
3
+  &-view {
4
+    margin: 50px 0 0;
5
+
6
+    &-card {
7
+      // height: 106px;
8
+      // line-height: 106px;
9
+      padding: 0 40px;
10
+      // color:#181818;
11
+      font-size: 24px;
12
+      // font-weight: 600;
13
+      margin-top: 26.67px;
14
+      border-radius: 30px;
15
+      border-radius: 20px;
16
+      .input{
17
+        font-size: 28px;
18
+        padding:30px 0;
19
+        line-height: 106px;
20
+        // color: red;
21
+      }
22
+      .placeholderinput{
23
+        // line-height: 106px;
24
+        color: #d2d2d2;
25
+        font-size: 28px;
26
+      }
27
+    }
28
+    &-icon {
29
+      margin-left: 40px;
30
+      // padding: 20px 30px;
31
+      // color:#181818;
32
+      width: 150px;
33
+      height: 106.67px;
34
+      // font-size: 36px;
35
+      // // font-weight: 600;
36
+      margin-top: 26.67px;
37
+      border-radius: 20px;
38
+      background-color: #274291;
39
+      padding: 0;
40
+      text-align: center;
41
+      line-height:120.67px;
42
+      .icon {
43
+        
44
+        // width: 100%;
45
+      }
46
+    }
47
+    // style={{width:'48.4rpx',height:'48.4rpx'}}
48
+  }
49
+
50
+}

+ 4
- 0
src/pages/material/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+
3
+  
4
+}

+ 192
- 0
src/pages/material/index.jsx Voir le fichier

@@ -0,0 +1,192 @@
1
+ import React, { useEffect, useMemo, useState } from 'react'
2
+// import { useEffect, useLayoutEffect, useReducer, useState, useContext, useRef, useCallback, useMemo } from '@tarojs/taro'
3
+import Taro, { useShareAppMessage } from "@tarojs/taro";
4
+import { useSelector, } from 'react-redux'
5
+import { View, Input, Text, Image } from '@tarojs/components'
6
+import Layout from '../../layout/index'
7
+import Tab from '../../compents/tab/index'
8
+import Container from '../../compents/container/index'
9
+import locationicon from '../../assets/locationicon.png'
10
+import Tags from '../../compents/tags/index'
11
+import './index.scss'
12
+
13
+// Page({
14
+//     data: {
15
+//         text: 'init data',
16
+//         array: [{ msg: '1' }, { msg: '2' }]
17
+//     }
18
+// })
19
+
20
+const index = (props) => {
21
+
22
+
23
+
24
+    const page = useSelector(state => state.page)
25
+
26
+    const user = useSelector(state => state.user)
27
+
28
+    const [userRole, setUserRole] = useState('1')
29
+    const [pageState, setPageState] = useState('1')
30
+    const [list, setList] = useState([])
31
+    useEffect(() => {
32
+
33
+        // console.log(page, 'page')
34
+        setList([
35
+            {
36
+                typename: '行政区域',
37
+                list: [
38
+                    {
39
+                        id: 1,
40
+                        name: '建邺区'
41
+                    },
42
+                    {
43
+                        id: 2,
44
+                        name: '建邺区'
45
+                    },
46
+                    {
47
+                        id: 3,
48
+                        name: '建邺区'
49
+                    },
50
+                    {
51
+                        id: 4,
52
+                        name: '建邺区'
53
+                    },
54
+                    {
55
+                        id: 5,
56
+                        name: '建邺区'
57
+                    },
58
+                    {
59
+                        id: 6,
60
+                        name: '建邺区'
61
+                    },{
62
+                        id: 7,
63
+                        name: '建邺区'
64
+                    },
65
+                    {
66
+                        id: 8,
67
+                        name: '建邺区'
68
+                    },
69
+                    
70
+
71
+                ]
72
+            },
73
+            {
74
+                typename: '行政区域',
75
+                list: [
76
+                    {
77
+                        id: 1,
78
+                        name: '建邺区'
79
+                    },
80
+                    {
81
+                        id: 2,
82
+                        name: '建邺区'
83
+                    },
84
+                    {
85
+                        id: 3,
86
+                        name: '建邺区'
87
+                    },
88
+
89
+                ]
90
+            },
91
+            {
92
+                typename: '行政区域',
93
+                list: [
94
+                    {
95
+                        id: 1,
96
+                        name: '建邺区'
97
+                    },
98
+                    {
99
+                        id: 2,
100
+                        name: '建邺区'
101
+                    },
102
+                    {
103
+                        id: 3,
104
+                        name: '建邺区'
105
+                    },
106
+
107
+                ]
108
+            },
109
+        ])
110
+    }, [])
111
+    useShareAppMessage(res => {
112
+        console.log('3333')
113
+        if (res.from === 'button') {
114
+            // 来自页面内转发按钮
115
+            console.log(res.target)
116
+        }
117
+        return {
118
+            title: '自定义转发标题',
119
+            path: '/page/share/index'
120
+        }
121
+    })
122
+
123
+    const onTabClick = (e) => {
124
+        console.log(e, '111')
125
+        setUserRole(e)
126
+    }
127
+
128
+    const onRegisterChange = (e) => {
129
+        console.log(e, '111')
130
+    }
131
+    const onSave = () => {
132
+        console.log(333)
133
+
134
+        Taro.showModal({
135
+            title: '修改成功',
136
+            content: '点击确认按钮,返回上级菜单',
137
+            showCancel: false,
138
+            success: function (res) {
139
+                if (res.confirm) {
140
+                    console.log('用户点击确定')
141
+
142
+                    Taro.navigateBack({
143
+                        delta: 1
144
+                    })
145
+                } else if (res.cancel) {
146
+                    console.log('用户点击取消')
147
+                }
148
+            }
149
+        })
150
+    }
151
+
152
+    return <View className='material'>
153
+
154
+
155
+
156
+
157
+        <Layout>
158
+            {
159
+                list.map((item) => {
160
+                    return <View className='material-card'>
161
+                        <Text>{item.typename}</Text>
162
+                        <Tags list={item.list}  onChange={(e)=>{console.log(e)}} style={{marginTop:'90rpx'}}> </Tags>
163
+                    </View>
164
+                })
165
+            }
166
+
167
+            {/* <View className='inputstyle-view'>
168
+                <Text className='title'>入住人数</Text>
169
+                <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
170
+                    <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
171
+                </Container>
172
+            </View>
173
+            <View className='inputstyle-view'>
174
+                <Text className='title'>入住日期</Text>
175
+                <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
176
+                    <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
177
+                </Container>
178
+            </View>
179
+
180
+            <View className='inputstyle-view'>
181
+                <Text className='title'>离店日期</Text>
182
+                <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
183
+                    <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
184
+                </Container>
185
+            </View> */}
186
+        </Layout>
187
+{/* className='addhousetab' */}
188
+        <Tab  pageState='3' value={['取消', '开始查询']} onClick={[(e) => setPageState('2'), (e) => setPageState('3')]}></Tab>
189
+    </View>
190
+}
191
+
192
+export default index

+ 58
- 0
src/pages/material/index.scss Voir le fichier

@@ -0,0 +1,58 @@
1
+.material {
2
+  padding-top: 30rpx;
3
+  &-card {
4
+    text-align: center;
5
+color: #7b7b7b;
6
+margin-top: 30px;
7
+
8
+  }
9
+
10
+  // // padding:13.33px;
11
+  // &-view {
12
+  //   margin: 50px 0 0;
13
+
14
+  //   &-card {
15
+  //     // height: 106px;
16
+  //     // line-height: 106px;
17
+  //     padding: 0 40px;
18
+  //     // color:#181818;
19
+  //     font-size: 24px;
20
+  //     // font-weight: 600;
21
+  //     margin-top: 26.67px;
22
+  //     border-radius: 30px;
23
+  //     border-radius: 20px;
24
+  //     .input{
25
+  //       font-size: 28px;
26
+  //       padding:30px 0;
27
+  //       line-height: 106px;
28
+  //       // color: red;
29
+  //     }
30
+  //     .placeholderinput{
31
+  //       // line-height: 106px;
32
+  //       color: #d2d2d2;
33
+  //       font-size: 28px;
34
+  //     }
35
+  //   }
36
+  //   &-icon {
37
+  //     margin-left: 40px;
38
+  //     // padding: 20px 30px;
39
+  //     // color:#181818;
40
+  //     width: 150px;
41
+  //     height: 106.67px;
42
+  //     // font-size: 36px;
43
+  //     // // font-weight: 600;
44
+  //     margin-top: 26.67px;
45
+  //     border-radius: 20px;
46
+  //     background-color: #274291;
47
+  //     padding: 0;
48
+  //     text-align: center;
49
+  //     line-height:120.67px;
50
+  //     .icon {
51
+
52
+  //       // width: 100%;
53
+  //     }
54
+  //   }
55
+  //   // style={{width:'48.4rpx',height:'48.4rpx'}}
56
+  // }
57
+
58
+}

+ 117
- 0
src/pages/recommend/index.jsx Voir le fichier

@@ -0,0 +1,117 @@
1
+import React, { useEffect, useState } from 'react'
2
+import Taro from '@tarojs/taro'
3
+import { View, Text, Image } from '@tarojs/components'
4
+import ContainerLayout from '../../compents/container/index'
5
+import more from '../../assets/more.png'
6
+import deleteicon from '../../assets/deleteicon.png'
7
+import userRloe from '../../util/userRole'
8
+import './index.scss'
9
+import { useSelector } from 'react-redux'
10
+import { AtFab } from 'taro-ui'
11
+
12
+const recommend = (props) => {
13
+
14
+    const user = useSelector(state => state.user)
15
+
16
+    const { value, ...prop } = props
17
+
18
+    const [state, setState] = useState(1)
19
+    const [list, setList] = useState([])
20
+    const [id, setId] = useState()
21
+    useEffect(() => {
22
+        setList([{
23
+            id: 1,
24
+            src: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1657471424,2319316184&fm=26&gp=0.jpg',
25
+            title: '八八餐厅1',
26
+            srcdetail: '',
27
+        }, {
28
+            id: 2,
29
+            src: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1657471424,2319316184&fm=26&gp=0.jpg',
30
+            title: '八八餐厅2',
31
+            srcdetail: '',
32
+        }, {
33
+            id: 3,
34
+            src: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1657471424,2319316184&fm=26&gp=0.jpg',
35
+            title: '八八餐厅3',
36
+            srcdetail: '',
37
+        }, {
38
+            id: 4,
39
+            src: 'https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1657471424,2319316184&fm=26&gp=0.jpg',
40
+            title: '八八餐厅4',
41
+            srcdetail: '',
42
+        }])
43
+    }, [])
44
+
45
+    
46
+    // 
47
+
48
+    const onClick = (item) => {
49
+        if(user.role == userRloe.customer){
50
+            setId(item.id)
51
+        }
52
+        else{
53
+            Taro.showModal({
54
+                title: '确定删除该图片吗?',
55
+                content: '确定后,相关房东推荐会即时更新',
56
+                cancelColor:'#d2d2d2',
57
+                confirmColor:"#274191",
58
+                success: function (res) {
59
+                    if (res.confirm) {
60
+                        console.log('用户点击确定')
61
+        
62
+                     
63
+                    } else if (res.cancel) {
64
+                        console.log('用户点击取消')
65
+                    }
66
+                }
67
+            })
68
+        }
69
+        
70
+    }
71
+    return <View className='recommend'>
72
+        {
73
+            true && list.map((x) => {
74
+                return <View className='recommend-view'>
75
+                    <ContainerLayout className='recommend-view-layout' >
76
+                        {id != x.id ? <View><Image className='recommend-view-img' src={x.src} style={{ height: '280rpx' }}></Image>
77
+                            <View style={{ display: 'flex', justifyContent: 'space-between' }}>
78
+                                <View className='recommend-view-info'>
79
+                                    <Text className='recommend-view-info-title'>{x.title}</Text>
80
+                                    <Text className='introduction'>水煮鱼</Text>
81
+                                </View>
82
+                               { userRloe.customer==user.role ?  <Image className='icon' src={more  } onClick={() => onClick(x)}></Image>
83
+
84
+                              :  <Image className='icon' src={ deleteicon } style ={{width:'40rpx'}} onClick={() => onClick(x)}></Image>
85
+                              }
86
+                            </View>
87
+                        </View> :
88
+                            <View><Image className='recommend-view-img' mode='widthFix' src="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3184265929,203096592&fm=26&gp=0.jpg"></Image>
89
+                                <View style={{ display: 'flex', justifyContent: 'space-between' }}>
90
+                                    <View className='recommend-view-info'>
91
+                                        <Text className='text'>地址:{x.title}</Text>
92
+                                        <Text className='text'>推荐:水煮鱼</Text>
93
+                                    </View>
94
+                                </View>
95
+                            </View>
96
+                        }
97
+                    </ContainerLayout>
98
+                </View>
99
+            })
100
+        }
101
+<AtFab>
102
+  <Text className='at-fab__icon at-icon at-icon-menu'></Text>
103
+</AtFab>
104
+        {
105
+            false && <View className='recommend-noorder' style={{ marginTop: 'calc(40vh)' }}>
106
+                <Text>哎呀</Text>
107
+                <Text>暂时没发现您的入住订单呢~</Text>
108
+
109
+
110
+            </View>
111
+        }
112
+
113
+
114
+    </View>
115
+};
116
+
117
+export default recommend

+ 80
- 0
src/pages/recommend/index.scss Voir le fichier

@@ -0,0 +1,80 @@
1
+.recommend {
2
+  padding: 13.3px 0;
3
+  &-view {
4
+    margin: 40px 0 0;
5
+
6
+    &-img{
7
+      width: 100%;
8
+      height: 420px;
9
+      border-radius: 40px 40px 0 0;
10
+    }
11
+
12
+    &-info{
13
+      padding: 10px 40px 22px;
14
+      display: grid;
15
+      &-title{
16
+        font-size: 28px;
17
+        color: #181818;
18
+        
19
+      }
20
+      .introduction{
21
+        font-size: 24px;
22
+        color: #7b7b7b;
23
+        font-weight: 500;
24
+      }
25
+      .text{
26
+        font-size: 24px;
27
+        font-weight: 550;
28
+      }
29
+    }
30
+
31
+    &-layout {
32
+      padding: 0;
33
+
34
+      margin: 26.67px 0 40px;
35
+     
36
+     
37
+    }
38
+  }
39
+
40
+  .icon{
41
+      width: 10px;
42
+      height: 40px;
43
+      padding:20px 30px;
44
+  }
45
+
46
+  &-noorder{
47
+    
48
+    font-size: 30px;
49
+    color: #acacac;
50
+    font-weight: 500;
51
+    display: flex;
52
+    // text-align: center;
53
+    flex-direction:  column ;
54
+    justify-content:center
55
+  }
56
+}
57
+
58
+// .register{
59
+//     &-user{
60
+//         margin: 60px 0 0;
61
+//         Text {
62
+//             color: #7b7b7b;
63
+//             font-size: 34px;
64
+//             font-weight: 500;
65
+//         }
66
+//         &-from{
67
+//             // height: 300px;
68
+//             padding: 80px 60px;
69
+//             margin-top: 40px;
70
+//             &-input{
71
+//                 margin: 40px 0;
72
+//                 // 
73
+//             }
74
+//             .at-input__title{
75
+//                 text-align: center;
76
+//                 color: #cccccc;
77
+//             }
78
+//         }
79
+//     }
80
+// }

+ 8
- 0
src/pages/share/index.config.js Voir le fichier

@@ -0,0 +1,8 @@
1
+// onShareAppMessage: function () {
2
+// return custom share data when user share.
3
+//     console.log('44444444')
4
+//   },
5
+
6
+export default {
7
+    enableShareAppMessage: true
8
+}

+ 125
- 0
src/pages/share/index.jsx Voir le fichier

@@ -0,0 +1,125 @@
1
+import React, { useEffect, useMemo, useState } from 'react'
2
+// import { useEffect, useLayoutEffect, useReducer, useState, useContext, useRef, useCallback, useMemo } from '@tarojs/taro'
3
+import Taro, { useShareAppMessage } from "@tarojs/taro";
4
+import { useSelector, } from 'react-redux'
5
+import { View, Input, Text, Image } from '@tarojs/components'
6
+import Layout from '../../layout/index'
7
+import Tab from '../../compents/tab/index'
8
+import Container from '../../compents/container/index'
9
+import locationicon from '../../assets/locationicon.png'
10
+import './index.scss'
11
+
12
+// Page({
13
+//     data: {
14
+//         text: 'init data',
15
+//         array: [{ msg: '1' }, { msg: '2' }]
16
+//     }
17
+// })
18
+
19
+const index = (props) => {
20
+
21
+  
22
+
23
+    const page = useSelector(state => state.page)
24
+
25
+    const user = useSelector(state => state.user)
26
+
27
+    const [userRole, setUserRole] = useState('1')
28
+    const [pageState, setPageState] = useState('1')
29
+    const [list, setList] = useState([])
30
+    useEffect(() => {
31
+
32
+        // console.log(page, 'page')
33
+        setList([
34
+            {
35
+                name: 'zhou',
36
+                phone: '177'
37
+            },
38
+            {
39
+                name: 'zhou',
40
+                phone: '177'
41
+            },
42
+            {
43
+                name: 'zhou',
44
+                phone: '177'
45
+            }
46
+        ])
47
+    }, [])
48
+    useShareAppMessage(res => {
49
+        console.log('3333')
50
+        if (res.from === 'button') {
51
+            // 来自页面内转发按钮
52
+              console.log(res.target)
53
+        }
54
+        return {
55
+            title: '自定义转发标题',
56
+            path: '/page/share/index'
57
+        }
58
+    })
59
+
60
+    const onTabClick = (e) => {
61
+        console.log(e, '111')
62
+        setUserRole(e)
63
+    }
64
+
65
+    const onRegisterChange = (e) => {
66
+        console.log(e, '111')
67
+    }
68
+    const onSave = () => {
69
+        console.log(333)
70
+
71
+        Taro.showModal({
72
+            title: '修改成功',
73
+            content: '点击确认按钮,返回上级菜单',
74
+            showCancel: false,
75
+            success: function (res) {
76
+                if (res.confirm) {
77
+                    console.log('用户点击确定')
78
+
79
+                    Taro.navigateBack({
80
+                        delta: 1
81
+                    })
82
+                } else if (res.cancel) {
83
+                    console.log('用户点击取消')
84
+                }
85
+            }
86
+        })
87
+    }
88
+
89
+    return <View className='share'>
90
+
91
+
92
+
93
+
94
+        <Layout>
95
+            <View className='inputstyle-view'>
96
+                <Text className='title'>入住人数</Text>
97
+                <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
98
+                    <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
99
+                </Container>
100
+            </View>
101
+            <View className='inputstyle-view'>
102
+                <Text className='title'>入住日期</Text>
103
+                <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
104
+                    <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
105
+                </Container>
106
+            </View>
107
+
108
+            <View className='inputstyle-view'>
109
+                <Text className='title'>离店日期</Text>
110
+                <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
111
+                    <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
112
+                </Container>
113
+            </View>
114
+        </Layout>
115
+        <button open-type="share" style={{display:'contents'}}><Tab className='addhousetab' color='#ffffff' pageState='3' onClick={(e) => console.log(33)} value={['分享到微信']} ></Tab> </button>
116
+
117
+
118
+{/* onClick={[(e) => setPageState('2'),style={{ display: 'contents' }} (e) => setPageState('1')]} */}
119
+
120
+{/* <Tab className='addhousetab' color='#ffffff' pageState='3' value={['分享到微信']} ></Tab> */}
121
+
122
+    </View>
123
+}
124
+
125
+export default index

+ 50
- 0
src/pages/share/index.scss Voir le fichier

@@ -0,0 +1,50 @@
1
+.map {
2
+  // // padding:13.33px;
3
+  // &-view {
4
+  //   margin: 50px 0 0;
5
+
6
+  //   &-card {
7
+  //     // height: 106px;
8
+  //     // line-height: 106px;
9
+  //     padding: 0 40px;
10
+  //     // color:#181818;
11
+  //     font-size: 24px;
12
+  //     // font-weight: 600;
13
+  //     margin-top: 26.67px;
14
+  //     border-radius: 30px;
15
+  //     border-radius: 20px;
16
+  //     .input{
17
+  //       font-size: 28px;
18
+  //       padding:30px 0;
19
+  //       line-height: 106px;
20
+  //       // color: red;
21
+  //     }
22
+  //     .placeholderinput{
23
+  //       // line-height: 106px;
24
+  //       color: #d2d2d2;
25
+  //       font-size: 28px;
26
+  //     }
27
+  //   }
28
+  //   &-icon {
29
+  //     margin-left: 40px;
30
+  //     // padding: 20px 30px;
31
+  //     // color:#181818;
32
+  //     width: 150px;
33
+  //     height: 106.67px;
34
+  //     // font-size: 36px;
35
+  //     // // font-weight: 600;
36
+  //     margin-top: 26.67px;
37
+  //     border-radius: 20px;
38
+  //     background-color: #274291;
39
+  //     padding: 0;
40
+  //     text-align: center;
41
+  //     line-height:120.67px;
42
+  //     .icon {
43
+        
44
+  //       // width: 100%;
45
+  //     }
46
+  //   }
47
+  //   // style={{width:'48.4rpx',height:'48.4rpx'}}
48
+  // }
49
+
50
+}

+ 4
- 0
src/pages/wifi/index.config.js Voir le fichier

@@ -0,0 +1,4 @@
1
+export default {
2
+
3
+  
4
+}

+ 99
- 0
src/pages/wifi/index.jsx Voir le fichier

@@ -0,0 +1,99 @@
1
+import React, { useEffect, useMemo, useState } from 'react'
2
+import Taro from "@tarojs/taro";
3
+import { useSelector } from 'react-redux'
4
+import { View, Input, Text, Image } from '@tarojs/components'
5
+import Layout from '../../layout/index'
6
+import Tab from '../../compents/tab/index'
7
+import Container from '../../compents/container/index'
8
+import locationicon from '../../assets/locationicon.png'
9
+import './index.scss'
10
+
11
+const index = (props) => {
12
+
13
+    const page = useSelector(state => state.page)
14
+
15
+    const user = useSelector(state => state.user)
16
+
17
+    const [userRole, setUserRole] = useState('1')
18
+    const [pageState, setPageState] = useState('1')
19
+    const [list, setList] = useState([])
20
+    useEffect(() => {
21
+
22
+        console.log(page, 'page')
23
+        setList([
24
+            {
25
+                name: 'zhou',
26
+                phone: '177'
27
+            },
28
+            {
29
+                name: 'zhou',
30
+                phone: '177'
31
+            },
32
+            {
33
+                name: 'zhou',
34
+                phone: '177'
35
+            }
36
+        ])
37
+    }, [])
38
+
39
+
40
+    const onTabClick = (e) => {
41
+        console.log(e, '111')
42
+        setUserRole(e)
43
+    }
44
+
45
+    const onRegisterChange = (e) => {
46
+        console.log(e, '111')
47
+    }
48
+    const onSave = () => {
49
+        console.log(333)
50
+        
51
+        Taro.showModal({
52
+            title: '修改成功',
53
+            content: '点击确认按钮,返回上级菜单',
54
+            showCancel:false,
55
+            success: function (res) {
56
+              if (res.confirm) {
57
+                console.log('用户点击确定')
58
+
59
+                Taro.navigateBack({
60
+                    delta: 1
61
+                  })
62
+              } else if (res.cancel) {
63
+                console.log('用户点击取消')
64
+              }
65
+            }
66
+          })
67
+    }
68
+    onSave
69
+
70
+    return <View className='map'>
71
+
72
+
73
+
74
+
75
+        <Layout>
76
+            <View className='map-view'>
77
+                <Text className='title'>WiFi名称</Text>
78
+                <Container className='map-view-card'>
79
+                <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' />
80
+                </Container>
81
+            </View>
82
+          
83
+            <View className='map-view'>
84
+                <Text className='title'>密码</Text>
85
+                <Container className='map-view-card'>
86
+                <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' />
87
+                </Container>
88
+            </View>
89
+        </Layout>
90
+         <Tab className='addhousetab' pageState='3' value={['取消', '保存修改']} onClick={[(e) => setPageState('2'), () => onSave()]}></Tab>
91
+
92
+
93
+
94
+
95
+
96
+    </View>
97
+}
98
+
99
+export default index

+ 50
- 0
src/pages/wifi/index.scss Voir le fichier

@@ -0,0 +1,50 @@
1
+.map {
2
+  // padding:13.33px;
3
+  &-view {
4
+    margin: 50px 0 0;
5
+
6
+    &-card {
7
+      // height: 106px;
8
+      // line-height: 106px;
9
+      padding: 0 40px;
10
+      // color:#181818;
11
+      font-size: 24px;
12
+      // font-weight: 600;
13
+      margin-top: 26.67px;
14
+      border-radius: 30px;
15
+      border-radius: 20px;
16
+      .input{
17
+        font-size: 28px;
18
+        padding:30px 0;
19
+        line-height: 106px;
20
+        // color: red;
21
+      }
22
+      .placeholderinput{
23
+        // line-height: 106px;
24
+        color: #d2d2d2;
25
+        font-size: 28px;
26
+      }
27
+    }
28
+    &-icon {
29
+      margin-left: 40px;
30
+      // padding: 20px 30px;
31
+      // color:#181818;
32
+      width: 150px;
33
+      height: 106.67px;
34
+      // font-size: 36px;
35
+      // // font-weight: 600;
36
+      margin-top: 26.67px;
37
+      border-radius: 20px;
38
+      background-color: #274291;
39
+      padding: 0;
40
+      text-align: center;
41
+      line-height:120.67px;
42
+      .icon {
43
+        
44
+        // width: 100%;
45
+      }
46
+    }
47
+    // style={{width:'48.4rpx',height:'48.4rpx'}}
48
+  }
49
+
50
+}

+ 31
- 0
src/reducers/guide.js Voir le fichier

@@ -0,0 +1,31 @@
1
+import { ADD, MINUS } from '../constants/user'
2
+
3
+// landlord: 'landlord',
4
+//     customer:'customer'
5
+
6
+const INITIAL_STATE = {
7
+  house:{},
8
+  Park:{},
9
+  wifi:{
10
+      name:'234',
11
+      passward:'432'
12
+  },
13
+  image:''
14
+}
15
+
16
+export default function counter (state = INITIAL_STATE, action) {
17
+  switch (action.type) {
18
+    case ADD:
19
+      return {
20
+        ...state,
21
+        num: state.num + 1
22
+      }
23
+     case MINUS:
24
+       return {
25
+         ...state,
26
+         num: state.num - 1
27
+       }
28
+     default:
29
+       return state
30
+  }
31
+}

+ 10
- 0
src/reducers/index.js Voir le fichier

@@ -0,0 +1,10 @@
1
+import { combineReducers } from 'redux'
2
+import user from './user'
3
+import page from './page'
4
+import guide from './guide'
5
+
6
+export default combineReducers({
7
+  user,
8
+  page,
9
+  guide,
10
+})

+ 27
- 0
src/reducers/page.js Voir le fichier

@@ -0,0 +1,27 @@
1
+import { ADD, MINUS } from '../constants/user'
2
+
3
+// landlord: 'landlord',
4
+//     customer:'customer'
5
+
6
+const INITIAL_STATE = {
7
+  link:'index',
8
+  id:String,
9
+  params:Object
10
+}
11
+
12
+export default function counter (state = INITIAL_STATE, action) {
13
+  switch (action.type) {
14
+    case ADD:
15
+      return {
16
+        ...state,
17
+        num: state.num + 1
18
+      }
19
+     case MINUS:
20
+       return {
21
+         ...state,
22
+         num: state.num - 1
23
+       }
24
+     default:
25
+       return state
26
+  }
27
+}

+ 30
- 0
src/reducers/user.js Voir le fichier

@@ -0,0 +1,30 @@
1
+import {
2
+  ADD,
3
+  MINUS
4
+} from '../constants/user'
5
+
6
+// landlord: 'landlord',
7
+//     customer:'customer'
8
+// adminuser
9
+const INITIAL_STATE = {
10
+  // role: 'adminuser',
11
+  // role: 'landlord',
12
+  role: 'customer'
13
+}
14
+
15
+export default function counter(state = INITIAL_STATE, action) {
16
+  switch (action.type) {
17
+    case ADD:
18
+      return {
19
+        ...state,
20
+        num: state.num + 1
21
+      }
22
+      case MINUS:
23
+        return {
24
+          ...state,
25
+          num: state.num - 1
26
+        }
27
+        default:
28
+          return state
29
+  }
30
+}

+ 0
- 0
src/route/index.js Voir le fichier


+ 28
- 0
src/store/index.js Voir le fichier

@@ -0,0 +1,28 @@
1
+import { createStore, applyMiddleware, compose } from 'redux'
2
+// import thunkMiddleware from 'redux-thunk'
3
+import rootReducer from '../reducers'
4
+
5
+// const composeEnhancers =
6
+//   typeof window === 'object' &&
7
+//   window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ?   
8
+//     window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({
9
+//       // Specify extension’s options like name, actionsBlacklist, actionsCreators, serialize...
10
+//     }) : compose
11
+
12
+// const middlewares = [
13
+//   thunkMiddleware
14
+// ]
15
+
16
+// if (process.env.NODE_ENV === 'development' && process.env.TARO_ENV !== 'quickapp') {
17
+//   // middlewares.push(require('redux-logger').createLogger())
18
+// }
19
+
20
+// const enhancer = composeEnhancers(
21
+//   applyMiddleware(...middlewares),
22
+//   // other store enhancers if any
23
+// ), enhancer
24
+
25
+export default function configStore () {
26
+  const store = createStore(rootReducer)
27
+  return store
28
+}

+ 182
- 0
src/util/req.js Voir le fichier

@@ -0,0 +1,182 @@
1
+
2
+  
3
+import Taro from '@tarojs/taro'
4
+import * as apis from '@/constants/api'
5
+import login from '@/utils/login'
6
+import rtLog from './rtLog'
7
+
8
+const CODE_SUCCESS = 1000
9
+const CODE_UNLOGIN = 1001
10
+const CODE_AUTH_EXPIRED = 1002
11
+const accountInfo = wx.getAccountInfoSync();
12
+const appId = accountInfo.miniProgram.appId
13
+
14
+export { apis };
15
+
16
+export const getStorage = function (key) {
17
+  return Taro.getStorage({ key }).then(res => res.data).catch(() => '')
18
+}
19
+
20
+export const setStorage = function (key, data) {
21
+  return Taro.setStorage({ key, data })
22
+}
23
+
24
+// function updateToken(data = {}) {
25
+//   return Promise.all([
26
+//     Taro.setStorage({ key: 'token', data: data['token'] || '' })
27
+//   ])
28
+// }
29
+
30
+/**
31
+ * 简易封装网络请求
32
+ * // NOTE 需要注意 RN 不支持 *StorageSync,此处用 async/await 解决
33
+ * @param {*} options
34
+ */
35
+export const fetch = async (options) => {
36
+  const opts = optionBuilder(options)
37
+  console.log(opts, "optsoptsoptsoptsoptsoptsoptsoptsoptsopts")
38
+
39
+  return Taro.request(opts[0])
40
+    .then((res) => reqSuccess(res, opts))
41
+    .catch((err) => reqFail(err, opts))
42
+}
43
+
44
+export const uploadFiles = async (files) => {
45
+  const uploads = []
46
+  const token = await getStorage('token')
47
+  const authHeader = token ? { 'authorization': `Bearer ${token}` } : {}
48
+  for (var i = 0; i < files.length; i++) {
49
+    uploads[i] = new Promise((resolve, reject) => {
50
+      wx.uploadFile({
51
+        url: apis.API_UPLOAD_IMAGE,
52
+        filePath: files[i],
53
+        header: {
54
+          ...authHeader,
55
+          'appId': appId,
56
+          'x-action': 'miniapp'
57
+        },
58
+        name: 'file',
59
+        success: function (res) {
60
+          // debugger
61
+          const _data = JSON.parse(res.data)
62
+          if (_data.code !== CODE_SUCCESS) {
63
+            reject(new Error(_data.message))
64
+          }
65
+
66
+          resolve(_data.data)
67
+        },
68
+        fail(err) {
69
+          reject(err)
70
+        }
71
+      })
72
+    })
73
+  }
74
+
75
+  return Promise.all(uploads)
76
+}
77
+
78
+export function optionBuilder(options) {
79
+  const { url, payload = {}, method = 'GET', showToast = true, autoLogin = true, header } = options
80
+  const showMessage = Object.prototype.hasOwnProperty.call(payload, 'showToast') ? payload.showToast : showToast
81
+  const consultant = Taro.getStorageSync('consultantId') || ''
82
+  const recommender = Taro.getStorageSync('recommender') || ''
83
+
84
+  return [
85
+    {
86
+      url,
87
+      method,
88
+      data: payload,
89
+      header: {
90
+        'content-type': 'application/json',
91
+        'authorization': `Bearer ${Taro.getStorageSync('token')}`,
92
+        'appId': appId,
93
+        'x-action': 'miniapp',
94
+        'x-version': Version,
95
+        'x-consultant': consultant,
96
+        'x-recommender': recommender,
97
+        ...header || {},
98
+      }
99
+    },
100
+    {
101
+      showMessage,
102
+      autoLogin
103
+    }
104
+  ]
105
+}
106
+
107
+export function reqSuccess(res, opts) {
108
+  const [, settings] = opts || []
109
+  const { showMessage, autoLogin = true } = settings || {}
110
+
111
+  if (res.statusCode === 500) {
112
+    Taro.showToast({
113
+      title: "请检查网络",
114
+      icon: 'none'
115
+    })
116
+    console.error(res)
117
+    throw new Error('请检查网络')
118
+  }
119
+
120
+  const { data, code, message } = typeof res.data === 'string' ? JSON.parse(res.data) : res.data
121
+  if (code === CODE_SUCCESS) {
122
+    return data
123
+  } else {
124
+    const isExpired = (code === CODE_AUTH_EXPIRED || code === CODE_UNLOGIN)
125
+    const defaultMsg = isExpired ? '登录失效' : message
126
+    if (isExpired && autoLogin) {
127
+      // token失效,重新登录后,跳转到首页
128
+      login({}, () => {
129
+        Taro.switchTab({
130
+          url: '/pages/project/index'
131
+        })
132
+      })
133
+    } else {
134
+      if (showMessage) {
135
+        Taro.showToast({
136
+          title: defaultMsg,
137
+          icon: 'none'
138
+        })
139
+      }
140
+    }
141
+    if (showMessage) {
142
+
143
+      Taro.showToast({
144
+        title: message,
145
+        icon: 'none'
146
+      })
147
+    }
148
+
149
+    throw res.data
150
+  }
151
+}
152
+
153
+export function reqFail(err, opts) {
154
+  const [reqParams, settings] = opts || []
155
+  const { showMessage } = settings || {}
156
+
157
+  rtLog.error('[request]', "==================================")
158
+  rtLog.error('[request]', err)
159
+  rtLog.error('[request]', reqParams.url)
160
+  rtLog.error('[request]', wx.getLaunchOptionsSync())
161
+  rtLog.error('[request]', "==================================")
162
+
163
+  let errMessage = `请求失败: ${err.errMsg}`
164
+  if (err.errMsg) {
165
+    errMessage = '请检查网络'
166
+  }
167
+
168
+  if (err.message) {
169
+    console.error('请求失败', err.message)
170
+    errMessage = err.message.indexOf('java') > -1 ? '服务内部错误' : err.message
171
+  }
172
+
173
+  if (showMessage) {
174
+    Taro.showToast({
175
+      title: errMessage,
176
+      icon: 'none',
177
+      duration: 3000
178
+    })
179
+  }
180
+
181
+  throw new Error(errMessage)
182
+}

+ 48
- 0
src/util/request.js Voir le fichier

@@ -0,0 +1,48 @@
1
+import Taro from '@tarojs/taro'
2
+
3
+const baseURL = HOST
4
+
5
+export default async (options) => {
6
+  const opts = optionBuilder(options)
7
+  console.log(opts, "optsoptsoptsoptsoptsoptsoptsoptsoptsopts")
8
+
9
+  return Taro.request(opts[0])
10
+    .then((res) =>{console.log('3322'); reqSuccess(res, opts)})
11
+    .catch((err) =>{console.log('333221'); reqFail(err, opts)})
12
+}
13
+
14
+
15
+export function optionBuilder(options) {
16
+  const {
17
+    url,
18
+    data = {},
19
+    method = 'GET',
20
+    showToast = true,
21
+    autoLogin = true,
22
+    header
23
+  } = options
24
+//   const showMessage = Object.prototype.hasOwnProperty.call(payload, 'showToast') ? payload.showToast : showToast
25
+//   const consultant = Taro.getStorageSync('consultantId') || ''
26
+//   const recommender = Taro.getStorageSync('recommender') || ''
27
+
28
+  return [{
29
+      url:`${baseURL}${url}`,
30
+      method,
31
+      data,
32
+      header: {
33
+        'content-type': 'application/json',
34
+        // 'authorization': `Bearer ${Taro.getStorageSync('token')}`,
35
+        // 'appId': appId,
36
+        // 'x-action': 'miniapp',
37
+        // 'x-version': Version,
38
+        // 'x-consultant': consultant,
39
+        // 'x-recommender': recommender,
40
+        ...header || {},
41
+      }
42
+    },
43
+    // {
44
+    // //   showMessage,
45
+    //   // autoLogin
46
+    // }
47
+  ]
48
+}

+ 5
- 0
src/util/userRole.js Voir le fichier

@@ -0,0 +1,5 @@
1
+export default {
2
+    landlord: 'landlord',
3
+    customer:'customer',
4
+    adminuser:'adminuser'
5
+}