Pārlūkot izejas kodu

Merge branch 'dev'

张延森 5 gadus atpakaļ
vecāks
revīzija
2f2921e8a3
100 mainītis faili ar 3982 papildinājumiem un 212 dzēšanām
  1. 2
    1
      .vscode/settings.json
  2. 1
    1
      config/dev.js
  3. 4
    0
      config/index.js
  4. 5
    5
      config/prod.js
  5. 9
    16
      project.config.json
  6. 22
    2
      src/app.js
  7. Binārs
      src/assets/award.png
  8. Binārs
      src/assets/mine/selection.png
  9. Binārs
      src/assets/news/property.png
  10. 21
    0
      src/components/Loading/index.js
  11. 41
    0
      src/components/Loading/index.scss
  12. 1
    0
      src/components/Poster/index.js
  13. 1
    1
      src/components/authorizationComponent/index.scss
  14. 1
    1
      src/components/authorize/index.scss
  15. 5
    5
      src/components/indexMenus/icons.js
  16. 2
    1
      src/components/indexMenus/index.js
  17. 6
    0
      src/components/indexMenus/index.scss
  18. 2
    0
      src/components/taro-plugin-canvas/index.js
  19. 17
    0
      src/constants/api.js
  20. 3
    0
      src/constants/common.js
  21. Binārs
      src/onlineSelling/assets/consultant.png
  22. Binārs
      src/onlineSelling/assets/explain.png
  23. Binārs
      src/onlineSelling/assets/fail.png
  24. Binārs
      src/onlineSelling/assets/fail2.png
  25. Binārs
      src/onlineSelling/assets/going.png
  26. Binārs
      src/onlineSelling/assets/location.png
  27. Binārs
      src/onlineSelling/assets/norecord.png
  28. Binārs
      src/onlineSelling/assets/notice.png
  29. Binārs
      src/onlineSelling/assets/record.png
  30. Binārs
      src/onlineSelling/assets/screen.png
  31. Binārs
      src/onlineSelling/assets/seeding.png
  32. Binārs
      src/onlineSelling/assets/share-friends.png
  33. Binārs
      src/onlineSelling/assets/share.png
  34. Binārs
      src/onlineSelling/assets/sharing-circleoffriends.png
  35. Binārs
      src/onlineSelling/assets/success.png
  36. Binārs
      src/onlineSelling/assets/success2.png
  37. 49
    0
      src/onlineSelling/components/ActSheet/index.js
  38. 42
    0
      src/onlineSelling/components/ActSheet/index.scss
  39. 15
    0
      src/onlineSelling/components/Blank/index.js
  40. 37
    0
      src/onlineSelling/components/Blank/index.scss
  41. 39
    0
      src/onlineSelling/components/GrantProfile/index.js
  42. 32
    0
      src/onlineSelling/components/HotBlock/index.js
  43. 45
    0
      src/onlineSelling/components/HotBlock/index.scss
  44. 47
    0
      src/onlineSelling/components/HouseCard/index.js
  45. 81
    0
      src/onlineSelling/components/HouseCard/index.scss
  46. 22
    0
      src/onlineSelling/components/HouseGrid/Floor.js
  47. 28
    0
      src/onlineSelling/components/HouseGrid/Room.js
  48. 39
    0
      src/onlineSelling/components/HouseGrid/Unit.js
  49. 29
    0
      src/onlineSelling/components/HouseGrid/floor.scss
  50. 16
    0
      src/onlineSelling/components/HouseGrid/index.js
  51. 22
    0
      src/onlineSelling/components/HouseGrid/room.scss
  52. 25
    0
      src/onlineSelling/components/HouseGrid/unit.scss
  53. 12
    0
      src/onlineSelling/components/NamedIcon/index.js
  54. 4
    0
      src/onlineSelling/components/NamedIcon/index.scss
  55. 73
    0
      src/onlineSelling/components/ScrollMessage/index.js
  56. 12
    0
      src/onlineSelling/components/ScrollMessage/index.scss
  57. 21
    0
      src/onlineSelling/components/ShareButtons/ShareBtn.js
  58. 27
    0
      src/onlineSelling/components/ShareButtons/index.js
  59. 32
    0
      src/onlineSelling/components/ShareButtons/index.scss
  60. 47
    0
      src/onlineSelling/components/TimeTicker/index.js
  61. 4
    0
      src/onlineSelling/components/TimeTicker/index.scss
  62. 232
    0
      src/onlineSelling/pages/detail/index.js
  63. 201
    0
      src/onlineSelling/pages/detail/index.scss
  64. 91
    0
      src/onlineSelling/pages/detail/resultPage.js
  65. 160
    0
      src/onlineSelling/pages/help/index.js
  66. 45
    0
      src/onlineSelling/pages/help/index.scss
  67. 652
    0
      src/onlineSelling/pages/houseList/index.js
  68. 210
    0
      src/onlineSelling/pages/houseList/index.scss
  69. 183
    0
      src/onlineSelling/pages/houseList/poster.js
  70. 56
    0
      src/onlineSelling/pages/houseList/poster.scss
  71. 349
    0
      src/onlineSelling/pages/live/index.js
  72. 88
    0
      src/onlineSelling/pages/live/index.scss
  73. 75
    0
      src/onlineSelling/pages/records/index.js
  74. 9
    0
      src/onlineSelling/pages/records/index.scss
  75. 152
    0
      src/onlineSelling/pages/screenHouse/index.js
  76. 125
    0
      src/onlineSelling/pages/screenHouse/index.scss
  77. 105
    0
      src/onlineSelling/pages/selectionRecord/index.js
  78. 28
    0
      src/onlineSelling/pages/selectionRecord/index.scss
  79. 1
    1
      src/pages/activity/activity.js
  80. 24
    24
      src/pages/activity/detail/poster.js
  81. 14
    9
      src/pages/activity/index.js
  82. 23
    7
      src/pages/activity/item/index.js
  83. 10
    0
      src/pages/activity/item/index.scss
  84. 11
    5
      src/pages/card/index.js
  85. 26
    25
      src/pages/card/poster.js
  86. 5
    1
      src/pages/im/msgItem/index.js
  87. 24
    24
      src/pages/news/detail/poster.js
  88. 1
    1
      src/pages/news/index.js
  89. 1
    1
      src/pages/person/authorize/index.scss
  90. 2
    2
      src/pages/person/index.js
  91. 10
    2
      src/pages/person/menus.js
  92. 3
    2
      src/pages/person/myShare/index.js
  93. 1
    1
      src/pages/policy/detail/index.js
  94. 2
    2
      src/pages/policy/index.js
  95. 1
    1
      src/pages/project/activity/index.js
  96. 86
    25
      src/pages/project/detail/index.js
  97. 7
    20
      src/pages/project/detail/index.scss
  98. 25
    25
      src/pages/project/detail/poster.js
  99. 1
    1
      src/pages/project/floor/index.js
  100. 0
    0
      src/pages/project/icons.js

+ 2
- 1
.vscode/settings.json Parādīt failu

@@ -1,3 +1,4 @@
1 1
 {
2
-  "editor.fontFamily": "'Cascadia Code', Consolas, 'Courier New', monospace"
2
+  "editor.fontFamily": "'Cascadia Code', Consolas, 'Courier New', monospace",
3
+  "editor.tabSize": 2
3 4
 }

+ 1
- 1
config/dev.js Parādīt failu

@@ -13,7 +13,7 @@ module.exports = {
13 13
     // WSS_HOST: '"wss://lt.pawoma.cn"',
14 14
     // HOST: '"http://127.0.0.1:8080"',
15 15
     // WSS_HOST: '"ws://127.0.0.1:8080"',
16
-    Version: 'V3.5.9'
16
+    Version: 'V3.5.11'
17 17
   },
18 18
   weapp: {},
19 19
   h5: {}

+ 4
- 0
config/index.js Parādīt failu

@@ -49,6 +49,10 @@ const config = {
49 49
   },
