1002884655 4 anni fa
parent
commit
f1c30aa7e0
100 ha cambiato i file con 20955 aggiunte e 0 eliminazioni
  1. 12
    0
      .editorconfig
  2. 7
    0
      .eslintrc.js
  3. 6
    0
      .gitignore
  4. 10
    0
      babel.config.js
  5. 14
    0
      config/dev.js
  6. 83
    0
      config/index.js
  7. 23
    0
      config/prod.js
  8. 17457
    0
      package-lock.json
  9. 65
    0
      package.json
  10. 37
    0
      project.config.json
  11. 13
    0
      project.tt.json
  12. 30
    0
      src/actions/activity.js
  13. 59
    0
      src/actions/card.js
  14. 30
    0
      src/actions/city.js
  15. 24
    0
      src/actions/counter.js
  16. 36
    0
      src/actions/house.js
  17. 32
    0
      src/actions/news.js
  18. 53
    0
      src/actions/project.js
  19. 89
    0
      src/actions/shop.js
  20. 86
    0
      src/actions/user.js
  21. 49
    0
      src/app.config.js
  22. 60
    0
      src/app.jsx
  23. 35
    0
      src/app.scss
  24. 86
    0
      src/assets/css/iconfont.css
  25. BIN
      src/assets/css/iconfont.eot
  26. 1
    0
      src/assets/css/iconfont.js
  27. 128
    0
      src/assets/css/iconfont.json
  28. 77
    0
      src/assets/css/iconfont.svg
  29. BIN
      src/assets/css/iconfont.ttf
  30. BIN
      src/assets/css/iconfont.woff
  31. BIN
      src/assets/css/iconfont.woff2
  32. BIN
      src/assets/logo.png
  33. BIN
      src/assets/tabbar/chat1.png
  34. BIN
      src/assets/tabbar/chat2.png
  35. BIN
      src/assets/tabbar/index1.png
  36. BIN
      src/assets/tabbar/index2.png
  37. BIN
      src/assets/tabbar/mine1.png
  38. BIN
      src/assets/tabbar/mine2.png
  39. BIN
      src/assets/tabbar/video1.png
  40. BIN
      src/assets/tabbar/video2.png
  41. 18
    0
      src/components/Loading/index.jsx
  42. 22
    0
      src/components/Loading/style.scss
  43. 43
    0
      src/components/ProjectListItem/index.jsx
  44. 114
    0
      src/components/ProjectListItem/index.scss
  45. 30
    0
      src/components/Spin/index.jsx
  46. 112
    0
      src/components/Spin/style.scss
  47. 1
    0
      src/constants/activity.js
  48. 237
    0
      src/constants/api.js
  49. 5
    0
      src/constants/card.js
  50. 2
    0
      src/constants/checkin.js
  51. 2
    0
      src/constants/city.js
  52. 20
    0
      src/constants/common.js
  53. 2
    0
      src/constants/counter.js
  54. 21
    0
      src/constants/house.js
  55. 1
    0
      src/constants/login.js
  56. 4
    0
      src/constants/news.js
  57. 5
    0
      src/constants/project.js
  58. 7
    0
      src/constants/shop.js
  59. 18
    0
      src/constants/user.js
  60. 19
    0
      src/index.html
  61. 25
    0
      src/layout/Basic/index.jsx
  62. 5
    0
      src/layout/Basic/style.scss
  63. 25
    0
      src/layout/index.js
  64. 3
    0
      src/pages/chat/index.config.js
  65. 36
    0
      src/pages/chat/index.jsx
  66. 12
    0
      src/pages/chat/index.scss
  67. 25
    0
      src/pages/index/components/Banner/index.jsx
  68. 18
    0
      src/pages/index/components/Banner/index.scss
  69. 23
    0
      src/pages/index/components/ColumnTitle/index.jsx
  70. 26
    0
      src/pages/index/components/ColumnTitle/index.scss
  71. 36
    0
      src/pages/index/components/HotRecommend/index.jsx
  72. 60
    0
      src/pages/index/components/HotRecommend/index.scss
  73. 41
    0
      src/pages/index/components/LiveSale/index.jsx
  74. 56
    0
      src/pages/index/components/LiveSale/index.scss
  75. 17
    0
      src/pages/index/components/Location/index.jsx
  76. 49
    0
      src/pages/index/components/Location/index.scss
  77. 47
    0
      src/pages/index/components/Menu/index.jsx
  78. 48
    0
      src/pages/index/components/Menu/index.scss
  79. 3
    0
      src/pages/index/index.config.js
  80. 110
    0
      src/pages/index/index.jsx
  81. 76
    0
      src/pages/index/index.scss
  82. 30
    0
      src/pages/mine/components/NeedLogin/index.jsx
  83. 56
    0
      src/pages/mine/components/NeedLogin/index.scss
  84. 3
    0
      src/pages/mine/index.config.js
  85. 115
    0
      src/pages/mine/index.jsx
  86. 156
    0
      src/pages/mine/index.scss
  87. 3
    0
      src/pages/video/index.config.js
  88. 36
    0
      src/pages/video/index.jsx
  89. 12
    0
      src/pages/video/index.scss
  90. 55
    0
      src/reducers/card.js
  91. 31
    0
      src/reducers/city.js
  92. 22
    0
      src/reducers/counter.js
  93. 84
    0
      src/reducers/house.js
  94. 22
    0
      src/reducers/index.js
  95. 33
    0
      src/reducers/news.js
  96. 51
    0
      src/reducers/project.js
  97. 62
    0
      src/reducers/shop.js
  98. 31
    0
      src/reducers/system.js
  99. 127
    0
      src/reducers/user.js
  100. 0
    0
      src/routes.js

+ 12
- 0
.editorconfig Vedi File

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

+ 7
- 0
.eslintrc.js Vedi File

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

+ 6
- 0
.gitignore Vedi File

1
+dist/
2
+deploy_versions/
3
+.temp/
4
+.rn_temp/
5
+node_modules/
6
+.DS_Store

+ 10
- 0
babel.config.js Vedi File

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 Vedi File

1
+module.exports = {
2
+  env: {
3
+    NODE_ENV: '"development"'
4
+  },
5
+  defineConstants: {
6
+    HOST: '"https://wx.fangdeal.cn"', //正式
7
+    WSS_HOST: '"https://wx.fangdeal.cn"',
8
+    OSS_PATH: '"https://zhiyun-image.oss-accelerate.aliyuncs.com/"',
9
+    OSS_FAST_PATH: '"https://zhiyun-image.oss-accelerate.aliyuncs.com/"',
10
+    Version: '"V3.5.29-20201112"'
11
+  },
12
+  mini: {},
13
+  h5: {}
14
+}

+ 83
- 0
config/index.js Vedi File

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

+ 23
- 0
config/prod.js Vedi File

1
+module.exports = {
2
+  env: {
3
+    NODE_ENV: '"production"'
4
+  },
5
+  defineConstants: {
6
+    HOST: '"https://zcloud.njyunzhi.com"', //正式
7
+    WSS_HOST: '"wss://zcloud.njyunzhi.com"',
8
+    OSS_PATH: '"https://zhiyun-image.oss-accelerate.aliyuncs.com/"',
9
+    OSS_FAST_PATH: '"https://zhiyun-image.oss-accelerate.aliyuncs.com/"',
10
+    Version: '"V3.5.29-20201112"'
11
+  },
12
+  mini: {},
13
+  h5: {
14
+    /**
15
+     * 如果h5端编译后体积过大,可以使用webpack-bundle-analyzer插件对打包体积进行分析。
16
+     * 参考代码如下:
17
+     * webpackChain (chain) {
18
+     *   chain.plugin('analyzer')
19
+     *     .use(require('webpack-bundle-analyzer').BundleAnalyzerPlugin, [])
20
+     * }
21
+     */
22
+  }
23
+}

+ 17457
- 0
package-lock.json
File diff suppressed because it is too large
Vedi File


+ 65
- 0
package.json Vedi File

1
+{
2
+  "name": "miniapp",
3
+  "version": "1.0.0",
4
+  "private": true,
5
+  "description": "",
6
+  "templateInfo": {
7
+    "name": "redux",
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
+  "license": "MIT",
38
+  "dependencies": {
39
+    "@babel/runtime": "^7.7.7",
40
+    "@tarojs/components": "3.2.8",
41
+    "@tarojs/runtime": "3.2.8",
42
+    "@tarojs/taro": "3.2.8",
43
+    "redux-logger": "^3.0.6",
44
+    "redux-thunk": "^2.3.0",
45
+    "redux": "^4.0.0",
46
+    "react-redux": "^7.2.0",
47
+    "react-dom": "^17.0.0",
48
+    "@tarojs/react": "3.2.8",
49
+    "react": "^17.0.0"
50
+  },
51
+  "devDependencies": {
52
+    "@types/webpack-env": "^1.13.6",
53
+    "@types/react": "^17.0.2",
54
+    "@tarojs/mini-runner": "3.2.8",
55
+    "@babel/core": "^7.8.0",
56
+    "@tarojs/webpack-runner": "3.2.8",
57
+    "babel-preset-taro": "3.2.8",
58
+    "eslint-config-taro": "3.2.8",
59
+    "eslint": "^6.8.0",
60
+    "eslint-plugin-react": "^7.8.2",
61
+    "eslint-plugin-import": "^2.12.0",
62
+    "eslint-plugin-react-hooks": "^4.2.0",
63
+    "stylelint": "9.3.0"
64
+  }
65
+}

+ 37
- 0
project.config.json Vedi File

1
+{
2
+	"miniprogramRoot": "dist/",
3
+	"projectname": "miniapp",
4
+	"description": "",
5
+	"appid": "wx1a0fa56e6d0b78b3",
6
+	"setting": {
7
+		"urlCheck": false,
8
+		"es6": false,
9
+		"enhance": false,
10
+		"postcss": false,
11
+		"preloadBackgroundData": false,
12
+		"minified": false,
13
+		"newFeature": false,
14
+		"coverView": true,
15
+		"nodeModules": false,
16
+		"autoAudits": false,
17
+		"showShadowRootInWxmlPanel": true,
18
+		"scopeDataCheck": false,
19
+		"uglifyFileName": false,
20
+		"checkInvalidKey": true,
21
+		"checkSiteMap": true,
22
+		"uploadWithSourceMap": true,
23
+		"compileHotReLoad": false,
24
+		"babelSetting": {
25
+			"ignore": [],
26
+			"disablePlugins": [],
27
+			"outputPath": ""
28
+		},
29
+		"useIsolateContext": true,
30
+		"useCompilerModule": true,
31
+		"userConfirmedUseCompilerModuleSwitch": false
32
+	},
33
+	"compileType": "miniprogram",
34
+	"simulatorType": "wechat",
35
+	"simulatorPluginLibVersion": {},
36
+	"condition": {}
37
+}

+ 13
- 0
project.tt.json Vedi File

1
+{
2
+  "miniprogramRoot": "./",
3
+  "projectname": "miniapp",
4
+  "description": "",
5
+  "appid": "touristappid",
6
+  "setting": {
7
+    "urlCheck": true,
8
+    "es6": false,
9
+    "postcss": false,
10
+    "minified": false
11
+  },
12
+  "compileType": "miniprogram"
13
+}

+ 30
- 0
src/actions/activity.js Vedi File

1
+import {
2
+  ACTIVITY_SIGNIN
3
+} from '@/constants/activity'
4
+
5
+import {
6
+  API_ACTIVITY_SIGNIN
7
+} from '@/constants/api'
8
+
9
+import { createAction } from '@/utils/redux'
10
+
11
+/**
12
+ * 个人签到
13
+ * @param {*} id 
14
+ */
15
+export const dispatchSignin = id => createAction({
16
+  url: `${API_ACTIVITY_SIGNIN}/${id}`,
17
+  type: ACTIVITY_SIGNIN,
18
+  method: 'POST'
19
+})
20
+
21
+/**
22
+ * 判断是否签到
23
+ * @param {*} id 
24
+ */
25
+export const dispatchSigninCheck = id => createAction({
26
+  url: `${API_ACTIVITY_SIGNIN}/${id}/isChecked`,
27
+  type: ACTIVITY_SIGNIN
28
+})
29
+
30
+

+ 59
- 0
src/actions/card.js Vedi File

1
+import {
2
+  CARD_INFO,
3
+  CARD_LIST,
4
+  CARD_LIKE,
5
+  CARD_UNLIKE
6
+} from '@/constants/card'
7
+
8
+import {
9
+  API_CARDS_LIST,
10
+  API_CARDS_LIKE
11
+} from '@/constants/api'
12
+
13
+import { createAction } from '@/utils/redux'
14
+import { toQueryString } from '@/utils/tools'
15
+
16
+/**
17
+ * 获取卡片信息
18
+ * @param {*} id
19
+ */
20
+export const dispatchCardInfo = (id, params, options) => createAction({
21
+  url: `${API_CARDS_LIST}/${id}?${toQueryString(params)}`,
22
+  type: CARD_INFO,
23
+  fetchOptions: options || {}
24
+})
25
+
26
+/**
27
+ * 获取置业顾问列表
28
+ */
29
+export const dispatchCardList = (payload) => createAction({
30
+  url: `${API_CARDS_LIST}`,
31
+  type: CARD_LIST,
32
+  payload
33
+})
34
+
35
+
36
+/**
37
+ * 卡片点赞
38
+ * @param {*} id 
39
+ */
40
+export const dispatchCardLike = id => createAction({
41
+  url: `${API_CARDS_LIKE}/${id}`,
42
+  type: CARD_LIKE,
43
+  method: 'POST'
44
+})
45
+
46
+
47
+/**
48
+ * 卡片取消点赞
49
+ * @param {*} id 
50
+ */
51
+export const dispatchCardUnlike = id => createAction({
52
+  url: `${API_CARDS_LIKE}/${id}`,
53
+  type: CARD_UNLIKE,
54
+  method: 'DELETE'
55
+})
56
+
57
+
58
+
59
+

+ 30
- 0
src/actions/city.js Vedi File

1
+import {
2
+  CITY_LIST,
3
+  CITY_SELECTED
4
+} from '@/constants/city'
5
+
6
+import {
7
+  API_CITY_LIST
8
+} from '@/constants/api'
9
+
10
+import { createAction, createActionNormal } from '@/utils/redux'
11
+
12
+/**
13
+ * 获取城市列表
14
+ * @param {*} payload 
15
+ */
16
+export const dispatchCityList = payload => createAction({
17
+  url: API_CITY_LIST,
18
+  type: CITY_LIST,
19
+  payload
20
+})
21
+
22
+/**
23
+ * 获取城市列表
24
+ * @param {*} payload 
25
+ */
26
+export const dispatchCitySelected = payload => createActionNormal({
27
+  type: CITY_SELECTED,
28
+  payload
29
+})
30
+

+ 24
- 0
src/actions/counter.js Vedi File

1
+import {
2
+  ADD,
3
+  MINUS
4
+} from '../constants/counter'
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
+}

+ 36
- 0
src/actions/house.js Vedi File

1
+import { createAction, createActionNormal } from '@/utils/redux'
2
+import { API_CARDS_LIST, API_PRESELECTION_RECORD } from '@/constants/api'
3
+import {
4
+  ADD_CART,
5
+  SUB_CART,
6
+  FLUSH_TO_CART,
7
+  ADD_CONSULTANT,
8
+  CHOOSE_CONSULTANT,
9
+  MY_PRESELECT_RECORD,
10
+  SET_ONLINE_PROTOCOL,
11
+} from '@/constants/house'
12
+
13
+// 加入临时车
14
+export const dispatchAddCart = payload => createActionNormal({ type: ADD_CART, payload })
15
+// 删减临时车
16
+export const dispatchSubCart = payload => createActionNormal({ type: SUB_CART, payload })
17
+// 全部进入临时车
18
+export const dispatchFlush2Cart = payload => createActionNormal({ type: FLUSH_TO_CART, payload })
19
+// 获取置业顾问
20
+export const dispatchGetConsultants = payload => createAction({
21
+  type: ADD_CONSULTANT,
22
+  url: API_CARDS_LIST,
23
+  payload
24
+})
25
+
26
+// 临时选择置业
27
+export const dispatchChooseConsultant = payload => createActionNormal({ type: CHOOSE_CONSULTANT, payload })
28
+
29
+// 获取预选记录
30
+export const dispatchGetMySelection = payload => createAction({
31
+  type: MY_PRESELECT_RECORD,
32
+  url: API_PRESELECTION_RECORD,
33
+  payload,
34
+})
35
+
36
+export const dispatchSetOnlineProtocol = payload => createActionNormal({ type: SET_ONLINE_PROTOCOL, payload })

+ 32
- 0
src/actions/news.js Vedi File

1
+import {
2
+  NEWS_LIST
3
+} from '@/constants/news'
4
+
5
+import {
6
+  API_NEWS_LIST,
7
+
8
+} from '@/constants/api'
9
+
10
+import { createAction } from '@/utils/redux'
11
+
12
+
13
+/**
14
+ * 资讯列表
15
+ * @param {*} payload 
16
+ */
17
+export const dispatchNewsList = payload => createAction({
18
+  url: API_NEWS_LIST,
19
+  type: NEWS_LIST,
20
+  payload
21
+})
22
+
23
+
24
+/**
25
+ * 资讯详情
26
+ * @param {*} id 
27
+ */
28
+export const dispatchNewsDetail = id => createAction({
29
+  url: `${API_NEWS_LIST}/${id}`,
30
+  type: NEWS_DETAIL,
31
+  payload
32
+})

+ 53
- 0
src/actions/project.js Vedi File

