1002884655 3 gadus atpakaļ
vecāks
revīzija
60b21859a6

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

@@ -3,8 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-    HOST: '"https://wx.fangdeal.cn"', //正式
7
-    WSS_HOST: '"https://wx.fangdeal.cn"',
6
+    HOST: '"http://81.69.196.8:8567"', //正式
7
+    WSS_HOST: '"http://81.69.196.8:8567"',
8 8
     OSS_PATH: '"https://zhiyun-image.oss-accelerate.aliyuncs.com/"',
9 9
     OSS_FAST_PATH: '"https://zhiyun-image.oss-accelerate.aliyuncs.com/"',
10 10
     Version: '"V3.5.29-20201112"'

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

@@ -12,6 +12,9 @@ export const pathname = '/api/wx'
12 12
 
13 13
 const resolvePath = api => `${host + pathname}/${api}`
14 14
 
15
+// 帮我找房
16
+export const API_HELP_FIND_HOUSE_QUESTION = resolvePath('houseProperty') // 问卷列表
17
+
15 18
 // common
16 19
 export const API_PRELOAD = resolvePath('preload')
17 20
 export const API_QRCODE = resolvePath('qrcode')

+ 9
- 1
src/pages/index/helpToFindHouse/index.jsx Parādīt failu

@@ -6,10 +6,12 @@ import '../../../assets/css/iconfont.css'
6 6
 import BuyHouse from './components/BuyHouse/index'
7 7
 import RentingHouse from './components/RentingHouse/index'
8 8
 import HousePurchasing from './components/HousePurchasing/index'
9
+import { fetch } from '@/utils/request'
10
+import { API_HELP_FIND_HOUSE_QUESTION } from '@/constants/api'
9 11
 
10 12
 export default withLayout((props) => {
11 13
 
12
-  // const [PageProps] = useState(props)
14
+  const [PageProps] = useState(props)
13 15
   const [DemandList] = useState([
14 16
     { name: '我要买房', id: 1, icon: '', spell: 'MAI FANG' },
15 17
     { name: '我要租房', id: 2, icon: '', spell: 'ZU FANG' },
@@ -18,6 +20,12 @@ export default withLayout((props) => {
18 20
   const [CurrentDemandId, setCurrentDemandId] = useState(2)
19 21
   const [ShowDemand, setShowDemand] = useState(true)
20 22
 
23
+  useEffect(() => {
24
+    fetch({url: API_HELP_FIND_HOUSE_QUESTION}).then(() => {
25
+      
26
+    })
27
+  }, [])
28
+
21 29
   const CutDemandId = (id) => {
22 30
     return () => {
23 31
       setCurrentDemandId(id)

+ 5
- 4
src/pages/mine/index.jsx Parādīt failu

@@ -9,8 +9,9 @@ import Taro from '@tarojs/taro'
9 9
 
10 10
 export default withLayout((props) => {
11 11
 
12
-  // const [PageProps] = useState(props)
13
-  const UserRole = 2 // 1-普通用户 2-经纪人 3-置业顾问 4-驻场管理
12
+  const [PageProps] = useState(props)
13
+  console.log(`PageProps`, PageProps.person)
14
+  const UserRole = PageProps.person.personType === 'customer' ? 1 : PageProps.person.personType === 'estate agent' ? 2 : PageProps.person.personType === 'Realty Consultant' ? 3 : 4 // 1-普通用户 2-经纪人 3-置业顾问 4-驻场管理
14 15
   const [MenuList, setMenuList] = useState(UserRole === 1 ? MineMenuList.User : UserRole === 2 ? MineMenuList.Broker : UserRole === 3 ? MineMenuList.Adviser : MineMenuList.Resident)
15 16
   const [IsPull, setPull] = useState(false)
16 17
   const [ShowLogin, setShowLogin] = useState(false)
@@ -57,12 +58,12 @@ export default withLayout((props) => {
57 58
               {/* 用户信息 */}
58 59
               <view className='UserInfo'>
59 60
                 <view className='UserIcon'>
60
-                  <Image mode='aspectFill' className='centerLabel' src={require('../../assets/mine-icon18.png')} />
61
+                  <Image mode='aspectFill' className='centerLabel' src={PageProps.person.avatarurl || require('../../assets/mine-icon18.png')} />
61 62
                 </view>
62 63
                 <view className='OtherInfo'>
63 64
                   <view className='Name'>
64 65
                     <view>
65
-                      <text>用户姓名</text>
66
+                      <text>{PageProps.person.nickname}</text>
66 67
                       <view>
67 68
                         <text className='iconfont icon-bianji' onClick={() => { Taro.navigateTo({ url: `/pages/mine/userInfo/index` }) }}></text>
68 69
                         <text onClick={() => { Taro.navigateTo({ url: `/pages/mine/userInfo/index` }) }}>个人信息资料修改</text>

+ 6
- 6
src/routes.js Parādīt failu

@@ -4,6 +4,12 @@ const routes = [
4 4
   /**********************************
5 5
    *  Tab 页面
6 6
    *********************************/
7
+  {
8
+    name: '帮我找房',
9
+    page: 'pages/index/helpToFindHouse/index',
10
+    pkg: 'main',
11
+    type: 'building',
12
+  },
7 13
   {
8 14
     name: '首页',
9 15
     page: 'pages/index/index',
@@ -66,12 +72,6 @@ const routes = [
66 72
     pkg: 'main',
67 73
     type: 'building',
68 74
   },
69
-  {
70
-    name: '帮我找房',
71
-    page: 'pages/index/helpToFindHouse/index',
72
-    pkg: 'main',
73
-    type: 'building',
74
-  },
75 75
   {
76 76
     name: '增值服务',
77 77
     page: 'pages/index/addedValueService/index',