Przeglądaj źródła

Merge branch 'dev' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into dev

xujing 5 lat temu
rodzic
commit
7a9a53648f

+ 4
- 4
config/dev.js Wyświetl plik

@@ -5,14 +5,14 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://47.101.36.130:8085"',//测试
7 7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
-    HOST: '"https://dev.pawoma.cn"',//测试
9
-    WSS_HOST: '"wss://dev.pawoma.cn"',
8
+    // HOST: '"https://dev.pawoma.cn"',//测试
9
+    // WSS_HOST: '"wss://dev.pawoma.cn"',
10 10
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
11 11
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
12 12
     // HOST: '"https://lt.pawoma.cn"',
13 13
     // WSS_HOST: '"wss://lt.pawoma.cn"',
14
-    // HOST: '"http://127.0.0.1:8080"',
15
-    // WSS_HOST: '"ws://127.0.0.1:8080"',
14
+    HOST: '"http://127.0.0.1:8080"',
15
+    WSS_HOST: '"ws://127.0.0.1:8080"',
16 16
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
17 17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
18 18
     Version: 'V3.5.12'

+ 1
- 1
config/prod.js Wyświetl plik

@@ -11,7 +11,7 @@ module.exports = {
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12 12
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
13 13
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
14
-    Version: 'V3.5.12'
14
+    Version: 'V3.5.13'
15 15
   },
16 16
   weapp: {},
17 17
   h5: {}

+ 7
- 3
src/onlineSelling/components/RaiseCard/index.js Wyświetl plik

@@ -7,7 +7,7 @@ import closeImg from '../../assets/close.png'
7 7
 import './index.scss'
8 8
 