1
+import {
2
+  PROJECT_DETAIL,
3
+  PROJECT_LIST,
4
+  PROJECT_SCREEN
5
+} from '@/constants/project'
6
+
7
+import {
8
+  API_ITEMS_DETAIL,
9
+  API_ITEMS_LIST,
10
+  API_BANNER_LIST,
11
+  API_INDEX_PROJECTS,
12
+} from '@/constants/api'
13
+
14
+import { createAction } from '@/utils/redux'
15
+import { toQueryString } from '@/utils/tools'
16
+
17
+/**
18
+ * 获取楼盘列表
19
+ * @param {*} payload 
20
+ */
21
+export const dispatchProjectList = payload => createAction({
22
+  url: `${API_ITEMS_LIST}`,
23
+  type: PROJECT_LIST,
24
+  payload
25
+})
26
+
27
+/**
28
+ * 获取楼盘列表
29
+ * @param {*} payload 
30
+ */
31
+export const dispatchIndexProjects = payload => createAction({
32
+  url: `${API_INDEX_PROJECTS}`,
33
+  type: PROJECT_LIST,
34
+  payload
35
+})
36
+
37
+
38
+/**
39
+ * 获取项目信息
40
+ * @param {*} id 
41
+ */
42
+export const dispatchProjectDetail = (id, params, options) => createAction({
43
+  url: `${API_ITEMS_DETAIL}/${id}?${toQueryString(params)}`,
44
+  type: PROJECT_DETAIL,
45
+  fetchOptions: options || {}
46
+})
47
+
48
+/**
49
+ * 获取开屏广告
50
+ *  @param {*} payload 
51
+ * 
52
+*/
53
+export const dispatchProjectScreen = (payload) => createAction({ url: `${API_BANNER_LIST}/screen`, payload, type: PROJECT_SCREEN })

+ 89
- 0
src/actions/shop.js Vedi File

1
+import {
2
+  GOODS_LIST,
3
+  GOODS_DETAIL,
4
+  GOODS_EXCHANGE,
5
+  GOODS_EXCHANGE_RECORDS,
6
+  POINTS_RECORDS,
7
+  POINTS_RULE,
8
+  POINTS_ADRESS
9
+} from '@/constants/shop'
10
+
11
+import {
12
+  API_GOODS_LIST,
13
+  API_GOODS_EXCHANGE,
14
+  API_GOODS_EXCHANGE_RECORDS,
15
+  API_POINTS_RECORDS,
16
+  API_POINTS_RULE,
17
+  API_POINTS_ADRESS
18
+} from '@/constants/api'
19
+
20
+import { createAction } from '@/utils/redux'
21
+
22
+
23
+
24
+
25
+
26
+
27
+/**
28
+ * 商品详情
29
+ * @param {*} id
30
+ */
31
+export const dispatchGoodsDetail = id => createAction({
32
+  url: `${API_GOODS_LIST}/${id}`,
33
+  type: GOODS_DETAIL
34
+})
35
+
36
+
37
+
38
+/**
39
+ * 商品兑换
40
+ * @param {*} id
41
+ */
42
+export const dispatchGoodsExchange = id => createAction({
43
+  url: `${API_GOODS_EXCHANGE}/${id}`,
44
+  type: GOODS_EXCHANGE,
45
+  method: 'POST'
46
+})
47
+
48
+
49
+/**
50
+ * 商品兑换记录
51
+ * @param {*} payload
52
+ */
53
+export const dispatchGoodsExchangeRecords = payload => createAction({
54
+  url: `${API_GOODS_EXCHANGE_RECORDS}`,
55
+  type: GOODS_EXCHANGE_RECORDS,
56
+  payload
57
+})
58
+
59
+
60
+/**
61
+ * 积分记录
62
+ * @param {*} payload
63
+ */
64
+export const dispatchPointsRecords = payload => createAction({
65
+  url: API_POINTS_RECORDS,
66
+  type: POINTS_RECORDS,
67
+  payload
68
+})
69
+
70
+/**
71
+ * 积分规则
72
+ * @param {*} payload
73
+ */
74
+export const dispatchPointsRule = payload => createAction({
75
+  url: API_POINTS_RULE,
76
+  type: POINTS_RULE,
77
+  payload
78
+})
79
+
80
+/**
81
+ * 请求地址
82
+ * @param {*} payload
83
+ */
84
+export const dispatchPointsAddress = payload => createAction({
85
+  url: `${API_POINTS_ADRESS}`,
86
+  type: POINTS_ADRESS,
87
+  payload,
88
+  method: 'PUT'
89
+})

+ 86
- 0
src/actions/user.js Vedi File

1
+import {
2
+  USER_INFO,
3
+  // USER_QUERY_INFO,
4
+  USER_SIGNIN,
5
+  USER_GOODS,
6
+  UPDATE_USER_INFO
7
+} from '@/constants/user'
8
+
9
+import {
10
+  API_USER_INFO,
11
+  // API_QUERY_USER_INFO,
12
+  API_USER_SIGNIN,
13
+  API_QUERY_CUSTOMER_INFO,
14
+  API_QUERY_MYREPORT,
15
+  API_QUERY_USERINFO_BYID,
16
+  API_QUERY_DOCUMENTVERIFY
17
+} from '@/constants/api'
18
+
19
+import { createAction,createActionNormal } from '@/utils/redux'
20
+
21
+/**
22
+ * 获取用户信息
23
+ * @param {*} payload
24
+ */
25
+export const dispatchUpdateUserInfo = payload => createAction({
26
+  url: API_USER_INFO,
27
+  type: USER_INFO,
28
+  payload,
29
+  method: 'POST'
30
+})
31
+
32
+// export const dispatchQueryUserInfo = payload => createAction({
33
+//   url: API_QUERY_USER_INFO,
34
+//   type: USER_QUERY_INFO,
35
+//   payload
36
+// })
37
+
38
+export const dispatchUpdateUserInfoNew = id => createAction({
39
+  url: `${API_QUERY_USERINFO_BYID}/${id}`,
40
+  type: UPDATE_USER_INFO
41
+})
42
+
43
+
44
+
45
+/**
46
+ * 个人签到
47
+ * @param {*} payload
48
+ */
49
+export const dispatchUserSignin = payload => createAction({
50
+  url: API_USER_SIGNIN,
51
+  type: USER_SIGNIN,
52
+  payload,
53
+  method: 'POST'
54
+})
55
+
56
+
57
+/**
58
+ * 更新我的商品兑换记录
59
+ * @param {*} payload
60
+ */
61
+export const dispatchUserGoods = payload => {
62
+  return dispatch => dispatch({ type: USER_GOODS, payload })
63
+}
64
+
65
+/**
66
+ * 我的客户列表
67
+ * @param {*} payload
68
+ */
69
+export const dispatchCustomerInfo = payload => createAction({
70
+  url: API_QUERY_CUSTOMER_INFO,
71
+  type: '',
72
+  payload,
73
+  method: 'GET'
74
+})
75
+
76
+/**
77
+ * 我报备的客户列表
78
+ * @param {*} payload
79
+ */
80
+export const dispatchMyReport = payload =>createAction({
81
+  url: API_QUERY_MYREPORT,
82
+  type: '',
83
+  payload,
84
+  method: 'GET'
85
+})
86
+

+ 49
- 0
src/app.config.js Vedi File

1
+import { getPages } from './routes'
2
+
3
+const { pages } = getPages()
4
+
5
+export default {
6
+  pages,
7
+  window: {
8
+    backgroundTextStyle: 'light',
9
+    navigationBarBackgroundColor: '#fff',
10
+    navigationBarTitleText: 'WeChat',
11
+    navigationBarTextStyle: 'black'
12
+  },
13
+  tabBar: {
14
+    color: '#666',
15
+    selectedColor: '#193C83',
16
+
17
+    list: [
18
+      {
19
+        pagePath: "pages/index/index",
20
+        text: "首页",
21
+        iconPath: './assets/tabbar/index1.png',
22
+        selectedIconPath: './assets/tabbar/index2.png',
23
+      },
24
+      {
25
+        pagePath: "pages/video/index",
26
+        text: "视频",
27
+        iconPath: './assets/tabbar/video1.png',
28
+        selectedIconPath: './assets/tabbar/video2.png',
29
+      },
30
+      {
31
+        pagePath: "pages/chat/index",
32
+        text: "聊天",
33
+        iconPath: './assets/tabbar/chat1.png',
34
+        selectedIconPath: './assets/tabbar/chat2.png',
35
+      },
36
+      {
37
+        pagePath: "pages/mine/index",
38
+        text: "我是",
39
+        iconPath: './assets/tabbar/mine1.png',
40
+        selectedIconPath: './assets/tabbar/mine2.png',
41
+      }
42
+    ]
43
+  },
44
+  permission: {
45
+    "scope.userLocation": {
46
+      desc: "你的位置信息将用于显示当前区域信息"
47
+    }
48
+  },
49
+}

+ 60
- 0
src/app.jsx Vedi File

1
+import { Component } from 'react'
2
+import { Provider } from 'react-redux'
3
+import Taro from '@tarojs/taro'
4
+import { getLocation, getRouterParams } from '@/utils/tools'
5
+import login from '@/utils/login'
6
+import store from './store'
7
+
8
+import './app.scss'
9
+
10
+class App extends Component {
11
+
12
+  componentDidMount () {}
13
+
14
+  componentDidShow () {}
15
+
16
+  componentDidHide () {}
17
+
18
+  componentDidCatchError () {}
19
+  
20
+  onLaunch (options) {
21
+    getLocation().then((loc) => {
22
+      getRouterParams(options).then(router => {
23
+        Taro.setStorageSync('router', router)
24
+        const { query: payload } = router
25
+
26
+        payload.path = router.path
27
+        payload.scene = router.scene
28
+
29
+        if (loc) {
30
+          payload.lon = loc.lon
31
+          payload.lat = loc.lat
32
+        }
33
+
34
+        // login
35
+        login(payload).then((res) => {
36
+          // const { person: { personId } } = res
37
+
38
+          // socket.createSocket({ id: personId });
39
+          // socket.onMessage(data => {
40
+          //   store.dispatch({ type: INCREASE_UNREADNUM })
41
+          // })
42
+          // // 埋点
43
+          // trackUserSource(router.params).then(r => this.updateTrack = r)
44
+        })
45
+      })
46
+    })
47
+  }
48
+
49
+  // 在 App 类中的 render() 函数没有实际作用
50
+  // 请勿修改此函数
51
+  render () {
52
+    return (
53
+      <Provider store={store}>
54
+        {this.props.children}
55
+      </Provider>
56
+    )
57
+  }
58
+}
59
+
60
+export default App

+ 35
- 0
src/app.scss Vedi File

1
+page,
2
+.Page {
3
+  width: 100%;
4
+  height: 100%;
5
+  position: relative;
6
+  overflow: hidden;
7
+}
8
+
9
+.centerLabel {
10
+  display: block;
11
+  position: absolute;
12
+  left: 50%;
13
+  top: 50%;
14
+  transform: translate(-50%, -50%);
15
+  -webkit-transform: translate(-50%, -50%);
16
+}
17
+
18
+.flex-h {
19
+  display: flex;
20
+  display: -webkit-flex;
21
+}
22
+
23
+.flex-v {
24
+  display: flex;
25
+  display: -webkit-flex;
26
+  flex-direction: column;
27
+  -webkit-flex-direction: column;
28
+}
29
+
30
+.flex-item {
31
+  flex: 1;
32
+  -webkit-flex: 1;
33
+  position: relative;
34
+  overflow: hidden;
35
+}

+ 86
- 0
src/assets/css/iconfont.css Vedi File

1
+@font-face {
2
+  font-family: "iconfont"; /* Project id 2603904 */
3
+  src: url('iconfont.eot?t=1623340225195'); /* IE9 */
4
+  src: url('iconfont.eot?t=1623340225195#iefix') format('embedded-opentype'), /* IE6-IE8 */
5
+       url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAoUAAsAAAAAEkgAAAnFAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHFQGZACFKAqTeJBBATYCJANICyYABCAFhG0HgVcbpg8jEfaCsfIn+6sD3hA17xEMrCI844RqBMTojNk5DMr6Fwn04o9cU9tU9nME9Guv++4uhOzKLAFwPJJvhC242JYVjk/rmNxHkLEx8qQOT6f+y6Ud7tVRhZSeEF6hQ+ElaSdmc/K/7zbXTDPYl2QC0nzgfH/Tb4yhUSe75Le3/PR8CDR9kPQgdAgrLgcATIaOpXbaqG6VQFO7/774uPWtsnhNCfRAUfeLCBsOeDjBAdEAfBrLSWAm1OWq8uv2HAHZBs0QzXtftk7+fn38oGoJuTXgDQz7cdcWmdc8SUZokKlJTzg+LRF+a0QXo6e4bnULnwyHwP7SYvJGq3bO3+7eW++vdyJ1wvp42on6puD4iFQKaYjR27uC8JRS+kTsoF6LZCeNTNxAtcLIpd+Gt5lvq3WZYZ1JN03d88/31+vb+623Gcke3+YiDQ+q1apXSGvvSDwnzRnyZL3/yUuXI1+2XAUKFYkI6STJhed0WxFvaSmk8TakEPM2A8jkLZZFq4GBdoHJA50BJgt0HZgEdBJMOuhNMDmgU0ghn3c9KWTz7lsKubz7zhSA/gBTCPoTXJG9K0eJiCTF/JhWjBDHJBMQcEVzpFCaERokUqU1lggODijOLkiXEWlp6VLbSF9FUkNu88L3Ew6ECbGNi8DNViBwsmUJeMHBrl48wQJyZDUjyKjU8XFVRYd+ni0GL6q6XlRGaKGJQM25J02jzxfBOVvjTYTKTEKQCwFqydueyDLghy0Ui+Mog2w+ROaGiviUeYwt2JZgJm1ZfEschwPNEJRCc02Ecx4LcYBVWKgFVV0oi50aYRghrOJm6A4+f0/QHsUJEjUt3ixRCYcWiici23zLzaSIavdiqNMjLypNEJpwlkk7gYD2QM4CCHQsS5vNeosl35YxmYATB1jUhjYf4nCiQq2BDlJV1PR2ikSIbi+ErGsfhEwvALqZ/RxuZXdfnXCBvnpMV4l1DZ8KbcnLlGUKbdD3Mb26HmhTyjRCG7RU9fbeXoB8f9GebULSuYGNY2lym9nTrKeaLYkWhthq8pjEdNfr67pQuke3dgFp4dTfk6EsWUQpnYD1w8QMsC6LLCAgcBpBXBxdyYgOZ82CrOwPZdPnDukPn2fOHjQdOJNXRlYPoWrGTOKU1jAx4EcwAqKykV/Bxyu2CavymE4Boqvp6BJy9X0+dysX62WEyEExbfXIOV+l3igifkWHUFOlF02mA0i8AzUEXevcKLKuyY1TvzuQovQHMTtdCKJzZ2ODGCdqjeIekqiEjIhTXS8kKZZAWFUlJElEd2UI3uFcUSsgcEjTP0jLCI6afBrZIJXGYPZqt8irIXMyePjIvtOltPgIy3q3RG8crp6R4WX7Yzf7tpnNsuntxgYZzAsqV6VZqFFV0DXzOlHZlmbjKlYNOtJO1oiquwWdZnlV65crUGfUCCpr+cQ/I/qeh073+9Vnf09/c9rU6TPUqX9oAsNeHQrUBD0kZszQ6YDFdY2nBMEMAMPsHqtzIM1TtatOHNwdlsSfTJKoBCiNK5qHtKw0AizT9XTriXr+lP1TYHnuKFGQgqe271uHJHmOrR4oQT9We0kRxTqgtCvhawLln8tz3WQnWneFY4KpmepXDVPSd48bjUCJSlr6DMaVLajEXWNAFF7SNahkfglU53wOkvPUIKFtTRJql2z12WfLX9Z+2pJoXr+4MqtZq30eJVvZuQzj35tlq3bIEy5KKSnSrpM7M2hC93OECx3ybdWqdxOJ+XGKzKESAeUoscYkVwtSAof8DoEFFlg7ScFYzrSEXPmccz0TiyYOm2hWjIJGrvjp01HDJ0wcsVhAgZc44tWgIwwLDcXCRQFpo/wDLgXo904LEIWHYlgoCPvmEO1NyWoGOq2qkRBuEred+3m1TpTGefv3Bs6V0buS5/IfSHTUqWKIqKzMKCL6pApN6EK/9sT9CPWwzMz7fgpx0lgv4aswRbvHLvwv7iwE/+UOvRJ9x8OJ7+RxJ/rK3Vh44ZjRD8vg3fHwIa8qHJjepkojkePhnfJ7u8rsm656XGmyF/7uewOGjFJ2/BlHqcdF45EZGVF41DFAE7ql0fgxcY9IPHockSRWiCNa9fsCSGWoPDhEHqI0hmAccq4MMVrFwcFyf7UxRBl8lwz8Pb3HjihIjUwOC08JTysAqUp9QmHOdK+La8V7D3lRM+KLlHqQWhCRFp6cEqYbz3kR8KEoKe1j0oc0gJnGwZIl5bE5MSQZkxN7QYXQx5D+JRfu54kjo6PJuJwhZdmhSSFKZUhS6AYBBXShf8mGu0+Y4gKKsKR7nQ1O/znCyuXJX1Ytz+sUF3ZZogBbG6Gda5rNm+lebqk2jo8xaOdWEwj1dKs19RPau9bZvJ0WAesZmkpCEGJPN2jrAKbs6vWUeNQNGNB/gC2uBbUXDD4+Bo86YBY6BW+glD/Jme+aFg7jxbsZ/Zs+gqMZXnrAl1xfMTdi7l/E+oM+pRHXjfb0n767E1CPUW9adxf82R+qwezpzv6nKxlyTBBwvq4/75e/J/Ar71ti/u5z/tGqoDGaCjrgtPP073DAOFDTa3eJSsuYLRNiRoGAL9gjxGSz0zKoS3Zef49bvXpcJW8kz1eUlRiPl2i5ICExUWIvMbomAK62JB6Pcyby5YWmeHx7luoBYjc61g2D9Q444zq42x6gF6yUDG8VR15Ra5b8vpc0GecjN4DUd8uQ31bUYSu5I6Oum8MVt36wlGtDKZ2OvEP4dqSTdyCfUXJEAbUXsY4LEFaOPLUYrUWOAamnDFwhShnkGcJkyIjaaB9yAuUKJPyIbR68bLjRXGQ/7CMiYELumH73ZrZVm3qYaEeTedzAocXC1Inf9hWTA3QdxUnS4mqyWmOKrVfYHCFb2USqnSKv29aUkeV/DJoyD0Qy1IFYplbXxLMXpMkxCtJlmgmy9Vh4co4SR8VCkoVuZxkICt0BkXx3UZzk+Qwl8HwF0hz55F99hMCwD878hvtznnsOePaSQAtYtV0VGianFsqZPfATfAk6ceXJ3i+kjEyqrZpvxwcQpDqc5Ml3Ik65xFG9MwGEwGpMPICRqkf7uKlrd3NaGY47Z14kQBMjsaVsrdmRwYjbXpxFvv8T8IpASxkzvrL/AkmGhiutSkNw/SBEmrEvw7OJ1xHOHaWNT1ikvHMOgtLKlDHZ0gAYotKXaB5t1HwlRyVV+5q49YnNN6v8zOKwp6iabgjTsh3X8/ndunOfjraipgEPLf5hOc09kI+odTmY2cKR3wiXFU4CahY005HRcd2GH2UuufCxpfAZ8DIMR6SjFclk58N3hHAJ4OSkrC2jyR9qXJBO48vLeOF0JPS9kHtYnmlnBwAA') format('woff2'),
6
+       url('iconfont.woff?t=1623340225195') format('woff'),
7
+       url('iconfont.ttf?t=1623340225195') format('truetype'),
8
+       url('iconfont.svg?t=1623340225195#iconfont') format('svg');
9
+}
10
+
11
+.iconfont {
12
+  font-family: "iconfont" !important;
13
+  font-size: 16px;
14
+  font-style: normal;
15
+  -webkit-font-smoothing: antialiased;
16
+  -moz-osx-font-smoothing: grayscale;
17
+}
18
+
19
+.icon-bianji:before {
20
+  content: "\e608";
21
+}
22
+
23
+.icon-diqiu:before {
24
+  content: "\e88f";
25
+}
26
+
27
+.icon-shengming:before {
28
+  content: "\e601";
29
+}
30
+
31
+.icon-wode:before {
32
+  content: "\e654";
33
+}
34
+
35
+.icon-shouye:before {
36
+  content: "\e600";
37
+}
38
+
39
+.icon-liaotian:before {
40
+  content: "\e69b";
41
+}
42
+
43
+.icon-camera:before {
44
+  content: "\e61a";
45
+}
46
+
47
+.icon-sousuo:before {
48
+  content: "\e607";
49
+}
50
+
51
+.icon-dingwei:before {
52
+  content: "\e63e";
53
+}
54
+
55
+.icon-shipin:before {
56
+  content: "\e72b";
57
+}
58
+
59
+.icon-yinpin:before {
60
+  content: "\e6ac";
61
+}
62
+
63
+.icon-jiantouleft:before {
64
+  content: "\e7ef";
65
+}
66
+
67
+.icon-shoucang:before {
68
+  content: "\e629";
69
+}
70
+
71
+.icon-aixin:before {
72
+  content: "\e6b6";
73
+}
74
+
75
+.icon-jiantouup:before {
76
+  content: "\e7f0";
77
+}
78
+
79
+.icon-jiantouright:before {
80
+  content: "\e7f1";
81
+}
82
+
83
+.icon-jiantoudown:before {
84
+  content: "\e7f2";
85
+}
86
+

