Browse Source

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

xujing 5 years ago
parent
commit
b174f246de
2 changed files with 14 additions and 7 deletions
  1. 4
    4
      config/dev.js
  2. 10
    3
      src/onlineSelling/pages/addHouse/index.js

+ 4
- 4
config/dev.js View File

@@ -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://192.168.2.52:8080"',
15
-    WSS_HOST: '"ws://192.168.2.52:8080"',
14
+    // HOST: '"http://192.168.2.52:8080"',
15
+    // WSS_HOST: '"ws://192.168.2.52: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'

+ 10
- 3
src/onlineSelling/pages/addHouse/index.js View File

@@ -52,19 +52,26 @@ export default class extends Component {
52 52
   }
53 53
 
54 54
   handleSubmit = () => {
55
-    if (!this.state.chooseList.length) {
55
+    const { chooseList } = this.state
56
+    const { house } = this.props
57
+
58
+    if (!chooseList.length) {
56 59
       Taro.showModal({
57 60
         title: '提示',
58 61
         content: '您未选择房源, 确认离开?',
59 62
         success: (res) => {
60 63
           if (res.confirm) {
61
-            this.props.dispatchFlush2Cart([])
64
+            const leftHouses = house.raiseCart.filter(x => !(house.mySelectHouses || []).filter(it => it.houseId == x.houseId)[0])
65
+
66
+            this.props.dispatchFlush2Cart(leftHouses)
62 67
             Taro.navigateBack({ delta: 1 })
63 68
           }
64 69
         }
65 70
       })
66 71
     } else {
67
-      this.props.dispatchFlush2Cart(this.state.chooseList)
72
+      const notInPreSelect = house.raiseCart.filter(x => !chooseList.filter(it => it.houseId == x.houseId)[0])
73
+      
74
+      this.props.dispatchFlush2Cart(notInPreSelect.concat(chooseList))
68 75
       Taro.navigateBack({ delta: 1 })
69 76
     }
70 77
   }