Explorar el Código

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

张延森 hace 5 años
padre
commit
f4d6e9ecb1

+ 4
- 4
config/dev.js Ver fichero

@@ -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://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'

+ 2
- 2
config/prod.js Ver fichero

@@ -3,8 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"production"'
4 4
   },
5 5
   defineConstants: {
6
-    // HOST: '"http://192.168.2.54:8080"',
7
-    // WSS_HOST: '"ws://192.168.2.54:8080"',
6
+    // HOST: '"http://192.168.2.52:8080"',
7
+    // WSS_HOST: '"ws://192.168.2.52:8080"',
8 8
     HOST: '"https://dev.pawoma.cn"',// 新测试
9 9
     WSS_HOST: '"wss://dev.pawoma.cn"',
10 10
     // HOST: '"https://lt.pawoma.cn"',

+ 214
- 214
package-lock.json
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 1
- 0
src/constants/api.js Ver fichero

@@ -64,6 +64,7 @@ export const API_SAVE_RAISE_RECORD = resolvePath('taRaiseRecord')
64 64
 export const API_RATSE_RECORD = resolvePath('taRaiseRecord/list')
65 65
 export const API_RATSE_DETAIL = resolvePath('taRaiseRecord')
66 66
 export const API_RATSE_ORDER = resolvePath('unifiedOrder')
67
+export const API_CANCEL_ORDER = resolvePath('cancel')
67 68
 export const API_HOUSE_DETAIL = resolvePath('getHousingDetailById')
68 69
 export const API_ADD_PRESELECTION = resolvePath('taPreselectionRecord')
69 70
 export const API_CANCEL_PRESELECTION = resolvePath('taPreselectionRecordCancel')

+ 12
- 16
src/onlineSelling/components/RaiseCard/index.js Ver fichero

@@ -1,34 +1,31 @@
1 1
 import { View, Image, Text } from "@tarojs/components";
2 2
 import { transferImage } from '@/utils/tools'
3 3
 import dayjs from 'dayjs'
4
-import emptyImg from '@/assets/empty.png'
5 4
 import copyImg from '../../assets/copy.png'
6 5
 import closeImg from '../../assets/close.png'
7 6
 
8 7
 import './index.scss'
9 8
 
10
-export default function HouseCard(props) {
9
+export default function RaiseCard(props) {
11 10
   const {
12 11
     buildingName,
13
-    termname,
12
+    termName,
14 13
     blockName,
15 14
     unitName,
16 15
     roomName,
17 16
     price,
18
-    housingStatus,
19
-    saleBatchStatus,
17
+    houseLockingStatus,
20 18
     apartmentName,
21
-    houseId,
19
+    mineLocked,
22 20
     createDate,
23
-    status = 1,
24
-    area1,
25
-    area2,
21
+    buildingArea,
22
+    insideArea,
26 23
     payStatus,
27 24
     code,
28 25
     buildingImgList = [],
29 26
   } = props.summary || {}
30 27
 
31
-  const title = `${buildingName} ${termname || ''} ${blockName} ${unitName} ${roomName}`
28
+  const title = `${buildingName || ''} ${termName || ''} ${blockName || ''} ${unitName || ''} ${roomName || ' '}`
32 29
   const thumb = (buildingImgList || []).length
33 30
   const showDT = dayjs(createDate).format('YYYY/MM/DD')
34 31
   const wanY = Number(price)
@@ -58,16 +55,15 @@ export default function HouseCard(props) {
58 55
         {props.type == 'raiseMoney' && <Image src={closeImg} onClick={handleCancel} className="close-img"></Image>}
59 56
         <View onClick={props.handleCard}>
60 57
           {!props.type && <View className={payStatus == 'paid' ? 'raised badge' : payStatus == 'unpaid' ? 'unraise badge' : 'badge'}>{payStatus == 'paid' ? '已缴费' : payStatus == 'unpaid' ? '未缴费' : '已退费'}</View>}
61
-          {(props.type == 'raiseProfile' || props.type == 'houseResource') && <View style="color:#FF3C3C" className={status == '1' ? 'raised badge' : status == '2' ? 'unraise badge' : 'badge'}>{status == '1' ? '已锁给我' : '未缴费'}</View>}
62
-          {props.type == 'raiseProfile' || props.type == 'raiseMoney' && <View style={props.type == 'raiseMoney' ? 'color:#BB9C79;font-size:30rpx' : 'color:#BB9C79;font-size:30rpx;margin-top:-20rpx'}>{apartmentName || ''}</View>}
58
+          {(props.type == 'raiseProfile' || props.type == 'houseResource') && houseLockingStatus == 'locked' && <View style="color:#FF3C3C" className='raised badge'>{mineLocked ? '已锁给我' : ''}</View>}
59
+          {props.type == 'raiseProfile' || props.type == 'raiseMoney' && <View style={props.type == 'raiseMoney' ? 'color:#BB9C79;font-size:30rpx' : 'color:#BB9C79;font-size:30rpx;margin-top:-20rpx'}>{apartmentName || ' '}</View>}
63 60
           {props.type == 'raiseMoney' && <View className="red-price">现价{Number(price) + 0}万</View>}
64
-          {props.type == 'houseResource' && <View style="color:#BB9C79;font-size:28rpx;margin:-40rpx 0 26rpx 0">未锁定/已锁定</View>}
61
+          {props.type == 'houseResource' && <View style="color:#BB9C79;font-size:28rpx;margin:-40rpx 0 26rpx 0">{houseLockingStatus == 'locked' ? '已锁定' : '未锁定'}</View>}
65 62
           <View className="title">{title}</View>
66 63
           {!props.type && <View className="meta">{showDT}</View>}
67 64
           {props.type == 'raiseProfile' && <View className="price">现价<Text className="red">{Number(price) + 0}</Text>万</View>}
68
-
69
-          {props.type == 'raiseProfile' || props.type == 'raiseMoney' && <View className="area">建筑面积约<Text className="red">{area1}m²</Text></View>}
70
-          {props.type == 'raiseProfile' || props.type == 'raiseMoney' && <View className="area">使用面积约<Text className="red">{area2}m²</Text></View>}
65
+          {props.type == 'raiseProfile' || props.type == 'raiseMoney' && buildingArea && <View className="area">建筑面积约<Text className="red">{buildingArea}m²</Text></View>}
66
+          {props.type == 'raiseProfile' || props.type == 'raiseMoney' && insideArea && <View className="area">使用面积约<Text className="red">{insideArea}m²</Text></View>}
71 67
         </View>
72 68
         {props.type == 'houseResource' && <View className="house-code" style="margin-top:26rpx">房源编号:{code}
73 69
           <Image src={copyImg} className="copy-img" onClick={copyData}></Image>

+ 20
- 19
src/onlineSelling/pages/raiseMoney/index.js Ver fichero

@@ -10,15 +10,15 @@ import * as houseActions from '@/actions/house'
10 10
 import NextStep from './NextStep'
11 11
 import { fetch, apis } from '@/utils/request'
12 12
 import Captcha from './Captcha'
13
-import { raiseOrder } from '@/services/project'
13
+import { raiseOrder, cancelOrder } from '@/services/project'
14 14
 import { getCodeMessage } from '@/services/getCode'
15 15
 import { checkIDCard, isEmpty } from '@/utils/tools'
16 16
 
17
-const getRaiseProfile = ({raiseId, salesBatchId, personId}) => {
17
+const getRaiseProfile = ({ raiseId, salesBatchId, personId }) => {
18 18
   const queryString = [
19
-    `${raiseId ? 'raiseId='+raiseId : ''}`,
20
-    `${salesBatchId ? 'salesBatchId='+salesBatchId : ''}`,
21
-    `${personId ? 'personId='+personId : ''}`,
19
+    `${raiseId ? 'raiseId=' + raiseId : ''}`,
20
+    `${salesBatchId ? 'salesBatchId=' + salesBatchId : ''}`,
21
+    `${personId ? 'personId=' + personId : ''}`,
22 22
   ].filter(Boolean).join('&')
23 23
 
24 24
   return fetch({ url: `${apis.API_RAISE_PROFILE}?${queryString}` })
@@ -51,7 +51,7 @@ export default class raiseMoney extends Component {
51 51
   captchaLock = false
52 52
 
53 53
   // 此页面不支持分享,以及二维码
54
-  componentWillMount(){
54
+  componentWillMount() {
55 55
     ready.queue(() => {
56 56
       const {
57 57
         salesBatchId,   // 批次, 备用
@@ -74,7 +74,7 @@ export default class raiseMoney extends Component {
74 74
         })
75 75
         return;
76 76
       }
77
-      
77
+
78 78
       if (this.$router.params.type == 'pay') {
79 79
         this.setState({ current: 3 })
80 80
       }
@@ -151,10 +151,10 @@ export default class raiseMoney extends Component {
151 151
       <ScrollView scrollY className="container">
152 152
         {
153 153
           raiseCart.map(item => (
154
-              <View key={item.houseId} >
155
-                <RaiseCard type="raiseMoney" summary={item} onCancel={this.handleCancel}/>
156
-              </View>
157
-            )
154
+            <View key={item.houseId} >
155
+              <RaiseCard type="raiseMoney" summary={item} onCancel={this.handleCancel} />
156
+            </View>
157
+          )
158 158
           )
159 159
         }
160 160
         <View className="addhouse">从<Text style="color:#BB9C79">预选记录</Text>中添加其他房源</View>
@@ -387,19 +387,20 @@ export default class raiseMoney extends Component {
387 387
 
388 388
   makePay = () => {
389 389
     const params = {
390
-      targetId: this.$router.params.id,
390
+      targetId: this.$router.params.raiseRecordId,
391 391
       targetType: 'house'
392 392
     }
393
-    
393
+
394 394
     return new Promise((resolve, reject) => {
395 395
       raiseOrder(params).then(res => {
396
+
396 397
         Taro.requestPayment({
397
-          timeStamp: res.timeStamp,
398
-          nonceStr: res.noncestr,
399
-          package: `prepay_id=${res.prepayid}`,
400
-          signType: 'MD5',
398
+          timeStamp: String(res.timeStamp),
399
+          nonceStr: res.nonceStr,
400
+          package: res.package,
401
+          signType: res.signType,
401 402
           paySign: res.sign,
402
-  
403
+
403 404
           success(res) {
404 405
             // TODO 缴费成功
405 406
 
@@ -457,7 +458,7 @@ export default class raiseMoney extends Component {
457 458
     return (
458 459
       <View className="bottom-btn">
459 460
         {current == 1 && <View style="font-size:24rpx;color:#999;line-height:70rpx">请仔细阅读选房协议直到结尾才能进入下一步</View>}
460
-        {current != 4 && 
461
+        {current != 4 &&
461 462
           <NextStep
462 463
             countdown={current == 1 ? 2 : 0}
463 464
             onClick={() => this.nextStep(current)}

+ 1
- 1
src/onlineSelling/pages/raiseProfile/index.js Ver fichero

@@ -97,7 +97,7 @@ export default class extends Component {
97 97
   toPay = () => {
98 98
     const { raiseDeatil: { raiseRecordId } } = this.state
99 99
     Taro.navigateTo({
100
-      url: `/onlineSelling/pages/raiseMoney/index?type=pay&id=${raiseRecordId}`
100
+      url: `/onlineSelling/pages/raiseMoney/index?type=pay&raiseRecordId=${raiseRecordId}`
101 101
     })
102 102
   }
103 103
   // 未交费提示

+ 3
- 3
src/onlineSelling/pages/records/index.js Ver fichero

@@ -122,7 +122,7 @@ export default class Records extends Component {
122 122
         <ScrollView scrollY className="container">
123 123
           <CheckboxGroup onChange={this.CheckboxChange}>
124 124
             {
125
-              noRecord ? <Blank style="margin:14vh 0 32vh 0" tips="暂无预选记录" /> :
125
+              noRecord ? <Blank style="margin:10vh 0 22vh 0" tips="暂无预选记录" /> :
126 126
                 <View>
127 127
                   {
128 128
                     recordList.map((item) => {
@@ -160,12 +160,12 @@ export default class Records extends Component {
160 160
       <Block>
161 161
 
162 162
         {
163
-          noRaiseRecord ? <Blank style="margin:14vh 0 32vh 0" tips="暂无认筹记录" /> :
163
+          noRaiseRecord ? <Blank style="margin:10vh 0 22vh 0" tips="暂无认筹记录" /> :
164 164
             <ScrollView scrollY>
165 165
               {
166 166
                 raiseList.map(item => (
167 167
                   <View key={item.raiseRecordId} >
168
-                    <RaiseCard handleCard={this.toRaiseProfile(item.raiseRecordId)} summary={item} />
168
+                    <RaiseCard handleCard={()=>this.toRaiseProfile(item.raiseRecordId)} summary={item} />
169 169
                   </View>
170 170
                 )
171 171
                 )

+ 7
- 1
src/services/project.js Ver fichero

@@ -11,7 +11,8 @@ import {
11 11
   API_NOTICE_INFO,
12 12
   API_SALES_BATCH,
13 13
   API_RATSE_DETAIL,
14
-  API_RATSE_ORDER
14
+  API_RATSE_ORDER,
15
+  API_CANCEL_ORDER
15 16
 
16 17
 } from '@/constants/api'
17 18
 
@@ -79,6 +80,11 @@ export const queryApartmentType = payload => fetch({ url: API_APARTMENT_TYPE, pa
79 80
  * @param {*} payload
80 81
  */
81 82
 export const raiseOrder = payload => fetch({ url: API_RATSE_ORDER, payload, method: 'POST' })
83
+/**
84
+ *认筹单取消支付接口
85
+ * @param {*} payload
86
+ */
87
+export const cancelOrder = payload => fetch({ url: API_CANCEL_ORDER, payload, method: 'POST' })
82 88
 
83 89
 
84 90