BIN
src/assets/css/iconfont.eot Vedi File


+ 1
- 0
src/assets/css/iconfont.js
File diff suppressed because it is too large
Vedi File


+ 128
- 0
src/assets/css/iconfont.json Vedi File

1
+{
2
+  "id": "2603904",
3
+  "name": "新联康",
4
+  "font_family": "iconfont",
5
+  "css_prefix_text": "icon-",
6
+  "description": "",
7
+  "glyphs": [
8
+    {
9
+      "icon_id": "11745026",
10
+      "name": "编辑",
11
+      "font_class": "bianji",
12
+      "unicode": "e608",
13
+      "unicode_decimal": 58888
14
+    },
15
+    {
16
+      "icon_id": "13939045",
17
+      "name": "地球",
18
+      "font_class": "diqiu",
19
+      "unicode": "e88f",
20
+      "unicode_decimal": 59535
21
+    },
22
+    {
23
+      "icon_id": "6664481",
24
+      "name": "声明",
25
+      "font_class": "shengming",
26
+      "unicode": "e601",
27
+      "unicode_decimal": 58881
28
+    },
29
+    {
30
+      "icon_id": "7821346",
31
+      "name": "我 的",
32
+      "font_class": "wode",
33
+      "unicode": "e654",
34
+      "unicode_decimal": 58964
35
+    },
36
+    {
37
+      "icon_id": "4950560",
38
+      "name": "首页-选中",
39
+      "font_class": "shouye",
40
+      "unicode": "e600",
41
+      "unicode_decimal": 58880
42
+    },
43
+    {
44
+      "icon_id": "1535331",
45
+      "name": "聊天",
46
+      "font_class": "liaotian",
47
+      "unicode": "e69b",
48
+      "unicode_decimal": 59035
49
+    },
50
+    {
51
+      "icon_id": "10297753",
52
+      "name": "视频",
53
+      "font_class": "camera",
54
+      "unicode": "e61a",
55
+      "unicode_decimal": 58906
56
+    },
57
+    {
58
+      "icon_id": "731139",
59
+      "name": "搜索",
60
+      "font_class": "sousuo",
61
+      "unicode": "e607",
62
+      "unicode_decimal": 58887
63
+    },
64
+    {
65
+      "icon_id": "1311980",
66
+      "name": "定位",
67
+      "font_class": "dingwei",
68
+      "unicode": "e63e",
69
+      "unicode_decimal": 58942
70
+    },
71
+    {
72
+      "icon_id": "14666058",
73
+      "name": "视频",
74
+      "font_class": "shipin",
75
+      "unicode": "e72b",
76
+      "unicode_decimal": 59179
77
+    },
78
+    {
79
+      "icon_id": "15346626",
80
+      "name": "音频",
81
+      "font_class": "yinpin",
82
+      "unicode": "e6ac",
83
+      "unicode_decimal": 59052
84
+    },
85
+    {
86
+      "icon_id": "17710127",
87
+      "name": "箭头",
88
+      "font_class": "jiantouleft",
89
+      "unicode": "e7ef",
90
+      "unicode_decimal": 59375
91
+    },
92
+    {
93
+      "icon_id": "19954259",
94
+      "name": "收 藏 (1)",
95
+      "font_class": "shoucang",
96
+      "unicode": "e629",
97
+      "unicode_decimal": 58921
98
+    },
99
+    {
100
+      "icon_id": "20587062",
101
+      "name": "爱心",
102
+      "font_class": "aixin",
103
+      "unicode": "e6b6",
104
+      "unicode_decimal": 59062
105
+    },
106
+    {
107
+      "icon_id": "22166463",
108
+      "name": "箭头",
109
+      "font_class": "jiantouup",
110
+      "unicode": "e7f0",
111
+      "unicode_decimal": 59376
112
+    },
113
+    {
114
+      "icon_id": "22166464",
115
+      "name": "箭头",
116
+      "font_class": "jiantouright",
117
+      "unicode": "e7f1",
118
+      "unicode_decimal": 59377
119
+    },
120
+    {
121
+      "icon_id": "22166465",
122
+      "name": "箭头",
123
+      "font_class": "jiantoudown",
124
+      "unicode": "e7f2",
125
+      "unicode_decimal": 59378
126
+    }
127
+  ]
128
+}

+ 77
- 0
src/assets/css/iconfont.svg Vedi File

1
+<?xml version="1.0" standalone="no"?>
2
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
+<!--
4
+2013-9-30: Created.
5
+-->
6
+<svg>
7
+<metadata>
8
+Created by iconfont
9
+</metadata>
10
+<defs>
11
+
12
+<font id="iconfont" horiz-adv-x="1024" >
13
+  <font-face
14
+    font-family="iconfont"
15
+    font-weight="500"
16
+    font-stretch="normal"
17
+    units-per-em="1024"
18
+    ascent="896"
19
+    descent="-128"
20
+  />
21
+    <missing-glyph />
22
+    
23
+    <glyph glyph-name="bianji" unicode="&#58888;" d="M797.86880407 541.08664501L669.1300934 669.86880407 717.1844352 718.05349239a45.66465922 45.66465922 0 0 0 64.95591337-0.08689746l63.82624636-63.78279729a45.62121016 45.62121016 0 0 0 0.0434484-64.95591405l-48.0977902-48.14123858z m-64.39107954-64.43452859L362.94659898 106.07754179999995c-8.77665177-8.77665177-25.46098003-19.55194721-36.71421252-23.89682438l-103.36462809-39.712178c-47.01157089-18.074689-70.3870105 5.64834045-52.39921895 52.39921896l39.7556264 103.32117968c4.38832623 11.5139242 15.5112115 28.32859899 23.89682436 36.71421184l370.6180237 370.61802303 128.78215905-128.86905651z"  horiz-adv-x="1024" />
24
+
25
+    
26
+    <glyph glyph-name="diqiu" unicode="&#59535;" d="M727.61173333 538.5152h147.71093334c19.78346667-44.016 31.6416-92.23466667 33.6288-143.13066667h-169.48266667c-0.7168 53.8048-5.1648 101.20106667-11.85706667 143.13066667z m-64.55146666 202.5216c84.72853333-32.93226667 154.26986667-95.24266667 197.86346666-173.89866667H722.77866667c-15.6768 80.11626667-39.47306667 137.056-59.7184 173.89866667zM539.3408 567.1392000000001V766.93333333c30.46826667-1.33546667 60.01813333-6.15466667 88.29866667-14.07786666 21.4656-36.06613333 49.1232-96.31146667 66.59413333-185.71626667H539.3408zM351.392 223.62986666999996c-6.69013333 41.96053333-11.328 89.0848-12.0192 143.13066666H510.70933333v-143.1296H351.392z m-0.27946667 314.88533333h159.59466667v-143.13066667H339.21066667c0.72213333 53.84746667 5.20533333 101.184 11.90186666 143.13066667z m71.6704 214.96853333c28.21866667 7.57653333 57.5488 12.42666667 87.92533334 13.4016v-199.74613333H355.82933333c17.5744 89.9072 45.43786667 150.35626667 66.95253334 186.34453333z m-237.86666666-186.34453333c44.30506667 79.94453333 116.0288 142.59946667 202.69013333 175.07733333-20.3776-36.82346667-44.5216-94.0992-60.35946667-175.07733333H184.91733333z m125.6608-171.75466667h-173.088c1.90933333 50.86186667 13.34506667 99.20106667 33.0912 143.13066667h151.86453333c-6.6944-41.9392-11.14773333-89.32906667-11.86773333-143.13066667z m12.1984-171.75466666H171.66826667c-19.82506667 44.0736-32.51626667 92.064-34.39146667 143.13066666h173.4368c0.68906667-54.048 5.36426667-101.1328 12.06186667-143.1296z m4.69546666-28.62293334c15.9552-81.78666667 40.4352-139.00053333 60.94293334-175.3952-86.97493333 32.36693333-158.7296 95.24266667-203.08906667 175.3952h142.14613333z m183.23626667 0v-199.74826666c-30.0352 0.96426667-59.05173333 5.712-86.98133333 13.1328-21.552 35.3248-49.57866667 96.05226667-67.31733334 186.61546666h154.29866667z m182.94826667 0c-17.632-90.02026667-45.43146667-150.54293333-66.9376-185.952-27.9552-7.75893333-57.2928-11.9424-87.37706667-13.27573333V195.00693333000004h154.31466667z m-154.31466667 171.7536h171.3344c-0.6912-54.05226667-5.33226667-101.16693333-12.02346667-143.1296H539.3408V366.76053333000004z m171.49653333 28.624H539.3408V538.5152h159.59466667c6.69546667-41.94346667 11.17866667-89.28106667 11.90186666-143.13066667z m28.50133334-28.624h169.30453333C906.752 315.73333333000005 894.15253333 267.72266666999997 874.4256 223.63093332999995H727.2768c6.6944 41.99253333 11.37066667 89.07306667 12.0608 143.1296z m121.3792-171.75466666c-43.48053333-78.98133333-113.34933333-141.32693333-198.44373334-174.18666667 20.3808 36.4416 44.5472 93.24586667 60.336 174.18666667h138.10773334z"  horiz-adv-x="1024" />
27
+
28
+    
29
+    <glyph glyph-name="shengming" unicode="&#58881;" d="M873.58203125 658.5703125c-5.9765625 17.84179688-17.84179688 23.73046875-35.59570313 23.73046875C665.72070313 670.43554688 582.57617188 771.421875 541.00390625 818.8828125 529.05078125 830.8359375 523.07421875 830.8359375 511.20898437 830.8359375s-23.73046875-5.9765625-29.70703124-11.86523438c-41.57226563-47.54882813-118.828125-148.53515625-296.98242188-136.58203124-17.84179688 0-29.70703125-5.9765625-35.68359375-23.73046876 0-5.9765625-184.13085938-498.95507813 350.41992188-718.76953125h23.73046874c534.7265625 219.7265625 350.59570313 712.70507813 350.59570313 718.68164063zM511.03320312 56.16796875C156.5703125 207.33984375 213.875 509.68359375 239.97851562 587.90625c140.71289063 0 224.12109375 67.76367188 271.05468751 114.69726563C557.96679688 655.66992188 636.18945313 587.90625 776.90234375 587.90625h5.18554688c20.91796875-78.22265625 83.40820313-375.38085938-271.05468751-531.73828125zM463.66015625 551.60742188h106.96289063v-95.00976563H463.66015625V551.60742188z m0-154.42382813h106.96289063v-213.83789063H463.66015625V397.18359375z m0 0"  horiz-adv-x="1024" />
30
+
31
+    
32
+    <glyph glyph-name="wode" unicode="&#58964;" d="M512 804h233.34375001v-233.34375001c0-128.90625001-104.4375-233.34375001-233.34375001-233.34374999S278.65624999 441.75 278.65624999 570.65625001 383.09374999 804 512 804zM302 290.625h420c90.1875 0 163.3125-73.125 163.3125-163.3125v-23.34375001c0-77.34375001-62.71875001-139.96875001-139.96875001-139.96874999H278.65624999c-77.34375001 0-139.96875001 62.71875001-139.96874999 139.96875001v23.34374999c-0.09375001 90.1875 73.03125001 163.3125 163.3125 163.3125z"  horiz-adv-x="1024" />
33
+
34
+    
35
+    <glyph glyph-name="shouye" unicode="&#58880;" d="M556.65283203 763.07446289a63.39990234 63.39990234 0 0 1-85.19238281 0L126.97314453 435.96972656a31.77905273 31.77905273 0 0 1 42.55664063-47.20385742l5.4777832 5.20092774V52.56445312000005a63.55810547 63.55810547 0 0 1 63.55810547-63.63720703h184.95922851v191.34667969a44.75170898 44.75170898 0 0 0 44.77148438 44.81103516h87.03149414a44.75170898 44.75170898 0 0 0 44.77148437-44.81103516v-191.34667969h189.34936524a63.55810547 63.55810547 0 0 1 63.57788086 63.63720704V389.79418945c14.11962891-12.77490234 34.15209961-11.8059082 45.89868164 1.28540039a31.77905273 31.77905273 0 0 1-2.29394531 44.89013672L556.65283203 763.0546875z"  horiz-adv-x="1024" />
36
+
37
+    
38
+    <glyph glyph-name="liaotian" unicode="&#59035;" d="M880.64624023 384c0 203.85131836-165.28930664 369.140625-369.140625 369.140625s-369.140625-165.28930664-369.140625-369.140625 165.28930664-369.140625 369.140625-369.140625H828.40625L745.102417 98.16320800000005c82.72705078 67.64831543 135.54382325 170.56274414 135.54382323 285.836792zM301.0625 331.265625c-29.08630372 0-52.734375 23.64807129-52.734375 52.734375s23.64807129 52.734375 52.734375 52.734375 52.734375-23.64807129 52.734375-52.734375-23.64807129-52.734375-52.734375-52.734375z m209.94873047 0c-29.08630372 0-52.734375 23.64807129-52.734375 52.734375s23.64807129 52.734375 52.734375 52.734375 52.734375-23.64807129 52.734375-52.734375-23.56567383-52.734375-52.734375-52.734375zM670.203125 384c0 29.08630372 23.64807129 52.734375 52.734375 52.734375s52.734375-23.64807129 52.734375-52.734375-23.64807129-52.734375-52.734375-52.734375-52.734375 23.64807129-52.734375 52.734375z"  horiz-adv-x="1024" />
39
+
40
+    
41
+    <glyph glyph-name="camera" unicode="&#58906;" d="M761.325714 515.730286l90.441143 59.922285A63.817143 63.817143 0 0 0 950.857143 522.441143v-276.882286a63.817143 63.817143 0 0 0-99.108572-53.211428l-90.422857 59.904a1326.08 1326.08 0 0 0-3.437714-30.445715 136.228571 136.228571 0 0 0-119.826286-118.509714c-69.723429-7.917714-141.988571-11.867429-216.813714-11.867429-75.081143 0-147.803429 3.986286-218.148571 11.958858a136.228571 136.228571 0 0 0-119.862858 118.509714A1309.878857 1309.878857 0 0 0 73.142857 384c0 54.016 3.364571 108.032 10.093714 162.066286a136.228571 136.228571 0 0 0 119.862858 118.528c70.546286 7.990857 143.268571 11.977143 218.148571 11.977143 74.624 0 146.907429-3.968 216.832-11.885715a136.228571 136.228571 0 0 0 119.808-118.528c1.28-10.148571 2.413714-20.297143 3.437714-30.427428zM219.428571 475.428571a54.857143 54.857143 0 1 1 0 109.714286 54.857143 54.857143 0 0 1 0-109.714286z"  horiz-adv-x="1024" />
42
+
43
+    
44
+    <glyph glyph-name="sousuo" unicode="&#58887;" d="M931.55522188 72.77261250000004L766.76391031 205.19355094000002c33.62616188 55.1434125 53.34942937 119.69516625 53.34942938 189.00817219 0 201.0288225-162.96471 363.99641063-363.99449156 363.99641062S92.12435563 595.2305456199999 92.12435563 394.20172313s162.96471-363.99641063 363.99449156-363.99641063c115.22459812 0 217.7550825 53.68807969 284.45290125 137.24454844l162.2902875-130.39863L931.55522188 72.77261250000004zM456.11884719 76.04303436999999c-175.4314575 0-318.15676969 142.72531219-318.15676969 318.15772875s142.72531219 318.15772875 318.15676969 318.15772875 318.15676969-142.72531219 318.15676968-318.15772874S631.55030469 76.04303436999999 456.11884719 76.04303436999999z"  horiz-adv-x="1024" />
45
+
46
+    
47
+    <glyph glyph-name="dingwei" unicode="&#58942;" d="M516.320553 830.086277C327.473365 829.240951 174.512778 674.914838 175.350878 486.045975c0.787526-177.21493 282.974557-496.596289 315.154731-532.417865a39.737529 39.737529 0 0 1 59.440119 0.2601c31.862273 36.110576 311.202653 357.991787 310.415127 535.213942-0.838101 188.861638-155.178664 341.822225-344.040302 340.984125z m2.196402-492.860961c-76.483906-0.339575-139.009102 61.614845-139.348677 138.105976-0.339575 76.491131 61.629295 139.001877 138.105976 139.334227 76.512806 0.3468 139.023552-61.60762 139.363127-138.091526 0.339575-76.498356-61.614845-139.001877-138.120426-139.348677z"  horiz-adv-x="1024" />
48
+
49
+    
50
+    <glyph glyph-name="shipin" unicode="&#59179;" d="M128 384c0 212.08 171.92 384 384 384s384-171.92 384-384-171.92-384-384-384c-211.98 0.24-383.76 172.02-384 384z m59.05 0c0-179.46 145.48-324.95 324.95-324.95S836.95 204.53999999999996 836.95 384 691.46 708.95 512 708.95c-179.39-0.19-324.76-145.56-324.95-324.95z m226.48-77.95v155.9c0 23.56 19.1 42.67 42.66 42.67 7.11 0 14.11-1.78 20.36-5.17l143.62-77.95c20.72-11.21 28.43-37.11 17.22-57.83a42.676 42.676 0 0 0-17.22-17.22l-143.62-77.91c-20.71-11.24-46.61-3.56-57.85 17.15a42.484 42.484 0 0 0-5.17 20.36z"  horiz-adv-x="1024" />
51
+
52
+    
53
+    <glyph glyph-name="yinpin" unicode="&#59052;" d="M182 414a30 30 0 0 0 29.79-26.49L212 384v-330.96a30 30 0 0 0-59.79-3.51L152 53.039999999999964V384a30 30 0 0 0 30 30z m219.99 330.75a30 30 0 0 0 29.82-26.49l0.18-3.51V53.700000000000045a30 30 0 0 0-59.79-3.48l-0.21 3.48V714.75a30 30 0 0 0 30 30z m220.02-254.22a30 30 0 0 0 29.79-26.49l0.21-3.51v-406.86a30 30 0 0 0-59.82-3.48l-0.18 3.48V460.53a30 30 0 0 0 30 30zM842 603.24a30 30 0 0 0 29.79-26.52l0.21-3.48v-519.57a30 30 0 0 0-59.79-3.48L812 53.66999999999996V573.24a30 30 0 0 0 30 30z"  horiz-adv-x="1024" />
54
+
55
+    
56
+    <glyph glyph-name="jiantouleft" unicode="&#59375;" d="M622.88853333 698.7114666699999c14.1632 14.16213333 37.1264 14.16213333 51.2896 0 14.02133333-14.02133333 14.16106667-36.66773333 0.42026667-50.86186667l-0.42026667-0.42666667L409.68853333 382.93333333l264.4896-264.48853333c14.02133333-14.02133333 14.16106667-36.66773333 0.42026667-50.86186667l-0.42026667-0.42666666c-14.02133333-14.0224-36.66773333-14.16213333-50.86186666-0.42133334l-0.42666667 0.42026667-290.13333333 290.13333333c-14.0224 14.02133333-14.16213333 36.66773333-0.42133334 50.86186667l0.42026667 0.42666667 290.13333333 290.13333333z"  horiz-adv-x="1024" />
57
+
58
+    
59
+    <glyph glyph-name="shoucang" unicode="&#58921;" d="M727.43475342-22.573791509999978c-11.8677063 0-25.20703125 3.40466308-37.57241821 9.58941651L513.29116821 75.33087158000001 335.62658691-12.841003419999993c-11.25137329-5.99029541-24.13092041-9.13787842-37.2642517-9.13787842a79.23669434 79.23669434 0 0 0-47.4189148 15.5253296c-24.86508179 18.65478516-37.60620117 50.96282959-31.72467041 80.38778686l36.3364563 188.50231934L116.28125 392.243042a85.74197388 85.74197388 0 0 0-21.65487671 82.94128417l0.27850342 0.9574585c10.125 30.34533691 35.243042 51.60800171 65.6987915 55.6875l193.5013733 35.18371582L440.95608521 743.40866089c13.95153808 27.92861938 42.32757568 45.87478638 72.335083 45.87478638 31.30279541 0 60.41217041-18.62182617 72.61688233-46.38153076l86.57336425-175.83618164L866.01245117 533.23004151a78.83129883 78.83129883 0 0 0 64.48754883-56.33761597 81.54876709 81.54876709 0 0 0-20.16595459-83.2230835l-0.47625733-0.4770813-138.8809204-130.78125L806.07653809 73.57168578999995c5.65246583-30.19784546-6.35778808-60.70385742-31.36212158-79.71295166a74.49472046 74.49472046 0 0 0-47.27966309-16.43252564z m-214.07684326 161.54434205l187.59182739-93.81198121c5.50909424-2.77679443 11.85864258-4.52279663 16.20346069-4.52279662 6.68737792 0 12.89685058 2.05911255 17.45755005 5.86422729l0.84869385 0.70037842c10.65975953 7.99832153 15.85739136 20.70977783 13.52471924 33.15509033l-37.74957276 203.36022949 149.31408692 140.61126709c9.16754151 9.29443359 12.30194092 22.60409546 8.23562621 34.84259033l-0.40951537 1.28704835a30.74249268 30.74249268 0 0 1-25.51931763 22.24978637l-0.85198974 0.13430786L635.3984375 518.95880127 542.41290283 707.83026123c-4.51373291 10.55099487-16.76541138 18.20819092-29.13491821 18.20819091-12.15362549 0-23.7807312-7.61022949-29.67050171-19.36010742L391.21685791 519.0420227100001l-207.69268799-37.72814942c-12.61505127-1.58203125-22.4145813-9.96020508-26.9414978-23.02597046-3.21432495-11.93939209 0.59490967-26.32516479 9.37023926-35.29412842l149.48712158-139.29867553-39.22943116-203.46652222c-2.3590393-11.76635742 3.21350098-25.30755615 13.52059937-33.04138184 5.16796875-3.88504028 11.86276245-6.02819824 18.88302612-6.02819824 5.41268921 0 10.60125732 1.26150513 15.07379151 3.66668701l0.64517212 0.37902832 189.02554321 93.76583863z"  horiz-adv-x="1024" />
60
+
61
+    
62
+    <glyph glyph-name="aixin" unicode="&#59062;" d="M665.1 681.6c9.2 0 18.7-0.7 28-2.2 72-11.3 131.7-72 141.8-144.4 7.3-52.5-9.2-104.5-45.3-142.7l-6.1-6.5-271.4-271.5-270.4 270.4-7.2 7.6c-36.1 38.2-52.7 90.2-45.3 142.6C199.3 607.3 259 668.1 331 679.4c9.4 1.5 18.8 2.2 28 2.2 40.7 0 80.3-14.7 111.4-41.3l41.7-35.7 41.7 35.7c31.1 26.7 70.6 41.3 111.3 41.3M359 745.7c-12.5 0-25.1-1-38-3-100.4-15.7-181.2-98.2-195.3-198.9-10.6-75.9 15.2-145.9 62.3-195.6l-0.2-0.2 311.7-311.7c3.5-3.5 8-5.2 12.6-5.2s9.1 1.7 12.6 5.2L836.4 348l-0.2 0.2c47 49.7 72.9 119.7 62.2 195.6-14.1 100.7-95 183.1-195.4 198.9-12.8 2-25.5 3-37.9 3-58.5 0-111.9-21.4-153-56.7-41.2 35.3-94.6 56.7-153.1 56.7z"  horiz-adv-x="1024" />
63
+
64
+    
65
+    <glyph glyph-name="jiantouup" unicode="&#59376;" d="M826.71146667 273.11146667c14.16213333-14.1632 14.16213332-37.1264 0-51.2896-14.02133333-14.02133333-36.66773333-14.16106667-50.86186667-0.42026667l-0.42666667 0.42026667L510.93333333 486.31146667l-264.48853333-264.4896c-14.02133333-14.02133333-36.66773333-14.16106667-50.86186668-0.42026667l-0.42666665 0.42026667c-14.0224 14.02133333-14.16213333 36.66773333-0.42133334 50.86186667l0.42026667 0.42666666 290.13333333 290.13333333c14.02133333 14.0224 36.66773333 14.16213333 50.86186667 0.42133334l0.42666667-0.42026667 290.13333333-290.13333333z"  horiz-adv-x="1024" />
66
+
67
+    
68
+    <glyph glyph-name="jiantouright" unicode="&#59377;" d="M401.11146667 69.28853332999995c-14.1632-14.16213333-37.1264-14.16213332-51.2896 0-14.02133333 14.02133333-14.16106667 36.66773333-0.42026667 50.86186667l0.42026667 0.42666667L614.31146667 385.06666667l-264.4896 264.48853333c-14.02133333 14.02133333-14.16106667 36.66773333-0.42026667 50.86186668l0.42026667 0.42666665c14.02133333 14.0224 36.66773333 14.16213333 50.86186667 0.42133334l0.42666666-0.42026667 290.13333333-290.13333333c14.0224-14.02133333 14.16213333-36.66773333 0.42133334-50.86186667l-0.42026667-0.42666667-290.13333333-290.13333333z"  horiz-adv-x="1024" />
69
+
70
+    
71
+    <glyph glyph-name="jiantoudown" unicode="&#59378;" d="M197.28853333 494.88853333c-14.16213333 14.1632-14.16213332 37.1264 0 51.2896 14.02133333 14.02133333 36.66773333 14.16106667 50.86186667 0.42026667l0.42666667-0.42026667L513.06666667 281.68853333000004l264.48853333 264.4896c14.02133333 14.02133333 36.66773333 14.16106667 50.86186668 0.42026667l0.42666665-0.42026667c14.0224-14.02133333 14.16213333-36.66773333 0.42133334-50.86186667l-0.42026667-0.42666666-290.13333333-290.13333333c-14.02133333-14.0224-36.66773333-14.16213333-50.86186667-0.42133334l-0.42666667 0.42026667-290.13333333 290.13333333z"  horiz-adv-x="1024" />
72
+
73
+    
74
+
75
+
76
+  </font>
77
+</defs></svg>