50 50
   copy: {
51 51
     patterns: [
52
+      {
53
+        from: 'src/onlineSelling/assets/',
54
+        to: 'dist/onlineSelling/assets/'
55
+      }
52 56
     ],
53 57
     options: {
54 58
     }

+ 5
- 5
config/prod.js Parādīt failu

@@ -7,11 +7,11 @@ module.exports = {
7 7
     // WSS_HOST: '"ws://192.168.2.54:8080"',
8 8
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
9 9
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
-    HOST: '"https://dev.pawoma.cn"',// 新测试
11
-    WSS_HOST: '"wss://dev.pawoma.cn"',
12
-    // HOST: '"https://lt.pawoma.cn"',
13
-    // WSS_HOST: '"wss://lt.pawoma.cn"',
14
-    Version: 'V3.5.9'
10
+    // HOST: '"https://dev.pawoma.cn"',// 新测试
11
+    // WSS_HOST: '"wss://dev.pawoma.cn"',
12
+    HOST: '"https://lt.pawoma.cn"',
13
+    WSS_HOST: '"wss://lt.pawoma.cn"',
14
+    Version: 'V3.5.11'
15 15
   },
16 16
   weapp: {},
17 17
   h5: {}

+ 9
- 16
project.config.json Parādīt failu

@@ -1,8 +1,8 @@
1 1
 {
2 2
 	"miniprogramRoot": "dist/",
3 3
 	"projectname": "mini-chengjiao",
4
-	"description": "知与行联调",
5
-	"appid": "wxd9ee3a9480a4e544",
4
+	"description": "知与行互动",
5
+	"appid": "wxd6f47a9bb3052175",
6 6
 	"setting": {
7 7
 		"urlCheck": false,
8 8
 		"es6": false,
@@ -48,23 +48,16 @@
48 48
 			"list": [
49 49
 				{
50 50
 					"id": -1,
51
-					"name": "pages/im/list/index",
52
-					"pathName": "pages/im/list/index",
53
-					"query": "",
51
+					"name": "pages/houseList/index",
52
+					"pathName": "onlineSelling/pages/houseList/index",
53
+					"query": "id=6&buildingId=7a46e04f15c324fa9cf44ce27f9573c5",
54 54
 					"scene": null
55 55
 				},
56 56
 				{
57
-					"id": -1,
58
-					"name": "pages/activity/detail/assistance",
59
-					"pathName": "pages/activity/detail/assistance",
60
-					"query": "id=85",
61
-					"scene": null
62
-				},
63
-				{
64
-					"id": -1,
65
-					"name": "pages/project/detail/index",
66
-					"pathName": "pages/project/detail/index",
67
-					"query": "id=93e6d86b8b48e3ea359084e3ceaf2d03",
57
+					"id": 1,
58
+					"name": "pages/records/index",
59
+					"pathName": "onlineSelling/pages/records/index",
60
+					"query": "",
68 61
 					"scene": null
69 62
 				}
70 63
 			]

+ 22
- 2
src/app.js Parādīt failu

@@ -42,6 +42,13 @@ class App extends Component {
42 42
         "desc": "你的位置信息将用于显示当前区域信息"
43 43
       }
44 44
     },
45
+    navigateToMiniProgramAppIdList: [
46
+      "wxb825ab501296672e",
47
+      "wxca1e7ba3fe18ff12",
48
+      "wx74767bf0b684f7d3",
49
+      "wx6fa58869f7b65e7f",
50
+      "wxc4f812079fc9ff0d",
51
+    ],
45 52
     pages: [
46 53
       'pages/project/index',
47 54
       'pages/project/h5Page',
@@ -113,6 +120,19 @@ class App extends Component {
113 120
           'pages/person/feedback/index',
114 121
           'pages/shop/record/index',
115 122
         ],
123
+      },
124
+      {
125
+        root: "onlineSelling",
126
+        pages: [
127
+          'pages/houseList/index',
128
+          'pages/live/index',
129
+          'pages/help/index',
130
+          'pages/records/index',
131
+          'pages/detail/index',
132
+          'pages/detail/resultPage',
133
+          'pages/selectionRecord/index',
134
+          'pages/screenHouse/index',
135
+        ],
116 136
       }
117 137
     ],
118 138
     window: {
@@ -136,7 +156,7 @@ class App extends Component {
136 156
         },
137 157
         {
138 158
           pagePath: "pages/shop/index",
139
-          text: "积分商城",
159
+          text: "赚好礼",
140 160
           iconPath: './assets/tabbar/shop1.png',
141 161
           selectedIconPath: './assets/tabbar/shop2.png',
142 162
         },
@@ -148,7 +168,7 @@ class App extends Component {
148 168
         },
149 169
         {
150 170
           pagePath: "pages/person/index",
151
-          text: "我的",
171
+          text: "我的地盘",
152 172
           iconPath: './assets/tabbar/mine1.png',
153 173
           selectedIconPath: './assets/tabbar/mine2.png',
154 174
         }

Binārs
src/assets/award.png Parādīt failu


Binārs
src/assets/mine/selection.png Parādīt failu


Binārs
src/assets/news/property.png Parādīt failu


+ 21
- 0
src/components/Loading/index.js Parādīt failu

@@ -0,0 +1,21 @@
1
+import { View } from "@tarojs/components";
2
+
3
+import './index.scss'
4
+
5
+export default function Loading(props) {
6
+  const size = props.size || '200';
7
+  const color = props.color || '#333';
8
+
9
+  const boxStyle = `width: ${size}px; height: ${size}px;`
10
+  const loadingStyle = `border-color: transparent ${color} transparent ${color};`
11
+  const textStyle = `color: ${color};`
12
+
13
+  const text = props.text || 'LOADING';
14
+
15
+  return (
16
+    <View className="loading-box" style={boxStyle}>
17
+      <View className="loading" style={loadingStyle}></View>
18
+      <View className="loading-text" style={textStyle}>{text}</View>
19
+    </View>
20
+  )
21
+}

+ 41
- 0
src/components/Loading/index.scss Parādīt failu

@@ -0,0 +1,41 @@
1
+.loading-box {
2
+  // width: 200px;
3
+  // height: 200px;
4
+  position: relative;
5
+  margin: 0 auto;
6
+
7
+  .loading {
8
+    width: calc(100% - 4px);
9
+    height: calc(100% - 4px);
10
+    border-radius: 100%;
11
+    border: 4px solid transparent;
12
+    border-color: transparent #333 transparent #333;
13
+    animation: rotate-loading 1.5s linear 0s infinite normal;
14
+    transform-origin: 50% 50%;
15
+  }
16
+
17
+  .loading-text {
18
+    width: calc(100% - 4px);
19
+    animation: loading-text-opacity 2s linear 0s infinite normal;
20
+    color: #333;
21
+    font-size: 20px;
22
+    font-weight: bold;
23
+    margin-top: 40%;
24
+    opacity: 0;
25
+    position: absolute;
26
+    text-align: center;
27
+    top: 0;
28
+  }
29
+
30
+  @keyframes rotate-loading {
31
+    0%  {transform: rotate(0deg);}
32
+    100% {transform: rotate(360deg);}
33
+  }
34
+
35
+  @keyframes loading-text-opacity {
36
+    0%  {opacity: 0}
37
+    20% {opacity: 0}
38
+    50% {opacity: 1}
39
+    100%{opacity: 0}
40
+  }
41
+}

+ 1
- 0
src/components/Poster/index.js Parādīt failu

@@ -75,6 +75,7 @@ export default class Poster extends Component {
75 75
 
76 76
   onCreateSuccess = (inx) => {
77 77
     return (result) => {
78
+      // debugger
78 79
       const { tempFilePath, errMsg } = result;
79 80
       if (errMsg === 'canvasToTempFilePath:ok') {
80 81
         this.tmpImgs[inx] = tempFilePath

+ 1
- 1
src/components/authorizationComponent/index.scss Parādīt failu

@@ -3,7 +3,7 @@
3 3
 .auth-page{
4 4
   position: relative;
5 5
   width: 100%;
6
-  height: 100%;
6
+  height: 100vh;
7 7
   .avatar_img{
8 8
     position: absolute;
9 9
     width:120px;

+ 1
- 1
src/components/authorize/index.scss Parādīt failu

@@ -3,7 +3,7 @@
3 3
 .auth-page{
4 4
   position: relative;
5 5
   width: 100%;
6
-  height: 100%;
6
+  height: 100vh;
7 7
   .avatar_img{
8 8
     position: absolute;
9 9
     width:120px;

+ 5
- 5
src/components/indexMenus/icons.js Parādīt failu

@@ -18,14 +18,14 @@ const CONSULTANT = ROLE_CODE['CONSULTANT']
18 18
 const menus = [
19 19
 
20 20
     {
21
-        name: '积分商城',
21
+        name: '积分',
22 22
         url: '/pages/shop/index',
23 23
         icon: icons.shop,
24 24
         switchTab: true,
25 25
         iconCode: 'integralMall',
26 26
     },
27 27
     {
28
-        name: '购房百科',
28
+        name: '购房须知',
29 29
         url: '/pages/policy/index?from=mine',
30 30
         icon: icons.encyclopedia,
31 31
         iconCode: 'buyingEncyclopedia'
@@ -38,7 +38,7 @@ const menus = [
38 38
         city: true,
39 39
     },
40 40
     {
41
-        name: '地图找房',
41
+        name: '选好房',
42 42
         url: '/pages/project/map/index',
43 43
         icon: icons.map,
44 44
         iconCode: 'findRoom'
@@ -50,7 +50,7 @@ const menus = [
50 50
         iconCode: 'Highlyrecommented'
51 51
     },
52 52
     {
53
-        name: '房贷计算器',
53
+        name: '房贷',
54 54
         url: '/pages/toolKit/index',
55 55
         icon: icons.calculator,
56 56
         iconCode: 'MortgageCalculator'
@@ -70,7 +70,7 @@ const menus = [
70 70
         switchTab: true,
71 71
     },
72 72
     {
73
-        name: '热门活动',
73
+        name: '参加活动',
74 74
         url: '/pages/activity/activity',
75 75
         icon: icons.activity,
76 76
         iconCode: 'Popularactivities',

+ 2
- 1
src/components/indexMenus/index.js Parādīt failu

@@ -42,7 +42,8 @@ export default class Menus extends Component {
42 42
                 {menusList.map((item, ginx) => (
43 43
                     <View onClick={() => this.toMenuePage(item)} className="mune-item" key={`menu- ${ginx}`}>
44 44
                         <Image className="icon" src={item.icon} ></Image>
45
-                        <View className="mune-text">{item.name}</View>
45
+                        <View className="mune-text"><Text>{item.name} </Text>{item.iconCode== 'refercustomers'&&<Image style="width:30rpx;height:30rpx;margin-left:4rpx" src={require('@/assets/award.png')} ></Image>}</View>
46
+                      
46 47
                     </View>
47 48
                 ))}
48 49
             </View>

+ 6
- 0
src/components/indexMenus/index.scss Parādīt failu

@@ -16,6 +16,12 @@
16 16
         width:84px;
17 17
         height:84px;
18 18
       }
19
+      .mune-text{
20
+        display: flex;
21
+        align-items: center;
22
+        justify-content: center;
23
+        
24
+      }
19 25
     }
20 26
   }
21 27
   

+ 2
- 0
src/components/taro-plugin-canvas/index.js Parādīt failu

@@ -9,6 +9,7 @@ import {
9 9
   drawLine,
10 10
 } from './utils/draw';
11 11
 import './index.css';
12
+import rtLog from '@/utils/rtLog';
12 13
 
13 14
 let count = 1;
14 15
 export default class CanvasDrawer extends Component {
@@ -167,6 +168,7 @@ export default class CanvasDrawer extends Component {
167 168
       .catch((err) => {
168 169
         Taro.hideLoading();
169 170
         Taro.showToast({ icon: 'none', title: err.message || err.errMsg || '下载图片失败' });
171
+        rtLog.error('下载图片失败, 图片地址 ('+ imageUrl +'), 错误消息: ' + ( err.message || err.errMsg || err))
170 172
         console.error(err);
171 173
         if (!onCreateFail) {
172 174
           console.warn('您必须实现 taro-plugin-canvas 组件的 onCreateFail 方法,详见文档 https://github.com/chuyun/taro-plugin-canvas#fail');

+ 17
- 0
src/constants/api.js Parādīt failu

@@ -54,6 +54,19 @@ export const API_LOCATION_CITYP = resolvePath('location/city')
54 54
 export const API_TACUSTOMIMG = resolvePath('taCustomImg')
55 55
 export const API_INDEX_PROJECTS = resolvePath('building/main')
56 56
 export const API_INDEX_ICONS = resolvePath('taMiniappOrgIcon')
57
+
58
+
59
+
60
+export const API_HOUSE_LIST = resolvePath('listHousingResources')
61
+export const API_PRESELECTION_RECORD = resolvePath('listPreselectionRecord')
62
+export const API_HOUSE_DETAIL = resolvePath('getHousingDetailById')
63
+export const API_ADD_PRESELECTION = resolvePath('taPreselectionRecord')
64
+export const API_CANCEL_PRESELECTION = resolvePath('taPreselectionRecordCancel')
65
+export const API_APARTMENT_TYPE = resolvePath('listBuildApartmentBySalesBatchId')
66
+export const API_NOTICE_INFO = resolvePath('getNoticeInfo')
67
+export const API_SALES_BATCH = resolvePath('taSalesBatch')
68
+export const API_ADDLIVE_NUM = resolvePath('addVisitNum')
69
+export const API_LIVE_DEATIL = resolvePath('taLiveActivity')
57 70
 // /wx/location/city?location=lon,lat
58 71
 
59 72
 
@@ -97,6 +110,10 @@ export const API_HELP_SHARE = resolvePath('help/share')
97 110
 export const API_GROUP_SHARE = resolvePath('group/share')
98 111
 export const API_HFIVE_SHARE = resolvePath('h5/share')
99 112
 export const API_NEWS_SHARE = resolvePath('news/share')
113
+export const API_HOUSE_SHARE = resolvePath('houseApp/share')
114
+export const API_HOUSE_POSTER = resolvePath('housePost/share')
115
+export const API_LIVE_SHARE = resolvePath('liveApp/share')
116
+export const API_LIVE_POSTER = resolvePath('livePost/share')
100 117
 
101 118
 export const API_ACTIVITY_FAVOR = resolvePath('activity/save')
102 119
 export const API_NEWS_FAVOR = resolvePath('news/save')

+ 3
- 0
src/constants/common.js Parādīt failu

@@ -7,6 +7,9 @@ export const TPL_HELP = "help-result";
7 7
 // 拼团消息
8 8
 export const TPL_GROUP = "group-result";
9 9
 
10
+// 预选消息
11
+export const TPL_HOUSE = "house";
12
+
10 13
 // 更新预拉取数据
11 14
 export const UPDATE_PRELOAD = 'UPDATE_PRELOAD';
12 15
 

Binārs
src/onlineSelling/assets/consultant.png Parādīt failu


Binārs
src/onlineSelling/assets/explain.png Parādīt failu


Binārs
src/onlineSelling/assets/fail.png Parādīt failu


Binārs
src/onlineSelling/assets/fail2.png Parādīt failu


Binārs
src/onlineSelling/assets/going.png Parādīt failu


Binārs
src/onlineSelling/assets/location.png Parādīt failu


Binārs
src/onlineSelling/assets/norecord.png Parādīt failu


Binārs
src/onlineSelling/assets/notice.png Parādīt failu


Binārs
src/onlineSelling/assets/record.png Parādīt failu


Binārs
src/onlineSelling/assets/screen.png Parādīt failu


Binārs
src/onlineSelling/assets/seeding.png Parādīt failu


Binārs
src/onlineSelling/assets/share-friends.png Parādīt failu


Binārs
src/onlineSelling/assets/share.png Parādīt failu


Binārs
src/onlineSelling/assets/sharing-circleoffriends.png Parādīt failu


Binārs
src/onlineSelling/assets/success.png Parādīt failu


Binārs
src/onlineSelling/assets/success2.png Parādīt failu


+ 49
- 0
src/onlineSelling/components/ActSheet/index.js Parādīt failu

@@ -0,0 +1,49 @@
1
+import Taro, { Component } from '@tarojs/taro'
2
+import { View, Button } from "@tarojs/components";
3
+
4
+import './index.scss'
5
+
6
+export default class ActSheet extends Component {
7
+
8
+  state = {
9
+    visible: this.props.show,
10
+    showMask: this.props.mask === void 0 ? true : this.props.mask,
11
+    localVisibleChange: false,
12
+  }
13
+
14
+  static getDerivedStateFromProps(props, state) {
15
+    if (!state.localVisibleChange) {
16
+      return { visible: props.show }
17
+    }
18
+
19
+    return { localVisibleChange: false }
20
+  }
21
+
22
+  handleCancel = e => {
23
+    this.setState({ visible: false, localVisibleChange: true })
24
+
25
+    if (this.props.onCancel) {
26
+      this.props.onCancel()
27
+    }
28
+  }
29
+
30
+  handleTouchMove = e => {
31
+    e.stopPropagation()
32
+  }
33
+
34
+  render() {
35
+    const { visible, showMask } = this.state
36
+    const cls = `actsheet ${ showMask ? 'mask' : '' }`
37
+
38
+    return visible && (
39
+      <View className={cls} onTouchMove={this.handleTouchMove}>
40
+        <View className="content sheetitem">
41
+          <View className="body sheetitem">{this.props.children}</View>
42
+          <View className="foot sheetitem">
43
+            <Button className="cancel" onClick={this.handleCancel}>取消</Button>
44
+          </View>
45
+        </View>
46
+      </View>
47
+    )
48
+  }
49
+}

+ 42
- 0
src/onlineSelling/components/ActSheet/index.scss Parādīt failu

@@ -0,0 +1,42 @@
1
+.actsheet {
2
+  z-index: 10000;
3
+  width: 100vw;
4
+  height: 100vh;
5
+  position:fixed;
6
+  left: 0;
7
+  top: 0;
8
+  background: transparent;
9
+  &.mask {
10
+    background-color: rgba(0,0,0,0.34);
11
+  }
12
+
13
+  .sheetitem {
14
+    width: 100%;
15
+  }
16
+
17
+  .content {
18
+    position: absolute;
19
+    left: 0;
20
+    bottom: 0;
21
+    background: transparent;
22
+
23
+    .body {
24
+      background: #fff;
25
+      border-radius: 22rpx 22rpx 0px 0px;
26
+      overflow: hidden;
27
+    }
28
+  
29
+    .foot {
30
+      margin-top: 2rpx;
31
+      background: #fff;
32
+  
33
+      .cancel {
34
+        width: 100%;
35
+        line-height: 94rpx;
36
+        font-size: 36rpx;
37
+        color:#BB9C79;
38
+        text-align: center;
39
+      }
40
+    }
41
+  }
42
+}

+ 15
- 0
src/onlineSelling/components/Blank/index.js Parādīt failu

@@ -0,0 +1,15 @@
1
+
2
+import { View } from '@tarojs/components'
3
+import './index.scss'
4
+
5
+export default function Blank(props) {
6
+  return (
7
+    <View className="blank">
8
+      <Image className="nodata-img" src={require('../../assets/norecord.png')}></Image>
9
+      {/* <View className="nodata"></View> */}
10
+      {
11
+        props.tips && <View className="tips">{props.tips}</View>
12
+      }
13
+    </View>
14
+  )
15
+}

+ 37
- 0
src/onlineSelling/components/Blank/index.scss Parādīt failu

@@ -0,0 +1,37 @@
1
+
2
+// .blank {
3
+//   width: 280rpx;
4
+//   transform: translateY(50%);
5
+//   margin: 0 auto;
6
+
7
+//   .nodata {
8
+//     height: 220rpx;
9
+//     background: url('../../assets/norecord.png');
10
+//     background-size: cover;
11
+//   }
12
+
13
+//   .tips {
14
+//     margin-top: 10rpx;
15
+//     font-size: 28rpx;
16
+//     line-height: 1.8em;
17
+//     color: #999;
18
+//     text-align: center;
19
+//   }
20
+// }
21
+.blank {
22
+  width: 100%;
23
+  transform: translateY(50%);
24
+  margin: 0 auto;
25
+  text-align: center;
26
+  .nodata-img{
27
+    width:280px;
28
+    height:220px;
29
+  }
30
+
31
+  .tips {
32
+    font-size: 28px;
33
+    line-height: 2;
34
+    color: #999;
35
+    text-align: center;
36
+  }
37
+}

+ 39
- 0
src/onlineSelling/components/GrantProfile/index.js Parādīt failu

@@ -0,0 +1,39 @@
1
+import { useState } from '@tarojs/taro'
2
+import { Block } from "@tarojs/components"
3
+import AchievePhone from '@/components/achievePhone'
4
+import AchieveAvatar from '@/components/achieveAvatar'
5
+import { isEmpty } from '@/utils/tools'
6
+
7
+function noop(){}
8
+
9
+export default function GrantProfile(props) {
10
+  if (isEmpty(props.person)) return <Block />;
11
+
12
+  const { tel, phone, avatarurl } = props.person
13
+
14
+  const noPhone = !(tel || phone)
15
+  const noAvatar = !avatarurl || avatarurl.indexOf('wx.qlogo.cn') === -1
16
+  
17
+  const grantPhone = (props.phone || props.both) && noPhone
18
+  const grantAvatar = (props.avatar || props.both) && noAvatar
19
+  
20
+  if (!grantPhone && !grantAvatar) {
21
+    if (props.onSuccess) {
22
+      props.onSuccess()
23
+    }
24
+  }
25
+  
26
+  return (
27
+    <Block>
28
+      {
29
+        grantPhone &&
30
+        (<AchievePhone user={props.person} onSuccess={noop}></AchievePhone>)
31
+      }
32
+
33
+      {
34
+        grantAvatar && !grantPhone &&
35
+        (<AchieveAvatar user={props.person} onSuccess={noop} ></AchieveAvatar>)
36
+      }
37
+    </Block>
38
+  )
39
+}

+ 32
- 0
src/onlineSelling/components/HotBlock/index.js Parādīt failu

@@ -0,0 +1,32 @@
1
+import { View } from "@tarojs/components";
2
+import './index.scss'
3
+
4
+function computeLevel (num) {
5
+  switch (true) {
6
+    case num > 200:
7
+      return 13;
8
+    case num > 100:
9
+      return 12;
10
+    case num > 50:
11
+      return 11;
12
+    case num > 40:
13
+      return 10;
14
+    case num > 30:
15
+      return 9;    
16
+    case num > 20:
17
+      return 8;
18
+    case num > 10:
19
+      return 7;
20
+    case num >= 6:
21
+      return 6;
22
+    case num > 0:
23
+      return num;
24
+    default:
25
+      return 0;
26
+  }
27
+}
28
+
29
+export default function HotBlock(props) {
30
+  const level = computeLevel(props.number)
31
+  return (<View className={`hotblock bkg-${level}`}>{props.children}</View>)
32
+}

+ 45
- 0
src/onlineSelling/components/HotBlock/index.scss Parādīt failu

@@ -0,0 +1,45 @@
1
+
2
+.hotblock {
3
+  &.bkg-0 {
4
+    background:#F8F8F8;
5
+  }
6
+  &.bkg-1 {
7
+    background:#F9DED1;
8
+  }
9
+  &.bkg-2 {
10
+    background:#F6D4C3;
11
+  }
12
+  &.bkg-3 {
13
+    background:#F8C6AD;
14
+  }
15
+  &.bkg-4 {
16
+    background:#FDDBDB;
17
+  }
18
+  &.bkg-5 {
19
+    background:#F9CCCC;
20
+  }
21
+  &.bkg-6 {
22
+    background:#F9B7B7;
23
+  }
24
+  &.bkg-7 {
25
+    background:#FFADAD;
26
+  }
27
+  &.bkg-8 {
28
+    background:#F59683;
29
+  }
30
+  &.bkg-9 {
31
+    background:#F7836C;
32
+  }
33
+  &.bkg-10 {
34
+    background:#F97459;
35
+  }
36
+  &.bkg-11 {
37
+    background:#FC6749;
38
+  }
39
+  &.bkg-12 {
40
+    background:#FD4E2B;
41
+  }
42
+  &.bkg-13 {
43
+    background:#FE2E2E;
44
+  }
45
+}

+ 47
- 0
src/onlineSelling/components/HouseCard/index.js Parādīt failu

@@ -0,0 +1,47 @@
1
+import { View, Image, Text } from "@tarojs/components";
2
+import { transferImage } from '@/utils/tools'
3
+import dayjs from 'dayjs'
4
+import emptyImg from '@/assets/empty.png'
5
+
6
+import './index.scss'
7
+
8
+export default function HouseCard(props) {
9
+  const {
10
+    buildingName,
11
+    termname,
12
+    blockName,
13
+    unitName,
14
+    roomName,
15
+    price,
16
+    createDate,
17
+    status,
18
+    buildingImgList = [],
19
+  } = props.summary || {}
20
+
21
+  const title = `${buildingName} ${termname||''} ${blockName} ${unitName} ${roomName}`
22
+  const thumb = (buildingImgList || []).length
23
+  // const thumb = (buildingImgList || []).length ? transferImage((buildingImgList)[0].url) : emptyImg
24
+  const showDT = dayjs(createDate).format('YYYY/MM/DD')
25
+  const wanY = Number(price)
26
+
27
+  return (
28
+    <View className="housecard">
29
+      <View className="head">
30
+        {thumb ? <Image className="thumb" src={transferImage((buildingImgList)[0].url)} mode="aspectFit" /> :
31
+          <Text style="font-size:26rpx;color:#666">暂无户型图</Text>
32
+        }
33
+        {/* <Image className="thumb" src={thumb} mode="aspectFit" /> */}
34
+      </View>
35
+      <View className="body">
36
+        <View className="badge">已预选</View>
37
+        <View className="title">{title}</View>
38
+        <View className="subtitle">
39
+          <Text>现价</Text>
40
+          <Text className="red">{wanY + '万元' || '待定'}</Text>
41
+        </View>
42
+        <View className="meta">{showDT}预选</View>
43
+        <View className="sign bg-success"></View>
44
+      </View>
45
+    </View>
46
+  )
47
+}

+ 81
- 0
src/onlineSelling/components/HouseCard/index.scss Parādīt failu

@@ -0,0 +1,81 @@
1
+.housecard {
2
+  // width: calc(100% - 32px);
3
+  width: 690px;
4
+  height: 250px;
5
+  background:#fff;
6
+  border-radius: 8px;
7
+  display: flex;
8
+  margin: 16px 30px;
9
+  box-shadow: 0 4px 15px 1px rgba(0, 0, 0, 0.12);
10
+  font-weight: 400;
11
+
12
+  .head {
13
+    width: 250px;
14
+    flex: none;
15
+    border-right: 2px solid rgba(0, 0, 0, 0.04);
16
+    padding: 20px;
17
+    display: flex;
18
+    align-items: center;
19
+    justify-content: center;
20
+
21
+
22
+    .thumb {
23
+      width: 100%;
24
+      height: 100%;
25
+    }
26
+  }
27
+
28
+  .body {
29
+    width: 438px;
30
+    flex: none;
31
+    position: relative;
32
+    line-height: 40px;
33
+    padding: 20px 16px;
34
+
35
+    .badge {
36
+      font-size: 30px;
37
+      color: #BB9C79;
38
+      text-align: right;
39
+      margin-right: 12px;
40
+    }
41
+
42
+    .title {
43
+      font-size: 26px;
44
+      font-weight: bold;
45
+      color:#333;
46
+      line-height: 1.8;
47
+    }
48
+
49
+    .subtitle {
50
+      font-size: 28px;
51
+      color:#333;
52
+    }
53
+
54
+    .meta {
55
+      font-size: 24px;
56
+      color:#999;
57
+    }
58
+
59
+    .sign {
60
+      width: 86px;
61
+      height: 86px;
62
+      position: absolute;
63
+      right: 10px;
64
+      bottom: 10px;
65
+    }
66
+  }
67
+
68
+  .red {
69
+    color: #FF3C3C;
70
+  }
71
+
72
+  .bg-success {
73
+    background: url(../../assets/success.png);
74
+    background-size: cover;
75
+  }
76
+
77
+  .bg-fail {
78
+    background: url(../../assets/fail.png);
79
+    background-size: cover;
80
+  }
81
+}

+ 22
- 0
src/onlineSelling/components/HouseGrid/Floor.js Parādīt failu

@@ -0,0 +1,22 @@
1
+import { View } from "@tarojs/components";
2
+import Room from "./Room";
3
+import './floor.scss'
4
+
5
+export default function Floor(props) {
6
+  const { floorName, roomList = [] } = props.dataset || {}
7
+
8
+  return (
9
+    <View className="floor">
10
+      <View className="head">{floorName}</View>
11
+      <View className="body">
12
+        {roomList.map((room) => {
13
+          return (
14
+            <View className="item" key={room.houseId} >
15
+              <Room dataset={room} onClick={props.onRoomClick}/>
16
+            </View>
17
+          )
18
+        })}
19
+      </View>
20
+    </View>
21
+  );
22
+}

+ 28
- 0
src/onlineSelling/components/HouseGrid/Room.js Parādīt failu

@@ -0,0 +1,28 @@
1
+import { View } from "@tarojs/components";
2
+import HotBlock from "../HotBlock";
3
+import './room.scss'
4
+
5
+export default function Room(props) {
6
+  const { roomName, heat, realHeat, price, apartmentName, status } = props.dataset || {}
7
+  const personNum = `(${realHeat + heat + 0}人)`
8
+
9
+  const handleClick = () => {
10
+    if (props.onClick) {
11
+      props.onClick(props.dataset || {})
12
+    }
13
+  }
14
+
15
+  const wanY = Number(price)
16
+
17
+  return (
18
+    <HotBlock number={heat + realHeat + 0}>
19
+      {status == '1' && <View className="room" onClick={handleClick}>
20
+        <View className="warn">{roomName || ''}</View>
21
+        <View className="warn">{personNum || ''}</View>
22
+        <View className="info" >{wanY}万元</View>
23
+        <View className="info">{apartmentName || ''}</View>
24
+      </View>}
25
+
26
+    </HotBlock>
27
+  )
28
+}

+ 39
- 0
src/onlineSelling/components/HouseGrid/Unit.js Parādīt failu

@@ -0,0 +1,39 @@
1
+import Taro, { Component, render } from '@tarojs/taro'
2
+import { View, Text } from "@tarojs/components";
3
+import Floor from "./Floor";
4
+import './unit.scss'
5
+
6
+
7
+export default class Unit extends Component {
8
+
9
+  onShowMoreClick = (item) => {
10
+
11
+    if (!item.noshow) {
12
+      item.noshow = true
13
+    } else {
14
+      item.noshow = false
15
+    }
16
+    this.setState({})
17
+  }
18
+  render() {
19
+    const { termName, blockName, unitName, noshow = false, floorList = [] } = this.props.dataset || {}
20
+    return (
21
+      <View className="unit">
22
+        <View className="head" onClick={() => this.onShowMoreClick(this.props.dataset)} >
23
+          <View>
24
+            <Text className="item">{termName}</Text>
25
+            <Text className="item">{blockName}</Text>
26
+            <Text className="item">{unitName}</Text>
27
+          </View>
28
+          <Image className="arrow" style={!noshow ? 'transform:rotate(90deg);' : ''} src={require('@/assets/person/arrow2.png')} mode="widthFix"></Image>
29
+        </View>
30
+        <View className="body" >
31
+          {!noshow && floorList.map((floor) => {
32
+            return <Floor key={floor.floorId} dataset={floor} onRoomClick={this.props.onRoomClick} />
33
+          })}
34
+        </View>
35
+      </View>
36
+    )
37
+  }
38
+
39
+}

+ 29
- 0
src/onlineSelling/components/HouseGrid/floor.scss Parādīt failu

@@ -0,0 +1,29 @@
1
+.floor {
2
+  display: flex;
3
+
4
+  .head {
5
+    font-size: 32rpx;
6
+    padding-top: 68rpx;
7
+    flex: none;
8
+    width: 14%;
9
+    text-align: left;
10
+  }
11
+
12
+  .body {
13
+    text-align: center;
14
+    flex: auto;
15
+    display: flex;
16
+    justify-content: flex-start;
17
+    flex-wrap: wrap;
18
+
19
+    .item {
20
+      width: 31%;
21
+      flex: none;
22
+      margin-right: 2%;
23
+      
24
+      &:nth-child(3) {
25
+        margin-right: 0;
26
+      }
27
+    }
28
+  }
29
+}

+ 16
- 0
src/onlineSelling/components/HouseGrid/index.js Parādīt failu

@@ -0,0 +1,16 @@
1
+import { Block } from "@tarojs/components"
2
+import Unit from './Unit'
3
+
4
+export default (props) => {
5
+  const unitList = (props.dataset || {}).unitList || []
6
+  const onRoomClick = props.onRoomClick || (() => {})
7
+
8
+  return (
9
+    <Block>
10
+      {
11
+        unitList.map((unit) => (<Unit key={unit.unitId} dataset={unit} onRoomClick={onRoomClick} />))
12
+      }
13
+    </Block>
14
+  )
15
+
16
+}

+ 22
- 0
src/onlineSelling/components/HouseGrid/room.scss Parādīt failu

@@ -0,0 +1,22 @@
1
+.room {
2
+  text-align: center;
3
+  margin-bottom: 16px;
4
+  padding: 20px 10px;
5
+  font-size: 28px;
6
+  line-height: 1.4em;
7
+  height: 192px;
8
+  overflow: hidden;
9
+
10
+  .info {
11
+    color: #333;
12
+    white-space:nowrap;
13
+  }
14
+
15
+  .warn {
16
+    color: #730000;
17
+  }
18
+
19
+  .tip {
20
+    color: #BB9C79;
21
+  }
22
+}

+ 25
- 0
src/onlineSelling/components/HouseGrid/unit.scss Parādīt failu

@@ -0,0 +1,25 @@
1
+.unit {
2
+  .head {
3
+    margin-bottom: 20px;
4
+    padding: 0 30px;
5
+    font-size: 32px;
6
+    line-height: 1.8em;
7
+    color: #333;
8
+    background-color: #F2F2F2;
9
+    display: flex;
10
+    align-items: center;
11
+    justify-content: space-between;
12
+    .item {
13
+      display: inline-block;
14
+      margin-right: 32px;
15
+    }
16
+    .arrow{
17
+      width: 16px;
18
+      transition: transform 0.6s ;
19
+    }
20
+  }
21
+
22
+  .body {
23
+    padding: 0 30px 20px 30px;
24
+  }
25
+}

+ 12
- 0
src/onlineSelling/components/NamedIcon/index.js Parādīt failu

@@ -0,0 +1,12 @@
1
+import { Text } from "@tarojs/components";
2
+import './index.scss'
3
+
4
+export default function NamedIcon(props) {
5
+  // const bg = `require('../../assets/${props.name}.png')`
6
+  const bg = `background: url(../../assets/${props.name}.png); background-size:cover;`
7
+  const size = props.size || 48
8
+  const bound = `width: ${size}rpx; height: ${size}rpx;`
9
+
10
+  // return <Text><Image src={bg}></Image><Text className="namedicon" style={`${bg} ${bound}`}></Text></Text> 
11
+  return <Text className="namedicon" style={`${bg} ${bound}`}></Text>
12
+}

+ 4
- 0
src/onlineSelling/components/NamedIcon/index.scss Parādīt failu

@@ -0,0 +1,4 @@
1
+.namedicon {
2
+  display: inline-block;
3
+  vertical-align: middle;
4
+}

+ 73
- 0
src/onlineSelling/components/ScrollMessage/index.js Parādīt failu

@@ -0,0 +1,73 @@
1
+import Taro, { Component, render } from '@tarojs/taro'
2
+import { Swiper, View, SwiperItem } from "@tarojs/components";
3
+import NamedIcon from '../NamedIcon';
4
+import { formateLeftTime } from '@/utils/tools'
5
+import dayjs from 'dayjs'
6
+import './index.scss'
7
+import TimeTicker from '../TimeTicker';
8
+
9
+export default class ScrollMessage extends Component {
10
+  formateTM = (dt) => {
11
+    const now = dayjs(new Date);
12
+    const { preselectionStartTime, preselectionEndTime } = this.props.summary || {}
13
+    const start = dayjs(preselectionStartTime)
14
+    const end = dayjs(preselectionEndTime)
15
+
16
+    let tip = ''
17
+    let useTK = true
18
+
19
+    if (now.isBefore(start)) {
20
+      tip = '距离预选开始还有'
21
+    } else if (now.isBefore(end)) {
22
+      tip = '距离预选结束还有'
23
+    } else {
24
+      tip = '预选已结束,请关注下轮预选'
25
+      useTK = false
26
+    }
27
+
28
+    return `${tip} ${useTK ? formateLeftTime(dt, 'min') : ''}`
29
+  }
30
+
31
+  computeDate = () => {
32
+    const now = dayjs(new Date);
33
+    const { preselectionStartTime, preselectionEndTime } = this.props.summary || {}
34
+    const start = dayjs(preselectionStartTime)
35
+    const end = dayjs(preselectionEndTime)
36
+
37
+    if (now.isBefore(start)) {
38
+      return [now, start]
39
+    } else if (now.isBefore(end)) {
40
+      return [now, end]
41
+    } else {
42
+      return [now, now]
43
+    }
44
+  }
45
+
46
+  render() {
47
+    const [start, end] = this.computeDate()
48
+    const { salesNumber, preselectionNumber, heatNumber } = this.props.summary || {}
49
+    const personNum = heatNumber + preselectionNumber + 0
50
+  
51
+    const notice = `当前 ${salesNumber} 套房源已有 ${personNum} 人成功预选`
52
+
53
+    return (
54
+      <View className="scrollmessage">
55
+        <View className="head">
56
+          <Image style="width:44rpx;height:44rpx;margin-top: 10rpx;" src={require('../../assets/notice.png')}></Image>
57
+          {/* <NamedIcon name="notice" size={44} /> */}
58
+        </View>
59
+        <View className="body">
60
+          <Swiper vertical autoplay>
61
+            <SwiperItem>
62
+              <TimeTicker startTime={start} endTime={end} translate={this.formateTM} />
63
+            </SwiperItem>
64
+            {personNum > 0 && <SwiperItem>
65
+              <View>{notice}</View>
66
+            </SwiperItem>}
67
+          </Swiper>
68
+        </View>
69
+      </View>
70
+    )
71
+  }
72
+}
73
+

+ 12
- 0
src/onlineSelling/components/ScrollMessage/index.scss Parādīt failu

@@ -0,0 +1,12 @@
1
+.scrollmessage {
2
+  display: flex;
3
+
4
+  .head {
5
+    flex: none;
6
+    width: 60px;
7
+  }
8
+
9
+  .body {
10
+    flex: auto;
11
+  }
12
+}

+ 21
- 0
src/onlineSelling/components/ShareButtons/ShareBtn.js Parādīt failu

@@ -0,0 +1,21 @@
1
+import { View, Button } from "@tarojs/components";
2
+import './index.scss'
3
+import NamedIcon from "../NamedIcon";
4
+
5
+export default function ShareBtn(props) {
6
+
7
+  const handleClick = props.onClick || (() => {})
8
+
9
+  return (
10
+    <Button className="sharebtn" onClick={handleClick} openType={props.openType}>
11
+      <View>
12
+        {/* <NamedIcon name={props.name} size={props.size || 56} /> */}
13
+        {props.name=='share-friends'&&<Image style="width:56rpx;height:56rpx" src={require('../../assets/share-friends.png')}></Image>}
14
+        {props.name=='sharing-circleoffriends'&&<Image style="width:56rpx;height:56rpx" src={require('../../assets/sharing-circleoffriends.png')}></Image>}
15
+      </View>
16
+      <View>
17
+        <Text>{props.tips}</Text>
18
+      </View>
19
+    </Button>
20
+  )
21
+}

+ 27
- 0
src/onlineSelling/components/ShareButtons/index.js Parādīt failu

@@ -0,0 +1,27 @@
1
+
2
+import { View } from '@tarojs/components'
3
+import './index.scss'
4
+import ShareBtn from './ShareBtn'
5
+
6
+export default function ShareButtons(props) {
7
+
8
+  const tips = !props.circleBtn ? '后台暂未配置海报图,请选择分享给好友或群' : ''
9
+
10
+  return (
11
+    <View className="sharebuttons">
12
+      <View className="btns">
13
+        <View className="btn">
14
+          <ShareBtn name="share-friends" tips="发送朋友或群" openType="share" onClick={props.onShareFrineds} />
15
+        </View>
16
+        {props.circleBtn &&
17
+        (
18
+          <View className="btn">
19
+            <ShareBtn name="sharing-circleoffriends" tips="分享至朋友圈" onClick={props.onSharingCircleOfFriends} />
20
+          </View>
21
+        )
22
+        }
23
+      </View>
24
+      <View className="tips">{tips}</View>
25
+    </View>
26
+  )
27
+}

+ 32
- 0
src/onlineSelling/components/ShareButtons/index.scss Parādīt failu

@@ -0,0 +1,32 @@
1
+.sharebuttons {
2
+  padding-top: 36rpx;
3
+  text-align: center;
4
+
5
+  .btns {
6
+    display: flex;
7
+    justify-content: center;
8
+
9
+    .btn {
10
+      flex: none;
11
+      & + .btn {
12
+        margin-left: 30rpx;
13
+      }
14
+    }
15
+  }
16
+
17
+  .tips {
18
+    padding-bottom: 20rpx;
19
+    height: 44rpx;
20
+    font-size: 24rpx;
21
+    line-height: 1em;
22
+    color: #BCBCBC;
23
+  }
24
+}
25
+
26
+.sharebtn {
27
+  font-size: 26rpx;
28
+  line-height: 56rpx;
29
+  color: #666;
30
+  text-align: center;
31
+  background: transparent;
32
+}

+ 47
- 0
src/onlineSelling/components/TimeTicker/index.js Parādīt failu

@@ -0,0 +1,47 @@
1
+import Taro, { Component } from '@tarojs/taro'
2
+import { View, Text } from '@tarojs/components'
3
+import dayjs from 'dayjs'
4
+import { formateLeftTime } from '@/utils/tools'
5
+import './index.scss'
6
+
7
+export default class TimeTicker extends Component {
8
+
9
+    state = {
10
+      tips: '',
11
+    }
12
+
13
+    tk = undefined
14
+
15
+    componentWillMount() {
16
+      this.tk = setInterval(() => {
17
+        const now = dayjs()
18
+        const start = dayjs(this.props.startTime || now)
19
+        const end = dayjs(this.props.endTime || now)
20
+
21
+        const tm = end.diff(start)
22
+        const translate = this.props.translate || (x => formateLeftTime(x, 'min'))
23
+
24
+        if (tm >= 0) {
25
+          this.setState({
26
+            tips: translate(tm)
27
+          })
28
+        }
29
+
30
+      }, this.props.interval || 1000)
31
+    }
32
+
33
+    componentWillUnmount() {
34
+      if (this.tk) {
35
+        clearInterval(this.tk)
36
+      }
37
+    }
38
+
39
+    render() {
40
+        return (
41
+            <View className="timeticker">
42
+                <Text></Text>
43
+                <Text>{tips}</Text>
44
+            </View>
45
+        )
46
+    }
47
+}

+ 4
- 0
src/onlineSelling/components/TimeTicker/index.scss Parādīt failu

@@ -0,0 +1,4 @@
1
+.timeticker {
2
+  // color: #999;
3
+  // background:rgba(248,248,248,1);
4
+}

+ 232
- 0
src/onlineSelling/pages/detail/index.js Parādīt failu

@@ -0,0 +1,232 @@
1
+import Taro, { Component } from '@tarojs/taro';
2
+import './index.scss'
3
+import AchievePhone from '@/components/achievePhone'
4
+import AchieveAvatar from '@/components/achieveAvatar'
5
+import { connect } from '@tarojs/redux'
6
+import ready from '@/utils/ready'
7
+import { queryHouseDetail } from '@/services/project'
8
+import dayjs from 'dayjs'
9
+import { transferImage } from '@/utils/tools'
10
+import Blank from '../../components/Blank'
11
+import * as noticeType from '@/constants/common.js'
12
+
13
+@connect(
14
+  ({ user }) => ({ ...user })
15
+)
16
+
17
+export default class Index extends Component {
18
+  config = {
19
+    navigationBarTitleText: '房源详情',
20
+  }
21
+
22
+  state = {
23
+    grantPhoneVisible: false, // 授权电话
24
+    grantAvatarVisible: false, // 授权头像
25
+    houseDetail: null,
26
+    popVisiable: false,
27
+  }
28
+
29
+
30
+  componentDidShow() {
31
+
32
+    ready.queue(() => {
33
+      // 分享场景需要先授权手机, 再授权头像
34
+      if (this.toggleGrantPhone()) {
35
+        this.toggleGrantAvatar()
36
+      }
37
+      const id = this.$router.params.id
38
+      const { userInfo: { person: { personId } } } = this.props
39
+      const params = {
40
+        houseId: id,
41
+        personId,
42
+      }
43
+      queryHouseDetail(params).then(res => {
44
+        this.setState({
45
+          houseDetail: res || {},
46
+          buildingImgList: res.buildingImgList || []
47
+        })
48
+      })
49
+
50
+    })
51
+  }
52
+
53
+
54
+
55
+  // 调起授权电话
56
+  toggleGrantPhone = () => {
57
+    const { userInfo: { person: { phone, tel } } } = this.props
58
+    if (!phone && !tel) {
59
+      this.setState({ grantPhoneVisible: true })
60
+      return false
61
+    }
62
+    console.log('phone:', phone, 'tel:', tel, '!!!!!')
63
+    console.log(this.props, 'this.propsphone!!!!!')
64
+
65
+    return true
66
+  }
67
+
68
+  // 调起授权头像
69
+  toggleGrantAvatar = () => {
70
+    const { userInfo: { person: { avatarurl } } } = this.props
71
+
72
+    if (!avatarurl || avatarurl.indexOf('wx.qlogo.cn') === -1) {
73
+      this.setState({ grantAvatarVisible: true })
74
+      return false
75
+    }
76
+
77
+    console.log(avatarurl, "avatarurl")
78
+    console.log(this.props.userInfo, "this.props")
79
+    return true
80
+  }
81
+
82
+  chooseBtn(type) {
83
+    const { houseDetail: { houseId, buildingId } } = this.state
84
+    Taro.navigateTo({
85
+      url: `/onlineSelling/pages/detail/resultPage?type=${type}&id=${houseId}&buildingId=${buildingId}`
86
+    })
87
+    this.setState({ popVisiable: false })
88
+  }
89
+
90
+
91
+  handleChat(buildingId) {
92
+    Taro.navigateTo({
93
+      url: `/pages/card/list/index?buildingId=${buildingId}`
94
+    })
95
+  }
96
+
97
+  handlePanoramaClick(panoramaLink) {
98
+    console.log(panoramaLink, "panoramapanoramapanoramapanoramapanoramapanoramapanoramapanoramapanorama")
99
+
100
+    if (!panoramaLink) return;
101
+
102
+    Taro.navigateTo({ url: `/pages/project/panorama/index?url=${encodeURIComponent(panoramaLink)}` })
103
+
104
+  }
105
+
106
+  goToPanorama(panoramaLink) {
107
+    if (!panoramaLink) return;
108
+
109
+    this.navigateTo(`/pages/project/panorama/index?url=${encodeURIComponent(panoramaLink)}`)
110
+
111
+  }
112
+
113
+  handlePanoramaClick(panoramaLink) {
114
+    this.goToPanorama(panoramaLink)
115
+  }
116
+  navigateTo(url) {
117
+    Taro.navigateTo({ url: url })
118
+  }
119
+  open() {
120
+    const { houseDetail: { isPreselect } } = this.state
121
+    if (!isPreselect) {
122
+      const { userInfo: { miniApp: { tpls } } } = this.props
123
+
124
+      const tplId = (tpls.filter(x => x.tplType == noticeType.TPL_HOUSE && x.isSubscribe == true)[0] || {}).tplId
125
+      const that = this
126
+      wx.requestSubscribeMessage({
127
+        tmplIds: [tplId],
128
+        success(res) { },
129
+        fail(res) { },
130
+        complete() {
131
+          that.setState({ popVisiable: true })
132
+        }
133
+      })
134
+    } else {
135
+      this.setState({ popVisiable: true })
136
+    }
137
+
138
+  }
139
+
140
+
141
+
142
+  render() {
143
+    const { grantPhoneVisible, grantAvatarVisible, houseDetail, buildingImgList, popVisiable } = this.state
144
+    const { userInfo } = this.props
145
+    const address = `${houseDetail.buildingName || ''}${houseDetail.termName || ''}${houseDetail.blockName || ''}${houseDetail.unitName || ''}${houseDetail.floorName || ''}${houseDetail.roomName || ''}`
146
+
147
+    return (
148
+      <Block>
149
+        {
150
+          grantPhoneVisible &&
151
+          <AchievePhone user={userInfo.person} onSuccess={this.toggleGrantAvatar}></AchievePhone>
152
+        }
153
+        {
154
+          grantAvatarVisible &&
155
+          <AchieveAvatar user={userInfo.person} onSuccess={() => { this.setState({ grantAvatarVisible: false }) }} ></AchieveAvatar>
156
+        }
157
+        {popVisiable &&
158
+          <Block>
159
+            <View className="mask"> </View>
160
+            <View className="pop-box">
161
+              <View className="title" >{!houseDetail.isPreselect ? `确认使用手机号${userInfo.person.phone || userInfo.person.tel}预选此房源?` : '确认取消预选此房源?'}</View>
162
+              <View className="sure" onClick={!houseDetail.isPreselect ? () => this.chooseBtn('add') : () => this.chooseBtn('cancel')}>确定</View>
163
+              <View className="cancel" onClick={() => this.setState({ popVisiable: false })}>取消</View>
164
+            </View>
165
+          </Block>
166
+        }
167
+
168
+        <View className='detail'>
169
+          <View className='detail-top'>
170
+            {buildingImgList.length ?
171
+              <Image className="cover-img" mode="widthFix" onClick={() => buildingImgList[0].type == '1' ? this.handlePanoramaClick(buildingImgList[0].panoramaLink) : ''} src={transferImage(buildingImgList[0].url)} />
172
+              : <Blank tips="暂无户型信息"></Blank>
173
+            }
174
+          </View>
175
+          {buildingImgList.length && buildingImgList[0].type == '1' &&
176
+            <Image className="vr-img" onClick={() => this.handlePanoramaClick(buildingImgList[0].panoramaLink)} src={require('@/assets/vr.png')} />
177
+          }
178
+          <ScrollView
179
+            enableBackToTop
180
+            className="wrap"
181
+            scrollY>
182
+            <View className='detail__main'>
183
+              <View style="padding: 0 30rpx;">
184
+                <View className="name">{houseDetail.apartmentName || ''}</View>
185
+                <View className="btn" onClick={() => this.handleChat(houseDetail.buildingId)}>询问优惠</View>
186
+                <View className="price">
187
+                  现价:{houseDetail.price}万
188
+              </View>
189
+                {houseDetail.apartmentName &&
190
+                  <View className="area">
191
+                    {houseDetail.buildingArea ? <Text>建筑面积约<Text style="color:#FE1C1C">{houseDetail.buildingArea}</Text>m² </Text> : '建筑面积待定'}
192
+                    <Text style="margin-left:20rpx">{houseDetail.insideArea ? <Text>使用面积约<Text style="color:#FE1C1C">{houseDetail.insideArea}</Text>m² </Text> : '使用面积待定'}</Text>
193
+                  </View>
194
+                }
195
+                <View className="address">
196
+                  <Image className="location-icon" src={require('../../assets/location.png')}></Image>{address || ''}
197
+                </View>
198
+                <View className="date">
199
+                  预选时间:{dayjs(houseDetail.preselectionStartTime).format('MM/DD HH:mm:ss')}--{dayjs(houseDetail.preselectionEndTime).format('MM/DD HH:mm:ss')}
200
+                </View>
201
+                {/* <View className="date">
202
+                  认筹时间:2/12 12:23:33--2/13 12:23:34
203
+              </View> */}
204
+              </View>
205
+              <View className="num">
206
+                已有{houseDetail.realHeat + houseDetail.heat + 0}人预选此房源,快快预选认筹~
207
+              </View>
208
+              <View style="padding: 0 30rpx;">
209
+                {!houseDetail.isPreselect ?
210
+                  <View className="choose-btn" onClick={() => this.open()}>
211
+                    预选此房源
212
+                  </View> : <View className="choose-btn" onClick={() => this.open()}>
213
+                    取消预选
214
+                  </View>
215
+                }
216
+                <View className="close-btn">
217
+                  认筹功能未开放
218
+              </View>
219
+              </View>
220
+
221
+
222
+            </View>
223
+          </ScrollView>
224
+
225
+
226
+
227
+        </View>
228
+
229
+      </Block >
230
+    );
231
+  }
232
+}

+ 201
- 0
src/onlineSelling/pages/detail/index.scss Parādīt failu

@@ -0,0 +1,201 @@
1
+@import "@/styles/mixins.scss";
2
+@import "@/styles/theme.scss";
3
+.mask{
4
+  width: 100vw;
5
+  height: 100vh;
6
+  position: fixed;
7
+  top: 0;
8
+  left: 0;
9
+  background-color: rgba(0,0,0,.34);
10
+  z-index: 99;
11
+
12
+}
13
+.pop-box{
14
+  position: fixed;
15
+  bottom: 0;
16
+  width: 100%;
17
+  z-index: 999;
18
+  text-align: center;
19
+  background-color: #fff;
20
+  box-shadow: 0px -2px 10px rgb(189, 187, 187);
21
+  .title{
22
+    line-height: 130px;
23
+    font-size: 26px;
24
+    color: #666;
25
+    border-bottom: 2px solid rgba(26,22,22,0.32);
26
+  
27
+  }
28
+  .sure{
29
+    line-height: 94px;
30
+    font-size: 36px;
31
+    color: $primary-color;
32
+    border-bottom: 2px solid rgba(26,22,22,0.32);
33
+  }
34
+  .cancel{
35
+    line-height: 94px;
36
+    font-size: 36px;
37
+    color: #999;
38
+  }
39
+
40
+}
41
+.vr-img{
42
+  position: fixed;
43
+  top: 452px;
44
+  left: 327px;
45
+  width:96px;
46
+  height:88px;
47
+}
48
+.detail {
49
+  position: relative;
50
+  width: 100%;
51
+  font-weight: 300;
52
+  background-color: #F8F8F8;
53
+  .detail-top{
54
+    width:100%;
55
+    height:600px;
56
+    position: fixed;
57
+    top: 0;
58
+    background-color: #F8F8F8;
59
+ 
60
+    
61
+    .cover-img{
62
+      width:100%;
63
+      height:100%;
64
+      min-height: 600px;
65
+    }
66
+    
67
+    .norecord-img{
68
+      width:280px;
69
+      height:220px;
70
+      margin: 140px auto 4px auto;
71
+    }
72
+    .norecord-text{
73
+     font-size: 28px;
74
+     color: #999;
75
+    }
76
+  }
77
+ 
78
+  .wrap {
79
+    margin-top: 570px;
80
+    background: transparent;
81
+    position: relative;
82
+
83
+  }
84
+
85
+  &__main {
86
+    background: #fff;
87
+    border-radius: 40px 40px 0 0;
88
+    padding: 60px 0;
89
+   
90
+    .name{
91
+      font-size: 44px;
92
+      color: #333333;
93
+      font-weight: 600;
94
+    }
95
+    .btn{
96
+      background-color: #F3B82E;
97
+      font-size: 30px;
98
+      color: #fff;
99
+      padding: 14px 28px;
100
+      font-weight: 300;
101
+      border-radius: 36px;
102
+      position: absolute;
103
+      right: 30px;
104
+      top: 48px;
105
+    }
106
+    
107
+    .price{
108
+      color: #FE1C1C;
109
+      font-size: 38px;
110
+      font-weight: 600;
111
+    }
112
+    .area{
113
+      font-size: 34px;
114
+      color: #666;
115
+      font-weight: 300;
116
+      line-height: 50px;
117
+    }
118
+    .address{
119
+      font-size: 30px;
120
+      color: #666;
121
+      font-weight: 300;
122
+      margin-bottom: 10px;
123
+      display: flex;
124
+      align-items: center;
125
+      margin: 0;
126
+      line-height: 60px;
127
+      .location-icon{
128
+        width:40px;
129
+        height:40px;
130
+        margin-left: -6px;
131
+        margin-right: 6px;
132
+      }
133
+    }
134
+    .date{
135
+      font-size: 22px;
136
+      color: #999;
137
+      line-height: 1.7;
138
+    }
139
+    .num{
140
+      font-size: 26px;
141
+      color: #999;
142
+      background-color: #F8F8F8;
143
+      line-height: 54px;
144
+      padding: 0 30px;
145
+      margin-top: 10px;
146
+      font-weight: 300;
147
+      margin-bottom: 78px;
148
+   
149
+    }
150
+    .choose-btn{
151
+      color: #fff;
152
+      font-size: 36px;
153
+      background-color: $primary-color;
154
+      line-height: 94px;
155
+      border-radius:10px;
156
+      text-align: center; 
157
+    }
158
+    .close-btn{
159
+      color: $primary-color;
160
+      font-size: 36px;
161
+      background-color: #F8F8F8;
162
+      line-height: 94px;
163
+      border-radius:10px;
164
+      text-align: center;
165
+      margin: 40px 0;
166
+    }
167
+  }
168
+}
169
+
170
+
171
+.result{
172
+  background-color: #fff;
173
+  height: 100vh;
174
+  width: 100vw;
175
+  position: relative;
176
+  text-align: center;
177
+  padding-top: 20vh;
178
+  font-weight: 300;
179
+  .result-img{
180
+    width:168px;
181
+    height:168px;
182
+  }
183
+  .status{
184
+    font-size: 36px;
185
+    color: #333;
186
+    line-height: 1.8;
187
+  }
188
+  .tip{
189
+    font-size: 34px;
190
+    color: #999;
191
+    padding: 0 100px;
192
+  }
193
+  .contact{
194
+    position: absolute;
195
+    bottom: 8vh;
196
+    font-size: 36px;
197
+    color: #3DE344;
198
+    left: 50%;
199
+    margin-left: -108px;
200
+  }
201
+}

+ 91
- 0
src/onlineSelling/pages/detail/resultPage.js Parādīt failu

@@ -0,0 +1,91 @@
1
+import Taro, { Component } from '@tarojs/taro';
2
+import './index.scss'
3
+import { connect } from '@tarojs/redux'
4
+import ready from '@/utils/ready'
5
+import { addPreselection, cancelPreselection } from '@/services/project'
6
+
7
+@connect(
8
+  ({ user }) => ({ ...user })
9
+)
10
+
11
+export default class Index extends Component {
12
+  config = {
13
+    navigationBarTitleText: '',
14
+  }
15
+
16
+  state = {
17
+    status: 2, // 1为成功 2为处理中 3为失败
18
+    statusText: '',// 文案
19
+    statusText2: null// 文案2
20
+  }
21
+
22
+  componentWillMount() {
23
+
24
+    ready.queue(() => {
25
+      const { type, id } = this.$router.params
26
+      const { userInfo: { person: { personId, orgId } } } = this.props
27
+      const params = {
28
+        houseId: id,
29
+        personId,
30
+        orgId,
31
+      }
32
+      const params2 = {
33
+        houseId: id,
34
+        personId,
35
+      }
36
+      if (type == 'add') {
37
+        Taro.setNavigationBarTitle({ title: '预选结果' })
38
+        addPreselection(params).then(res => {
39
+          this.setState({
40
+            status: 1,
41
+            statusText: '您已成功预选此房源',
42
+            statusText2: '以后可以到个人中心查看选房记录',
43
+          })
44
+        }).catch(err => {
45
+          this.setState({
46
+            status: 3,
47
+            statusText: err.message
48
+          })
49
+        })
50
+      } else {
51
+        Taro.setNavigationBarTitle({ title: '取消预选' })
52
+        cancelPreselection( params2).then(res => {
53
+          this.setState({
54
+            status: 1,
55
+            statusText: '您已成功取消预选此房源'
56
+          })
57
+        }).catch(err => {
58
+          this.setState({
59
+            status: 3,
60
+            statusText: err.message
61
+          })
62
+        })
63
+      }
64
+    })
65
+  }
66
+  handleChat() {
67
+    const { buildingId } = this.$router.params
68
+
69
+    Taro.navigateTo({
70
+      url: `/pages/card/list/index?buildingId=${buildingId}`
71
+    })
72
+  }
73
+  render() {
74
+    const { status, statusText2 } = this.state
75
+    const { type } = this.$router.params
76
+    return (
77
+      <View className="result">
78
+        {status == 1 && <Image className="result-img" src={require('../../assets/success2.png')}></Image>}
79
+        {status == 2 && <Image className="result-img" src={require('../../assets/going.png')}></Image>}
80
+        {status == 3 && <Image className="result-img" src={require('../../assets/fail2.png')}></Image>}
81
+        {type == 'add' && <View className="status">{status == 1 ? '预选成功' : status == 2 ? '正在处理' : '预选失败'}</View>}
82
+        {type != 'add' && <View className="status">{status == 1 ? '取消成功' : status == 2 ? '正在处理' : '取消失败'}</View>}
83
+        <View className="tip" style="margin-bottom:10rpx">{statusText}</View>
84
+        {statusText2 && <View className="tip">{statusText2}</View>}
85
+
86
+        <View className="contact" onClick={() => this.handleChat()}>联系置业顾问</View>
87
+      </View>
88
+
89
+    );
90
+  }
91
+}

+ 160
- 0
src/onlineSelling/pages/help/index.js Parādīt failu

@@ -0,0 +1,160 @@
1
+import Taro, { Component } from '@tarojs/taro'
2
+import { View } from '@tarojs/components'
3
+import './index.scss'
4
+import HotBlock from '../../components/HotBlock'
5
+
6
+export default class Help extends Component {
7
+  config = {
8
+    navigationBarTitleText: '帮助说明'
9
+  }
10
+  handleChat() {
11
+    const { buildingId } = this.$router.params
12
+    if (buildingId) {
13
+      Taro.navigateTo({
14
+        url: `/pages/card/list/index?buildingId=${buildingId}`
15
+      })
16
+    } else {
17
+      Taro.showToast({ title: '未获取到buildingId', icon: 'none', duration: 2000 })
18
+    }
19
+
20
+  }
21
+  render() {
22
+    const hots = [
23
+      {
24
+        label: '(0)',
25
+        value: 0,
26
+      },
27
+      {
28
+        label: '(1)',
29
+        value: 1,
30
+      },
31
+      {
32
+        label: '(2)',
33
+        value: 2,
34
+      },
35
+      {
36
+        label: '(3)',
37
+        value: 3,
38
+      },
39
+      {
40
+        label: '(4)',
41
+        value: 4,
42
+      },
43
+      {
44
+        label: '(5)',
45
+        value: 5,
46
+      },
47
+      {
48
+        label: '(6~10)',
49
+        value: 8,
50
+      },
51
+      {
52
+        label: '(11~20)',
53
+        value: 15,
54
+      },
55
+      {
56
+        label: '(21~30)',
57
+        value: 25,
58
+      },
59
+      {
60
+        label: '(31~40)',
61
+        value: 35,
62
+      },
63
+      {
64
+        label: '(41~50)',
65
+        value: 45,
66
+      },
67
+      {
68
+        label: '(51~100)',
69
+        value: 80,
70
+      },
71
+      {
72
+        label: '(101~200)',
73
+        value: 150,
74
+      },
75
+      {
76
+        label: '(200以上)',
77
+        value: 201,
78
+      },
79
+    ]
80
+
81
+    return (
82
+      <View className="article">
83
+        <View className="section">
84
+          <View className="title">1.图例解释:</View>
85
+          <View>
86
+            <View className="cell flex">
87
+              <View className="head item-0">1号楼</View>
88
+              <View className="body item-1">楼栋/幢</View>
89
+            </View>
90
+            <View className="cell flex">
91
+              <View className="head item-0">2 单元</View>
92
+              <View className="body item-1">单元</View>
93
+            </View>
94
+            <View className="cell flex">
95
+              <View className="head item-0">3 楼</View>
96
+              <View className="body item-1">楼层</View>
97
+            </View>
98
+            <View className="cell flex">
99
+              <View className="head item-0">
100
+                <View>301 (1人)</View>
101
+                <View>234万</View>
102
+                <View>A户型</View>
103
+              </View>
104
+              <View className="body item-1">
105
+                <View>房号(预选人数)</View>
106
+                <View>价格</View>
107
+                <View>户型名</View>
108
+              </View>
109
+            </View>
110
+          </View>
111
+        </View>
112
+        <View className="section">
113
+          <View className="title">2.预选人数(热度):</View>
114
+          <View>每有一位客户预选此房源,热度自动增加1,热度越大说明想购买此房源的用户越多,认筹摇号购买难度越大</View>
115
+        </View>
116
+        <View className="section">
117
+          <View className="title">3.热度指标值与颜色关系:</View>
118
+          <View className="flex" style="flex-wrap: wrap">
119
+            {hots.map(b => (<View className="item-0 hot-box" key={b.value}><HotBlock number={b.value}>{b.label}</HotBlock></View>))}
120
+          </View>
121
+        </View>
122
+        <View className="section">
123
+          <View className="title">4.为何需要登录:</View>
124
+          <View>预选房源和认筹房源按相关法律法规需要实名认证,通过手机号授权登录可以实现快捷认证。登录预选认筹后可以登录账号查看预选记录和认筹记录而不会遗失数据。</View>
125
+        </View>
126
+        <View className="section">
127
+          <View className="title">5.楼盘、房源问题:</View>
128
+          <View>和楼盘、房源相关问题可以联系置业顾问->在线置业顾问</View>
129
+        </View>
130
+        <View className="section">
131
+          <View className="title">6.如何按面积或价格筛选房源:</View>
132
+          <View>房源页面点击筛选按钮,选择一个户型或者价格即可查看按户型或价格筛选后的房源。</View>
133
+        </View>
134
+        <View className="section">
135
+          <View className="title">7.如何把在线选房分享我的亲朋好友:</View>
136
+          <View>房源页面点击分享按钮,选择直接分享发送链接给好友或群,选择生成海报保存图片,相册中找海报图片发送给好友或者朋友圈即可。</View>
137
+        </View>
138
+        <View className="section">
139
+          <View className="title">8.为什么房源详情中预选/取消按钮或认筹/取消按钮操作失败:</View>
140
+          <View>
141
+            <View>可能原因:</View>
142
+            <View>1)没有到预选或认筹时间,请关注通知或联系置业顾问</View>
143
+            <View>2)已过预选或认筹时间,请关注通知 或 联系置业顾问</View>
144
+            <View>3)其他原因,请 联系置业顾问</View>
145
+          </View>
146
+        </View>
147
+        <View className="section">
148
+          <View className="title">9.为什么之前看到的房源现在找不到了:</View>
149
+          <View>可能由于线上线下销售工作同步不及时原因,临时取消了此房源的线上预选和销售工作,有疑问请  联系置业顾问</View>
150
+        </View>
151
+        <View className="section">
152
+          <View className="title">10.如何查看我的选房记录:</View>
153
+          <View>房源页面点击下方选房记录按钮进入个人选房记录查看。或直接进入个人中心查看选房记录。</View>
154
+        </View>
155
+        <Image onClick={() => this.handleChat()} style="width: 110rpx;height: 110rpx;position: fixed;bottom: 40px;right: 20rpx;" src={require('../../assets/consultant.png')}></Image>
156
+      </View>
157
+    )
158
+  }
159
+
160
+}

+ 45
- 0
src/onlineSelling/pages/help/index.scss Parādīt failu

@@ -0,0 +1,45 @@
1
+.article {
2
+  padding: 30rpx;
3
+  font-size: 28rpx;
4
+  line-height: 1.6em;
5
+  color: #666;
6
+
7
+  .section {
8
+    margin-bottom: 40rpx;
9
+
10
+    .title {
11
+      color: #333;
12
+    }
13
+  }
14
+
15
+
16
+  .flex {
17
+    display: flex;
18
+
19
+    .item-0 {
20
+      flex: none;
21
+    }
22
+
23
+    .item-1 {
24
+      flex: auto;
25
+    }
26
+  }
27
+
28
+  .cell {
29
+    padding: 28rpx 0;
30
+    box-shadow:0px 1rpx 0px 0px rgba(0, 0, 0, 0.08);
31
+
32
+    .head {
33
+      width: 180rpx;
34
+    }
35
+  }
36
+
37
+  .hot-box {
38
+    width: 23%;
39
+    height: 60rpx;
40
+    line-height: 60rpx;
41
+    text-align: center;
42
+    
43
+    margin: 2% 2% 0 0;
44
+  }
45
+}

+ 652
- 0
src/onlineSelling/pages/houseList/index.js Parādīt failu

@@ -0,0 +1,652 @@
1
+import Taro, { Component } from '@tarojs/taro'
2
+import { View, ScrollView, Button, Swiper, Block } from '@tarojs/components'
3
+import HouseGrid from '../../components/HouseGrid'
4
+import NamedIcon from '../../components/NamedIcon'
5
+import ScrollMessage from '../../components/ScrollMessage'
6
+import Blank from '../../components/Blank'
7
+import ActSheet from '../../components/ActSheet'
8
+import ShareButtons from '../../components/ShareButtons'
9
+import GrantProfile from '../../components/GrantProfile'
10
+// import Poster from './poster'
11
+import Poster from '@/components/Poster'
12
+import { connect } from '@tarojs/redux'
13
+import ready from '@/utils/ready'
14
+import { queryHouseList, queryNoticeInfo, queryApartmentType, querySalesInfo } from '@/services/project'
15
+import { getQrCodeParams } from '@/utils/qrcode'
16
+import { withDetail } from '@/utils/page'
17
+import { share as shareSavePoint } from '@/utils/shareSavePoint'
18
+import { ROLE_CODE } from '@/constants/user'
19
+import { report as reportCustomer } from '@/utils/customer'
20
+import { getMiniQrcode, savePoint, updatePoint } from '@/services/common'
21
+import { getCanvasConfig, transferImage } from '@/utils/tools'
22
+import { getCardDetail } from '@/services/card'
23
+import Consultant from '@/components/consultant'
24
+import './index.scss'
25
+import { Loading } from '@/components/Loading'
26
+
27
+@connect(s => s.user)
28
+@withDetail({
29
+  track: {
30
+    event: 'house_list',
31
+    eventType: 'house',
32
+    propertyName: '查看房源列表',
33
+    data: '{}',
34
+  }
35
+})
36
+export default class HouseList extends Component {
37
+  config = {
38
+    navigationBarTitleText: '房源',
39
+  }
40
+  state = {
41
+    showShareMenu: false,
42
+    showPoster: false,
43
+    tipsList: [],
44
+    houseList: [{}],
45
+    id: null,
46
+    qrcodeParams: {},
47
+    current: 0,
48
+    priceCurrent: -1,
49
+    apartmentList: [],
50
+    conditionVisible: false,
51
+    startPrice: '',
52
+    endPrice: '',
53
+    apartmentId: '',
54
+    reportedCustomer: false,
55
+    posterShow: false,
56
+    posterData: {},
57
+    buildingId: null,
58
+    salesBatchDetail: {},
59
+    posterConfig: [],
60
+    consultData: {}, // 分享的置业顾问信息
61
+    consultShow: false,  // 置业顾问悬浮框显示隐藏
62
+    noRecord: false,
63
+    loading: true,
64
+  }
65
+
66
+
67
+  componentDidShow() {
68
+
69
+    ready.queue(() => {
70
+      this.setState({ showShareMenu: false })
71
+      this.initPageData()
72
+    })
73
+  }
74
+  
75
+
76
+  componentWillReceiveProps() {
77
+    this.reportClientFn()
78
+  }
79
+
80
+  transTPLs2Configs(tpls, params) {
81
+    return tpls.map((tpl) => {
82
+      const conf = getCanvasConfig(tpl.configs, params)
83
+      return { ...conf }
84
+    })
85
+  }
86
+
87
+  // 报备客户
88
+  reportClientFn() {
89
+
90
+    const { qrcodeParams } = this.state
91
+    const consultant = this.$router.params.consultant || qrcodeParams.consultant || ""
92
+    const { userInfo: { person } } = this.props
93
+
94
+    if (!this.state.reportedCustomer) {
95
+      reportCustomer(person, consultant).then(() => {
96
+        this.setState({ reportedCustomer: true })
97
+      })
98
+    }
99
+  }
100
+  initPageData() {
101
+
102
+    Taro.showToast({
103
+      title: '加载中...',
104
+      icon: 'loading'
105
+    })
106
+    const id = this.$router.params.id
107
+
108
+    if (this.$router.params.scene) {
109
+      getQrCodeParams(this.$router.params.scene).then((res) => {
110
+        this.setState({ id: res.id, qrcodeParams: res }, () => {
111
+          this.getInfo(res.id)
112
+          this.anotherInfo(res.id)
113
+        })
114
+      })
115
+    } else {
116
+      this.getInfo(id)
117
+      this.anotherInfo(id)
118
+    }
119
+    this._$_dataReady()
120
+  }
121
+
122
+  getInfo(id) {
123
+    const { startPrice, endPrice, apartmentId } = this.state
124
+    const params = {
125
+      salesBatchId: id,
126
+      startPrice,
127
+      endPrice,
128
+      apartmentId,
129
+      pageNum: 1,
130
+      pageSize: 999,
131
+    }
132
+    queryHouseList(params).then(res => {
133
+      this.setState({
134
+        houseList: this.groupHouseList(res) || [],
135
+        loading: false,
136
+      }, () => {
137
+        Taro.hideToast()
138
+      })
139
+
140
+
141
+    }).catch(err => {
142
+      Taro.hideToast()
143
+      Taro.showToast({ title: '未找到房源批次', icon: 'none', duration: 2000 })
144
+    })
145
+  }
146
+  anotherInfo(id) {
147
+    queryNoticeInfo(id).then(res => {
148
+      this.setState({
149
+        tipsList: res || {}
150
+      })
151
+    })
152
+    this.reportClientFn()
153
+    let { qrcodeParams } = this.state
154
+    const consultant = this.$router.params.consultant || qrcodeParams.consultant
155
+
156
+    if (consultant) {
157
+      getCardDetail(consultant).then(res => {
158
+        this.setState({
159
+          consultData: res,
160
+          consultShow: true
161
+        })
162
+      })
163
+    }
164
+    querySalesInfo(id).then(res => {
165
+
166
+      this.setState({
167
+        buildingId: res.buildingId,
168
+        salesBatchDetail: res || {},
169
+        noRecord: res.status == '1' ? false : true
170
+      })
171
+      const { templates = [], posterImg = '' } = (res.posters || [])[0]
172
+
173
+      this.setState({
174
+        posterData: { poster: posterImg },
175
+      }, () => {
176
+        this.getPosterData().then(posterData => {
177
+          const posterConfig = this.transTPLs2Configs(templates, posterData)
178
+          this.setState({ posterConfig, posterData })
179
+        })
180
+      })
181
+    })
182
+    queryApartmentType({ salesBatchId: id }).then(res => {
183
+      this.setState({
184
+        apartmentList: res || []
185
+      })
186
+    })
187
+  }
188
+  groupHouseList(houseList = []) {
189
+    // 先按照楼层分组
190
+    const floorList = houseList.reduce((list, room) => {
191
+      let found = false
192
+
193
+      list.forEach((floor) => {
194
+        if (floor.floorId === room.floorId) {
195
+          found = true
196
+          floor.roomList.push(room)
197
+        }
198
+      })
199
+
200
+      if (!found) {
201
+        list.push({ ...room, roomList: [room] })
202
+      }
203
+
204
+      return list
205
+    }, [])
206
+
207
+    // 再按照单元分组
208
+    const unitList = floorList.reduce((list, floor) => {
209
+      let found = false
210
+      list.forEach((unit) => {
211
+        if (unit.unitId === floor.unitId) {
212
+          found = true
213
+          unit.floorList.push(floor)
214
+        }
215
+      })
216
+
217
+      if (!found) {
218
+        list.push({ ...floor, floorList: [floor] })
219
+      }
220
+
221
+      return list
222
+    }, [])
223
+
224
+    // 最后按照楼栋分组
225
+    return unitList.reduce((list, unit) => {
226
+      let found = false
227
+      list.forEach((block) => {
228
+        if (block.blockId === unit.blockId) {
229
+          found = true
230
+          block.unitList.push(unit)
231
+        }
232
+      })
233
+
234
+      if (!found) {
235
+        list.push({ ...unit, unitList: [unit] })
236
+      }
237
+
238
+      return list
239
+    }, [])
240
+  }
241
+
242
+  goto = url => Taro.navigateTo({ url })
243
+
244
+  handleExplainClick = e => {
245
+    const buildingId = this.$router.params.buildingId || this.state.buildingId
246
+    this.goto(`/onlineSelling/pages/help/index?buildingId=${buildingId}`)
247
+  }
248
+
249
+  handleSearchClick = e => {
250
+    // Taro.setNavigationBarTitle({ title: '房源筛选' })
251
+    this.setState({
252
+      conditionVisible: true
253
+    })
254
+    // const id = this.$router.params.id || this.state.id
255
+    // this.goto(`/onlineSelling/pages/screenHouse/index?id=${id}`)
256
+  }
257
+
258
+  handleShareBtn = e => {
259
+    this.setState({ showShareMenu: true })
260
+  }
261
+
262
+  handleRecordBtn = e => {
263
+    this.goto('/onlineSelling/pages/records/index')
264
+  }
265
+  currentPageAndParams() {
266
+    const id = this.$router.params.id || this.state.id
267
+    const {
268
+      userInfo: { person: { personId, personType, userId } }
269
+    } = this.props
270
+
271
+    const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
272
+    const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
273
+
274
+    const queryParams = [
275
+      `id=${id}`,
276
+      'from=house_share',
277
+      `recommender=${personId}`,
278
+      `consultant=${consultant}`,
279
+      `consultantId=${consultantId}`,
280
+    ]
281
+
282
+    return [
283
+      'onlineSelling/pages/houseList/index',
284
+      queryParams.join('&'),
285
+    ]
286
+  }
287
+  // handleShareFrineds = e => {
288
+  onShareAppMessage = () => {
289
+    this.setState({ showShareMenu: false })
290
+    const id = this.$router.params.id || this.state.id
291
+    const { userInfo: { person: { personId, personType, userId } } } = this.props
292
+    const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
293
+    const { salesBatchDetail: { shareContents } } = this.state
294
+    const shareData = shareContents && shareContents.length ? shareContents[0] : { shareContentTitle: '房源列表', shareContentImg: null };
295
+    // 分享埋点
296
+    shareSavePoint({
297
+      event: 'share',
298
+      eventType: 'house',
299
+      propertyName: '房源列表分享',
300
+      consultantId: consultantId,
301
+      sharePersonId: personId,
302
+      targetId: id,
303
+      data: '{}'
304
+    }, 'houseApp')
305
+
306
+    const [page, params] = this.currentPageAndParams()
307
+
308
+    console.log(`/${page}?${params}`, "`/${page}?${params}`")
309
+    return {
310
+      title: shareData.shareContentTitle,//分享标题
311
+      path: `/${page}?${params}`,//分享地址
312
+      imageUrl: shareData.shareContentImg
313
+    }
314
+  }
315
+
316
+  // 开始生成海报
317
+  togglePosterStatus = (flag) => {
318
+    if (flag) {
319
+      this.getPosterData().then(posterData => {
320
+        this.setState({
321
+          showPoster: !!flag,
322
+          posterData,
323
+          showShareMenu: false
324
+        })
325
+        const id = this.$router.params.id || this.state.id
326
+        shareSavePoint({
327
+          event: 'poster',
328
+          eventType: 'house',
329
+          propertyName: '生成房源列表海报',
330
+          targetId: id,
331
+          data: '{}'
332
+        }, 'housePoster')
333
+      })
334
+
335
+
336
+    } else {
337
+      this.setState({
338
+        showPoster: !!flag,
339
+        showShareMenu: false
340
+      })
341
+    }
342
+
343
+
344
+  }
345
+  getPosterData = () => {
346
+    return new Promise(resolve => {
347
+      const { posterData } = this.state
348
+      if (posterData.qrcode) {
349
+        resolve(posterData)
350
+        return
351
+      }
352
+
353
+      const [page, scene] = this.currentPageAndParams()
354
+      const payload = { page, scene, showToast: false }
355
+
356
+      getMiniQrcode(payload).then(qrcode => {
357
+        const { posterData = {} } = this.state
358
+        let data = {
359
+          qrcode,//小程序二维码
360
+          ...posterData,
361
+        }
362
+        resolve(data)
363
+      })
364
+    })
365
+  }
366
+
367
+
368
+
369
+  handleRoomClick = room => {
370
+    this.goto(`/onlineSelling/pages/detail/index?id=${room.houseId}`)
371
+  }
372
+
373
+  renderBar() {
374
+    const { tipsList } = this.state
375
+
376
+    return (
377
+      <View className="topbar">
378
+        <View className="body">
379
+          <ScrollMessage summary={tipsList} />
380
+        </View>
381
+        <View className="action">
382
+          <View onClick={this.handleExplainClick}>
383
+            {/* <NamedIcon name="explain" size={50} /> */}
384
+            <Image style="width:50rpx;height:50rpx" src={transferImage(require('../../assets/explain.png'))}></Image>
385
+          </View>
386
+          <View onClick={this.handleSearchClick}>
387
+            <Image style="width:50rpx;height:50rpx" src={transferImage(require('../../assets/screen.png'))}></Image>
388
+            {/* <NamedIcon name="screen" size={50} /> */}
389
+          </View>
390
+        </View>
391
+      </View>
392
+    )
393
+  }
394
+
395
+  renderHouses() {
396
+    const { houseList } = this.state
397
+
398
+    return (
399
+      <ScrollView className="container" scrollY scrollWithAnimation>
400
+        {
401
+          houseList.map((item) => {
402
+            return <HouseGrid key={item.unitId} dataset={item} onRoomClick={this.handleRoomClick} />
403
+          })
404
+        }
405
+      </ScrollView>
406
+    )
407
+  }
408
+
409
+  renderBlank() {
410
+    return (
411
+      <View className="container"><Blank tips="暂无可选房源" /></View>
412
+    )
413
+  }
414
+
415
+  renderBottom() {
416
+    return (
417
+      <View className="bottombar">
418
+        <Button className="btn record" onClick={this.handleRecordBtn}>
419
+          {/* <NamedIcon name="record" size="42" /> */}
420
+          <Image style="width:42rpx;height:42rpx" src={transferImage(require('../../assets/record.png'))}></Image>
421
+          <Text className="txt">选房记录</Text>
422
+        </Button>
423
+        <Button className="btn share" onClick={this.handleShareBtn}>
424
+          {/* <NamedIcon name="share" size="42" /> */}
425
+          <Image style="width:42rpx;height:42rpx" src={transferImage(require('../../assets/share.png'))}></Image>
426
+          <Text className="txt">分享</Text>
427
+        </Button>
428
+      </View>
429
+    )
430
+  }
431
+
432
+  handleCondition(value) {
433
+    this.setState({
434
+      current: value,
435
+    })
436
+  }
437
+  handlePriceItem(item) {
438
+    this.setState({
439
+      priceCurrent: item.value,
440
+      startPrice: item.startPrice,
441
+      endPrice: item.endPrice,
442
+      apartmentId: '',
443
+      conditionVisible: false
444
+    }, () => {
445
+      const id = this.$router.params.id || this.state.id
446
+      this.getInfo(id)
447
+    })
448
+  }
449
+  handleInput(e) {
450
+    this.setState({ startPrice: e.detail.value })
451
+  }
452
+  handleInput2(e) {
453
+    this.setState({ endPrice: e.detail.value })
454
+  }
455
+  sureFilter() {
456
+    this.setState({
457
+      conditionVisible: false,
458
+      apartmentId: ''
459
+    }, () => {
460
+      // Taro.setNavigationBarTitle({ title: '房源' })
461
+      const id = this.$router.params.id || this.state.id
462
+      this.getInfo(id)
463
+    })
464
+  }
465
+  renderPrice() {
466
+    const { priceCurrent, startPrice, endPrice } = this.state
467
+    const priceList = [
468
+      { startPrice: null, endPrice: '100', value: 0 },
469
+      { startPrice: '100', endPrice: '150', value: 1 },
470
+      { startPrice: '150', endPrice: '200', value: 2 },
471
+      { startPrice: '200', endPrice: '250', value: 3 },
472
+      { startPrice: '250', endPrice: '300', value: 4 },
473
+      { startPrice: '300', endPrice: '400', value: 5 },
474
+      { startPrice: '400', endPrice: '500', value: 6 },
475
+      { startPrice: '500', endPrice: '600', value: 7 },
476
+      { startPrice: '600', endPrice: null, value: 8 },
477
+    ]
478
+    return (
479
+      <View>
480
+        <View className="price-con">
481
+          {priceList.map(priceItem => (
482
+            <View key={priceItem.value} className={priceCurrent == priceItem.value ? 'active-item' : 'price-item'} onClick={() => { this.handlePriceItem(priceItem) }}>
483
+              {!priceItem.startPrice && <View className="item-con">{priceItem.endPrice}万以下</View>}
484
+              {priceItem.startPrice && priceItem.endPrice && <View className="item-con">{priceItem.startPrice}万-{priceItem.endPrice}万</View>}
485
+              {!priceItem.endPrice && <View className="item-con">{priceItem.startPrice}万以上</View>}
486
+            </View>
487
+          ))}
488
+        </View>
489
+        <View style="color:#666;font-size:28rpx;margin-left:40rpx">
490
+          填写价格(万元)
491
+        </View>
492
+        <View className="search">
493
+          <Input
494
+            type="number"
495
+            placeholder="最低价"
496
+            class="search-input"
497
+            placeholder-style="color:#dcdcdc;font-size:28rpx"
498
+            maxlength="6"
499
+            value={startPrice}
500
+            onInput={this.handleInput}
501
+          />
502
+          <Text style="margin:0 8rpx;color:#999;font-size:28rpx">-</Text>
503
+          <Input
504
+            type="number"
505
+            placeholder="最高价"
506
+            class="search-input"
507
+            placeholder-style="color:#dcdcdc;font-size:28rpx"
508
+            maxlength="6"
509
+            value={endPrice}
510
+            onInput={this.handleInput2}
511
+          />
512
+          <View className="sure-btn" onClick={() => this.sureFilter()}>
513
+            确定
514
+              </View>
515
+        </View>
516
+      </View>
517
+    )
518
+  }
519
+  apartmentFilter(apartmentId) {
520
+    this.setState({
521
+      apartmentId,
522
+      startPrice: '',
523
+      endPrice: '',
524
+      conditionVisible: false,
525
+    }, () => {
526
+      // Taro.setNavigationBarTitle({ title: '房源' })
527
+      const id = this.$router.params.id || this.state.id
528
+      this.getInfo(id)
529
+    })
530
+  }
531
+  renderApartment() {
532
+    const { apartmentList } = this.state
533
+    return (
534
+      <Block>
535
+        {apartmentList.length ? <View style="padding:40rpx 20rpx">
536
+          {apartmentList.map((apartmentItem, index) => (
537
+            <View className='item' key={index + 'apartment'} onClick={() => this.apartmentFilter(apartmentItem.apartmentId)}>
538
+              <View className='house__img-info'>
539
+                <Image className='house__img' src={transferImage(apartmentItem.buildingImgList[0].url)} mode="widthFix"></Image>
540
+              </View>
541
+              <View className="rest-info">
542
+                <View className='house-type__name'>{apartmentItem.apartmentName || ''}</View>
543
+                <View className='construction__area'>
544
+                  <Text>{apartmentItem.buildingArea ? '建筑面积约' + apartmentItem.buildingArea + 'm²' : '建筑面积待定'}</Text>
545
+                  {
546
+                    apartmentItem.insideArea ? <Text>使用面积约{apartmentItem.insideArea}m²</Text> : <Text>使用面积待定</Text>
547
+                  }
548
+                </View>
549
+              </View>
550
+            </View>
551
+          ))}
552
+        </View>
553
+          : <Blank tips="暂无户型图,请按价格筛选"></Blank>
554
+        }
555
+      </Block>
556
+    )
557
+  }
558
+
559
+  renderCondition() {
560
+    const { current } = this.state
561
+    const condition = [{ title: '按价格', value: 0 }, { title: '按户型', value: 1 }]
562
+    return (
563
+      <View className="screen-page">
564
+        <View className="screen-top">
565
+          筛选房源
566
+            {condition.map(item => (
567
+            <View key={item.value} onClick={() => this.handleCondition(item.value)} className={current == item.value ? 'top-item active' : 'top-item'}>
568
+              {item.title}
569
+            </View>
570
+          ))}
571
+        </View>
572
+        {current == 0 && this.renderPrice()
573
+        }
574
+        {current == 1 && this.renderApartment()}
575
+
576
+      </View>
577
+
578
+    );
579
+  }
580
+  toBuildingDetail() {
581
+    const buildingId = this.$router.params.buildingId || this.state.buildingId
582
+    this.goto(`/pages/project/detail/index?id=${buildingId}`)
583
+  }
584
+
585
+  render() {
586
+    const {
587
+      consultData,
588
+      consultShow,
589
+      showShareMenu,
590
+      showPoster,
591
+      houseList,
592
+      conditionVisible,
593
+      posterData,
594
+      posterConfig,
595
+      noRecord,
596
+      loading,
597
+      salesBatchDetail,
598
+    } = this.state
599
+
600
+    if (loading) {
601
+      return <View style="margin: 80px auto;"><Loading color="#BB9C79" size={100} /></View>
602
+    }
603
+
604
+    const { userInfo: { person } } = this.props
605
+
606
+    const showCircleBtn = posterData && posterData.qrcode
607
+    console.log('==============>', posterData, showPoster, posterConfig)
608
+    return (
609
+      <Block>
610
+        {conditionVisible && this.renderCondition()}
611
+        {/* 授权电话与头像 */}
612
+        <GrantProfile both person={person} />
613
+        {/* 置业顾问悬框 */}
614
+        {
615
+          consultShow && <Consultant style="bottom:150rpx" smallStyle="bottom:178rpx" personId={person.personId} name={person.name || person.nickname} data={consultData}></Consultant>
616
+        }
617
+        {/* 生成海报 */}
618
+        {showPoster && <Poster data={posterData} configs={posterConfig} onCancel={this.togglePosterStatus} onFinish={this.togglePosterStatus} ></Poster>}
619
+        {!noRecord ?
620
+          <Block>
621
+            {!conditionVisible && <Block>
622
+              <View className="houselist">
623
+                {this.renderBar()}
624
+                <View className="building-top">
625
+                  <View style="color:#333;font-size:28rpx">{salesBatchDetail.buildingName || ''}</View>
626
+                  <View style="color:#666;font-size:24rpx;" onClick={() => this.toBuildingDetail()}>查看楼盘详情<Text className="right-icon"></Text></View>
627
+
628
+                </View>
629
+                {houseList.length ? this.renderHouses() : this.renderBlank()}
630
+                {this.renderBottom()}
631
+              </View>
632
+              {/* 分享按钮 */}
633
+              <ActSheet show={showShareMenu}>
634
+                <ShareButtons
635
+                  circleBtn={showCircleBtn}
636
+                  onShareFrineds={this.handleShareFrineds}
637
+                  onSharingCircleOfFriends={() => this.togglePosterStatus(true)}
638
+                // onSharingCircleOfFriends={this.handleSharingCircleOfFriends}
639
+                />
640
+              </ActSheet>
641
+            </Block>
642
+            }
643
+          </Block>
644
+          :
645
+          <View style="text-align: center;margin-top: 30vh;font-size: 28rpx;color: #999;">当前销售批次已被取消发布,请在发布后再试。</View>
646
+        }
647
+
648
+      </Block>
649
+    )
650
+  }
651
+}
652
+

+ 210
- 0
src/onlineSelling/pages/houseList/index.scss Parādīt failu

@@ -0,0 +1,210 @@
1
+.houselist {
2
+  height: 100vh;
3
+  overflow: hidden;
4
+
5
+  .topbar {
6
+    height: 64px;
7
+    font-size: 24px;
8
+    line-height: 64px;
9
+    display: flex;
10
+    margin: 24px 0;
11
+  
12
+    .body {
13
+      flex: auto;
14
+      color: #999;
15
+      background:rgba(248,248,248,1);
16
+      padding-left: 30px;
17
+      font-size: 24px;
18
+      overflow: hidden;
19
+    }
20
+  
21
+    .action {
22
+      flex: none;
23
+      width: 30%;
24
+      display: flex;
25
+      justify-content: space-around;
26
+    }
27
+  }
28
+  .building-top{
29
+    display: flex;
30
+    align-items: center;
31
+    justify-content: space-between;
32
+    padding: 6px 26px 26px 26px;
33
+    height: 70px;
34
+  
35
+    .right-icon{
36
+      width:17px;
37
+      height:17px;
38
+      border-top: 2px solid #999;
39
+      border-right: 2px solid #999;
40
+      transform:rotate(45deg);
41
+      display: inline-block;
42
+    }
43
+  }
44
+  
45
+  .bottombar {
46
+    height: 168px;
47
+    box-shadow:0px 16px 48px 0px rgba(0, 0, 0, 0.12);
48
+    width: 100%;
49
+    padding: 0 35px;
50
+    overflow: hidden;
51
+    display: flex;
52
+    align-items: center;
53
+
54
+    .btn {
55
+      height: 88px;
56
+      flex: none;
57
+      border-radius: 10px;
58
+      line-height: 88px;
59
+      display: flex;
60
+      align-items: center;
61
+      justify-content: center;
62
+
63
+      .txt {
64
+        display: inline-block;
65
+        padding-left: 10px;
66
+        font-size: 30px;
67
+        line-height: 88px;
68
+        text-align: center;
69
+      }
70
+    }
71
+
72
+    .record {
73
+      background: #BB9C79;
74
+      color: #fff;
75
+      width: 58%;
76
+    }
77
+
78
+    .share {
79
+      background: #FF7500;
80
+      color: #fff;
81
+      width: 32%;
82
+    }
83
+  }
84
+
85
+  .container {
86
+    // top + margin + bottom
87
+    height: calc(100% - 350px);
88
+  }
89
+}
90
+.screen-page{
91
+  .screen-top{
92
+    display: flex;
93
+    align-items: center;
94
+    height:100px;
95
+    background:rgba(248,248,248,1);
96
+    font-size: 34px;
97
+    color: #666;
98
+    padding: 0 30px;
99
+    font-size: 400;
100
+    .top-item{
101
+      font-size: 28px;
102
+      color: #999;
103
+      padding: 0 18px;
104
+      border-radius: 32px;
105
+      line-height: 60px;
106
+      background-color: #EEEEEE;
107
+      margin-left: 22px;
108
+
109
+    }
110
+    .active{
111
+      background-color: #fff;
112
+      box-shadow:0px 4px 12px 0px rgba(0, 0, 0, 0.08);
113
+    }
114
+  }
115
+  .price-con{
116
+    padding: 20px;
117
+    display: flex;
118
+    flex-wrap: wrap;
119
+    align-content: center;
120
+    .price-item{
121
+      flex: 0 0 33.3%;
122
+      .item-con{
123
+        text-align: center;
124
+        margin: 18px;
125
+        line-height:60px;
126
+        background:rgba(248,248,248,1);
127
+        border-radius:6px;
128
+        font-size: 28px;
129
+        color: #999;
130
+      }
131
+    }
132
+    .active-item{
133
+      flex: 0 0 33.3%;
134
+      .item-con{
135
+        text-align: center;
136
+        margin: 18px;
137
+        line-height:60px;
138
+        background-color: #fff;
139
+        box-shadow:0px 4px 12px 0px rgba(0, 0, 0, 0.08);
140
+        border-radius:6px;
141
+        font-size: 28px;
142
+        color: #999;
143
+        border:1px solid #bb9c79;
144
+      }
145
+    }
146
+  }
147
+  .search{
148
+    padding: 20px 40px;
149
+    display: flex;
150
+    align-items: center;
151
+    .search-input{
152
+      width:209px;
153
+      line-height:60px;
154
+      height:60px;
155
+      background:rgba(250,250,250,1);
156
+      border-radius:30px;
157
+      text-align: center;
158
+    }
159
+    .sure-btn{
160
+      width:120px;
161
+      line-height:60px;
162
+      background:rgba(187,156,121,1);
163
+      border-radius:10px;
164
+      text-align: center;
165
+      color: #fff;
166
+      font-size: 28px;
167
+      margin-left: 60px;
168
+    }
169
+  }
170
+  .item {
171
+    position: relative;
172
+    width: 340px;
173
+    margin: 2px 7.5px 20px 7.5px;
174
+    box-shadow: 0 0 16px rgba(0, 0, 0, 0.15);
175
+    border: 1px solid rgba(232, 232, 232, 1);
176
+    border-radius: 12px;
177
+    display: inline-block;
178
+
179
+    .house__img-info {
180
+      position: relative;
181
+      padding: 30px;
182
+      border-bottom: 1px solid #eee;
183
+
184
+      .house__img {
185
+        width: 100%;
186
+        border-radius: 10px;
187
+        height: 200px !important;
188
+      }
189
+    }
190
+    .rest-info {
191
+      padding: 10px  20px;
192
+
193
+      .house-type__name {
194
+        font-weight: bold;
195
+        margin: 10px 0;
196
+        font-size: 32px;
197
+        color: #333;
198
+      }
199
+      .construction__area {
200
+        color: rgba(0, 0, 0, 0.54);
201
+        font-size: 25px;
202
+        height: 80px;
203
+        display: flex;
204
+        flex-direction: column;
205
+        text-align: left;
206
+
207
+      }
208
+    }
209
+  }
210
+}

+ 183
- 0
src/onlineSelling/pages/houseList/poster.js Parādīt failu

@@ -0,0 +1,183 @@
1
+import Taro, { Component } from '@tarojs/taro';
2
+import { TaroCanvasDrawer } from '@/components/taro-plugin-canvas';
3
+import './poster.scss'
4
+/**
5
+ * 文档参考
6
+ * http://taro-ext.jd.com/plugin/view/5d23051670a0f46a87c9785b
7
+ */
8
+export default class Index extends Component {
9
+  static options = {
10
+    addGlobalClass: true,
11
+  }
12
+  static defaultProps = {
13
+    data: {}
14
+  }
15
+  state = {
16
+    // 绘制的图片
17
+    shareImage: null,
18
+    canvasStatus: false,
19
+    configs: null,
20
+    visible: false,
21
+    basicConfig: {
22
+      width: 640,
23
+      height: 1136,
24
+      backgroundColor: '#ffffff',
25
+      debug: false
26
+    }
27
+  }
28
+  componentWillMount() {
29
+    this.initConfig()
30
+    Taro.showLoading({
31
+      title: '生成中...',
32
+      icon: 'none'
33
+    })
34
+  }
35
+  initConfig() {
36
+    const { data } = this.props
37
+    console.log(data,"datadatadatadatadatadatadatadatadatadatadatadatadatadata")
38
+    const { basicConfig } = this.state
39
+    // const texts = [
40
+    //   {
41
+    //     x: 170,
42
+    //     y: 720,
43
+    //     text: data.nickname + ' 邀您参与' || '',
44
+    //     fontSize: 28,
45
+    //     color: '#666',
46
+    //     baseLine: 'middle',
47
+    //     lineHeight: 48,
48
+    //     // textAlign: 'left',
49
+    //     width: 260,
50
+    //     zIndex: 999
51
+    //   },
52
+    // ]
53
+    const images = [
54
+      {
55
+        url: data.poster,
56
+        width: 640,
57
+        height: 670,
58
+        y: 0,
59
+        x: 0
60
+      },
61
+      {
62
+        url: data.qrcode,
63
+        width: 160,
64
+        height: 160,
65
+        y: 950,
66
+        x: 450,
67
+        zIndex: 999
68
+      },
69
+    ]
70
+
71
+    const blocks = [
72
+      {
73
+        x: 0,
74
+        y: 936,
75
+        width: 640,
76
+        height: 200,
77
+        backgroundColor: 'rgba(248,248,248,1)',
78
+        zIndex: 1
79
+      }
80
+    ]
81
+    const configs = Object.assign(basicConfig, { images, blocks})
82
+    this.setState({
83
+      configs,
84
+      canvasStatus: true
85
+    })
86
+  }
87
+
88
+  onCreateSuccess = (result) => {
89
+    const { tempFilePath, errMsg } = result;
90
+    Taro.hideLoading();
91
+    if (errMsg === 'canvasToTempFilePath:ok') {
92
+      this.setState({
93
+        shareImage: tempFilePath,
94
+        canvasStatus: false,
95
+        configs: null,
96
+        visible: true
97
+      });
98
+    } else {
99
+      this.setState({
100
+        canvasStatus: false,
101
+        configs: null
102
+      });
103
+      Taro.showToast({ icon: 'none', title: errMsg || '出现错误' });
104
+      console.log(errMsg);
105
+      this.hidePoster()
106
+    }
107
+  }
108
+
109
+  onPreview(e) {
110
+    e.stopPropagation()
111
+    e.preventDefault()
112
+    Taro.previewImage({
113
+      current: this.state.shareImage,
114
+      urls: [this.state.shareImage]
115
+    })
116
+  }
117
+
118
+  onCreateFail = (error) => {
119
+    console.log(error);
120
+  }
121
+
122
+  hidePoster(e) {
123
+    Taro.hideLoading();
124
+    this.props.toggle(false)
125
+  }
126
+
127
+  // 保存图片至本地
128
+  saveToAlbum = (e) => {
129
+    e.stopPropagation()
130
+    e.preventDefault()
131
+
132
+    Taro.authorize({ scope: "scope.writePhotosAlbum" }).then(res => {
133
+      console.log('auth:', res)
134
+      Taro.saveImageToPhotosAlbum({
135
+        filePath: this.state.shareImage,
136
+      }).then(res => {
137
+        Taro.showToast({
138
+          title: '保存图片成功',
139
+          icon: 'success',
140
+          duration: 2000,
141
+        });
142
+      })
143
+    }).catch(err => {
144
+      console.log('err:', err)
145
+      Taro.showToast({
146
+        title: '未开启相册权限',
147
+        icon: 'none'
148
+      })
149
+    })
150
+  }
151
+
152
+  render() {
153
+    return (
154
+      <Block>
155
+        {
156
+          this.state.canvasStatus && (
157
+            <TaroCanvasDrawer
158
+              configs={this.state.configs}
159
+              onCreateSuccess={this.onCreateSuccess}
160
+              onCreateFail={this.onCreateFail}
161
+            />
162
+          )
163
+        }
164
+        {
165
+          this.state.visible && (
166
+            <View className="poster">
167
+              <View className="con">
168
+                <View className="con-head">
169
+                  <Text>保存后分享图片</Text>
170
+                  <Text className="iconfont icon-buoumaotubiao20" onClick={this.hidePoster}></Text>
171
+                </View>
172
+                <View className="con-body">
173
+                  <Image className="result-img" mode="aspectFit" lazy-load src={this.state.shareImage} onClick={this.onPreview}></Image>
174
+                </View>
175
+                <Button className="save-btn" onClick={this.saveToAlbum}>保存海报</Button>
176
+              </View>
177
+            </View>
178
+          )
179
+        }
180
+      </Block>
181
+    )
182
+  }
183
+}

+ 56
- 0
src/onlineSelling/pages/houseList/poster.scss Parādīt failu

@@ -0,0 +1,56 @@
1
+@import "@/styles/theme.scss";
2
+.poster {
3
+  position: fixed;
4
+  width: 100vw;
5
+  height: 100vh;
6
+  background: rgba(0, 0, 0, 0.6);
7
+  z-index: 999;
8
+  justify-content: space-around;
9
+  display: flex;
10
+  align-items: center;
11
+  flex-direction: column;
12
+  animation: fadeBottomIn 1s ease both;
13
+
14
+  .con {
15
+    position: absolute;
16
+    bottom: 0;
17
+    width: 100%;
18
+    padding: 0 60px;
19
+    background: white;
20
+    margin: 0 auto;
21
+    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
22
+    border-top-left-radius: 20px;
23
+    border-top-right-radius: 20px;
24
+
25
+    &-head {
26
+      display: flex;
27
+      justify-content: space-between;
28
+      align-items: center;
29
+      padding: 20px 0;
30
+      font-size: 32px;
31
+      font-weight: bold;
32
+
33
+      .iconfont {
34
+        font-size: 40px;
35
+        color: #545454;
36
+        font-weight: normal;
37
+      }
38
+    }
39
+
40
+      .result-img {
41
+        height: 60vh;
42
+        display: block;
43
+        margin: 0 auto;
44
+      }
45
+  }
46
+
47
+  .save-btn {
48
+    margin: 0 auto;
49
+    color: white;
50
+    border: none;
51
+    font-size: 36px;
52
+    background: $primary-color;
53
+    border-radius: 12px;
54
+    margin: 20px 0;
55
+  }
56
+}

+ 349
- 0
src/onlineSelling/pages/live/index.js Parādīt failu

@@ -0,0 +1,349 @@
1
+import Taro, { Component } from '@tarojs/taro'
2
+import { View, ScrollView, Button, Swiper, Block } from '@tarojs/components'
3
+import ActSheet from '../../components/ActSheet'
4
+import ShareButtons from '../../components/ShareButtons'
5
+import GrantProfile from '../../components/GrantProfile'
6
+import Poster from '@/components/Poster'
7
+import { connect } from '@tarojs/redux'
8
+import ready from '@/utils/ready'
9
+import { queryLiveDetail, addLiveNum } from '@/services/item'
10
+import { getQrCodeParams } from '@/utils/qrcode'
11
+import { withDetail } from '@/utils/page'
12
+import { share as shareSavePoint } from '@/utils/shareSavePoint'
13
+import { ROLE_CODE } from '@/constants/user'
14
+import { report as reportCustomer } from '@/utils/customer'
15
+import { getMiniQrcode, savePoint, updatePoint } from '@/services/common'
16
+import { getCanvasConfig, transferImage } from '@/utils/tools'
17
+import { getCardDetail } from '@/services/card'
18
+import Consultant from '@/components/consultant'
19
+import Blank from '../../components/Blank'
20
+import './index.scss'
21
+const bgImg = "https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/bg.png"
22
+
23
+@connect(s => s.user)
24
+@withDetail({
25
+  track: {
26
+    event: 'detail',
27
+    eventType: 'activity',
28
+    targetType: 'live',
29
+    propertyName: '查看直播详情页',
30
+    data: '{}',
31
+  }
32
+})
33
+export default class livePage extends Component {
34
+  config = {
35
+    navigationBarTitleText: '直播活动详情',
36
+  }
37
+  state = {
38
+    showShareMenu: false,
39
+    showPoster: false,
40
+    qrcodeParams: {},
41
+    reportedCustomer: false,
42
+    posterShow: false,
43
+    posterData: {},
44
+    liveDetail: {},
45
+    posterConfig: [],
46
+    consultData: {}, // 分享的置业顾问信息
47
+    consultShow: false,  // 置业顾问悬浮框显示隐藏
48
+    noRecord: false,
49
+  }
50
+
51
+
52
+  componentDidShow() {
53
+    this.setState({ showShareMenu: false })
54
+    ready.queue(() => {
55
+
56
+      this.initPageData()
57
+
58
+    })
59
+  }
60
+
61
+  componentWillReceiveProps() {
62
+    this.reportClientFn()
63
+  }
64
+
65
+  transTPLs2Configs(tpls, params) {
66
+    return tpls.map((tpl) => {
67
+      const conf = getCanvasConfig(tpl.configs, params)
68
+      return { ...conf }
69
+    })
70
+  }
71
+
72
+  // 报备客户
73
+  reportClientFn() {
74
+
75
+    const { qrcodeParams } = this.state
76
+    const consultant = this.$router.params.consultant || qrcodeParams.consultant || ""
77
+    const { userInfo: { person } } = this.props
78
+
79
+    if (!this.state.reportedCustomer) {
80
+      reportCustomer(person, consultant).then(() => {
81
+        this.setState({ reportedCustomer: true })
82
+      })
83
+    }
84
+  }
85
+  initPageData() {
86
+
87
+    Taro.showToast({
88
+      title: '加载中...',
89
+      icon: 'loading'
90
+    })
91
+    const id = this.$router.params.id
92
+
93
+    if (this.$router.params.scene) {
94
+      getQrCodeParams(this.$router.params.scene).then((res) => {
95
+        this.setState({ id: res.id, qrcodeParams: res }, () => {
96
+          this.anotherInfo(res.id)
97
+        })
98
+      })
99
+    } else {
100
+      this.anotherInfo(id)
101
+    }
102
+    this._$_dataReady()
103
+  }
104
+
105
+
106
+  anotherInfo(id) {
107
+
108
+    this.reportClientFn()
109
+    let { qrcodeParams } = this.state
110
+    const consultant = this.$router.params.consultant || qrcodeParams.consultant
111
+
112
+    if (consultant) {
113
+      getCardDetail(consultant).then(res => {
114
+        this.setState({
115
+          consultData: res,
116
+          consultShow: true
117
+        })
118
+      })
119
+    }
120
+
121
+    queryLiveDetail(id).then(res => {
122
+     
123
+      this.setState({
124
+        liveDetail: res || {},
125
+        noRecord: res.status == '1' ? false : true
126
+      })
127
+      Taro.hideToast()
128
+      const { templates = [], posterImg = '' } = (res.posters || [])[0]
129
+
130
+      this.setState({
131
+        posterData: { poster: posterImg },
132
+      }, () => {
133
+        this.getPosterData().then(posterData => {
134
+          const posterConfig = this.transTPLs2Configs(templates, posterData)
135
+          this.setState({ posterConfig, posterData })
136
+        })
137
+      })
138
+    }).catch(err => {
139
+      Taro.hideToast()
140
+    })
141
+  }
142
+
143
+
144
+  goto = url => Taro.navigateTo({ url })
145
+
146
+
147
+  handleShareBtn = e => {
148
+    this.setState({ showShareMenu: true })
149
+  }
150
+
151
+  handleLiveBtn = e => {
152
+    const { liveDetail: { liveAppAppId, liveAppPath } } = this.state
153
+    if (liveAppAppId && liveAppPath) {
154
+      const id = this.$router.params.id || this.state.liveDetail.liveActivityId
155
+      addLiveNum(id).then(res => { })
156
+
157
+      Taro.navigateToMiniProgram({
158
+        appId: liveAppAppId,
159
+        path: liveAppPath,
160
+        extraData: {
161
+          foo: 'bar'
162
+        },
163
+        success(res) {
164
+          console.log(res, "navigateToMiniProgram")
165
+        }
166
+      })
167
+
168
+    } else {
169
+      Taro.showToast({ title: '后台未配置跳转链接', icon: 'none', duration: 2000 })
170
+    }
171
+
172
+  }
173
+  currentPageAndParams() {
174
+    const id = this.$router.params.id || this.state.liveDetail.liveActivityId
175
+    const {
176
+      userInfo: { person: { personId, personType, userId } }
177
+    } = this.props
178
+
179
+    const consultant = personType == ROLE_CODE['CONSULTANT'] ? personId : ""
180
+    const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
181
+
182
+    const queryParams = [
183
+      `id=${id}`,
184
+      'from=live_share',
185
+      `recommender=${personId}`,
186
+      `consultant=${consultant}`,
187
+      `consultantId=${consultantId}`,
188
+    ]
189
+
190
+    return [
191
+      'onlineSelling/pages/live/index',
192
+      queryParams.join('&'),
193
+    ]
194
+  }
195
+
196
+  onShareAppMessage = () => {
197
+    this.setState({ showShareMenu: false })
198
+    const id = this.$router.params.id || this.state.liveDetail.liveActivityId
199
+    const { userInfo: { person: { personId, personType, userId } } } = this.props
200
+    const consultantId = personType == ROLE_CODE['CONSULTANT'] ? userId : ""
201
+    const { liveDetail: { shareContents } } = this.state
202
+    const shareData = shareContents && shareContents.length ? shareContents[0] : { shareContentTitle: '房源列表', shareContentImg: null };
203
+    // 分享埋点
204
+
205
+    shareSavePoint({
206
+      event: 'share',
207
+      eventType: 'activity',
208
+      targetType: 'live',
209
+      propertyName: '直播详情页分享',
210
+      consultantId: consultantId,
211
+      sharePersonId: personId,
212
+      targetId: id,
213
+      data: '{}',
214
+    }, 'liveApp')
215
+
216
+    const [page, params] = this.currentPageAndParams()
217
+
218
+    console.log(`/${page}?${params}`, "`/${page}?${params}`")
219
+    return {
220
+      title: shareData.shareContentTitle,//分享标题
221
+      path: `/${page}?${params}`,//分享地址
222
+      imageUrl: shareData.shareContentImg
223
+    }
224
+  }
225
+
226
+  // 开始生成海报
227
+  togglePosterStatus = (flag) => {
228
+    if (flag) {
229
+      this.getPosterData().then(posterData => {
230
+        this.setState({
231
+          showPoster: !!flag,
232
+          posterData,
233
+          showShareMenu: false
234
+        })
235
+        const id = this.$router.params.id || this.state.liveDetail.liveActivityId
236
+        shareSavePoint({
237
+          event: 'poster',
238
+          eventType: 'activity',
239
+          targetType: 'live',
240
+          propertyName: '生成直播详情海报',
241
+          targetId: id,
242
+          data: '{}'
243
+        }, 'livePoster')
244
+      })
245
+
246
+
247
+    } else {
248
+      this.setState({
249
+        showPoster: !!flag,
250
+        showShareMenu: false
251
+      })
252
+    }
253
+  }
254
+  getPosterData = () => {
255
+    return new Promise(resolve => {
256
+      const { posterData } = this.state
257
+      if (posterData.qrcode) {
258
+        resolve(posterData)
259
+        return
260
+      }
261
+
262
+      const [page, scene] = this.currentPageAndParams()
263
+      const payload = { page, scene, showToast: false }
264
+
265
+      getMiniQrcode(payload).then(qrcode => {
266
+        const { posterData = {} } = this.state
267
+        let data = {
268
+          qrcode,//小程序二维码
269
+          ...posterData,
270
+        }
271
+        resolve(data)
272
+      })
273
+    })
274
+  }
275
+  toBuildingDetail = () => {
276
+    const { liveDetail: { buildingId } } = this.state
277
+    this.goto(`/pages/project/detail/index?id=${buildingId}`)
278
+  }
279
+
280
+  renderBottom() {
281
+    const { liveDetail: { buildingId } } = this.state
282
+    return (
283
+      <View className="bottombar">
284
+        <View className="bt-nav__left">
285
+          {buildingId &&
286
+            <Button class='bt-nav__item' onClick={this.toBuildingDetail}>
287
+              <Image src={transferImage(require('@/assets/news/property.png'))} style="width:42rpx;height:42rpx"></Image>
288
+              <Text className="text">查看楼盘</Text>
289
+            </Button>
290
+          }
291
+          <Button className='bt-nav__item' onClick={this.handleShareBtn} >
292
+            <Image src={transferImage(require('@/assets/news/fasong.png'))} className='icon-img'></Image>
293
+            <Text className="text">分享</Text>
294
+          </Button>
295
+        </View>
296
+        <Button className="btn tolive" onClick={this.handleLiveBtn}>
297
+          <Image style="width:54rpx;height:40rpx" src={transferImage(require('../../assets/seeding.png'))}></Image>
298
+          <Text className="txt">观看直播</Text>
299
+        </Button>
300
+      </View>
301
+    )
302
+  }
303
+
304
+
305
+  render() {
306
+    const {
307
+      consultData,
308
+      consultShow,
309
+      showShareMenu,
310
+      showPoster,
311
+      posterData,
312
+      posterConfig,
313
+      liveDetail,
314
+      noRecord
315
+    } = this.state
316
+
317
+    const { userInfo: { person } } = this.props
318
+    const showCircleBtn = posterData && posterData.qrcode
319
+    console.log('==============>', posterData, showPoster, posterConfig)
320
+    return (
321
+      <Block>
322
+        {/* 授权电话与头像 */}
323
+        <GrantProfile both person={person} />
324
+        {/* 置业顾问悬框 */}
325
+        {
326
+          consultShow && <Consultant style="bottom:150rpx" smallStyle="bottom:178rpx" personId={person.personId} name={person.name || person.nickname} data={consultData}></Consultant>
327
+        }
328
+        {/* 生成海报 */}
329
+        {showPoster && <Poster data={posterData} configs={posterConfig} onCancel={this.togglePosterStatus} onFinish={this.togglePosterStatus} ></Poster>}
330
+        {!noRecord ?
331
+          <View className="live-page">
332
+            <Image onClick={this.handleLiveBtn} src={transferImage(liveDetail.detailTypeImg || bgImg)} mode='widthFix' className="bg_img"></Image>
333
+            {this.renderBottom()}
334
+          </View>
335
+          : <Blank tips="当前直播活动已取消或下架" />
336
+        }
337
+        {/* 分享按钮 */}
338
+        <ActSheet show={showShareMenu}>
339
+          <ShareButtons
340
+            circleBtn={showCircleBtn}
341
+            onSharingCircleOfFriends={() => this.togglePosterStatus(true)}
342
+          />
343
+        </ActSheet>
344
+
345
+      </Block>
346
+    )
347
+  }
348
+}
349
+

+ 88
- 0
src/onlineSelling/pages/live/index.scss Parādīt failu

@@ -0,0 +1,88 @@
1
+.live-page {
2
+  padding-bottom: 164px;
3
+  .bg_img{
4
+    width: 100vw;
5
+    min-height: 100vh;
6
+    height: auto;
7
+  }
8
+  
9
+  .bottombar {
10
+    height: 168px;
11
+    box-shadow:0px 16px 48px 0px rgba(0, 0, 0, 0.12);
12
+    width: 100%;
13
+    padding: 0 35px;
14
+    overflow: hidden;
15
+    display: flex;
16
+    align-items: center;
17
+    position: fixed;
18
+    bottom: 0;
19
+    background-color: #fff;
20
+
21
+    .btn {
22
+      height: 88px;
23
+      flex: none;
24
+      border-radius: 10px;
25
+      line-height: 88px;
26
+      display: flex;
27
+      align-items: center;
28
+      justify-content: center;
29
+
30
+      .txt {
31
+        display: inline-block;
32
+        padding-left: 14px;
33
+        font-size: 30px;
34
+        line-height: 88px;
35
+        text-align: center;
36
+        font-weight: 300;
37
+
38
+      }
39
+    }
40
+    .bt-nav {
41
+    
42
+      &__item {
43
+        margin: 0;
44
+        padding: 0;
45
+        line-height: 1;
46
+        width: 50%;
47
+        box-sizing: border-box;
48
+        background: transparent;
49
+        border-radius: none;
50
+        height: 80px;
51
+        display: flex;
52
+        flex-direction: column;
53
+        justify-content: center;
54
+        align-items: center;
55
+        .icon-img{
56
+          width: 50px;
57
+          height: 50px;
58
+        }
59
+    
60
+        .text {
61
+          margin-top: 10px;
62
+          text-align: center;
63
+          font-size: 24px;
64
+          color: #a1a1a1;
65
+        }
66
+      }
67
+    
68
+      &__left {
69
+        width: 100%;
70
+        display: flex;
71
+        align-items: center;
72
+        justify-content: space-between;
73
+        padding: 20px 0;
74
+      }
75
+      
76
+    }
77
+
78
+    .tolive {
79
+      background: #BB9C79;
80
+      color: #fff;
81
+      width: 66%;
82
+      margin-left: 2%;
83
+    }
84
+
85
+  }
86
+}
87
+  
88
+ 

+ 75
- 0
src/onlineSelling/pages/records/index.js Parādīt failu

@@ -0,0 +1,75 @@
1
+import Taro, { Component } from '@tarojs/taro'
2
+import { View, ScrollView, Block } from '@tarojs/components'
3
+import HouseCard from '../../components/HouseCard'
4
+import { queryPreselectionRecord } from '@/services/project'
5
+import { connect } from '@tarojs/redux'
6
+import ready from '@/utils/ready'
7
+import Blank from '../../components/Blank'
8
+import './index.scss'
9
+
10
+@connect(
11
+  ({ user }) => ({ ...user })
12
+)
13
+
14
+export default class Records extends Component {
15
+  config = {
16
+    navigationBarTitleText: '选房记录'
17
+  }
18
+
19
+  state = {
20
+    recordList: []
21
+  }
22
+  componentDidShow() {
23
+    ready.queue(() => {
24
+
25
+      const { userInfo: { person: { personId } } } = this.props
26
+      const params = {
27
+        personId,
28
+        pageNum: 1,
29
+        pageSize: 999,
30
+      }
31
+      queryPreselectionRecord(params).then(res => {
32
+        const list = res.records
33
+        this.setState({
34
+          recordList: list.filter(item => item.status == '1') || []
35
+        })
36
+      })
37
+    })
38
+  }
39
+  toHouseDetail(item) {
40
+    if (item.housingStatus == '0' || item.saleBatchStatus == '0') {
41
+      Taro.showToast({ title: '当前销售批次或该房源已被取消发布', icon: 'none', duration: 2000 })
42
+    } else {
43
+      Taro.navigateTo({
44
+        url: `/onlineSelling/pages/detail/index?id=${item.houseId}`
45
+      })
46
+    }
47
+  }
48
+
49
+  render() {
50
+    const { recordList } = this.state
51
+
52
+    return (
53
+      <View className="records" >
54
+
55
+        {
56
+          !recordList.length ? <Blank tips="暂无预选记录" /> :
57
+            <ScrollView scrollY>
58
+              {
59
+                recordList.map((item) => {
60
+                  return (
61
+                    <Block>
62
+                      {item.status == '1' && <View className="carditem" key={item.preselectionRecordId} onClick={() => this.toHouseDetail(item)}>
63
+                        <HouseCard summary={item} />
64
+                      </View>}
65
+                    </Block>
66
+                  )
67
+                })
68
+              }
69
+            </ScrollView >
70
+        }
71
+
72
+      </View >
73
+    )
74
+  }
75
+}

+ 9
- 0
src/onlineSelling/pages/records/index.scss Parādīt failu

@@ -0,0 +1,9 @@
1
+.records {
2
+  padding: 10px 0;
3
+
4
+  .carditem {
5
+    & + .carditem {
6
+      margin-top: 40px;
7
+    }
8
+  }
9
+}

+ 152
- 0
src/onlineSelling/pages/screenHouse/index.js Parādīt failu

@@ -0,0 +1,152 @@
1
+import Taro, { Component } from '@tarojs/taro';
2
+import './index.scss'
3
+import { connect } from '@tarojs/redux'
4
+import ready from '@/utils/ready'
5
+import { queryApartmentType } from '@/services/project'
6
+
7
+@connect(
8
+  ({ user }) => ({ ...user })
9
+)
10
+
11
+export default class Index extends Component {
12
+  config = {
13
+    navigationBarTitleText: '筛选房源',
14
+  }
15
+
16
+  state = {
17
+    current: 0,
18
+    priceCurrent: 0,
19
+    startPrice: '100',
20
+    endPrice: null,
21
+    apartmentList: [
22
+      // { apartmentName: 'A 户型', buildingArea: '149', area2: '131' },
23
+      // { apartmentName: 'B 户型', buildingArea: '95', area2: '84.7' },
24
+      // { apartmentName: 'C 户型', buildingArea: '95', area2: '84.7' },
25
+    ]
26
+  }
27
+
28
+  componentWillMount() {
29
+
30
+    ready.queue(() => {
31
+      const id = this.$router.params.id
32
+      queryApartmentType({ salesBatchId: id }).then(res => {
33
+        this.setState({
34
+          apartmentList: res || []
35
+        })
36
+      })
37
+
38
+    })
39
+  }
40
+  handleCondition(value) {
41
+    this.setState({
42
+      current: value,
43
+    })
44
+  }
45
+  handlePriceItem(item) {
46
+    this.setState({
47
+      priceCurrent: item.value,
48
+      startPrice: item.startPrice,
49
+      endPrice: item.endPrice,
50
+    })
51
+  }
52
+  renderPrice() {
53
+    const { priceCurrent, startPrice, endPrice } = this.state
54
+    const priceList = [
55
+      { startPrice: null, endPrice: '100', value: 0 },
56
+      { startPrice: '100', endPrice: '150', value: 1 },
57
+      { startPrice: '150', endPrice: '200', value: 2 },
58
+      { startPrice: '200', endPrice: '250', value: 3 },
59
+      { startPrice: '250', endPrice: '300', value: 4 },
60
+      { startPrice: '300', endPrice: '400', value: 5 },
61
+      { startPrice: '400', endPrice: '500', value: 6 },
62
+      { startPrice: '500', endPrice: '600', value: 7 },
63
+      { startPrice: '600', endPrice: null, value: 8 },
64
+    ]
65
+    return (
66
+      <View>
67
+        <View className="price-con">
68
+          {priceList.map(priceItem => (
69
+            <View key={priceItem.value} className={priceCurrent == priceItem.value ? 'active-item' : 'price-item'} onClick={() => { this.handlePriceItem(priceItem) }}>
70
+              {!priceItem.startPrice && <View className="item-con">{priceItem.endPrice}万以下</View>}
71
+              {priceItem.startPrice && priceItem.endPrice && <View className="item-con">{priceItem.startPrice}万-{priceItem.endPrice}万</View>}
72
+              {!priceItem.endPrice && <View className="item-con">{priceItem.startPrice}万以上</View>}
73
+            </View>
74
+          ))}
75
+        </View>
76
+        <View style="color:#666;font-size:28rpx;margin-left:40rpx">
77
+          填写价格(万元)
78
+        </View>
79
+        <View className="search">
80
+          <Input
81
+            type="number"
82
+            placeholder="最低价"
83
+            class="search-input"
84
+            placeholder-style="color:#dcdcdc;font-size:28rpx"
85
+            maxlength="6"
86
+            value={startPrice}
87
+            onInput={() => this.handleInput}
88
+          />
89
+          <Text style="margin:0 8rpx;color:#999;font-size:28rpx">-</Text>
90
+          <Input
91
+            type="number"
92
+            placeholder="最低价"
93
+            class="search-input"
94
+            placeholder-style="color:#dcdcdc;font-size:28rpx"
95
+            maxlength="6"
96
+            value={endPrice}
97
+            onInput={() => this.handleInput}
98
+          />
99
+          <View className="sure-btn">
100
+            确定
101
+              </View>
102
+        </View>
103
+      </View>
104
+    )
105
+  }
106
+  renderApartment() {
107
+    const { apartmentList } = this.state
108
+    return (
109
+
110
+      <View style="padding:40rpx 20rpx">
111
+        {apartmentList.map((apartmentItem, index) => (
112
+          <View className='item' key={index + 'apartment'}>
113
+            <View className='house__img-info'>
114
+              <Image className='house__img' src={apartmentItem.buildingImgList[0].url} mode="widthFix"></Image>
115
+            </View>
116
+            <View className="rest-info">
117
+              <View className='house-type__name'>{apartmentItem.apartmentName || ''}</View>
118
+              <View className='construction__area'>
119
+                <Text>{apartmentItem.buildingArea ? '建筑面积约' + apartmentItem.buildingArea + 'm²' : '建筑面积待定'}</Text>
120
+                {
121
+                  apartmentItem.area2 ? <Text>使用面积约{apartmentItem.area2}m²</Text> : <Text>使用面积待定</Text>
122
+                }
123
+              </View>
124
+            </View>
125
+          </View>
126
+        ))}
127
+      </View>
128
+    )
129
+  }
130
+
131
+  render() {
132
+    const { current } = this.state
133
+    const condition = [{ title: '按价格', value: 0 }, { title: '按户型', value: 1 }]
134
+    return (
135
+      <View className="screen-page">
136
+        <View className="screen-top">
137
+          筛选房源
138
+            {condition.map(item => (
139
+            <View key={item.value} onClick={() => this.handleCondition(item.value)} className={current == item.value ? 'top-item active' : 'top-item'}>
140
+              {item.title}
141
+            </View>
142
+          ))}
143
+        </View>
144
+        {current == 0 && this.renderPrice()
145
+        }
146
+        {current == 1 && this.renderApartment()}
147
+
148
+      </View>
149
+
150
+    );
151
+  }
152
+}

+ 125
- 0
src/onlineSelling/pages/screenHouse/index.scss Parādīt failu

@@ -0,0 +1,125 @@
1
+@import "@/styles/mixins.scss";
2
+@import "@/styles/theme.scss";
3
+.screen-page{
4
+  .screen-top{
5
+    display: flex;
6
+    align-items: center;
7
+    height:100px;
8
+    background:rgba(248,248,248,1);
9
+    font-size: 34px;
10
+    color: #666;
11
+    padding: 0 30px;
12
+    font-size: 400;
13
+    .top-item{
14
+      font-size: 28px;
15
+      color: #999;
16
+      padding: 0 18px;
17
+      border-radius: 32px;
18
+      line-height: 60px;
19
+      background-color: #EEEEEE;
20
+      margin-left: 22px;
21
+
22
+    }
23
+    .active{
24
+      background-color: #fff;
25
+      box-shadow:0px 4px 12px 0px rgba(0, 0, 0, 0.08);
26
+    }
27
+  }
28
+  .price-con{
29
+    padding: 20px;
30
+    display: flex;
31
+    flex-wrap: wrap;
32
+    align-content: center;
33
+    .price-item{
34
+      flex: 0 0 33.3%;
35
+      .item-con{
36
+        text-align: center;
37
+        margin: 18px;
38
+        line-height:60px;
39
+        background:rgba(248,248,248,1);
40
+        border-radius:6px;
41
+        font-size: 28px;
42
+        color: #999;
43
+      }
44
+    }
45
+    .active-item{
46
+      flex: 0 0 33.3%;
47
+      .item-con{
48
+        text-align: center;
49
+        margin: 18px;
50
+        line-height:60px;
51
+        background-color: #fff;
52
+        box-shadow:0px 4px 12px 0px rgba(0, 0, 0, 0.08);
53
+        border-radius:6px;
54
+        font-size: 28px;
55
+        color: #999;
56
+      }
57
+    }
58
+  }
59
+  .search{
60
+    padding: 20px 40px;
61
+    display: flex;
62
+    align-items: center;
63
+    .search-input{
64
+      width:209px;
65
+      line-height:60px;
66
+      height:60px;
67
+      background:rgba(250,250,250,1);
68
+      border-radius:30px;
69
+      text-align: center;
70
+    }
71
+    .sure-btn{
72
+      width:120px;
73
+      line-height:60px;
74
+      background:rgba(187,156,121,1);
75
+      border-radius:10px;
76
+      text-align: center;
77
+      color: #fff;
78
+      font-size: 28px;
79
+      margin-left: 60px;
80
+    }
81
+  }
82
+  .item {
83
+    position: relative;
84
+    width: 340px;
85
+    margin: 2px 7.5px 20px 7.5px;
86
+    box-shadow: 0 0 16px rgba(0, 0, 0, 0.15);
87
+    border: 1px solid rgba(232, 232, 232, 1);
88
+    border-radius: 12px;
89
+    display: inline-block;
90
+
91
+    .house__img-info {
92
+      position: relative;
93
+      padding: 30px;
94
+      border-bottom: 1px solid #eee;
95
+
96
+      .house__img {
97
+        width: 100%;
98
+        border-radius: 10px;
99
+        height: 200px !important;
100
+      }
101
+    }
102
+    .rest-info {
103
+      padding: 10px  20px;
104
+
105
+      .house-type__name {
106
+        font-weight: bold;
107
+        margin: 10px 0;
108
+        font-size: 32px;
109
+        color: #333;
110
+      }
111
+      .construction__area {
112
+        color: rgba(0, 0, 0, 0.54);
113
+        font-size: 25px;
114
+        height: 80px;
115
+        display: flex;
116
+        flex-direction: column;
117
+        font-size: 28px;
118
+        text-align: left;
119
+
120
+      }
121
+    }
122
+
123
+  
124
+  }
125
+}

+ 105
- 0
src/onlineSelling/pages/selectionRecord/index.js Parādīt failu

@@ -0,0 +1,105 @@
1
+import Taro, { Component } from '@tarojs/taro';
2
+import './index.scss'
3
+import HouseCard from '../../components/HouseCard'
4
+import Blank from '../../components/Blank'
5
+import { AtTabs, AtTabsPane } from 'taro-ui'
6
+import "taro-ui/dist/style/components/tabs.scss"
7
+import { connect } from '@tarojs/redux'
8
+
9
+
10
+@connect(({ user, city }) => ({ user, city }))
11
+export default class selectionRecord extends Component {
12
+
13
+  config = {
14
+    navigationBarTitleText: '选房记录'
15
+  }
16
+
17
+  state = {
18
+    current: 0,
19
+    recordId: undefined, // 埋点ID
20
+    testData: [
21
+      {
22
+        preselectionRecordId: 1,
23
+        buildingName: '艾菲国际二期',
24
+        blockName: '6栋',
25
+        unitName: '一单元',
26
+        roomName: '1502',
27
+        aerialViewImg: 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1573738541467-25667811-b020-4c1f-b57d-e65a410d6fbd3103856559286073565.jpg',
28
+        price: '234万',
29
+        createDate: '2020-02-8',
30
+        status: 1
31
+      },
32
+      {
33
+        preselectionRecordId: 2,
34
+        buildingName: '艾菲国际二期',
35
+        blockName: '6栋',
36
+        unitName: '一单元',
37
+        roomName: '1502',
38
+        aerialViewImg: 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1573738541467-25667811-b020-4c1f-b57d-e65a410d6fbd3103856559286073565.jpg',
39
+        price: '234万',
40
+        createDate: '2020-02-9',
41
+        status: 0
42
+      },
43
+      {
44
+        preselectionRecordId: 3,
45
+        buildingName: '艾菲国际二期',
46
+        blockName: '6栋',
47
+        unitName: '二单元',
48
+        roomName: '1503',
49
+        aerialViewImg: 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1573738541467-25667811-b020-4c1f-b57d-e65a410d6fbd3103856559286073565.jpg',
50
+        price: '234万',
51
+        createDate: '2020-02-10',
52
+        status: 1
53
+      },
54
+      {
55
+        preselectionRecordId: 4,
56
+        buildingName: '艾菲国际二期',
57
+        blockName: '6栋',
58
+        unitName: '二单元',
59
+        roomName: '1504',
60
+        aerialViewImg: 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1573738541467-25667811-b020-4c1f-b57d-e65a410d6fbd3103856559286073565.jpg',
61
+        price: '234万',
62
+        createDate: '2020-02-11',
63
+        status: 0
64
+      },
65
+    ]
66
+  }
67
+
68
+  componentWillMount() {
69
+
70
+  }
71
+
72
+
73
+  handleClick(value) {
74
+    this.setState({
75
+      current: value
76
+    })
77
+  }
78
+
79
+
80
+  render() {
81
+    const { testData } = this.state
82
+    return (
83
+      <View style="height:100vh">
84
+        <AtTabs className="selectionRecord" scroll current={this.state.current} tabList={[{ title: '预选记录' }, { title: '认筹记录' }]} onClick={this.handleClick.bind(this)}>
85
+          <AtTabsPane current={this.state.current} index={0} >
86
+            {
87
+              testData.map((item) => {
88
+                return (
89
+                  <View className="carditem" key={item.preselectionRecordId}>
90
+                    <HouseCard summary={item} />
91
+                  </View>
92
+                )
93
+              })
94
+            }
95
+          </AtTabsPane>
96
+          <AtTabsPane current={this.state.current} index={1}>
97
+            <View>
98
+              <Blank tips="暂无认筹记录" />
99
+            </View>
100
+          </AtTabsPane>
101
+        </AtTabs>
102
+      </View>
103
+    )
104
+  }
105
+}

+ 28
- 0
src/onlineSelling/pages/selectionRecord/index.scss Parādīt failu

@@ -0,0 +1,28 @@
1
+@import "@/styles/mixins.scss";
2
+@import "@/styles/theme.scss";
3
+.selectionRecord{
4
+    .at-tabs__header{
5
+      width: 86%;
6
+      background-color: #fff;
7
+      box-shadow:0px 4px 12px 0px rgba(0,0,0,0.12);
8
+      margin: 20px auto 10px auto;
9
+      border-radius: 44px;
10
+    }
11
+    .at-tabs__item{
12
+      width:50%;
13
+      flex: none;
14
+      color: #333;
15
+      font-size: 28px;
16
+    }
17
+    .at-tabs__item--active{
18
+      color: $primary-color;
19
+      background-color: #f4f4f4;
20
+    }
21
+    .at-tabs__item-underline{
22
+      height: 0;
23
+    }
24
+    .at-tabs__underline{
25
+      display: none;
26
+    }
27
+  
28
+}

+ 1
- 1
src/pages/activity/activity.js Parādīt failu

@@ -70,7 +70,7 @@ export default class active extends Component {
70 70
 
71 71
     return !phone && !tel ? this.renderLogin() : (
72 72
       <View style="height:100vh">
73
-        <AtTabs className="tab-box" scroll current={this.state.current} tabList={[{ title: '热门活动' }, { title: '最新资讯' }]} onClick={this.handleClick.bind(this)}>
73
+        <AtTabs className="tab-box" scroll current={this.state.current} tabList={[{ title: '参加活动' }, { title: '最新资讯' }]} onClick={this.handleClick.bind(this)}>
74 74
           <AtTabsPane current={this.state.current} index={0} >
75 75
             <Activity />
76 76
           </AtTabsPane>

+ 24
- 24
src/pages/activity/detail/poster.js Parādīt failu

@@ -100,36 +100,36 @@ export default class Index extends Component {
100 100
       {
101 101
         x: 30,
102 102
         y: 1065,
103
-        text: '进入',
103
+        text: '进入活动查看详情',
104 104
         fontSize: 26,
105 105
         color: '#999',
106 106
         baseLine: 'middle',
107 107
         lineHeight: 48,
108
-        width: 50,
109
-        zIndex: 11
110
-      },
111
-      {
112
-        x: 100,
113
-        y: 1065,
114
-        text: data.miniAppName,
115
-        fontSize: 34,
116
-        color: 'red',
117
-        baseLine: 'middle',
118
-        lineHeight: 48,
119
-        width: (data.miniAppName || '').length * 30 + 60,
120
-        zIndex: 11
121
-      },
122
-      {
123
-        x: (data.miniAppName || '').length * 30 + 130,
124
-        y: 1065,
125
-        text: '热门活动',
126
-        fontSize: 26,
127
-        color: '#999',
128
-        baseLine: 'middle',
129
-        lineHeight: 48,
130
-        width: 150,
108
+        width: 450,
131 109
         zIndex: 11
132 110
       },
111
+      // {
112
+      //   x: 100,
113
+      //   y: 1065,
114
+      //   text: data.miniAppName,
115
+      //   fontSize: 34,
116
+      //   color: 'red',
117
+      //   baseLine: 'middle',
118
+      //   lineHeight: 48,
119
+      //   width: (data.miniAppName || '').length * 30 + 60,
120
+      //   zIndex: 11
121
+      // },
122
+      // {
123
+      //   x: (data.miniAppName || '').length * 30 + 130,
124
+      //   y: 1065,
125
+      //   text: '参加活动',
126
+      //   fontSize: 26,
127
+      //   color: '#999',
128
+      //   baseLine: 'middle',
129
+      //   lineHeight: 48,
130
+      //   width: 150,
131
+      //   zIndex: 11
132
+      // },
133 133
     ]
134 134
     const images = [
135 135
       {

+ 14
- 9
src/pages/activity/index.js Parādīt failu

@@ -10,7 +10,7 @@ import { connect } from '@tarojs/redux'
10 10
 export default class Index extends Component {
11 11
 
12 12
   config = {
13
-    navigationBarTitleText: '热门活动'
13
+    navigationBarTitleText: '参加活动'
14 14
   }
15 15
 
16 16
   state = {
@@ -37,13 +37,13 @@ export default class Index extends Component {
37 37
       console.log('活动列表')
38 38
     })
39 39
   }
40
- 
41
-  componentDidShow () {
40
+
41
+  componentDidShow() {
42 42
     // // this.onPullDownRefresh()
43 43
     // console.log('----', this)
44 44
     this.loadData(1)
45 45
   }
46
-  
46
+
47 47
   componentWillUnmount() {
48 48
     const { recordId } = this.state
49 49
     recordId && updatePoint(recordId)
@@ -82,6 +82,11 @@ export default class Index extends Component {
82 82
           url: '/pages/activity/detail/assemble?id=' + item.id
83 83
         })
84 84
         return
85
+      case 'live':
86
+        Taro.navigateTo({
87
+          url: '/onlineSelling/pages/live/index?id=' + item.id
88
+        })
89
+        return;
85 90
       default:
86 91
         Taro.navigateTo({
87 92
           url: '/pages/activity/detail/index?id=' + item.id
@@ -99,7 +104,7 @@ export default class Index extends Component {
99 104
 
100 105
     // debugger
101 106
     rest && rest()
102
-    
107
+
103 108
     this.refreshing = false
104 109
   }
105 110
 
@@ -111,9 +116,9 @@ export default class Index extends Component {
111 116
 
112 117
   loadData = (page) => {
113 118
     this.loadList(page).then(res => {
114
-      const {records, list, total, current, pages} = res || {}
119
+      const { records, list, total, current, pages } = res || {}
115 120
       const _list = records || list || []
116
-      const newList = current <= 1 ? _list: this.state.list.concat(_list)
121
+      const newList = current <= 1 ? _list : this.state.list.concat(_list)
117 122
 
118 123
       this.setState({
119 124
         list: newList,
@@ -138,10 +143,10 @@ export default class Index extends Component {
138 143
       >
139 144
         <View className="list">
140 145
           {
141
-            list.map(item => (
146
+            list.map((item,index) => (
142 147
               <ActivityItem
143 148
                 data={item}
144
-                key={item.dynamicId}
149
+                key={index+'activity'}
145 150
                 onClick={this.handleItemClick}>
146 151
               </ActivityItem>
147 152
             ))

+ 23
- 7
src/pages/activity/item/index.js Parādīt failu

@@ -14,6 +14,12 @@ export default class Item extends Component {
14 14
   }
15 15
   render() {
16 16
     const { data, style } = this.props
17
+    const now = dayjs()
18
+    const start = dayjs(data.startDate)
19
+    const end = dayjs(data.endDate)
20
+    const endNow = end.diff(now)
21
+    const nowStart = now.diff(start)
22
+    
17 23
     return (
18 24
       <View className="item" style={style} onClick={this.handleClick.bind(this, data)}>
19 25
         <Image className="pic" mode="aspectFill" src={transferImage(data.mainImg || data.img || data.listImgUrl || data.imgUrl)}></Image>
@@ -25,29 +31,39 @@ export default class Item extends Component {
25 31
           }
26 32
           {(data.type == 'help' || data.type == 'group') &&
27 33
             <View className={data.type == 'help' ? 'type' : 'type2'}>{data.type == 'help' ? '助力' : '拼团'}</View>
28
-
34
+          }
35
+          {data.type == 'live' &&
36
+            <View className="live">直播</View>
29 37
           }
30 38
           {(data.type == 'help' || data.type == 'group') && data.successNum > 0 &&
31 39
             <View className="success-num">
32 40
               <View className="triangle"></View>
33 41
               <View className="text">已成功 {data.successNum}</View>
34 42
             </View>
35
-
36 43
           }
37 44
 
38
-          {/* <View className="time">活动开始时间:{`${dayjs(data.startDate).format('YYYY-MM-DD HH:mm:ss')}`}</View> */}
39
-
40 45
           <View className="left">
41
-            {data.endDate &&
46
+            {data.endDate && data.type != 'live' &&
42 47
               <View className="time">参与截止时间:{`${dayjs(data.endDate).format('YYYY年MM月DD日 HH:mm:ss')}`}</View>
43 48
             }
44
-            {!data.endDate &&
49
+            {!data.endDate && data.type != 'live' &&
45 50
               <View className="time">{data.type != 'dynamic' ? '参与截止时间:' : ''}</View>
46 51
             }
47
-            {data.endDate &&
52
+            {!data.startDate && data.type == 'live' &&
53
+              <View className="time">直播开始时间:</View>
54
+            }
55
+            {data.startDate && data.type == 'live' &&
56
+              <View className="time">直播开始时间:{`${dayjs(data.startDate).format('YYYY-MM-DD HH:mm:ss')}`}</View>
57
+            }
58
+            {data.endDate && data.type != 'live' &&
48 59
               <View className={data.activityStatus == 0 ? "btn jionin " : data.activityStatus == 1 ? "btn nostart" : data.activityStatus == 2 ? "btn jioned" : "btn"}>{data.activityStatus == 0 ? "立即参与" : data.activityStatus == 1 ? "未开始" : data.activityStatus == 2 ? "已结束" : "已参与"}</View>
49 60
             }
61
+            {data.startDate && data.type == 'live' && data.endDate &&
62
+              <View className={nowStart <= 0 ? "btn nostart" : endNow <= 0 ? "btn jioned" : "btn jionin"}>{nowStart <= 0 ? "即将直播" : endNow <= 0 ? "直播结束" : "正在直播"}</View>
63
+            }
50 64
           </View>
65
+          <View >{}</View>
66
+          <View ></View>
51 67
         </View>
52 68
       </View >
53 69
     );

+ 10
- 0
src/pages/activity/item/index.scss Parādīt failu

@@ -15,6 +15,16 @@
15 15
   width: 100%;
16 16
   position: relative;
17 17
   padding-bottom: 4px;
18
+  .live{
19
+    position: absolute;
20
+    left:0;
21
+    top:0;
22
+    color: #fff;
23
+    background:#FF3838;
24
+    padding: 10px 36px;
25
+    border-radius: 12px 0 12px 0;
26
+    font-size: 24px;
27
+  }
18 28
   .type{
19 29
     position: absolute;
20 30
     left:0;

+ 11
- 5
src/pages/card/index.js Parādīt failu

@@ -53,6 +53,7 @@ export default class Index extends Component {
53 53
       // if (sceneInShare(options.scene)) {
54 54
 
55 55
       // 必须授权电话
56
+
56 57
       if (this.toggleGrantPhone()) {
57 58
         this.toggleGrantAvatar()
58 59
       }
@@ -402,9 +403,14 @@ export default class Index extends Component {
402 403
 
403 404
   handleModalConfirm(phoneNumber) {
404 405
     const {
405
-      cardInfo: { id, projects = [] },
406
-      userInfo: { person: { phone, tel, personType, avatarurl } }
406
+      cardInfo: { id, name, projects = [] },
407
+      userInfo: { person: { phone, tel, personType, avatarurl, personId } }
407 408
     } = this.props
409
+    if (id != personId) {
410
+      Taro.setNavigationBarTitle({ title: `${name}为您服务` })
411
+    }
412
+
413
+
408 414
     if (personType === ROLE_CODE['CONSULTANT']) {
409 415
       return
410 416
     }
@@ -419,8 +425,8 @@ export default class Index extends Component {
419 425
         buildingId,
420 426
         phone: realPhone
421 427
       }
422
-      const { cardInfo, userInfo: { person } } = this.props
423
-      if (person.personId != cardInfo.id) {
428
+
429
+      if (personId != id) {
424 430
         reportClient(payload).then(res => {
425 431
           this.setState({ bound: true })
426 432
           if (res !== 'bound') {
@@ -617,7 +623,7 @@ export default class Index extends Component {
617 623
 
618 624
               {buildingId && (
619 625
                 <View className="pro__info">
620
-                  <View className='project__title'>项目信息</View>
626
+                  <View className='project__title'>{isSelf ? '项目信息' : '为您推荐'}</View>
621 627
                   <ProjectItem data={projectDetail} onClick={this.toProjectDetail.bind(this)} />
622 628
                 </View>
623 629
               )}

+ 26
- 25
src/pages/card/poster.js Parādīt failu

@@ -52,7 +52,7 @@ export default class Index extends Component {
52 52
         y: 210,
53 53
         text: `${data.company}`,
54 54
         fontSize: 30,
55
-        color: '#999',
55
+        color: 'red',
56 56
         baseLine: 'middle',
57 57
         lineHeight: 48,
58 58
         width: 260,
@@ -107,36 +107,37 @@ export default class Index extends Component {
107 107
       {
108 108
         x: 80,
109 109
         y: 755,
110
-        text: '进入',
111
-        fontSize: 26,
112
-        color: '#999',
113
-        baseLine: 'middle',
114
-        lineHeight: 48,
115
-        width: 50,
116
-        zIndex: 100
117
-      },
118
-      {
119
-        x: 140,
120
-        y: 755,
121
-        text: data.miniAppName,
122
-        fontSize: 34,
123
-        color: 'red',
124
-        baseLine: 'middle',
125
-        lineHeight: 48,
126
-        width: (data.miniAppName || '').length * 30 + 50,
127
-        zIndex: 100
128
-      },
129
-      {
130
-        x: (data.miniAppName || '').length * 30 + 156,
131
-        y: 755,
132
-        text: '查看',
110
+        text: '进入名片查看详情',
111
+        // text: '进入',
133 112
         fontSize: 26,
134 113
         color: '#999',
135 114
         baseLine: 'middle',
136 115
         lineHeight: 48,
137
-        width: 150,
116
+        width: 450,
138 117
         zIndex: 100
139 118
       },
119
+      // {
120
+      //   x: 140,
121
+      //   y: 755,
122
+      //   text: data.miniAppName,
123
+      //   fontSize: 34,
124
+      //   color: 'red',
125
+      //   baseLine: 'middle',
126
+      //   lineHeight: 48,
127
+      //   width: (data.miniAppName || '').length * 30 + 50,
128
+      //   zIndex: 100
129
+      // },
130
+      // {
131
+      //   x: (data.miniAppName || '').length * 30 + 156,
132
+      //   y: 755,
133
+      //   text: '查看',
134
+      //   fontSize: 26,
135
+      //   color: '#999',
136
+      //   baseLine: 'middle',
137
+      //   lineHeight: 48,
138
+      //   width: 150,
139
+      //   zIndex: 100
140
+      // },
140 141
       {
141 142
         x: 320,
142 143
         y: 1075,

+ 5
- 1
src/pages/im/msgItem/index.js Parādīt failu

@@ -34,6 +34,10 @@ export default class MsgItem extends Component {
34 34
     this.props.getPhone(e)
35 35
   }
36 36
 
37
+  gotPhone() {
38
+    Taro.showToast({ title: '您已成功授权手机号', icon: 'none' })
39
+  }
40
+
37 41
   renderMsgContent(row, phone) {
38 42
     if (row.messageType === 'card') {
39 43
       return (
@@ -47,7 +51,7 @@ export default class MsgItem extends Component {
47 51
 
48 52
           {
49 53
             phone ? (
50
-              <View className="card-btn" onClick={this.getPhoneNumber}>
54
+              <View className="card-btn" onClick={this.gotPhone}>
51 55
                 <Text className="iconfont icon-shouji"></Text>
52 56
                 <Text>留下您的电话</Text>
53 57
               </View>

+ 24
- 24
src/pages/news/detail/poster.js Parādīt failu

@@ -100,36 +100,36 @@ export default class Index extends Component {
100 100
       {
101 101
         x: 30,
102 102
         y: 1065,
103
-        text: '进入',
103
+        text: '进入资讯查看详情',
104 104
         fontSize: 26,
105 105
         color: '#999',
106 106
         baseLine: 'middle',
107 107
         lineHeight: 48,
108
-        width: 50,
109
-        zIndex: 11
110
-      },
111
-      {
112
-        x: 100,
113
-        y: 1065,
114
-        text: data.miniAppName,
115
-        fontSize: 34,
116
-        color: 'red',
117
-        baseLine: 'middle',
118
-        lineHeight: 48,
119
-        width: (data.miniAppName || '').length * 30 + 60,
120
-        zIndex: 11
121
-      },
122
-      {
123
-        x: (data.miniAppName || '').length * 30 + 130,
124
-        y: 1065,
125
-        text: '查看资讯',
126
-        fontSize: 26,
127
-        color: '#999',
128
-        baseLine: 'middle',
129
-        lineHeight: 48,
130
-        width: 150,
108
+        width: 450,
131 109
         zIndex: 11
132 110
       },
111
+      // {
112
+      //   x: 100,
113
+      //   y: 1065,
114
+      //   text: data.miniAppName,
115
+      //   fontSize: 34,
116
+      //   color: 'red',
117
+      //   baseLine: 'middle',
118
+      //   lineHeight: 48,
119
+      //   width: (data.miniAppName || '').length * 30 + 60,
120
+      //   zIndex: 11
121
+      // },
122
+      // {
123
+      //   x: (data.miniAppName || '').length * 30 + 130,
124
+      //   y: 1065,
125
+      //   text: '查看资讯',
126
+      //   fontSize: 26,
127
+      //   color: '#999',
128
+      //   baseLine: 'middle',
129
+      //   lineHeight: 48,
130
+      //   width: 150,
131
+      //   zIndex: 11
132
+      // },
133 133
     ]
134 134
     const images = [
135 135
       {

+ 1
- 1
src/pages/news/index.js Parādīt failu

@@ -10,7 +10,7 @@ import { connect } from '@tarojs/redux'
10 10
 export default class Index extends Component {
11 11
 
12 12
   config = {
13
-    navigationBarTitleText: '热门活动'
13
+    navigationBarTitleText: '资讯列表'
14 14
   }
15 15
 
16 16
   state = {

+ 1
- 1
src/pages/person/authorize/index.scss Parādīt failu

@@ -3,7 +3,7 @@
3 3
 .auth-page{
4 4
   position: relative;
5 5
   width: 100%;
6
-  height: 100%;
6
+  height: 100vh;
7 7
   .avatar_img{
8 8
     position: absolute;
9 9
     width:120px;

+ 2
- 2
src/pages/person/index.js Parādīt failu

@@ -18,7 +18,7 @@ import { rule as ruleToast } from '@/utils/ruleToast'
18 18
 
19 19
 export default class Person extends Component {
20 20
   config = {
21
-    navigationBarTitleText: '我的'
21
+    navigationBarTitleText: '我的地盘'
22 22
   }
23 23
 
24 24
   state = {
@@ -194,7 +194,7 @@ export default class Person extends Component {
194 194
 
195 195
   renderDetail() {
196 196
     const { users, menus, roleName } = this.state
197
-    const { user: { userInfo: { person: { org: { waterMark } }, miniApp: { name } } } } = this.props
197
+    const { user: { userInfo: { person: { org: { waterMark } = {} }, miniApp: { name } } } } = this.props
198 198
     
199 199
     // const showQRCode = user.personType === ROLE_CODE['CONSULTANT'] || ROLE_CODE['ESTATE_AGENT'] || ROLE_CODE['CHANNEL_AGENT']
200 200
     // const isConsultant = user.personType == ROLE_CODE['CONSULTANT']

+ 10
- 2
src/pages/person/menus.js Parādīt failu

@@ -18,6 +18,7 @@ const icons = {
18 18
   customerAnalysis: require('@/assets/mine/customerAnalysis.png'),
19 19
   fenxi: require('@/assets/mine/fenxi.png'),
20 20
   share: require('@/assets/mine/share.png'),
21
+  selection: require('@/assets/mine/selection.png'),
21 22
 }
22 23
 
23 24
 const DRIFT = ROLE_CODE['DRIFT']
@@ -121,6 +122,13 @@ const menus = [
121 122
     },
122 123
   ],
123 124
   [
125
+    {
126
+      name: '选房记录',
127
+      url: '/onlineSelling/pages/records/index',
128
+      icon: icons.selection,
129
+      extends: undefined,
130
+      userTypes: [CUSTOMER, CONSULTANT, ESTATE_AGENT, CHANNEL_AGENT],
131
+    },
124 132
     {
125 133
       name: '我的收藏',
126 134
       url: '/pages/person/favorite/index',
@@ -143,14 +151,14 @@ const menus = [
143 151
       userTypes: [CUSTOMER, CONSULTANT, ESTATE_AGENT, CHANNEL_AGENT],
144 152
     },
145 153
     {
146
-      name: '房贷计算器',
154
+      name: '房贷',
147 155
       url: '/pages/toolKit/index',
148 156
       icon: icons.calculator,
149 157
       extends: undefined,
150 158
       userTypes: [CUSTOMER, CONSULTANT, ESTATE_AGENT, CHANNEL_AGENT],
151 159
     },
152 160
     {
153
-      name: '购房百科',
161
+      name: '购房须知',
154 162
       url: '/pages/policy/index?from=mine',
155 163
       icon: icons.encyclopedia,
156 164
       extends: undefined,

+ 3
- 2
src/pages/person/myShare/index.js Parādīt failu

@@ -118,16 +118,17 @@ export default class Person extends Taro.Component {
118 118
               <View className="share-item" key={item.targetId + 'share'} onClick={this.handleItemClick.bind(this, item)}>
119 119
                 <Image className="img" mode="aspectFill" src={transferImage(item.activityImg || emptyImg)}></Image>
120 120
                 <View className={item.eventType == 'project' ? 'building' : 'name'}>{item.activityName || ''}</View>
121
-                {/* {item.eventType == 'project' && <View className="price"> {item.price ? <Text>约{item.price}{item.priceType == 'total' ? '万元/套' : '元/m²'}</Text> : '暂无均价'} </View>} */}
121
+  
122 122
                 {item.eventType == 'project' && <View className="price"> {item.price || '暂无均价'} </View>}
123 123
 
124 124
                 {item.eventType == 'h5' && <View className="num"> {item.drainageShareNum || '0'}人查看了分享 </View>}
125
+                {item.eventType == 'house' && <View className="num"> {item.houseShareNum || '0'}人查看了分享 </View>}
126
+                {item.eventType == 'live' && <View className="num"> {item.liveShareNum || '0'}人查看了分享 </View>}
125 127
                 {item.eventType == 'project' && <View className="num"> {item.buildingNum || '0'}人查看了分享 </View>}
126 128
                 {item.eventType == 'group' && <View className="num"> {item.groupActivityShareNum || '0'}人查看了分享 </View>}
127 129
                 {item.eventType == 'help' && <View className="num"> {item.helpActivityShareNum || '0'}人查看了分享 </View>}
128 130
                 {item.eventType == 'activity' && <View className="num"> {item.activityShareNum || '0'}人查看了分享 </View>}
129 131
                 {item.eventType == 'news' && <View className="num"> {item.newsNum || '0'}人查看了分享 </View>}
130
-
131 132
                 {item.eventType == 'project' && <View className="address"> {item.address || ''} </View>}
132 133
               </View>
133 134
             ))

+ 1
- 1
src/pages/policy/detail/index.js Parādīt failu

@@ -14,7 +14,7 @@ import { transferImage } from '@/utils/tools'
14 14
 @connect(state => state.user)
15 15
 export default class PolicyDetail extends Component {
16 16
   config = {
17
-    navigationBarTitleText: '购房百科详情'
17
+    navigationBarTitleText: '购房须知详情'
18 18
   }
19 19
 
20 20
   state = {

+ 2
- 2
src/pages/policy/index.js Parādīt failu

@@ -13,14 +13,14 @@ let pageIndex = 1
13 13
   track: {
14 14
     event: 'policy',
15 15
     eventType: 'main',
16
-    propertyName: '查看购房百科',
16
+    propertyName: '查看购房须知',
17 17
     data: '{}',
18 18
   }
19 19
 })
20 20
 export default class Index extends Component {
21 21
 
22 22
   config = {
23
-    navigationBarTitleText: '购房百科列表'
23
+    navigationBarTitleText: '购房须知'
24 24
   }
25 25
 
26 26
   state = {

+ 1
- 1
src/pages/project/activity/index.js Parādīt failu

@@ -48,7 +48,7 @@ export default class SwiperBanner extends Component {
48 48
         return (
49 49
             <View className="activity-box" style={`background: url(${transferImage(bgImg)}) no-repeat center;background-size: 100% 100%;`}>
50 50
                 <View className="section-head">
51
-                    <View className="section-head__title">热门活动 </View>
51
+                    <View className="section-head__title">参加活动 </View>
52 52
                     <View className="section-head__more" onClick={this.toActivity}>
53 53
                         查看更多<Text className="iconfont icon-more"></Text>
54 54
                     </View>

+ 86
- 25
src/pages/project/detail/index.js Parādīt failu

@@ -12,7 +12,8 @@ import {
12 12
   addItemUv,
13 13
   // addItemShareNum,
14 14
   favorProject,
15
-  cancelFavorProject
15
+  cancelFavorProject,
16
+  queryLiveList
16 17
 } from '@/services/item'
17 18
 import { getMiniQrcode, savePoint, updatePoint } from '@/services/common'
18 19
 import { queryNewsList, queryHelpGroup } from '@/services/news'
@@ -66,6 +67,7 @@ export default class Index extends Component {
66 67
     activityList: [],
67 68
     helpList: [],
68 69
     groupList: [],
70
+    liveList: [],
69 71
     statusOpts: ['待售', '售罄', '在售'],
70 72
     statusBgColors: ['#BB9C79', '#CECECE', '#F6B61D'],
71 73
     // circumOpts: [],
@@ -252,8 +254,14 @@ export default class Index extends Component {
252 254
     }
253 255
   }
254 256
 
257
+
255 258
   loadHelpGroupList() {
256 259
     const { buildingId } = this.state
260
+    queryLiveList({ buildingId }).then(res => {
261
+      this.setState({
262
+        liveList: res.records || []
263
+      })
264
+    })
257 265
 
258 266
     queryHelpGroup({ buildingId: buildingId }).then(res => {
259 267
       console.log(res, "buildingId")
@@ -769,7 +777,7 @@ export default class Index extends Component {
769 777
         <View className="bt-nav__left">
770 778
           <Button class='bt-nav__item' style={{ display: posterShow }} onClick={() => { this.togglePosterStatus(true) }}>
771 779
             <Image src={require('@/assets/news/tupian.png')} className='poster-img'></Image>
772
-            <Text className="text">海报</Text>
780
+            <Text className="text">生成海报</Text>
773 781
           </Button>
774 782
           <Button class='bt-nav__item' open-type="share">
775 783
             <Image src={require('@/assets/news/fasong.png')} className='fenxiang-img'></Image>
@@ -876,7 +884,7 @@ export default class Index extends Component {
876 884
         {listimg.length > 0 &&
877 885
           (
878 886
             <View className='photos__type'>
879
-              <View className='photos__type__title'>相册</View>
887
+              <View className='photos__type__title'>高清大图</View>
880 888
               <ScrollView scrollX>
881 889
                 <View className='photos__type__content' >
882 890
 
@@ -933,7 +941,7 @@ export default class Index extends Component {
933 941
       <View onClick={this.tomapDetail}>
934 942
         <View className="section circum">
935 943
           <View className="section-head">
936
-            <Text className="section-head__title">位置及周边配套</Text>
944
+            <Text className="section-head__title">楼盘位置及配套</Text>
937 945
             <View className="section-head__more">
938 946
               更多<Text className="iconfont icon-more"></Text>
939 947
             </View>
@@ -953,7 +961,7 @@ export default class Index extends Component {
953 961
           consultants.length > 0 && (
954 962
             <View className="section counselor">
955 963
               <View className="section-head">
956
-                <Text className="section-head__title">置业顾问</Text>
964
+                <Text className="section-head__title">咨询置业顾问</Text>
957 965
                 <View className="section-head__more" onClick={() => { this.handleMoreClick() }}>
958 966
                   更多<Text className="iconfont icon-more"></Text>
959 967
                 </View>
@@ -1031,11 +1039,11 @@ export default class Index extends Component {
1031 1039
       <Block>
1032 1040
         {helpList.length > 0 &&
1033 1041
           <View className="activity">
1034
-            <View className="title">助力活动</View>
1042
+            <View className="title">助力赢好礼</View>
1035 1043
             <View style={{ position: 'relative' }}>
1036 1044
               <HelpGroupBanner
1037 1045
                 style={{ height: '250rpx' }}
1038
-                indicatorDots={false}
1046
+                indicatorDots={helpList.length > 1}
1039 1047
                 list={helpList}
1040 1048
                 onClick={this.handleHelpClick}>
1041 1049
               </HelpGroupBanner>
@@ -1054,7 +1062,6 @@ export default class Index extends Component {
1054 1062
     } else {
1055 1063
       return
1056 1064
     }
1057
-
1058 1065
   }
1059 1066
 
1060 1067
   renderPoints() {
@@ -1070,6 +1077,30 @@ export default class Index extends Component {
1070 1077
       </Block>
1071 1078
     )
1072 1079
   }
1080
+  toHouseList(id) {
1081
+    const { projectDetail: { buildingId } } = this.props
1082
+    Taro.navigateTo({
1083
+      url: `/onlineSelling/pages/houseList/index?id=${id}&buildingId=${buildingId}`
1084
+    })
1085
+  }
1086
+  renderChooseHouse() {
1087
+    console.log('----------------renderChooseHouse----------------')
1088
+    const { projectDetail: { salesBatch = [] } } = this.props
1089
+    return (
1090
+      <Block>
1091
+        {salesBatch.length && <View className="activity" style="padding:40rpx 0 20rpx 0 ">
1092
+          <View className="title">在线选房</View>
1093
+          {salesBatch.map((item, index) => (
1094
+            <View style={{ position: 'relative', padding: '0 30rpx' }} key={index + 'salesBatch'} >
1095
+              <Image style="height:388rpx;width:100%;border-radius: 24rpx;margin-bottom:20rpx" onClick={() => { this.toHouseList(item.salesBatchId) }} src={transferImage(item.aerialViewImg || require('@/assets/empty.png'))} mode="aspectFill"></Image>
1096
+            </View>
1097
+          ))}
1098
+
1099
+        </View>}
1100
+
1101
+      </Block>
1102
+    )
1103
+  }
1073 1104
 
1074 1105
   handleHelpClick(item) {
1075 1106
     Taro.navigateTo({
@@ -1096,12 +1127,12 @@ export default class Index extends Component {
1096 1127
       <Block>
1097 1128
         {groupList.length > 0 &&
1098 1129
           <View className="activity">
1099
-            <View className="title">拼团活动</View>
1130
+            <View className="title">发起拼单</View>
1100 1131
             <View
1101 1132
               style={{ position: 'relative' }}>
1102 1133
               <HelpGroupBanner
1103 1134
                 style={{ height: '250rpx' }}
1104
-                indicatorDots={false}
1135
+                indicatorDots={groupList.length > 1}
1105 1136
                 list={groupList}
1106 1137
                 onClick={this.handleGroupClick}>
1107 1138
               </HelpGroupBanner>
@@ -1111,6 +1142,32 @@ export default class Index extends Component {
1111 1142
       </Block>
1112 1143
     )
1113 1144
   }
1145
+  handleLiveClick(item) {
1146
+    Taro.navigateTo({
1147
+      url: '/onlineSelling/pages/live/index?id=' + item.liveActivityId
1148
+    })
1149
+  }
1150
+  renderLive() {
1151
+    const { liveList } = this.state
1152
+    return (
1153
+      <Block>
1154
+        {liveList.length > 0 &&
1155
+          <View className="activity">
1156
+            <View className="title">直播活动</View>
1157
+            <View
1158
+              style={{ position: 'relative' }}>
1159
+              <HelpGroupBanner
1160
+                style={{ height: '255rpx' }}
1161
+                indicatorDots={liveList.length > 1}
1162
+                list={liveList}
1163
+                onClick={this.handleLiveClick}>
1164
+              </HelpGroupBanner>
1165
+            </View>
1166
+          </View>
1167
+        }
1168
+      </Block>
1169
+    )
1170
+  }
1114 1171
 
1115 1172
   renderHouseTypeList() {
1116 1173
     const { statusOpts, statusBgColors } = this.state
@@ -1136,7 +1193,7 @@ export default class Index extends Component {
1136 1193
         {
1137 1194
           list.length > 0 && (
1138 1195
             <View className='house-type'>
1139
-              <View className='house-type__title'>户型介绍({list.length})</View>
1196
+              <View className='house-type__title'>户型({list.length})</View>
1140 1197
               <ScrollView scrollX>
1141 1198
 
1142 1199
                 <View className='house-type__list'>
@@ -1147,7 +1204,7 @@ export default class Index extends Component {
1147 1204
                           <Block>
1148 1205
                             <View className='house-type__state' style={`background-color: ${statusBgColors[item.marketStatus - 1]}`}>{statusOpts[item.marketStatus - 1]}</View>
1149 1206
                             <View className='house__img-info'>
1150
-                              <Image className='house__img' src={transferImage(item.buildingImgList[0].url)} mode="widthFix" onClick={this.handleHouseTypePosterClick.bind(this, item, imgUrls)}></Image>
1207
+                              <Image className='house__img' src={transferImage(item.buildingImgList[0].url)} mode="aspectFill" onClick={this.handleHouseTypePosterClick.bind(this, item, imgUrls)}></Image>
1151 1208
                               {item.panoramaArr && (
1152 1209
                                 <View className='house-type__panorama'>
1153 1210
                                   <Image mode="aspectFill" src={vrLogo} style={{ width: '100%', height: '100%' }} />
@@ -1185,7 +1242,7 @@ export default class Index extends Component {
1185 1242
           activityList.length > 0 && (
1186 1243
             <View className="activity" >
1187 1244
               <View className="section-head">
1188
-                <Text className="section-head__title" style={{ margin: '10rpx 0 40rpx 35rpx' }}>热门活动</Text>
1245
+                <Text className="section-head__title" style={{ margin: '10rpx 0 40rpx 35rpx' }}>参加活动</Text>
1189 1246
                 <View className="section-head__more" style={{ marginRight: '20rpx' }} onClick={this.handleActivityMoreClick}>
1190 1247
                   更多活动<Text className="iconfont icon-more"></Text>
1191 1248
                 </View>
@@ -1284,14 +1341,14 @@ export default class Index extends Component {
1284 1341
 
1285 1342
   // onPause() {
1286 1343
   //   this.setState({
1287
-  //     videoPlayShow: 'flex'e.detail
1344
+  //     videoPlayShow: 'flex'
1288 1345
   //   })
1289 1346
   // }
1290 1347
   renderVideo() {
1291 1348
     const { videoPlayShow } = this.state
1292 1349
     const { projectDetail } = this.props
1293 1350
     const { videoImage } = projectDetail
1294
-    const imgSrc = videoImage[0].url
1351
+    const imgSrc = videoImage ? videoImage[0].url : ''
1295 1352
 
1296 1353
     return (
1297 1354
       <View
@@ -1414,6 +1471,11 @@ export default class Index extends Component {
1414 1471
     const { uvList = {} } = projectDetail
1415 1472
     const { total = 0, records = [] } = uvList
1416 1473
     const openDate = projectDetail.openingDate ? dayjs(projectDetail.openingDate).locale('zh-cn').format('YYYY年M月D日') : '暂无'
1474
+    const showBuildingImgs = projectDetail.buildingImg && projectDetail.buildingImg.length > 0
1475
+    const showBuildingVRs = projectDetail.panoramaList && projectDetail.panoramaList.length > 0
1476
+    const shwoBuildingVideo = projectDetail.videoUrl ? true : false
1477
+    const showMediaBtn = showBuildingImgs + showBuildingVRs + shwoBuildingVideo > 1 // 满足2个就展示
1478
+
1417 1479
     return (
1418 1480
       <Block>
1419 1481
         {
@@ -1424,10 +1486,6 @@ export default class Index extends Component {
1424 1486
           grantAvatarVisible &&
1425 1487
           <AchieveAvatar user={userInfo.person} onSuccess={() => { this.setState({ grantAvatarVisible: false }) }} ></AchieveAvatar>
1426 1488
         }
1427
-        {/* {
1428
-          (userInfo.person.personId && !userInfo.person.phone && !userInfo.person.tel) &&
1429
-          <AchievePhone user={userInfo.person} onSuccess={this.handleAuthPhoneSuccess}></AchievePhone>
1430
-        } */}
1431 1489
         {
1432 1490
           loaded && (
1433 1491
             <View className='detail'>
@@ -1440,13 +1498,12 @@ export default class Index extends Component {
1440 1498
               {btnstate === 2 && this.renderBannerPanorama()}
1441 1499
 
1442 1500
               {
1443
-                projectDetail.buildingImg && projectDetail.buildingImg.length &&
1444
-                projectDetail.panoramaList && projectDetail.panoramaList.length &&
1501
+                showMediaBtn &&
1445 1502
                 (
1446 1503
                   <View className="media-btn">
1447
-                    {/* <View className={`btn ${btnstate === 1 && 'active'}`} onClick={this.handleBannerBtnClick.bind(this, 1)}>视频</View> */}
1448
-                    <View className={`btn ${btnstate === 2 && 'active'}`} onClick={this.handleBannerBtnClick.bind(this, 2)}>全景</View>
1449
-                    <View className={`btn ${!btnstate && 'active'}`} onClick={this.handleBannerBtnClick.bind(this, 0)}>图片</View>
1504
+                    {shwoBuildingVideo && <View className={`btn ${btnstate === 1 && 'active'}`} onClick={this.handleBannerBtnClick.bind(this, 1)}>视频</View>}
1505
+                    {showBuildingVRs && <View className={`btn ${btnstate === 2 && 'active'}`} onClick={this.handleBannerBtnClick.bind(this, 2)}>全景</View>}
1506
+                    {showBuildingImgs && <View className={`btn ${!btnstate && 'active'}`} onClick={this.handleBannerBtnClick.bind(this, 0)}>图片</View>}
1450 1507
                   </View>
1451 1508
                 )
1452 1509
               }
@@ -1531,13 +1588,17 @@ export default class Index extends Component {
1531 1588
                   {this.rendercircum()}
1532 1589
                   {/* 户型介绍 */}
1533 1590
                   {this.renderHouseTypeList()}
1591
+                  {/* 在线选房 */}
1592
+                  {this.renderChooseHouse()}
1534 1593
                   {/* 助力活动 */}
1535 1594
                   {this.renderHelp()}
1536 1595
                   {/* 拼团活动 */}
1537 1596
                   {this.renderGroup()}
1597
+                  {/* 直播活动 */}
1598
+                  {this.renderLive()}
1538 1599
                   {/* 新鲜资讯 */}
1539 1600
                   {this.renderNews()}
1540
-                  {/* 热门活动 */}
1601
+                  {/* 参加活动 */}
1541 1602
                   {this.renderActivities()}
1542 1603
                   {/* 相册 */}
1543 1604
                   {this.renderPhotoAlbum()}

+ 7
- 20
src/pages/project/detail/index.scss Parādīt failu

@@ -14,11 +14,8 @@
14 14
   padding-bottom: 50px;
15 15
 
16 16
   .media-btn {
17
-    position: absolute;
18
-    width: 184px;
19 17
     height: 64px;
20 18
     top: 440px;
21
-    left: 284px;
22 19
     font-size: 30px;
23 20
     font-family: PingFangSC-Regular, PingFang SC;
24 21
     font-weight: 400;
@@ -27,6 +24,7 @@
27 24
     color: rgba(53, 53, 53, 1);
28 25
     display: flex;
29 26
     position: fixed;
27
+    transform: translateX(calc(50vw - 50%));
30 28
 
31 29
     .btn {
32 30
       width: 92px;
@@ -884,7 +882,7 @@
884 882
 
885 883
     .item {
886 884
       position: relative;
887
-      width: 350px;
885
+      width: 338px;
888 886
       margin: 2px 36px 2px 2px;
889 887
       box-shadow: 0 0 16px rgba(0, 0, 0, 0.15);
890 888
       border: 1px solid rgba(232, 232, 232, 1);
@@ -892,7 +890,7 @@
892 890
 
893 891
       .house__img-info {
894 892
         position: relative;
895
-        padding: 70px 30px;
893
+        // padding: 70px 20px 40px 20px;
896 894
         border-bottom: 1px solid rgba(232, 232, 232, 1);
897 895
       
898 896
         .house-type__panorama {
@@ -904,25 +902,13 @@
904 902
         }
905 903
 
906 904
         .house__img {
907
-          width: 100%;
905
+          width: 336px;
908 906
           border-radius: 10px;
909
-          height: 200px !important;
907
+          height: 336px;
908
+          display: block;
910 909
         }
911 910
       }
912 911
 
913
-      // .house__img__len {
914
-      //   position: absolute;
915
-      //   width: 80px;
916
-      //   height: 50px;
917
-      //   text-align: center;
918
-      //   line-height: 50px;
919
-      //   color: #fff;
920
-      //   background: rgba(0, 0, 0, 0.5);
921
-      //   right: 4%;
922
-      //   top: 47%;
923
-      //   font-size: 20px;
924
-      //   border-radius: 20px;
925
-      // }
926 912
       .rest-info {
927 913
         padding: 10px 26px 20px 26px;
928 914
 
@@ -969,6 +955,7 @@
969 955
         padding: 10px 36px;
970 956
         border-radius: 16px 0 14px 0;
971 957
         font-size: 24px;
958
+        z-index: 1;
972 959
       }
973 960
     }
974 961
   }

+ 25
- 25
src/pages/project/detail/poster.js Parādīt failu

@@ -127,37 +127,37 @@ export default class Index extends Component {
127 127
       {
128 128
         x: 30,
129 129
         y: 1070,
130
-        text: '进入',
130
+        text: '进入项目查看详情',
131 131
         fontSize: 26,
132 132
         color: '#999',
133 133
         baseLine: 'middle',
134 134
         lineHeight: 48,
135
-        width: 50,
136
-        zIndex: 11
137
-      },
138
-      {
139
-        x: 100,
140
-        y: 1070,
141
-        text: data.miniAppName,
142
-        fontSize: 34,
143
-        color: '#000',
144
-        baseLine: 'middle',
145
-        lineHeight: 48,
146
-        width: (data.miniAppName || '').length * 30 + 60,
147
-        zIndex: 11
148
-      },
149
-      {
150
-        x: (data.miniAppName || '').length * 30 + 120,
151
-        y: 1070,
152
-        text: '项目详情',
153
-        fontSize: 26,
154
-        color: '#999',
155
-        baseLine: 'middle',
156
-        lineHeight: 48,
157
-        lineNum: 1,
158
-        width: 150,
135
+        width: 450,
159 136
         zIndex: 11
160 137
       },
138
+      // {
139
+      //   x: 100,
140
+      //   y: 1070,
141
+      //   text: data.miniAppName,
142
+      //   fontSize: 34,
143
+      //   color: '#000',
144
+      //   baseLine: 'middle',
145
+      //   lineHeight: 48,
146
+      //   width: (data.miniAppName || '').length * 30 + 60,
147
+      //   zIndex: 11
148
+      // },
149
+      // {
150
+      //   x: (data.miniAppName || '').length * 30 + 120,
151
+      //   y: 1070,
152
+      //   text: '项目详情',
153
+      //   fontSize: 26,
154
+      //   color: '#999',
155
+      //   baseLine: 'middle',
156
+      //   lineHeight: 48,
157
+      //   lineNum: 1,
158
+      //   width: 150,
159
+      //   zIndex: 11
160
+      // },
161 161
     ]
162 162
     const images = [
163 163
       {

+ 1
- 1
src/pages/project/floor/index.js Parādīt failu

@@ -72,7 +72,7 @@ export default class Index extends Component {
72 72
           </View>
73 73
           <View className='item'>
74 74
             <Text className='txt left-txt'>物业类型</Text>
75
-            <Text className='txt right-txt'>{projectDetail.serviceCompany || '暂无'}</Text>
75
+            <Text className='txt right-txt'>{projectDetail.propertyType || '暂无'}</Text>
76 76
           </View>
77 77
           <View className='item'>
78 78
             <Text className='txt left-txt'>物业费</Text>

+ 0
- 0
src/pages/project/icons.js Parādīt failu


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels