瀏覽代碼

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

张延森 5 年之前
父節點
當前提交
f4d6e9ecb1

+ 4
- 4
config/dev.js 查看文件

5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://47.101.36.130:8085"',//测试
6
     // HOST: '"http://47.101.36.130:8085"',//测试
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
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
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
10
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
11
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
11
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
12
     // HOST: '"https://lt.pawoma.cn"',
12
     // HOST: '"https://lt.pawoma.cn"',
13
     // WSS_HOST: '"wss://lt.pawoma.cn"',
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
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
16
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
17
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
18
     Version: 'V3.5.12'
18
     Version: 'V3.5.12'

+ 2
- 2
config/prod.js 查看文件

3
     NODE_ENV: '"production"'
3
     NODE_ENV: '"production"'
4
   },
4
   },
5
   defineConstants: {
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
     HOST: '"https://dev.pawoma.cn"',// 新测试
8
     HOST: '"https://dev.pawoma.cn"',// 新测试
9
     WSS_HOST: '"wss://dev.pawoma.cn"',
9
     WSS_HOST: '"wss://dev.pawoma.cn"',
10
     // HOST: '"https://lt.pawoma.cn"',
10
     // HOST: '"https://lt.pawoma.cn"',

+ 214
- 214
package-lock.json
文件差異過大導致無法顯示
查看文件


+ 1
- 0
src/constants/api.js 查看文件

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

+ 12
- 16
src/onlineSelling/components/RaiseCard/index.js 查看文件

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

+ 20
- 19
src/onlineSelling/pages/raiseMoney/index.js 查看文件

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

+ 1
- 1
src/onlineSelling/pages/raiseProfile/index.js 查看文件

97
   toPay = () => {
97
   toPay = () => {
98
     const { raiseDeatil: { raiseRecordId } } = this.state
98
     const { raiseDeatil: { raiseRecordId } } = this.state
99
     Taro.navigateTo({
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 查看文件

122
         <ScrollView scrollY className="container">
122
         <ScrollView scrollY className="container">
123
           <CheckboxGroup onChange={this.CheckboxChange}>
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
                 <View>
126
                 <View>
127
                   {
127
                   {
128
                     recordList.map((item) => {
128
                     recordList.map((item) => {
160
       <Block>
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
             <ScrollView scrollY>
164
             <ScrollView scrollY>
165
               {
165
               {
166
                 raiseList.map(item => (
166
                 raiseList.map(item => (
167
                   <View key={item.raiseRecordId} >
167
                   <View key={item.raiseRecordId} >
168
-                    <RaiseCard handleCard={this.toRaiseProfile(item.raiseRecordId)} summary={item} />
168
+                    <RaiseCard handleCard={()=>this.toRaiseProfile(item.raiseRecordId)} summary={item} />
169
                   </View>
169
                   </View>
170
                 )
170
                 )
171
                 )
171
                 )

+ 7
- 1
src/services/project.js 查看文件

11
   API_NOTICE_INFO,
11
   API_NOTICE_INFO,
12
   API_SALES_BATCH,
12
   API_SALES_BATCH,
13
   API_RATSE_DETAIL,
13
   API_RATSE_DETAIL,
14
-  API_RATSE_ORDER
14
+  API_RATSE_ORDER,
15
+  API_CANCEL_ORDER
15
 
16
 
16
 } from '@/constants/api'
17
 } from '@/constants/api'
17
 
18
 
79
  * @param {*} payload
80
  * @param {*} payload
80
  */
81
  */
81
 export const raiseOrder = payload => fetch({ url: API_RATSE_ORDER, payload, method: 'POST' })
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