BIN
src/assets/css/iconfont.ttf Vedi File


BIN
src/assets/css/iconfont.woff Vedi File


BIN
src/assets/css/iconfont.woff2 Vedi File


BIN
src/assets/logo.png Vedi File


BIN
src/assets/tabbar/chat1.png Vedi File


BIN
src/assets/tabbar/chat2.png Vedi File


BIN
src/assets/tabbar/index1.png Vedi File


BIN
src/assets/tabbar/index2.png Vedi File


BIN
src/assets/tabbar/mine1.png Vedi File


BIN
src/assets/tabbar/mine2.png Vedi File


BIN
src/assets/tabbar/video1.png Vedi File


BIN
src/assets/tabbar/video2.png Vedi File


+ 18
- 0
src/components/Loading/index.jsx Vedi File

1
+import Spin from '@/components/Spin'
2
+import logo from '@/assets/logo.png'
3
+import './style.scss'
4
+
5
+export default (props) => {
6
+  const { width = '80px', logoVisible } = props
7
+  const height = width
8
+
9
+  return (
10
+    <view className="loading" style={{ width, height }}>
11
+      <Spin size={width} />
12
+      {
13
+        logoVisible !== false &&
14
+        (<image className="loading-logo" src={logo} style={{ width, height }} />)
15
+      }
16
+    </view>
17
+  )
18
+}

+ 22
- 0
src/components/Loading/style.scss Vedi File

1
+
2
+.loading {
3
+  margin: 0 auto;
4
+  position: relative;
5
+
6
+  &-logo {
7
+    position: absolute;
8
+    left: 0;
9
+    transform: scale(.75, .75);
10
+    animation: logo-opacity 2s linear infinite;
11
+  }
12
+}
13
+
14
+@keyframes logo-opacity {
15
+  0%, 100% {
16
+    opacity: 1;
17
+  }
18
+
19
+  50% {
20
+    opacity: .4;
21
+  }
22
+}

+ 43
- 0
src/components/ProjectListItem/index.jsx Vedi File

1
+import React, { useState, useEffect } from 'react'
2
+import './index.scss'
3
+
4
+export default function ProjectListItem (props) {
5
+  const { Data = {} } = props
6
+  return (
7
+    <view className='components ProjectListItem flex-h'>
8
+      <view className='Img'>
9
+        <view>
10
+          {
11
+            Data.img &&
12
+            <Image mode='aspectFill' className='centerLabel' src={Data.img || null} />
13
+          }
14
+        </view>
15
+      </view>
16
+      <view className='flex-item'>
17
+        <view className='Name flex-h'>
18
+          <view className='flex-item'>
19
+            <text>楼盘名称</text>
20
+          </view>
21
+          <text>约</text>
22
+          <text>20000m²</text>
23
+        </view>
24
+        <text className='Address'>楼盘地址sdsdsdsdsds</text>
25
+        <view className='Tags'>
26
+          <text>标签1</text>
27
+          <text>标签2</text>
28
+          <text>标签3</text>
29
+        </view>
30
+        <view className='ShareInfo'>
31
+          {/* <text className='iconfont'></text> */}
32
+          <text>3次分享</text>
33
+          <view className='Users'>
34
+            <view></view>
35
+            <view></view>
36
+            <view></view>
37
+          </view>
38
+          <text>...9人围观</text>
39
+        </view>
40
+      </view>
41
+    </view>
42
+  )
43
+}

+ 114
- 0
src/components/ProjectListItem/index.scss Vedi File

1
+.components.ProjectListItem {
2
+  padding-bottom: 30px;
3
+  border-bottom: 2px solid #eee;
4
+  > .Img {
5
+    width: 260px;
6
+    position: relative;
7
+    overflow: hidden;
8
+    margin-right: 20px;
9
+    > view {
10
+      width: 100%;
11
+      padding-bottom: 60%;
12
+      background: #eee;
13
+      position: relative;
14
+      overflow: hidden;
15
+      border-radius: 8px;
16
+      > image {
17
+        width: 100%;
18
+        height: 100%;
19
+      }
20
+    }
21
+  }
22
+  > .flex-item {
23
+    > .Name {
24
+      align-items: center;
25
+      > .flex-item {
26
+        margin-right: 10px;
27
+        > text {
28
+          display: block;
29
+          font-size: 28px;
30
+          font-weight: bold;
31
+          color: #000;
32
+          line-height: 40px;
33
+          white-space: nowrap;
34
+          overflow: hidden;
35
+          text-overflow: ellipsis;
36
+        }
37
+      }
38
+      > text {
39
+        font-size: 24px;
40
+        line-height: 40px;
41
+        color: #000;
42
+        &:last-child {
43
+          color: red;
44
+        }
45
+      }
46
+    }
47
+    > .Address {
48
+      display: block;
49
+      font-size: 24px;
50
+      color: #666;
51
+      line-height: 40px;
52
+      white-space: nowrap;
53
+      overflow: hidden;
54
+      text-overflow: ellipsis;
55
+    }
56
+    > .Tags {
57
+      font-size: 0;
58
+      white-space: nowrap;
59
+      > text {
60
+        display: inline-block;
61
+        vertical-align: middle;
62
+        font-size: 16px;
63
+        padding: 0 10px;
64
+        line-height: 36px;
65
+        background: #FBAB57;
66
+        color: #333;
67
+        margin-right: 10px;
68
+      }
69
+    }
70
+    > .ShareInfo {
71
+      font-size: 0;
72
+      white-space: nowrap;
73
+      margin-top: 10px;
74
+      > text {
75
+        display: inline-block;
76
+        vertical-align: middle;
77
+        font-size: 24px;
78
+        color: #333;
79
+        line-height: 40px;
80
+        margin-left: 10px;
81
+        &:first-child {
82
+          margin-left: 0;
83
+        }
84
+      }
85
+      > .Users {
86
+        display: inline-block;
87
+        vertical-align: middle;
88
+        font-size: 0;
89
+        white-space: nowrap;
90
+        margin-left: 30px;
91
+        > view {
92
+          display: inline-block;
93
+          vertical-align: middle;
94
+          width: 40px;
95
+          height: 40px;
96
+          background: #eee;
97
+          border-radius: 100%;
98
+          margin-left: -10px;
99
+          position: relative;
100
+          &:nth-child(1) {
101
+            z-index: 1;
102
+            margin-left: 0;
103
+          }
104
+          &:nth-child(2) {
105
+            z-index: 2;
106
+          }
107
+          &:nth-child(3) {
108
+            z-index: 3;
109
+          }
110
+        }
111
+      }
112
+    }
113
+  }
114
+}

+ 30
- 0
src/components/Spin/index.jsx Vedi File

1
+import './style.scss'
2
+
3
+export default (props) => {
4
+  const { size = '160rpx' } = props
5
+  const wrapperStyle = {
6
+    width: size,
7
+    height: size,
8
+  }
9
+
10
+  const leftBarStyle = {
11
+    'border-top-right-radius': size,
12
+    'border-bottom-right-radius': size,
13
+  }
14
+
15
+  const rightBarStyle = {
16
+    'border-top-left-radius': size,
17
+    'border-bottom-left-radius': size,
18
+  }
19
+
20
+  return (
21
+    <view className="spin" style={wrapperStyle}>
22
+      <view className="mask-left">
23
+        <view className="spin-bar" style={leftBarStyle}></view>
24
+      </view>
25
+      <view className="mask-right">
26
+        <view className="spin-bar" style={rightBarStyle}></view>
27
+      </view>
28
+    </view>
29
+  )
30
+}

+ 112
- 0
src/components/Spin/style.scss Vedi File