9 9
 export default function RaiseCard(props) {
10
-  const {
10
+  let {
11 11
     buildingName,
12 12
     termName,
13 13
     blockName,
@@ -27,8 +27,12 @@ export default function RaiseCard(props) {
27 27
     taRaise = {},
28 28
     buildingImgList = [],
29 29
   } = props.summary || {}
30
-  const defHouse = taHousingResourcesList[0] || {}
31 30
 
31
+  if (!taRaise) {
32
+    taRaise = {}
33
+  }
34
+
35
+  const defHouse = taHousingResourcesList[0] || {}
32 36
   const title = `${buildingName || defHouse.buildingName || ''} ${termName || defHouse.termName || ''} ${blockName || defHouse.blockName || ''} ${unitName || defHouse.unitName || ''} ${roomName || defHouse.roomName || ' '}`
33 37
   const thumb = (buildingImgList || []).length
34 38
   const thumb2 = (apartmentImgList || []).length
@@ -39,7 +43,7 @@ export default function RaiseCard(props) {
39 43
   const copyData = (e) => {
40 44
     e.stopPropagation()
41 45
     Taro.setClipboardData({
42
-      data: houseId,
46
+      data: `${houseId}`,
43 47
       onSuccess: (() => { }),
44 48
     })
45 49
   }

+ 2
- 2
src/onlineSelling/pages/detail/index.js Wyświetl plik

@@ -216,7 +216,7 @@ export default class Index extends Component {
216 216
               <Statement style="margin: 104rpx 0 30rpx 0" />
217 217
               <View style="padding: 0 30rpx;">
218 218
                 {
219
-                  houseDetail.raiseBtn && <View>
219
+                  houseDetail.preselectionBtn && <View>
220 220
                     {!houseDetail.isPreselect ?
221 221
                       <View className="choose-btn" onClick={() => this.open()}>
222 222
                         预选此房源
@@ -227,7 +227,7 @@ export default class Index extends Component {
227 227
                   </View>
228 228
                 }
229 229
 
230
-                {houseDetail.preselectionBtn && <View className="raise-btn" onClick={() => this.toRaiseMoney()}>
230
+                {houseDetail.raiseBtn && <View className="raise-btn" onClick={() => this.toRaiseMoney()}>
231 231
                   认筹此房源
232 232
               </View>}
233 233
               </View>

+ 32
- 7
src/onlineSelling/pages/houseCart/index.js Wyświetl plik

@@ -9,6 +9,17 @@ import { queryHouseList } from '@/services/project'
9 9
 import ready from '@/utils/ready'
10 10
 import { connect } from '@tarojs/redux'
11 11
 import * as houseActions from '@/actions/house'
12
+import { fetch, apis } from '@/utils/request'
13
+
14
+const getRaiseProfile = ({ salesBatchId, raiseRecordId, personId }) => {
15
+  const queryString = [
16
+    `${raiseRecordId ? 'raiseRecordId=' + raiseRecordId : ''}`,
17
+    `${salesBatchId ? 'salesBatchId=' + salesBatchId : ''}`,
18
+    `${personId ? 'personId=' + personId : ''}`,
19
+  ].filter(Boolean).join('&')
20
+
21
+  return fetch({ url: `${apis.API_RAISE_PROFILE}?${queryString}` })
22
+}
12 23
 
13 24
 @connect(
14 25
   ({ user, house }) => ({ ...user, house }),
@@ -24,19 +35,21 @@ export default class extends Component {
24 35
     dataType: 1, // maybe need change  1 预选, 2 认筹
25 36
     houseList: [],
26 37
     chooseList: [], // 已经选择的房源列表
27
-    collapsed: true, // 已选列表默认关闭, true 关闭, false 开启 
38
+    collapsed: true,      // 已选列表默认关闭, true 关闭, false 开启
39
+    multiSelect: true,  // 是否多选, 自动锁房是单选
28 40
   }
29 41
 
30 42
   componentWillMount () {
31 43
     ready.queue(() => {
32 44
       const { userInfo, house } = this.props
33
-      const { id: salesBatchId } = this.$router.params
45
+      const { id: salesBatchId, multi } = this.$router.params
34 46
 
35 47
       const params = {
36 48
         salesBatchId,
37 49
         pageNum: 1,
38 50
         pageSize: 9999,
39 51
       }
52
+
40 53
       queryHouseList(params).then(res => {
41 54
         this.setState({
42 55
           houseList: this.groupHouseList(res) || [],
@@ -44,9 +57,14 @@ export default class extends Component {
44 57
         })
45 58
       })
46 59
 
60
+      // 获取认筹信息
61
+      // getRaiseProfile(salesBatchId, undefined, userInfo.person.personId)
62
+
47 63
       if (house.raiseCart && house.raiseCart.length) {
48 64
         this.setState({ chooseList: house.raiseCart })
49 65
       }
66
+
67
+      this.setState({ multiSelect: multi !== 'false' })
50 68
     })
51 69
   }
52 70
   
@@ -119,14 +137,18 @@ export default class extends Component {
119 137
       return;
120 138
     }
121 139
 
122
-    const { chooseList } = this.state
140
+    const { chooseList, multiSelect } = this.state
123 141
     const checked = (chooseList || []).filter(x => x.houseId == room.houseId)[0]
124 142
 
125 143
     if (checked) {
126 144
       this.setState({ chooseList: chooseList.filter(x => x.houseId != room.houseId) })
127 145
     } else {
128
-      this.setState({ chooseList: chooseList.concat(room) })
129
-    }    
146
+      if (multiSelect) {
147
+        this.setState({ chooseList: chooseList.concat(room) })
148
+      } else {
149
+        this.setState({ chooseList: [room] })
150
+      }
151
+    }
130 152
   }
131 153
 
132 154
   // 确认选择
@@ -150,12 +172,15 @@ export default class extends Component {
150 172
 
151 173
   // 取消选择
152 174
   subChooseList = (house) => {
175
+    const name = [house.termName, house.blockName, house.unitName, house.floorName, house.roomName].join('')
176
+    const { chooseList } = this.state
177
+
153 178
     Taro.showModal({
154 179
       title: '取消选择',
155
-      content: `确认取消 ${house.name} ?`,
180
+      content: `确认取消 ${name} ?`,
156 181
       success: (res) => {
157 182
         if (res.confirm) {
158
-          // TODO: 取消房源选择
183
+          this.setState({ chooseList: chooseList.filter(x => x.houseId != house.houseId) })
159 184
         }
160 185
       }
161 186
     })

+ 10
- 5
src/onlineSelling/pages/raiseMoney/index.js Wyświetl plik

@@ -159,9 +159,10 @@ export default class raiseMoney extends Component {
159 159
 
160 160
   gotoHouseSelect = (pageType) => {
161 161
     const { raiseProfile } = this.state
162
+    const isMulti = raiseProfile.houseLockingType != 'auto'
162 163
 
163 164
     const url = pageType == 'all' ?
164
-      `/onlineSelling/pages/houseCart/index?id=${raiseProfile.salesBatchId}` :
165
+      `/onlineSelling/pages/houseCart/index?id=${raiseProfile.salesBatchId}&multi={isMulti}` :
165 166
       `/onlineSelling/pages/addHouse/index?id=${raiseProfile.salesBatchId}`
166 167
 
167 168
     Taro.navigateTo({ url })
@@ -214,7 +215,10 @@ export default class raiseMoney extends Component {
214 215
           !disabled &&
215 216
           (
216 217
             <Block>
217
-              <View className="addhouse">从 <Text style="color:#F3B82E" onClick={this.gotoHouseSelect.bind(this, 'all')}>房源列表</Text> 中添加其他房源</View>
218
+              {
219
+                !raiseProfile.needPreselection &&
220
+                (<View className="addhouse">从 <Text style="color:#F3B82E" onClick={this.gotoHouseSelect.bind(this, 'all')}>房源列表</Text> 中添加其他房源</View>)
221
+              }              
218 222
               <View className="addhouse">从 <Text style="color:#BB9C79" onClick={this.gotoHouseSelect.bind(this, 'select')}>预选记录</Text> 中添加其他房源</View>
219 223
             </Block>
220 224
           )
@@ -522,6 +526,7 @@ export default class raiseMoney extends Component {
522 526
         userId: consultant.userId,
523 527
         userName: consultant.name,
524 528
       }, raiseProfile).then((res) => {
529
+        this.setState({ record: res })
525 530
         resolve(res)
526 531
       })
527 532
     })
@@ -576,11 +581,11 @@ export default class raiseMoney extends Component {
576 581
   toRaiseProfile(id) {
577 582
 
578 583
     Taro.navigateTo({
579
-      url: `/onlineSelling/pages/raiseProfile/index?raiseRecordId=${id}`
584
+      url: `/onlineSelling/pages/raiseProfile/index?id=${id}`
580 585
     })
581 586
   }
582 587
   renderResult() {
583
-    const { raiseProfile = {}, failInfo } = this.state
588
+    const { raiseProfile = {}, record = {}, failInfo } = this.state
584 589
     const isOk = !failInfo
585 590
     const showIcon = isOk ? require('../../assets/success2.png') : require('../../assets/fail2.png')
586 591
     const showTitle = isOk ? '提交成功' : failInfo.title
@@ -607,7 +612,7 @@ export default class raiseMoney extends Component {
607 612
 
608 613
         <ContactConsultant buildingId={raiseProfile.buildingId} style=" position: absolute;bottom: 11vh;" />
609 614
 
610
-        <View className="look-btn" onClick={() => this.toRaiseProfile(raiseProfile.raiseId)}>查看认筹单</View>
615
+        <View className="look-btn" onClick={() => this.toRaiseProfile(record.raiseRecordId)}>查看认筹单</View>
611 616
       </View>
612 617
 
613 618
     );

+ 3
- 5
src/onlineSelling/pages/raiseProfile/index.js Wyświetl plik

@@ -29,7 +29,7 @@ export default class Raise extends Component {
29 29
   }
30 30
 
31 31
   componentWillMount() {
32
-    const { raiseRecordId } = this.$router.params
32
+    const { id: raiseRecordId } = this.$router.params
33 33
     queryRaiseDetail(raiseRecordId).then(res => {
34 34
       this.setState({
35 35
         buildingId: res.taRaiseRecord.buildingId,
@@ -45,13 +45,11 @@ export default class Raise extends Component {
45 45
   // 复制数据
46 46
   copyData(data) {
47 47
     Taro.setClipboardData({
48
-      data,
48
+      data: `${data}`,
49 49
       onSuccess: (() => { }),
50 50
     })
51 51
   }
52 52
 
53
-
54
-
55 53
   // 查看所有认筹房源
56 54
   viewAllHouses = () => {
57 55
     const { raiseRecordId } = this.$router.params
@@ -235,7 +233,7 @@ export default class Raise extends Component {
235 233
           {raiseDeatil.status == '0' && this.renderCancelReason()}
236 234
           {raiseDeatil.payStatus == 'unpaid' && this.renderUnpayNotice()}
237 235
           <View className="raise-flex">
238
-            <View className="date">认筹提交时间  {dayjs(raiseOrder.createDate).format('YYYY/MM/DD HH:mm:ss')}</View>
236
+            <View className="date">认筹提交时间  {dayjs(raiseDeatil.createDate).format('YYYY/MM/DD HH:mm:ss')}</View>
239 237
             <View className="agreement" onClick={() => this.toAgreement(raiseOrder.payProtocol, raiseOrder.buildingId)}>线上选房协议<Text className="right-icon"></Text></View>
240 238
           </View>
241 239
           <View>

+ 1
- 1
src/onlineSelling/pages/records/index.js Wyświetl plik

@@ -198,7 +198,7 @@ export default class Records extends Component {
198 198
       },
199 199
       complete() {
200 200
         Taro.navigateTo({
201
-          url: `/onlineSelling/pages/raiseProfile/index?raiseRecordId=${id}`
201
+          url: `/onlineSelling/pages/raiseProfile/index?id=${id}`
202 202
         })
203 203
       }
204 204
     })