1
+$width: 160px;
2
+
3
+.spin {
4
+  width: $width;
5
+  height: $width;
6
+  border-radius: 100%;
7
+  display: inline-block;
8
+  position: relative;
9
+  animation: spin-rotate 4s linear infinite;
10
+  box-sizing: border-box;
11
+
12
+  view {
13
+    box-sizing: border-box;
14
+    position: absolute;
15
+  }
16
+
17
+  .mask-left, .mask-right {
18
+    background: #fff;
19
+    top: 0;
20
+    width: calc(50% + 1px);
21
+    height: 100%;
22
+    overflow: hidden;
23
+  }
24
+
25
+  .mask-left {
26
+    left: 0;
27
+
28
+    .spin-bar {
29
+      left: 100%;
30
+      border-top-right-radius: $width;
31
+      border-bottom-right-radius: $width;
32
+      border-left: 0;
33
+      // transform: rotate(180deg);
34
+      transform-origin: center left;
35
+      animation: spin-rotate-right 1.2s cubic-bezier(.25,.5,.25,1) 0.6s infinite, spin-color 2s linear infinite;
36
+    }
37
+  }
38
+
39
+  .mask-right {
40
+    right: 0;
41
+
42
+    .spin-bar {
43
+      left: -100%;
44
+      border-top-left-radius: $width;
45
+      border-bottom-left-radius: $width;
46
+      border-right: 0;
47
+      transform-origin: center right;
48
+      animation: spin-rotate-right 1.2s cubic-bezier(1,.25,.5,.25) infinite, spin-color 2s linear infinite;
49
+    }
50
+  }
51
+
52
+  .spin-bar {
53
+    float: left;
54
+    width: 100%;
55
+    height: 100%;
56
+    border-width: 4px;
57
+    border-style: solid;
58
+  }
59
+}
60
+
61
+@keyframes spin-rotate-right {
62
+  0% {
63
+    transform: rotate(0deg);
64
+  }
65
+
66
+  50% {
67
+    transform: rotate(180deg);
68
+  }
69
+
70
+  100% {
71
+    transform: rotate(360deg);
72
+  }
73
+}
74
+
75
+@keyframes spin-rotate-left {
76
+  0% {
77
+    transform: rotate(180deg);
78
+  }
79
+
80
+  50% {
81
+    transform: rotate(360deg);
82
+  }
83
+
84
+  100% {
85
+    transform: rotate(540deg);
86
+  }
87
+}
88
+
89
+@keyframes spin-rotate {
90
+  0% {
91
+    transform: rotate(0deg);
92
+  }
93
+
94
+  100% {
95
+    transform: rotate(360deg);
96
+  }
97
+}
98
+
99
+@keyframes spin-color {
100
+  0%, 100% {
101
+    border-color: #d62d20;
102
+  }
103
+  40% {
104
+    border-color: #0057e7;
105
+  }
106
+  60% {
107
+    border-color: #008744;
108
+  }
109
+  80%, 90% {
110
+    border-color: #ffa700;
111
+  }
112
+}

+ 1
- 0
src/constants/activity.js Vedi File

1
+export const ACTIVITY_SIGNIN = 'ACTIVITY_SIGNIN'

+ 237
- 0
src/constants/api.js Vedi File

1
+/**
2
+ * NOTE HOST、HOST_M 是在 config 中通过 defineConstants 配置的
3
+ * 只所以不在代码中直接引用,是因为 eslint 会报 no-undef 的错误,因此用如下方式处理
4
+ */
5
+/* eslint-disable */
6
+export const host = HOST
7
+export const wss_host = WSS_HOST
8
+
9
+/* eslint-enable */
10
+
11
+export const pathname = '/api/wx'
12
+
13
+const resolvePath = api => `${host + pathname}/${api}`
14
+
15
+// common
16
+export const API_PRELOAD = resolvePath('preload')
17
+export const API_QRCODE = resolvePath('qrcode')
18
+export const API_BANNER_LIST = resolvePath('extendContent')
19
+export const API_QUERY_CODE_SCENE = resolvePath('qrcode/scene')
20
+
21
+// user
22
+export const API_USER_LOGIN = resolvePath('login')
23
+export const API_USER_INFO = resolvePath('signup')
24
+export const API_USER_SIGNIN = resolvePath('user/signin')
25
+export const API_USER_PHONE = resolvePath('userPhone')
26
+export const API_QUERY_USER_INFO = resolvePath('user/info')
27
+export const API_QUERY_USERINFO_BYID = resolvePath('onePerson')
28
+export const API_QUERY_CUSTOMER_INFO = resolvePath('customer/myCustomer')
29
+export const API_QUERY_MYREPORT = resolvePath('customer/myReport')
30
+export const API_QUERY_DOCUMENTVERIFY = resolvePath('documentVerify')
31
+
32
+export const API_QUERY_DOCUMENTVERIFY_list = resolvePath('documentVerify/list')
33
+export const API_QUERY_TADRAINGE = resolvePath('taDrainage')
34
+
35
+
36
+// chat
37
+export const API_CHAT_HISTORY = resolvePath('chat/history')
38
+export const API_CHAT_SEND = wss_host + '/wx/chat'
39
+export const API_CHAT_FRIENDS = resolvePath('chat/with')
40
+export const API_UPLOAD_IMAGE = resolvePath('image')
41
+export const API_CHAT_READED = resolvePath('chat/message')
42
+
43
+// card
44
+export const API_CARDS_LIST = resolvePath('cards')
45
+export const API_CARDS_APPLY = resolvePath('cards/apply')
46
+export const API_FORM_ID = resolvePath('formid')
47
+export const API_UPDATE_PHOTO = resolvePath('userInfo/updatePhoto')
48
+
49
+// project
50
+export const API_INDEX_CUSTOMER = resolvePath('indexCustomer')
51
+export const API_ITEMS_LIST = resolvePath('building/list')
52
+export const API_ITEMS_DETAIL = resolvePath('buildingSelectId')
53
+export const API_ITEMS_TYPE = resolvePath('tdBuildingType')
54
+export const API_ACTIVITY_GROUP = resolvePath('helpActivityAndGroup')
55
+export const API_LOCATION_CITYP = resolvePath('location/city')
56
+export const API_TACUSTOMIMG = resolvePath('taCustomImg')
57
+export const API_INDEX_PROJECTS = resolvePath('building/main')
58
+export const API_INDEX_ICONS = resolvePath('taMiniappOrgIcon')
59
+
60
+
61
+
62
+export const API_HOUSE_LIST = resolvePath('listHousingResources')
63
+export const API_PRESELECTION_RECORD = resolvePath('listPreselectionRecord')
64
+export const API_RAISE_CHECK = resolvePath('check/raise')
65
+export const API_RAISE_PROFILE = resolvePath('taRaise')
66
+export const API_SAVE_RAISE_RECORD = resolvePath('taRaiseRecord')
67
+export const API_RATSE_RECORD = resolvePath('taRaiseRecord/list')
68
+export const API_RATSE_DETAIL = resolvePath('taRaiseRecord')
69
+export const API_RATSE_ORDER = resolvePath('unifiedOrder')
70
+export const API_CANCEL_ORDER = resolvePath('cancel')
71
+export const API_HOUSE_DETAIL = resolvePath('getHousingDetailById')
72
+export const API_ADD_PRESELECTION = resolvePath('taPreselectionRecord')
73
+export const API_CANCEL_PRESELECTION = resolvePath('taPreselectionRecordCancel')
74
+export const API_APARTMENT_TYPE = resolvePath('listBuildApartmentBySalesBatchId')
75
+export const API_SALESBATCH_LIST = resolvePath('taSalesBatch/choice')
76
+export const API_NOTICE_INFO = resolvePath('getNoticeInfo')
77
+export const API_SALES_BATCH = resolvePath('taSalesBatch')
78
+export const API_ADDLIVE_NUM = resolvePath('addVisitNum')
79
+export const API_LIVE_DEATIL = resolvePath('taLiveActivity')
80
+// /wx/location/city?location=lon,lat
81
+
82
+//sign
83
+export const API_CONTRACT_USER = resolvePath('contract/user/add')
84
+export const API_CONTRACT_GET = resolvePath('contract/user/get')
85
+export const API_CONTRACT_AUTO = resolvePath('contract/auto')
86
+export const API_CONTRACT_MANUAL = resolvePath('contract/manual')
87
+export const API_CONTRACT_CHECK = resolvePath('contract/check')
88
+
89
+// shop
90
+export const API_GOODS_LIST = resolvePath('goods')
91
+export const API_GOODS_BUILDING = resolvePath('goodsToBuilding')
92
+export const API_GOODS_EXCHANGE = resolvePath('goods/exchange')
93
+export const API_GOODS_EXCHANGE_RECORDS = resolvePath('taPointsExchange')
94
+export const API_POINTS_RECORDS = resolvePath('taPointsRecords')
95
+export const API_POINTS_RULE = resolvePath('tdPointsRules')
96
+export const API_POINTS_ADRESS = resolvePath('person/city')
97
+export const API_GOODS_BELONGS = resolvePath('goodsToBuilding')
98
+
99
+// client
100
+export const API_CLIENT_LIST = resolvePath('customer/recommend/mine')
101
+export const API_RECOMENT_CLIENT = resolvePath('customer/new')
102
+export const API_CLIENT_PROGRESS = resolvePath('customer')
103
+export const API_TYPE_DATA = resolvePath('awesome/dict/recommendcustomer')
104
+
105
+// report
106
+export const API_REPORT_LIST = resolvePath('myReport')
107
+export const API_REPORT_CLIENT = resolvePath('customer/report')
108
+export const API_RECOMMEND_GET = resolvePath('customer/recommend/get')
109
+export const API_RECOMMEND_EDIT = resolvePath('customer/recommend/edit')
110
+
111
+// common
112
+export const API_ITEMS_UV = resolvePath('project/hot')
113
+export const API_CARDS_UV = resolvePath('consultant/hot')
114
+export const API_ACTIVITY_UV = resolvePath('activity/pvNum')
115
+export const API_NEWS_UV = resolvePath('taNews/pvNum')
116
+
117
+export const API_CARDS_LIKE = resolvePath('consultant/like')
118
+export const API_ITEMS_LIKE = resolvePath('project/like')
119
+export const API_ACTIVITY_LIKE = resolvePath('activity/like')
120
+export const API_NEWS_LIKE = resolvePath('news/like')
121
+
122
+export const API_CARDS_SHARE = resolvePath('consultant/share')
123
+export const API_ITEMS_SHARE = resolvePath('project/share')
124
+export const API_ACTIVITY_SHARE = resolvePath('activity/share')
125
+export const API_HELP_SHARE = resolvePath('help/share')
126
+export const API_GROUP_SHARE = resolvePath('group/share')
127
+export const API_HFIVE_SHARE = resolvePath('h5/share')
128
+export const API_NEWS_SHARE = resolvePath('news/share')
129
+export const API_HOUSE_SHARE = resolvePath('houseApp/share')
130
+export const API_HOUSE_POSTER = resolvePath('housePost/share')
131
+export const API_LIVE_SHARE = resolvePath('liveApp/share')
132
+export const API_LIVE_POSTER = resolvePath('livePost/share')
133
+
134
+export const API_INDEX_SHARE = resolvePath('main/share')
135
+
136
+export const API_ACTIVITY_FAVOR = resolvePath('activity/save')
137
+export const API_NEWS_FAVOR = resolvePath('news/save')
138
+export const API_CARD_FAVOR = resolvePath('card/save')
139
+export const API_PROJECT_FAVOR = resolvePath('project/save')
140
+
141
+// 埋点接口
142
+export const API_BURIED_POINT = resolvePath('taPersonVisitRecord')
143
+
144
+
145
+// activity
146
+export const API_ACTIVITY_LIST = resolvePath('buildingDynamiceList')
147
+//拼团
148
+export const API_GROUP_LIST = resolvePath('taShareRecord')
149
+//助力
150
+export const API_HELP_LIST = resolvePath('helpInitiateRecord')
151
+
152
+// save activity
153
+export const API_ACTIVITY_SAVE = resolvePath('save/buildingDynamiceList')
154
+
155
+export const API_ACTIVITY_DETAIL = resolvePath('buildingDynamiceInfo')
156
+// signup
157
+export const API_ACTIVITY_SIGNUP = resolvePath('activityDynamicEnlistAdd')
158
+// signin
159
+export const API_ACTIVITY_SIGNIN = resolvePath('taCheckin/activity')
160
+
161
+// news
162
+export const API_NEWS_LIST = resolvePath('taNews')
163
+
164
+
165
+// feedback
166
+export const API_FEEDBACK_SUBMIT = resolvePath('taCustomerMessage')
167
+
168
+
169
+// getCode
170
+export const API_GET_CODE = resolvePath('captcha')
171
+
172
+// checkCode
173
+export const API_CHECK_CODE = resolvePath('check/captcha')
174
+
175
+
176
+// /wx/registerConsultantOneClick
177
+// registerConsultant
178
+export const API_PUT_REGISTER = resolvePath('registerConsultant')
179
+
180
+// registerConsultantOneClick
181
+export const API_PUT_REGISTERCONSULTANT = resolvePath('registerConsultantOneClick')
182
+
183
+// city
184
+export const API_CITY_LIST = resolvePath('tdCity')
185
+
186
+
187
+// policy
188
+export const API_POLICY_LIST = resolvePath('taPolicy')
189
+
190
+//agent
191
+
192
+export const API_AGENT_LIST = resolvePath('agent/recommend/mine')
193
+
194
+export const API_REGISTER_AGENT = resolvePath('registerAgent')
195
+
196
+// agent change
197
+export const API_AGENT_CHANNEL = resolvePath('customer/recommend/becomeChannel')
198
+
199
+export const API_AGENT_CURRENT = resolvePath('user/current')
200
+
201
+export const API_EDIT_AGENT = resolvePath('editPerson')
202
+
203
+// 活动列表-新
204
+export const API_ACTNEW_LIST = resolvePath('activity/list')
205
+
206
+// 助力
207
+export const API_HELP_DETAIL = resolvePath('helpActivity')
208
+export const API_HELP_CREATE = resolvePath('helpInitiateRecord')
209
+export const API_HELP_FRIEND = resolvePath('helpRecord')
210
+
211
+//签到
212
+export const API_CHECKIN_DETAILS = resolvePath('buildingDynamiceEnlistInfo')
213
+export const API_CHECKIN_ACTIVE = resolvePath('buildingDynamicCheckin')
214
+
215
+// 拼团
216
+export const API_GROUP_DETAIL = resolvePath('taShareActivity')
217
+export const API_GROUP_CREATE = resolvePath('taShareRecord')
218
+export const API_GROUP_JOIN = resolvePath('taShareChildRecord')
219
+
220
+//person
221
+export const API_MY_CUSTOMER = resolvePath('inventory/customer/statistics')
222
+export const API_CUSTOMER_LIST = resolvePath('inventory/customer/statistics')
223
+export const API_CUSTOMER_DETAIL = resolvePath('inventory/customer')
224
+export const API_VISIT_RECORD = resolvePath('taPersonVisitRecord')
225
+export const API_ACTIVITY_LIST_CUSTOMER = resolvePath('customer/activity/list')
226
+export const API_FOLLOW_LIST = resolvePath('taCustomerFollowUpRecord')
227
+export const API_SEX_INFO = resolvePath('genderStatistic')
228
+export const API_ECHERTS_DAILY = resolvePath('customerStatisticDaily')
229
+export const API_ECHERTS_MONTH = resolvePath('customerStatisticMonthly')
230
+export const API_BUILDING_TYPE = resolvePath('getByBuildingIdSelectBuildingProjectType')
231
+export const API_CONSULTANT_VISIT_RECORD = resolvePath('activityVisitRecord')
232
+export const API_MORE_ACTIVITY = resolvePath('visitRecord/activity')
233
+export const API_SHARE_LIST = resolvePath('shareRecords')
234
+export const API_SHARE_INFOLIST = resolvePath('sharePersonInfoList')
235
+export const API_BIND_CUSTOMER = resolvePath('judgeBindCustomer')
236
+// 消息模板
237
+export const API_TEMPLATE_TYPE = resolvePath('template/of/')

+ 5
- 0
src/constants/card.js Vedi File

1
+export const CARD_INFO = 'CARD_INFO'
2
+export const CARD_LIST = 'CARD_LIST'
3
+export const CARD_LIKE = 'CARD_LIKE'
4
+export const CARD_UNLIKE = 'CARD_UNLIKE'
5
+

+ 2
- 0
src/constants/checkin.js Vedi File

1
+export const CHECKIN_DETAILS = 'CHECKIN_DETAILS'
2
+export const CHECKIN_ACTIVE = 'CHECKIN_ACTIVE'

+ 2
- 0
src/constants/city.js Vedi File

1
+export const CITY_LIST = 'CITY_LIST'
2
+export const CITY_SELECTED = 'CITY_SELECTED'

+ 20
- 0
src/constants/common.js Vedi File

1
+// 通知消息
2
+export const TPL_NOTICE = "notice";
3
+
4
+// 助力消息
5
+export const TPL_HELP = "help-result";
6
+
7
+// 拼团消息
8
+export const TPL_GROUP = "group-result";
9
+
10
+// 预选消息
11
+export const TPL_HOUSE = "house";
12
+
13
+// 签署合同消息
14
+export const TPL_SIGN = "contract-signing";
15
+
16
+// 更新预拉取数据
17
+export const UPDATE_PRELOAD = "UPDATE_PRELOAD";
18
+
19
+// 同步系统信息
20
+export const SYNC_SYSTEMINFO = "SYNC_SYSTEMINFO";

+ 2
- 0
src/constants/counter.js Vedi File

1
+export const ADD = 'ADD'
2
+export const MINUS = 'MINUS'

+ 21
- 0
src/constants/house.js Vedi File

1
+
2
+// 加入选择-暂存
3
+export const ADD_CART = 'ADD_CART'
4
+
5
+// 取消选择-暂存
6
+export const SUB_CART = 'SUB_CART'
7
+
8
+// 所有进入-暂存
9
+export const FLUSH_TO_CART = 'FLUSH_TO_CART'
10
+
11
+// 置业顾问列表
12
+export const ADD_CONSULTANT = 'ADD_CONSULTANT'
13
+
14
+// 临时选择置业
15
+export const CHOOSE_CONSULTANT = 'CHOOSE_CONSULTANT'
16
+
17
+// 获取预选记录
18
+export const MY_PRESELECT_RECORD = 'MY_PRESELECT_RECORD'
19
+
20
+//
21
+export const SET_ONLINE_PROTOCOL = 'SET_ONLINE_PROTOCOL'

+ 1
- 0
src/constants/login.js Vedi File

1
+export const USER_LOGIN = 'USER_LOGIN'

+ 4
- 0
src/constants/news.js Vedi File

1
+export const NEWS_LIST = 'NEWS_LIST'
2
+export const NEWS_DETAIL = 'NEWS_DETAIL'
3
+
4
+

+ 5
- 0
src/constants/project.js Vedi File

1
+export const PROJECT_LIST = 'PROJECT_LIST'
2
+export const PROJECT_DETAIL = 'PROJECT_DETAIL'
3
+export const PROJECT_SCREEN = 'PROJECT_SCREEN'
4
+export const SET_SCREEN_SHOWED = 'SET_SCREEN_SHOWED'
5
+export const LOCATION_CITY = 'LOCATION_CITY'

+ 7
- 0
src/constants/shop.js Vedi File

1
+export const GOODS_LIST = 'GOODS_LIST'
2
+export const GOODS_DETAIL = 'GOODS_DETAIL'
3
+export const GOODS_EXCHANGE = 'GOODS_EXCHANGE'
4
+export const GOODS_EXCHANGE_RECORDS = 'GOODS_EXCHANGE_RECORDS'
5
+export const POINTS_RECORDS = 'POINTS_RECORDS'
6
+export const POINTS_RULE = 'POINTS_RULE'
7
+export const POINTS_ADRESS = 'POINTS_ADRESS'

+ 18
- 0
src/constants/user.js Vedi File

1
+export const USER_INFO = 'USER_INFO'
2
+// export const USER_QUERY_INFO = 'USER_QUERY_INFO'
3
+export const USER_SIGNIN = 'USER_SIGNIN'
4
+export const USER_GOODS = 'USER_GOODS'
5
+export const ASSIGN_UNREADNUM = 'ASSIGN_UNREADNUM'
6
+export const INCREASE_UNREADNUM = 'INCREASE_UNREADNUM'
7
+export const DECREASE_UNREADNUM = 'DECREASE_UNREADNUM'
8
+export const API_QUERY_CUSTOMER_INFO = 'API_QUERY_CUSTOMER_INFO'
9
+export const API_QUERY_MYREPORT = 'API_QUERY_MYREPORT'
10
+export const UPDATE_USER_INFO = 'UPDATE_USER_INFO'
11
+
12
+export const ROLE_CODE = {
13
+  CONSULTANT: 'Realty Consultant', // 置业顾问
14
+  ESTATE_AGENT: 'estate agent', // 独立经纪人
15
+  CHANNEL_AGENT: 'channel agent', // 渠道经纪人
16
+  DRIFT: 'drift', // 游客
17
+  CUSTOMER: 'customer' // 客户
18
+}

+ 19
- 0
src/index.html Vedi File

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>

+ 25
- 0
src/layout/Basic/index.jsx Vedi File

1
+import React from 'react'
2
+import { connect } from 'react-redux'
3
+import { View } from '@tarojs/components'
4
+import Loading from '@/components/Loading'
5
+
6
+import './style.scss'
7
+
8
+const BasicLayout = (props) => {
9
+  const {person, children, onProps, ...leftProps} = props
10
+  const loading = !person || !person.personId
11
+
12
+  if (onProps) {
13
+    onProps({person, ...leftProps})
14
+  }
15
+
16
+  return null
17
+  // return loading ?
18
+  // (
19
+  //   <View className="page-loading-wrapper">
20
+  //     <Loading />
21
+  //   </View>
22
+  // ) : children || null
23
+}
24
+
25
+export default connect(({ user }) => ({...user.userInfo || {}}))(BasicLayout)

+ 5
- 0
src/layout/Basic/style.scss Vedi File

1
+
2
+.page-loading-wrapper {
3
+  margin-top: 30vw;
4
+  
5
+}

+ 25
- 0
src/layout/index.js Vedi File

1
+import React, { useState, useEffect } from 'react'
2
+import { useRouter } from '@tarojs/taro'
3
+import BasicLayout from './Basic'
4
+
5
+export default (Child) => (props) => {
6
+  const [ready, setReady] = useState(false)
7
+  // ext 里面包含的人员等基本信息
8
+  const [info, setInfo] = useState({})
9
+  // 路由信息
10
+  const router = useRouter()
11
+
12
+  useEffect(() => {
13
+    // const initedPerson = !!info?.person?.personId
14
+    // const initedRouter = !!router?.path
15
+    // setReady(initedPerson && initedRouter)
16
+    setReady(true)
17
+  })
18
+
19
+  return (
20
+    <>
21
+      <BasicLayout onProps={setInfo} />    
22
+      {ready && <Child {...info} {...props} router={router} />}
23
+    </>
24
+  )
25
+}

+ 3
- 0
src/pages/chat/index.config.js Vedi File

1
+export default {
2
+  navigationBarTitleText: '聊天'
3
+}

+ 36
- 0
src/pages/chat/index.jsx Vedi File

1
+import React, { useState, useEffect } from 'react'
2
+import withLayout from '@/layout'
3
+import './index.scss'
4
+import { ScrollView } from '@tarojs/components'
5
+
6
+export default withLayout((props) => {
7
+
8
+  // const [PageProps] = useState(props)
9
+  const [IsPull, setPull] = useState(false)
10
+  const [PullTimer, setPullTimer] = useState(null)
11
+
12
+  const PageRefresh = () => { // 页面下拉刷新回调
13
+    setPull(true)
14
+  }
15
+
16
+  useEffect(() => { // 下拉刷新触发
17
+    if (IsPull) {
18
+      clearTimeout(PullTimer)
19
+      setPullTimer(setTimeout(() => {
20
+        setPull(false)
21
+      }, 2000))
22
+    }
23
+  }, [IsPull])
24
+
25
+  return (
26
+    <view className='Page Chat'>
27
+
28
+      <ScrollView scroll-y={true} refresher-enabled={true} refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} refresher-background='#fff'>
29
+        <view className='PageContent'>
30
+          聊天
31
+        </view>
32
+      </ScrollView>
33
+
34
+    </view>
35
+  )
36
+})

+ 12
- 0
src/pages/chat/index.scss Vedi File

1
+.Page.Chat {
2
+  background: #fff;
3
+  > scroll-view {
4
+    width: 100%;
5
+    height: 100%;
6
+    .PageContent {
7
+      position: relative;
8
+      overflow: hidden;
9
+      min-height: 100vh;
10
+    }
11
+  }
12
+}

+ 25
- 0
src/pages/index/components/Banner/index.jsx Vedi File

1
+import React, { useState, useEffect } from 'react'
2
+import './index.scss'
3
+import { Swiper, SwiperItem, Image } from '@tarojs/components'
4
+
5
+export default function Banner (props) {
6
+  const { List = [] } = props
7
+  return (
8
+    <view className='components Banner'>
9
+      <Swiper autoplay={true} interval={2000} indicator-dots={true}>
10
+        {
11
+          List.map((item, index) => (
12
+            <SwiperItem key={`Banner-${index}`}>
13
+              <view className="swiper-item">
14
+                {
15
+                  item.img &&
16
+                  <Image mode='aspectFill' className='centerLabel' src={item.img || null} />
17
+                }
18
+              </view>
19
+            </SwiperItem>
20
+          ))
21
+        }
22
+      </Swiper>
23
+    </view>
24
+  )
25
+}

+ 18
- 0
src/pages/index/components/Banner/index.scss Vedi File

1
+.components.Banner {
2
+  width: 100%;
3
+  height: 100%;
4
+  border-radius: 10px;
5
+  background: #eee;
6
+  position: relative;
7
+  overflow: hidden;
8
+  > swiper {
9
+    width: 100%;
10
+    height: 100%;
11
+    .swiper-item {
12
+      > image {
13
+        width: 100%;
14
+        height: 100%;
15
+      }
16
+    }
17
+  }
18
+}

+ 23
- 0
src/pages/index/components/ColumnTitle/index.jsx Vedi File

1
+import React, { useState, useEffect } from 'react'
2
+import './index.scss'
3
+
4
+export default function ColumnTitle (props) {
5
+  const { Icon = '', Name = '', ShowMore = false, ToMore = () => { }, children } = props
6
+  return (
7
+    <view className='components ColumnTitle flex-h'>
8
+      <text className={`iconfont ${Icon}`}></text>
9
+      <text className='Name'>{Name}</text>
10
+      {
11
+        children
12
+      }
13
+      <view className='flex-item'></view>
14
+      {
15
+        ShowMore &&
16
+        <view className='More' onClick={ToMore}>
17
+          <text>更多</text>
18
+          <text className='iconfont icon-jiantouright'></text>
19
+        </view>
20
+      }
21
+    </view>
22
+  )
23
+}

+ 26
- 0
src/pages/index/components/ColumnTitle/index.scss Vedi File

1
+.components.ColumnTitle {
2
+  align-items: center;
3
+  padding: 0 30px;
4
+  margin-top: 40px;
5
+  > text {
6
+    font-size: 32px;
7
+    font-weight: bold;
8
+    color: #000;
9
+    line-height: 40px;
10
+    &.iconfont {
11
+      font-size: 40px;
12
+      font-weight: normal;
13
+      margin-right: 20px;
14
+    }
15
+  }
16
+  > .More {
17
+    white-space: nowrap;
18
+    font-size: 0;
19
+    > text {
20
+      display: inline-block;
21
+      vertical-align: middle;
22
+      font-size: 24px;
23
+      line-height: 40px;
24
+    }
25
+  }
26
+}

+ 36
- 0
src/pages/index/components/HotRecommend/index.jsx Vedi File

1
+import React, { useState, useEffect } from 'react'
2
+import './index.scss'
3
+import '../../../../assets/css/iconfont.css'
4
+
5
+export default function HotRecommend (props) {
6
+  const [MenuList] = useState([{ name: '热门活动', id: 1 }, { name: '热门团房', id: 2 }])
7
+  const [CurrentId, setCurrentId] = useState(1)
8
+  const [CurrentContentInfo, setCurrentContentInfo] = useState({ name: '#大运河孔雀城时代', desc: '5月30日六一儿童节表演赛案场展开!' })
9
+
10
+  const CutMenu = (id) => {
11
+    return () => {
12
+      setCurrentId(id)
13
+    }
14
+  }
15
+
16
+  return (
17
+    <view className='components HotRecommend'>
18
+      <view>
19
+        <view className='Menu flex-h'>
20
+          {
21
+            MenuList.map((item, index) => (
22
+              <view onClick={CutMenu(item.id)} className={CurrentId === item.id ? 'active flex-item' : 'flex-item'} key={`Menu-${index}`}>{item.name}</view>
23
+            ))
24
+          }
25
+        </view>
26
+        <view className='Content'>
27
+          <view className='flex-h'>
28
+            <text className='flex-item'>{CurrentContentInfo.name}</text>
29
+            <text>{CurrentId === 1 ? '更多活动' : '更多团房'}</text>
30
+          </view>
31
+          <text>{CurrentContentInfo.desc}</text>
32
+        </view>
33
+      </view>
34
+    </view>
35
+  )
36
+}

+ 60
- 0
src/pages/index/components/HotRecommend/index.scss Vedi File

1
+.components.HotRecommend {
2
+  position: relative;
3
+  overflow: visible;
4
+  padding: 0 30px;
5
+  margin-top: 40px;
6
+  > view {
7
+    position: relative;
8
+    overflow: hidden;
9
+    box-shadow: 0px 10px 32px 0px rgba(5, 83, 156, 0.04);
10
+    > .Menu {
11
+      position: relative;
12
+      overflow: hidden;
13
+      align-items: center;
14
+      background: rgba(0, 0, 0, 0.08);
15
+      > view {
16
+        font-size: 30px;
17
+        line-height: 70px;
18
+        text-align: center;
19
+        font-weight: bold;
20
+        &.active {
21
+          color: #193c83;
22
+          background: rgba(0, 0, 0, 0.08);
23
+        }
24
+      }
25
+    }
26
+    > .Content {
27
+      box-sizing: border-box;
28
+      border: 2px solid #eee;
29
+      padding: 20px;
30
+      > .flex-h {
31
+        align-items: center;
32
+        > .flex-item {
33
+          font-size: 32px;
34
+          color: #193c83;
35
+          font-weight: bold;
36
+          white-space: nowrap;
37
+          overflow: hidden;
38
+          text-overflow: ellipsis;
39
+          margin-right: 20px;
40
+          & + text {
41
+            font-size: 30px;
42
+            color: #193c83;
43
+            line-height: 60px;
44
+            box-sizing: border-box;
45
+            border: 2px solid #193c83;
46
+            border-radius: 30px;
47
+            width: 144px;
48
+            text-align: center;
49
+          }
50
+        }
51
+      }
52
+      >text {
53
+        font-size: 28px;
54
+        line-height: 40px;
55
+        display: block;
56
+        padding-bottom: 10px;
57
+      }
58
+    }
59
+  }
60
+}

+ 41
- 0
src/pages/index/components/LiveSale/index.jsx Vedi File

1
+import React, { useState, useEffect } from 'react'
2
+import './index.scss'
3
+import '../../../../assets/css/iconfont.css'
4
+import { ScrollView, Image } from '@tarojs/components'
5
+
6
+export default function LiveSale (props) {
7
+  const [MenuList] = useState([{ name: '全部', id: 1 }, { name: '预告', id: 2 }, { name: '直播中', id: 3 }, { name: '新房推荐', id: 4 }])
8
+  const [CurrentId, setCurrentId] = useState(1)
9
+  const [PageList, setPageList] = useState(['', '', '', '', '', '', '', ''])
10
+
11
+  const CutMenu = (id) => {
12
+    return () => {
13
+      setCurrentId(id)
14
+    }
15
+  }
16
+
17
+  return (
18
+    <view className='components LiveSale'>
19
+      <view>
20
+        <view className='Menu'>
21
+          {
22
+            MenuList.map((item, index) => (
23
+              <view onClick={CutMenu(item.id)} className={CurrentId === item.id ? 'active' : ''} key={`Menu-${index}`}>{item.name}</view>
24
+            ))
25
+          }
26
+        </view>
27
+        <view className='Content'>
28
+          <ScrollView scroll-x={true}>
29
+            {
30
+              PageList.map((item, index) => (
31
+                <view className='ListItem' key={`List-${index}`}>
32
+                  <Image mode='aspectFill' className='centerLabel' src={null} />
33
+                </view>
34
+              ))
35
+            }
36
+          </ScrollView>
37
+        </view>
38
+      </view>
39
+    </view>
40
+  )
41
+}

+ 56
- 0
src/pages/index/components/LiveSale/index.scss Vedi File

1
+.components.LiveSale {
2
+  position: relative;
3
+  overflow: visible;
4
+  padding: 0 30px;
5
+  margin-top: 40px;
6
+  > view {
7
+    position: relative;
8
+    overflow: hidden;
9
+    > .Menu {
10
+      position: relative;
11
+      overflow: hidden;
12
+      font-size: 0;
13
+      white-space: nowrap;
14
+      > view {
15
+        display: inline-block;
16
+        vertical-align: middle;
17
+        font-size: 30px;
18
+        font-weight: bold;
19
+        line-height: 70px;
20
+        padding: 0 23px;
21
+        background: rgba(0, 0, 0, 0.08);
22
+        border-radius: 8px;
23
+        margin-right: 30px;
24
+        &.active {
25
+          color: #193c83;
26
+        }
27
+      }
28
+    }
29
+    > .Content {
30
+      position: relative;
31
+      overflow: hidden;
32
+      margin-top: 20px;
33
+      > scroll-view {
34
+        font-size: 0;
35
+        white-space: nowrap;
36
+        width: 100%;
37
+        height: 201px;
38
+        .ListItem {
39
+          display: inline-block;
40
+          vertical-align: middle;
41
+          width: 335px;
42
+          height: 100%;
43
+          border-radius: 8px;
44
+          background: #eee;
45
+          position: relative;
46
+          overflow: hidden;
47
+          margin-right: 20px;
48
+          > image {
49
+            width: 100%;
50
+            height: 100%;
51
+          }
52
+        }
53
+      }
54
+    }
55
+  }
56
+}

+ 17
- 0
src/pages/index/components/Location/index.jsx Vedi File

1
+import React, { useState, useEffect } from 'react'
2
+import './index.scss'
3
+import '../../../../assets/css/iconfont.css'
4
+
5
+export default function Location (props) {
6
+  return (
7
+    <view className='components Location flex-h'>
8
+      <text className='iconfont icon-dingwei'></text>
9
+      <text>南京市</text>
10
+      <text className='iconfont icon-jiantoudown'></text>
11
+      <view className='flex-item'>
12
+        <text className='iconfont icon-sousuo'></text>
13
+        <text>输入你想查询的楼盘</text>
14
+      </view>
15
+    </view>
16
+  )
17
+}

+ 49
- 0
src/pages/index/components/Location/index.scss Vedi File

1
+.components.Location {
2
+  width: 100%;
3
+  position: relative;
4
+  overflow: hidden;
5
+  min-height: 10px;
6
+  box-shadow: 0px 8px 10px 0px rgba(0, 0, 0, 0.08);
7
+  align-items: center;
8
+  >text {
9
+    font-size: 20px;
10
+    line-height: 44px;
11
+    margin-left: 10px;
12
+    &:first-child {
13
+      margin-left: 20px;
14
+    }
15
+    &.iconfont {
16
+      font-size: 26px;
17
+    }
18
+  }
19
+  >view {
20
+    text-align: center;
21
+    font-size: 0;
22
+    white-space: nowrap;
23
+    position: relative;
24
+    overflow: hidden;
25
+    margin-left: 20px;
26
+    &::before {
27
+      content: '';
28
+      display: block;
29
+      position: absolute;
30
+      left: 0;
31
+      top: 50%;
32
+      transform: translateY(-50%);
33
+      -webkit-transform: translateY(-50%);
34
+      width: 2px;
35
+      height: 18px;
36
+      background: #999;
37
+    }
38
+    >text {
39
+      display: inline-block;
40
+      vertical-align: middle;
41
+      font-size: 20px;
42
+      color: #999;
43
+      &.iconfont {
44
+        font-size: 26px;
45
+        margin-right: 8px;
46
+      }
47
+    }
48
+  }
49
+}

+ 47
- 0
src/pages/index/components/Menu/index.jsx Vedi File

1
+import React, { useState, useEffect } from 'react'
2
+import './index.scss'
3
+import { Swiper, SwiperItem, Image } from '@tarojs/components'
4
+
5
+export default function Menu (props) {
6
+  const { List = [] } = props
7
+  let Arr = []
8
+  List.map((item) => {
9
+    if (Arr.length) {
10
+      if (Arr[Arr.length - 1].length < 10) {
11
+        Arr[Arr.length - 1].push({ ...item })
12
+      } else {
13
+        Arr.push([{ ...item }])
14
+      }
15
+    } else {
16
+      Arr.push([{ ...item }])
17
+    }
18
+  })
19
+  const [MenuList, setMenuList] = useState(Arr)
20
+
21
+  return (
22
+    <view className='components Menu'>
23
+      <view>
24
+        <view>
25
+          <Swiper autoplay={false} indicator-dots={true}>
26
+            {
27
+              MenuList.map((item, index) => (
28
+                <SwiperItem key={`Banner-${index}`}>
29
+                  <view className="swiper-item">
30
+                    {
31
+                      item.map((subItem, subIndex) => (
32
+                        <view key={`BannerItem-${subIndex}`}>
33
+                          <Image mode='heightFix' src={subItem.icon || null} />
34
+                          <text>{subItem.name}</text>
35
+                        </view>
36
+                      ))
37
+                    }
38
+                  </view>
39
+                </SwiperItem>
40
+              ))
41
+            }
42
+          </Swiper>
43
+        </view>
44
+      </view>
45
+    </view>
46
+  )
47
+}

+ 48
- 0
src/pages/index/components/Menu/index.scss Vedi File

1
+.components.Menu {
2
+  position: relative;
3
+  overflow: hidden;
4
+  > view {
5
+    width: 100%;
6
+    padding-bottom: 50%;
7
+    position: relative;
8
+    overflow: hidden;
9
+    > view {
10
+      position: absolute;
11
+      width: 100%;
12
+      left: 0;
13
+      top: 0;
14
+      bottom: 0;
15
+      overflow: hidden;
16
+      > swiper {
17
+        width: 100%;
18
+        height: 100%;
19
+        .swiper-item {
20
+          position: relative;
21
+          overflow: hidden;
22
+          font-size: 0;
23
+          > view {
24
+            display: inline-block;
25
+            vertical-align: middle;
26
+            position: relative;
27
+            overflow: hidden;
28
+            width: 20%;
29
+            margin-top: 20px;
30
+            > image {
31
+              width: 88px;
32
+              height: 88px;
33
+              display: block;
34
+              margin: 0 auto;
35
+            }
36
+            > text {
37
+              display: block;
38
+              text-align: center;
39
+              font-size: 24px;
40
+              line-height: 40px;
41
+              // margin-top: 10px;
42
+            }
43
+          }
44
+        }
45
+      }
46
+    }
47
+  }
48
+}

+ 3
- 0
src/pages/index/index.config.js Vedi File

1
+export default {
2
+  navigationBarTitleText: '新联康'
3
+}

+ 110
- 0
src/pages/index/index.jsx Vedi File

1
+import React, { useState, useEffect } from 'react'
2
+import withLayout from '@/layout'
3
+import './index.scss'
4
+import Location from './components/Location/index'
5
+import Banner from './components/Banner/index'
6
+import Menu from './components/Menu/index'
7
+import HotRecommend from './components/HotRecommend/index'
8
+import LiveSale from './components/LiveSale/index'
9
+import ColumnTitle from './components/ColumnTitle/index'
10
+import ProjectListItem from '../../components/ProjectListItem/index'
11
+import { ScrollView } from '@tarojs/components'
12
+
13
+export default withLayout((props) => {
14
+
15
+  // const [PageProps] = useState(props)
16
+  const [BannerList, setBannerList] = useState(['', '', ''])
17
+  const [MenuList, setMenuList] = useState([
18
+    { name: '全部楼盘', id: 1, icon: '', router: '' },
19
+    { name: '品牌地产', id: 2, icon: '', router: '' },
20
+    { name: '近期开盘', id: 3, icon: '', router: '' },
21
+    { name: '帮我找房', id: 4, icon: '', router: '' },
22
+    { name: '增值服务', id: 5, icon: '', router: '' },
23
+    { name: '地图找房', id: 6, icon: '', router: '' },
24
+    { name: '活动信息', id: 7, icon: '', router: '' },
25
+    { name: '团房信息', id: 8, icon: '', router: '' },
26
+    { name: '特价房', id: 9, icon: '', router: '' },
27
+    { name: '康养', id: 10, icon: '', router: '' },
28
+    { name: '文旅商办', id: 11, icon: '', router: '' },
29
+    { name: '新闻资讯', id: 12, icon: '', router: '' },
30
+    { name: '购房百科', id: 13, icon: '', router: '' },
31
+    { name: '房贷计算', id: 14, icon: '', router: '' }
32
+  ])
33
+  const [SubBannerList, setSubBannerList] = useState(['', '', ''])
34
+  const [ProjectList, setProjectList] = useState(['', '', ''])
35
+  const [IsPull, setPull] = useState(false)
36
+  const [PullTimer, setPullTimer] = useState(null)
37
+
38
+  const PageRefresh = () => { // 页面下拉刷新回调
39
+    setPull(true)
40
+  }
41
+
42
+  useEffect(() => { // 下拉刷新触发
43
+    if (IsPull) {
44
+      clearTimeout(PullTimer)
45
+      setPullTimer(setTimeout(() => {
46
+        setPull(false)
47
+      }, 2000))
48
+    }
49
+  }, [IsPull])
50
+
51
+  return (
52
+    <view className='Page Index'>
53
+
54
+      <ScrollView scroll-y={true} refresher-enabled={true} refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} refresher-background='#fff'>
55
+        <view className='PageContent'>
56
+
57
+          {/* 定位 */}
58
+          <view className="Location">
59
+            <Location></Location>
60
+          </view>
61
+
62
+          {/* banner */}
63
+          <view className='Banner'>
64
+            <view>
65
+              <view>
66
+                <Banner List={BannerList}></Banner>
67
+              </view>
68
+            </view>
69
+          </view>
70
+
71
+          {/* 菜单 */}
72
+          <view className='Menu'>
73
+            <Menu List={MenuList}></Menu>
74
+          </view>
75
+
76
+          {/* 热门推荐 */}
77
+          <view className='HotRecommend'>
78
+            <ColumnTitle Name='热门推荐' Icon="icon-shoucang"></ColumnTitle>
79
+            <HotRecommend></HotRecommend>
80
+          </view>
81
+
82
+          {/* 直播购房 */}
83
+          <view className='LiveSale'>
84
+            <ColumnTitle Name='直播购房' Icon="icon-yinpin" ShowMore={true}></ColumnTitle>
85
+            <LiveSale></LiveSale>
86
+          </view>
87
+
88
+          {/* 全部项目 */}
89
+          <view className='AllProject'>
90
+            <ColumnTitle Name='全部项目' Icon="icon-aixin" ShowMore={true}></ColumnTitle>
91
+            <view className='ProjectList'>
92
+              {
93
+                ProjectList.map((item, index) => (
94
+                  <ProjectListItem Data={item} key={`ProjectListItem-${index}`}></ProjectListItem>
95
+                ))
96
+              }
97
+            </view>
98
+          </view>
99
+
100
+          {/* bottom */}
101
+          <view className='PageBottom'>
102
+            <text>已经到底了~</text>
103
+          </view>
104
+
105
+        </view>
106
+      </ScrollView>
107
+
108
+    </view>
109
+  )
110
+})

+ 76
- 0
src/pages/index/index.scss Vedi File

1
+.Page.Index {
2
+  background: #fff;
3
+  > scroll-view {
4
+    width: 100%;
5
+    height: 100%;
6
+    .PageContent {
7
+      position: relative;
8
+      overflow: hidden;
9
+      min-height: 100vh;
10
+      >.Location {
11
+        padding: 0 50px;
12
+        position: relative;
13
+        overflow: visible;
14
+        margin-top: 24px;
15
+      }
16
+      > .Banner {
17
+        padding: 0 30px;
18
+        position: relative;
19
+        overflow: hidden;
20
+        margin-top: 20px;
21
+        > view {
22
+          position: relative;
23
+          overflow: hidden;
24
+          width: 100%;
25
+          padding-bottom: 50%;
26
+          > view {
27
+            width: 100%;
28
+            position: absolute;
29
+            left: 0;
30
+            top: 0;
31
+            bottom: 0;
32
+            overflow: hidden;
33
+          }
34
+        }
35
+      }
36
+      > .Menu {
37
+        padding: 0 30px;
38
+        position: relative;
39
+        overflow: hidden;
40
+      }
41
+      > .AllProject {
42
+        .ToMap {
43
+          margin-left: 20px;
44
+          font-size: 0;
45
+          white-space: nowrap;
46
+          > text {
47
+            font-size: 24px;
48
+            line-height: 40px;
49
+            display: inline-block;
50
+            vertical-align: middle;
51
+          }
52
+        }
53
+        > .ProjectList {
54
+          padding: 0 30px;
55
+          position: relative;
56
+          overflow: hidden;
57
+          > view {
58
+            margin-top: 30px;
59
+          }
60
+        }
61
+      }
62
+      > .PageBottom {
63
+        text-align: center;
64
+        font-size: 0;
65
+        white-space: nowrap;
66
+        > text {
67
+          display: inline-block;
68
+          font-size: 28px;
69
+          color: #666;
70
+          line-height: 40px;
71
+          margin: 20px auto;
72
+        }
73
+      }
74
+    }
75
+  }
76
+}

+ 30
- 0
src/pages/mine/components/NeedLogin/index.jsx Vedi File

1
+import React, { useState, useEffect } from 'react'
2
+import './index.scss'
3
+import { Image } from '@tarojs/components'
4
+import '../../../../assets/css/iconfont.css'
5
+
6
+export default function Banner (props) {
7
+  return (
8
+    <view className='components NeedLogin flex-v'>
9
+      <view className='Logo'>
10
+        <Image mode='aspectFill' className='centerLabel' src={null} />
11
+      </view>
12
+      <view className='LoginBtn'>
13
+        <text>微信登录</text>
14
+      </view>
15
+      <view className='flex-item'></view>
16
+      <view className='Bottom'>
17
+        <view>
18
+          <view>
19
+            <text className='iconfont icon-shengming'></text>
20
+            <text>免责声明</text>
21
+          </view>
22
+          <view>
23
+            <text>以上价格仅供参考,具体一房一价的信息以售楼处展示为准。房屋位置交通、医疗、教育、商业等配套信息,来源于第三方不作为要约,仅供参考,双方具体权利义务应以法律规定及买卖合同约定为准。本平台对项目周边文化教育的介绍旨在提供相关信息1 意味着信息发布方对就学安排作出承诺。相关教育资首页信息存在调整的可能,应以政府教育主管部门门及办学颁布的政策规定为准。详情请仔细阅读</text>
24
+            <text className='active'>《新联家使用免责条款》</text>
25
+          </view>
26
+        </view>
27
+      </view>
28
+    </view>
29
+  )
30
+}

+ 56
- 0
src/pages/mine/components/NeedLogin/index.scss Vedi File

1
+.components.NeedLogin {
2
+  width: 100%;
3
+  min-height: 100vh;
4
+  position: relative;
5
+  overflow: hidden;
6
+  >.Logo {
7
+    width: 128px;
8
+    height: 128px;
9
+    position: relative;
10
+    overflow: hidden;
11
+    background: #eee;
12
+    margin: 109px auto 0;
13
+    >image {
14
+      width: 100%;
15
+      height: 100%;
16
+    }
17
+  }
18
+  >.LoginBtn {
19
+    padding: 0 42px;
20
+    position: relative;
21
+    overflow: hidden;
22
+    margin-top: 195px;
23
+    >text {
24
+      display: block;
25
+      text-align: center;
26
+      font-size: 32px;
27
+      font-weight: bold;
28
+      color: #fff;
29
+      line-height: 92px;
30
+      border-radius: 92px;
31
+      background: #193C83;
32
+      letter-spacing: 6px;
33
+    }
34
+  }
35
+  >.Bottom {
36
+    padding: 0 30px 40px;
37
+    position: relative;
38
+    overflow: hidden;
39
+    >view {
40
+      padding: 30px;
41
+      position: relative;
42
+      overflow: hidden;
43
+      background: #F8F8F8;
44
+      >view {
45
+        >text {
46
+          font-size: 20px;
47
+          color: #999;
48
+          line-height: 30px;
49
+          &.active {
50
+            color: #193C83;
51
+          }
52
+        }
53
+      }
54
+    }
55
+  }
56
+}

+ 3
- 0
src/pages/mine/index.config.js Vedi File

1
+export default {
2
+  navigationBarTitleText: '我是'
3
+}

+ 115
- 0
src/pages/mine/index.jsx Vedi File

1
+import React, { useState, useEffect } from 'react'
2
+import withLayout from '@/layout'
3
+import './index.scss'
4
+import NeedLogin from './components/NeedLogin'
5
+import { ScrollView, Image } from '@tarojs/components'
6
+import '../../assets/css/iconfont.css'
7
+
8
+export default withLayout((props) => {
9
+
10
+  // const [PageProps] = useState(props)
11
+  const [MenuList, setMenuList] = useState([
12
+    [
13
+      { name: '添加客户', icon: '', router: '' },
14
+      { name: '我的主页', icon: '', router: '' },
15
+      { name: '我的推广码', icon: '', router: '' },
16
+      { name: '客户分析', icon: '', router: '' },
17
+      { name: '盘客工具', icon: '', router: '' }
18
+    ],
19
+    [
20
+      { name: '我的分享', icon: '', router: '' },
21
+      { name: '我的活动', icon: '', router: '' },
22
+      { name: '我的课堂', icon: '', router: '' },
23
+      { name: '我的收藏', icon: '', router: '' }
24
+    ],
25
+    [
26
+      { name: '房贷计算器', icon: '', router: '' },
27
+      { name: '购房百科', icon: '', router: '' },
28
+      { name: '意见反馈', icon: '', router: '' }
29
+    ]
30
+  ])
31
+  const [IsPull, setPull] = useState(false)
32
+  const [ShowLogin, setShowLogin] = useState(false)
33
+  const [PullTimer, setPullTimer] = useState(null)
34
+
35
+  const PageRefresh = () => { // 页面下拉刷新回调
36
+    setPull(true)
37
+  }
38
+
39
+  useEffect(() => { // 下拉刷新触发
40
+    if (IsPull) {
41
+      clearTimeout(PullTimer)
42
+      setPullTimer(setTimeout(() => {
43
+        setPull(false)
44
+      }, 2000))
45
+    }
46
+  }, [IsPull])
47
+
48
+  return (
49
+    <view className='Page Mine'>
50
+
51
+      <ScrollView scroll-y={true} refresher-enabled={true} refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} refresher-background='#fff'>
52
+        <view className='PageContent'>
53
+
54
+          {/* 需要登录 */}
55
+          {
56
+            ShowLogin &&
57
+            <NeedLogin></NeedLogin>
58
+          }
59
+
60
+          {/* 登录后 */}
61
+          {
62
+            !ShowLogin &&
63
+            <view className='Content'>
64
+
65
+              {/* 用户信息 */}
66
+              <view className='UserInfo'>
67
+                <view className='UserIcon'>
68
+                  <Image mode='aspectFill' className='centerLabel' src={null} />
69
+                </view>
70
+                <view className='OtherInfo'>
71
+                  <view className='Name'>
72
+                    <view>
73
+                      <text>用户姓名</text>
74
+                      <view>
75
+                        <text className='iconfont icon-bianji'></text>
76
+                        <text>个人信息资料修改</text>
77
+                      </view>
78
+                    </view>
79
+                    <text className='Role'>置业顾问</text>
80
+                    <text className='New'>NEW</text>
81
+                    <text className='iconfont icon-diqiu'></text>
82
+                  </view>
83
+                </view>
84
+              </view>
85
+
86
+              {/* 用户菜单 */}
87
+              <view className='MenuList'>
88
+                {
89
+                  MenuList.map((item, index) => (
90
+                    <view>
91
+                      {
92
+                        item.map((subItem, subIndex) => (
93
+                          <view key={`MenuItem-${index}-${subIndex}`} className='flex-h'>
94
+                            <text className={`iconfont ${subItem.icon}`}></text>
95
+                            <view className='flex-item flex-h'>
96
+                              <text className='flex-item'>{subItem.name}</text>
97
+                              <text className='iconfont icon-jiantouright'></text>
98
+                            </view>
99
+                          </view>
100
+                        ))
101
+                      }
102
+                    </view>
103
+                  ))
104
+                }
105
+              </view>
106
+
107
+            </view>
108
+          }
109
+
110
+        </view>
111
+      </ScrollView>
112
+
113
+    </view>
114
+  )
115
+})

+ 156
- 0
src/pages/mine/index.scss Vedi File

1
+.Page.Mine {
2
+  background: #fff;
3
+  > scroll-view {
4
+    width: 100%;
5
+    height: 100%;
6
+    .PageContent {
7
+      position: relative;
8
+      overflow: hidden;
9
+      min-height: 100vh;
10
+      > .Content {
11
+        position: relative;
12
+        overflow: hidden;
13
+        > .UserInfo {
14
+          position: relative;
15
+          overflow: hidden;
16
+          padding: 0 30px;
17
+          margin-top: 30px;
18
+          > .UserIcon {
19
+            width: 120px;
20
+            height: 120px;
21
+            position: relative;
22
+            overflow: hidden;
23
+            background: #eee;
24
+            border-radius: 100%;
25
+            margin: 0 auto;
26
+            z-index: 2;
27
+            > image {
28
+              width: 100%;
29
+              height: 100%;
30
+            }
31
+          }
32
+          > .OtherInfo {
33
+            position: relative;
34
+            overflow: hidden;
35
+            background: #193c83;
36
+            border-radius: 24px;
37
+            margin-top: -60px;
38
+            z-index: 1;
39
+            > .Name {
40
+              padding: 90px 20px 0;
41
+              > view {
42
+                position: relative;
43
+                z-index: 2;
44
+                > text {
45
+                  display: block;
46
+                  text-align: center;
47
+                  font-size: 34px;
48
+                  color: #fff;
49
+                  line-height: 40px;
50
+                }
51
+                > view {
52
+                  margin-top: 20px;
53
+                  border-top: 2px dashed rgba(255, 255, 255, 0.3);
54
+                  text-align: center;
55
+                  font-size: 0;
56
+                  white-space: nowrap;
57
+                  padding: 20px 0;
58
+                  > text {
59
+                    display: inline-block;
60
+                    vertical-align: middle;
61
+                    font-size: 28px;
62
+                    color: #fff;
63
+                    line-height: 40px;
64
+                    &.iconfont {
65
+                      width: 36px;
66
+                      line-height: 36px;
67
+                      background: #fff;
68
+                      border-radius: 100%;
69
+                      color: #193c83;
70
+                      margin-right: 10px;
71
+                    }
72
+                  }
73
+                }
74
+              }
75
+              > .Role {
76
+                width: 200px;
77
+                position: absolute;
78
+                right: -55px;
79
+                top: 20px;
80
+                font-size: 22px;
81
+                color: #193c83;
82
+                line-height: 50px;
83
+                background: #fff602;
84
+                text-align: center;
85
+                transform: rotateZ(45deg);
86
+                -webkit-transform: rotateZ(45deg);
87
+                z-index: 3;
88
+              }
89
+              > .New {
90
+                font-size: 90px;
91
+                font-weight: bold;
92
+                color: rgba(255, 255, 255, 0.1);
93
+                display: inline-block;
94
+                position: absolute;
95
+                z-index: 1;
96
+                right: 30px;
97
+                top: 30px;
98
+              }
99
+              > .iconfont {
100
+                font-size: 200px;
101
+                color: rgba(255, 255, 255, 0.1);
102
+                display: inline-block;
103
+                position: absolute;
104
+                z-index: 1;
105
+                left: 30px;
106
+                top: 10px;
107
+              }
108
+            }
109
+          }
110
+        }
111
+        > .MenuList {
112
+          position: relative;
113
+          overflow: hidden;
114
+          margin-top: 20px;
115
+          > view {
116
+            position: relative;
117
+            overflow: hidden;
118
+            border-top: 20px solid #f8f8f8;
119
+            &:first-child {
120
+              border: none;
121
+            }
122
+            > .flex-h {
123
+              align-items: center;
124
+              padding: 0 30px;
125
+              &:first-child {
126
+                >view {
127
+                  border: none;
128
+                }
129
+              }
130
+              > text {
131
+                width: 44px;
132
+                line-height: 44px;
133
+                height: 44px;
134
+                font-size: 40px;
135
+                text-align: center;
136
+                margin-right: 20px;
137
+              }
138
+              > view {
139
+                align-items: center;
140
+                border-top: 2px solid #eee;
141
+                > text {
142
+                  font-size: 32px;
143
+                  line-height: 100px;
144
+                  &.iconfont {
145
+                    color: #ccc;
146
+                    font-size: 40px;
147
+                  }
148
+                }
149
+              }
150
+            }
151
+          }
152
+        }
153
+      }
154
+    }
155
+  }
156
+}

+ 3
- 0
src/pages/video/index.config.js Vedi File

1
+export default {
2
+  navigationBarTitleText: '视频'
3
+}

+ 36
- 0
src/pages/video/index.jsx Vedi File

1
+import React, { useState, useEffect } from 'react'
2
+import withLayout from '@/layout'
3
+import './index.scss'
4
+import { ScrollView } from '@tarojs/components'
5
+
6
+export default withLayout((props) => {
7
+
8
+  // const [PageProps] = useState(props)
9
+  const [IsPull, setPull] = useState(false)
10
+  const [PullTimer, setPullTimer] = useState(null)
11
+
12
+  const PageRefresh = () => { // 页面下拉刷新回调
13
+    setPull(true)
14
+  }
15
+
16
+  useEffect(() => { // 下拉刷新触发
17
+    if (IsPull) {
18
+      clearTimeout(PullTimer)
19
+      setPullTimer(setTimeout(() => {
20
+        setPull(false)
21
+      }, 2000))
22
+    }
23
+  }, [IsPull])
24
+
25
+  return (
26
+    <view className='Page Video'>
27
+
28
+      <ScrollView scroll-y={true} refresher-enabled={true} refresher-triggered={IsPull} onrefresherrefresh={PageRefresh} refresher-background='#fff'>
29
+        <view className='PageContent'>
30
+          视频
31
+        </view>
32
+      </ScrollView>
33
+
34
+    </view>
35
+  )
36
+})

+ 12
- 0
src/pages/video/index.scss Vedi File

1
+.Page.Video {
2
+  background: #fff;
3
+  > scroll-view {
4
+    width: 100%;
5
+    height: 100%;
6
+    .PageContent {
7
+      position: relative;
8
+      overflow: hidden;
9
+      min-height: 100vh;
10
+    }
11
+  }
12
+}

+ 55
- 0
src/reducers/card.js Vedi File

1
+import {
2
+  CARD_INFO,
3
+  CARD_LIST,
4
+  CARD_LIKE,
5
+  CARD_UNLIKE
6
+} from '@/constants/card'
7
+
8
+const INITIAL_STATE = {
9
+  cardList: [],
10
+  cardInfo: {}
11
+}
12
+
13
+export default function card(state = INITIAL_STATE, action) {
14
+  switch (action.type) {
15
+    case CARD_INFO: {
16
+      return {
17
+        ...state,
18
+        cardInfo: {
19
+          ...action.payload
20
+        }
21
+      }
22
+    }
23
+    case CARD_LIKE: {
24
+      return {
25
+        ...state,
26
+        cardInfo: {
27
+          ...state.cardInfo,
28
+          liked: true,
29
+          likeNum: state.cardInfo.likeNum + 1
30
+        }
31
+      }
32
+    }
33
+    case CARD_UNLIKE: {
34
+      return {
35
+        ...state,
36
+        cardInfo: {
37
+          ...state.cardInfo,
38
+          liked: false,
39
+          likeNum: state.cardInfo.likeNum - 1
40
+        }
41
+      }
42
+    }
43
+    case CARD_LIST: {
44
+      return {
45
+        ...state,
46
+        cardList: {
47
+          ...action.payload.records || []
48
+        }
49
+      }
50
+    }
51
+
52
+    default:
53
+      return state
54
+  }
55
+}

+ 31
- 0
src/reducers/city.js Vedi File

1
+import {
2
+  CITY_LIST,
3
+  CITY_SELECTED
4
+} from '@/constants/city'
5
+
6
+const INITIAL_STATE = {
7
+  cityList: {},
8
+  curCity: {}
9
+}
10
+
11
+export default function news(state = INITIAL_STATE, action) {
12
+  switch (action.type) {
13
+    case CITY_LIST: {
14
+      // console.log(action.payload, "!!action.payload!!")
15
+      return {
16
+        ...state,
17
+        cityList: action.payload
18
+      }
19
+    }
20
+
21
+    case CITY_SELECTED: {
22
+      return {
23
+        ...state,
24
+        curCity: action.payload
25
+      }
26
+    }
27
+
28
+    default:
29
+      return state
30
+  }
31
+}

+ 22
- 0
src/reducers/counter.js Vedi File

1
+import { ADD, MINUS } from '../constants/counter'
2
+
3
+const INITIAL_STATE = {
4
+  num: 0
5
+}
6
+
7
+export default function counter (state = INITIAL_STATE, action) {
8
+  switch (action.type) {
9
+    case ADD:
10
+      return {
11
+        ...state,
12
+        num: state.num + 1
13
+      }
14
+     case MINUS:
15
+       return {
16
+         ...state,
17
+         num: state.num - 1
18
+       }
19
+     default:
20
+       return state
21
+  }
22
+}

+ 84
- 0
src/reducers/house.js Vedi File

1
+/**
2
+ * 房源相关
3
+ */
4
+
5
+ import {
6
+   ADD_CART,
7
+   SUB_CART,
8
+   FLUSH_TO_CART,
9
+   ADD_CONSULTANT,
10
+   CHOOSE_CONSULTANT,
11
+   MY_PRESELECT_RECORD,
12
+   SET_ONLINE_PROTOCOL,
13
+ } from '@/constants/house'
14
+
15
+const INITIAL_STATE = {
16
+  // 认筹临时选中房源
17
+  raiseCart: [],
18
+
19
+  // 置业顾问列表
20
+  consultantList: [],
21
+
22
+  // 认筹选中置业
23
+  chooseConsultant: undefined,
24
+
25
+  // 预选房源列表
26
+  mySelectHouses: [],
27
+
28
+  //
29
+  onlineProtocol: '',
30
+}
31
+
32
+export default function(state = INITIAL_STATE, action) {
33
+  const { type, payload } = action
34
+
35
+  switch(type) {
36
+    // 加入临时选择
37
+    case ADD_CART:
38
+      return {
39
+        ...state,
40
+        raiseCart: state.raiseCart.filter(x => x.houseId != payload.houseId).concat(payload),
41
+      };
42
+
43
+    // 取消临时选择
44
+    case SUB_CART:
45
+      return {
46
+        ...state,
47
+        raiseCart: state.raiseCart.filter(x => x.houseId != payload.houseId),
48
+      };
49
+
50
+    //
51
+    case FLUSH_TO_CART:
52
+      return {
53
+        ...state,
54
+        raiseCart: payload,
55
+      };
56
+
57
+    case ADD_CONSULTANT:
58
+      return {
59
+        ...state,
60
+        consultantList: payload.records,
61
+      };
62
+
63
+    case CHOOSE_CONSULTANT:
64
+      return {
65
+        ...state,
66
+        chooseConsultant: payload,
67
+      };
68
+
69
+    case MY_PRESELECT_RECORD:
70
+      return {
71
+        ...state,
72
+        mySelectHouses: payload.records,
73
+      };
74
+
75
+    case SET_ONLINE_PROTOCOL:
76
+      return {
77
+        ...state,
78
+        onlineProtocol: payload,
79
+      };
80
+
81
+    default:
82
+      return state;
83
+  }
84
+}

+ 22
- 0
src/reducers/index.js Vedi File

1
+import { combineReducers } from 'redux'
2
+import counter from './counter'
3
+import user from './user'
4
+import project from './project'
5
+import card from './card'
6
+import shop from './shop'
7
+import news from './news'
8
+import city from './city'
9
+import system from './system'
10
+import house from './house'
11
+
12
+export default combineReducers({
13
+  counter,
14
+  user,
15
+  project,
16
+  card,
17
+  shop,
18
+  news,
19
+  city,
20
+  system,
21
+  house,
22
+})

+ 33
- 0
src/reducers/news.js Vedi File

1
+import {
2
+  NEWS_LIST,
3
+  NEWS_DETAIL
4
+} from '@/constants/news'
5
+
6
+const INITIAL_STATE = {
7
+  newsList: {},
8
+  newsDetail: {}
9
+}
10
+
11
+export default function news(state = INITIAL_STATE, action) {
12
+  switch (action.type) {
13
+    case NEWS_LIST: {
14
+      return {
15
+        ...state,
16
+        newsList: {
17
+          ...action.payload
18
+        }
19
+      }
20
+    }
21
+    case NEWS_DETAIL: {
22
+      return {
23
+        ...state,
24
+        newsDetail: {
25
+          ...action.payload
26
+        }
27
+      }
28
+    }
29
+
30
+    default:
31
+      return state
32
+  }
33
+}

+ 51
- 0
src/reducers/project.js Vedi File

1
+import {
2
+  PROJECT_DETAIL,
3
+  PROJECT_LIST,
4
+  PROJECT_SCREEN,
5
+  SET_SCREEN_SHOWED,
6
+} from '@/constants/project'
7
+
8
+
9
+const INITIAL_STATE = {
10
+  proList: {},
11
+  projectDetail: {},
12
+  screen: {},
13
+  screenShow: undefined,
14
+}
15
+
16
+export default function project(state = INITIAL_STATE, action) {
17
+  switch (action.type) {
18
+    case PROJECT_LIST: {
19
+      return {
20
+        ...state,
21
+        proList: {
22
+          ...action.payload
23
+        }
24
+      }
25
+    }
26
+    case PROJECT_DETAIL: {
27
+      return {
28
+        ...state,
29
+        projectDetail: {
30
+          ...action.payload
31
+        }
32
+      }
33
+    }
34
+    case PROJECT_SCREEN: {
35
+      return {
36
+        ...state,
37
+        screen: (action.payload || [])[0] || {}
38
+      }
39
+    }
40
+
41
+    case SET_SCREEN_SHOWED: {
42
+      return {
43
+        ...state,
44
+        screenShow: action.payload,
45
+      }
46
+    }
47
+
48
+    default:
49
+      return state
50
+  }
51
+}

+ 62
- 0
src/reducers/shop.js Vedi File

1
+import {
2
+  GOODS_LIST,
3
+  GOODS_DETAIL,
4
+  GOODS_EXCHANGE_RECORDS,
5
+  POINTS_RECORDS,
6
+  POINTS_RULE
7
+} from '@/constants/shop'
8
+
9
+const INITIAL_STATE = {
10
+  goods: {},
11
+  goodsDetail: {},
12
+  exchangeRecords: {},
13
+  pointsRecords: {},
14
+  pointsRule:{}
15
+}
16
+
17
+export default function shop(state = INITIAL_STATE, action) {
18
+  switch (action.type) {
19
+    case GOODS_LIST: {
20
+      return {
21
+        ...state,
22
+        goods: {
23
+          ...action.payload
24
+        }
25
+      }
26
+    }
27
+    case GOODS_DETAIL: {
28
+      return {
29
+        ...state,
30
+        goodsDetail: {
31
+          ...action.payload
32
+        }
33
+      }
34
+    }
35
+    case GOODS_EXCHANGE_RECORDS: {
36
+      return {
37
+        ...state,
38
+        exchangeRecords: {
39
+          ...action.payload
40
+        }
41
+      }
42
+    }
43
+    case POINTS_RECORDS: {
44
+      return {
45
+        ...state,
46
+        pointsRecords: {
47
+          ...action.payload
48
+        }
49
+      }
50
+    }
51
+    case POINTS_RULE: {
52
+      return {
53
+        ...state,
54
+        pointsRule: {
55
+          ...action.payload
56
+        }
57
+      }
58
+    }
59
+    default:
60
+      return state
61
+  }
62
+}

+ 31
- 0
src/reducers/system.js Vedi File

1
+import { UPDATE_PRELOAD, SYNC_SYSTEMINFO } from "@/constants/common";
2
+
3
+// 初始数据
4
+const INITIAL_STATE = {
5
+  cityList: [],
6
+  miniappInfo: {},
7
+  orgInfo: {},
8
+  userInfo: {},
9
+  settings: [],
10
+  systemInfo: {}
11
+};
12
+
13
+export default function(state = INITIAL_STATE, action) {
14
+  switch (action.type) {
15
+    case UPDATE_PRELOAD: {
16
+      return {
17
+        ...state,
18
+        ...action.payload
19
+      };
20
+    }
21
+    case SYNC_SYSTEMINFO: {
22
+      return {
23
+        ...state,
24
+        systemInfo: action.payload
25
+      };
26
+    }
27
+
28
+    default:
29
+      return state;
30
+  }
31
+}

+ 127
- 0
src/reducers/user.js Vedi File

1
+import { mergeNotNull } from '@/utils/tools'
2
+
3
+import {
4
+  USER_INFO,
5
+  // USER_QUERY_INFO,
6
+  USER_SIGNIN,
7
+  ASSIGN_UNREADNUM,
8
+  INCREASE_UNREADNUM,
9
+  DECREASE_UNREADNUM,
10
+  UPDATE_USER_INFO,
11
+} from '@/constants/user'
12
+
13
+const INITIAL_STATE = {
14
+  userInfo: {
15
+    person: {},
16
+    extraInfo: {},
17
+    miniApp: {},
18
+  },
19
+  unReadNum: 0
20
+}
21
+
22
+export default function user(state = INITIAL_STATE, action) {
23
+  switch (action.type) {
24
+    case USER_INFO: {
25
+      if (!(state.userInfo || {}).person) {
26
+        return {
27
+          ...state,
28
+          userInfo: {
29
+            ...action.payload
30
+          }
31
+        }
32
+      } else {
33
+        const { person, extraInfo, miniApp } = action.payload || {}
34
+        const newPerson = mergeNotNull(state.userInfo.person, person)
35
+        const newExtraInfo = mergeNotNull(state.userInfo.extraInfo, extraInfo)
36
+        const newMiniApp = mergeNotNull(state.userInfo.miniApp, miniApp)
37
+        return {
38
+          ...state,
39
+          userInfo: {
40
+            ...state.userInfo,
41
+            ...action.payload,
42
+            person: newPerson,
43
+            extraInfo: newExtraInfo,
44
+            miniApp: newMiniApp,
45
+          }
46
+        }
47
+      }
48
+    }
49
+    // case USER_QUERY_INFO: {
50
+    //   const { person } = state.userInfo
51
+    //   return {
52
+    //     ...state,
53
+    //     userInfo: {
54
+    //       person,
55
+    //       extraInfo: {
56
+    //         ...action.payload
57
+    //       }
58
+
59
+    //     }
60
+    //   }
61
+    // }
62
+    case UPDATE_USER_INFO: {
63
+      // debugger
64
+      const { person, extraInfo, miniApp = {} } = state.userInfo
65
+      const newPerson = mergeNotNull(person, action.payload)
66
+
67
+      return {
68
+        ...state,
69
+        userInfo: {
70
+          extraInfo,
71
+          person: newPerson,
72
+          miniApp,
73
+        }
74
+      }
75
+    }
76
+    case USER_SIGNIN: {
77
+      let { person, extraInfo, miniApp = {} } = state.userInfo
78
+      return {
79
+        ...state,
80
+        userInfo: {
81
+          person: {
82
+            ...person,
83
+            points: (person.points + 1)
84
+          },
85
+          extraInfo: {
86
+            ...extraInfo,
87
+            havaSigned: 1
88
+          },
89
+          miniApp,
90
+        }
91
+      }
92
+    }
93
+    case ASSIGN_UNREADNUM: {
94
+      let { unReadNum } = action.payload
95
+      return {
96
+        ...state,
97
+        unReadNum
98
+      }
99
+    }
100
+    case INCREASE_UNREADNUM: {
101
+      let { unReadNum } = state
102
+      return {
103
+        ...state,
104
+        unReadNum: unReadNum + 1
105
+      }
106
+    }
107
+    case DECREASE_UNREADNUM: {
108
+      let { unReadNum } = state
109
+
110
+      if (action.payload === undefined) {
111
+        unReadNum = 0
112
+      } else {
113
+        unReadNum = unReadNum - action.payload
114
+        if (unReadNum < 0) {
115
+          unReadNum = 0
116
+        }
117
+      }
118
+
119
+      return {
120
+        ...state,
121
+        unReadNum,
122
+      }
123
+    }
124
+    default:
125
+      return state
126
+  }
127
+}

+ 0
- 0
src/routes.js Vedi File


Some files were not shown because too many files changed in this diff