Sfoglia il codice sorgente

feat: add map around

张延森 5 anni fa
parent
commit
5857b643fa

+ 2
- 2
config/dev.js Vedi File

@@ -5,8 +5,8 @@ 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.jinchengjiaye.com"',//测试
9
-    WSS_HOST: '"wss://dev.jinchengjiaye.com"',
8
+    // HOST:  '"https://dev.jinchengjiaye.com"',//测试
9
+    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10 10
     // HOST: '"https://lt.pawoma.cn"',
11 11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12 12
     HOST: '"http://192.168.0.218:8080"',

+ 2
- 2
config/prod.js Vedi File

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

+ 1
- 0
src/pages/person/index.js Vedi File

@@ -177,6 +177,7 @@ export default class Person extends Component {
177 177
         <View>
178 178
           {
179 179
             menus.map((group, ginx) => {
180
+              console.log('----------------')
180 181
               return (
181 182
                 <Block key={`grp-${ginx}`}>
182 183
                   {

+ 26
- 9
src/pages/person/menus.js Vedi File

@@ -43,21 +43,21 @@ const menus = [
43 43
       url: '/pages/person/customerAnalysis/index',
44 44
       icon: icons.homepage,
45 45
       extends: undefined,
46
-      userTypes: [CUSTOMER, CONSULTANT],
47
-    },
48
-    {
49
-      name: '成为经纪人',
50
-      url: '/pages/agent/become/index',
51
-      icon: icons.development,
52
-      extends: undefined,
53
-      userTypes: [CUSTOMER],
46
+      userTypes: [CONSULTANT],
54 47
     },
48
+    // {
49
+    //   name: '成为经纪人',
50
+    //   url: '/pages/agent/become/index',
51
+    //   icon: icons.development,
52
+    //   extends: undefined,
53
+    //   userTypes: [CUSTOMER],
54
+    // },
55 55
     {
56 56
       name: '推荐客户',
57 57
       url: '/pages/agent/client/index',
58 58
       icon: icons.recommend,
59 59
       extends: undefined,
60
-      userTypes: [ESTATE_AGENT, CHANNEL_AGENT],
60
+      userTypes: [CUSTOMER,ESTATE_AGENT, CHANNEL_AGENT],
61 61
     },
62 62
     {
63 63
       name: '发展经纪人',
@@ -141,6 +141,23 @@ const menus = [
141 141
       userTypes: [CUSTOMER, CONSULTANT, ESTATE_AGENT, CHANNEL_AGENT],
142 142
     },
143 143
   ],
144
+  [
145
+    {
146
+      name: '成为专业经纪人',
147
+      url: '/pages/agent/become/index',
148
+      icon: icons.feedback,
149
+      extends: undefined,
150
+      userTypes: [CUSTOMER],
151
+    },
152
+    {
153
+      name: '成为置业顾问',
154
+      url: '',
155
+      icon: icons.feedback,
156
+      extends: undefined,
157
+      userTypes: [CUSTOMER],
158
+    },
159
+
160
+  ]
144 161
 ]
145 162
 
146 163
 export { icons, menus }

+ 35
- 23
src/pages/project/detail/index.js Vedi File

@@ -54,7 +54,7 @@ export default class Index extends Component {
54 54
     recordId: null,
55 55
     posterShow: 'none',
56 56
     current: 1,
57
-    btnstate: true,
57
+    btnstate: 1,// 1显示视频 0显示图片
58 58
   }
59 59
 
60 60
   componentWillMount () {
@@ -63,7 +63,6 @@ export default class Index extends Component {
63 63
       const router = Taro.getStorageSync('router')
64 64
       const id = this.$router.params.id || router.query.id
65 65
       // const id='82b54f4a1f5b981df572253792afbfa1' 
66
-
67 66
       this.setState({
68 67
         buildingId: id
69 68
       }, () => {
@@ -96,15 +95,15 @@ export default class Index extends Component {
96 95
     recordId && updatePoint(recordId)
97 96
   }
98 97
 
99
-  loadMapAround(building) {
98
+  loadMapAround (building) {
100 99
     const [lat, lng] = (building.coordinate || '').split(',')
101 100
 
102 101
     if (!lat || !lng) return Promise.reject()
103 102
 
104
-    return getPoiAround({ lng, lat})
103
+    return getPoiAround({ lng, lat })
105 104
   }
106 105
 
107
-  loadHelpGroupList() {
106
+  loadHelpGroupList () {
108 107
     const { buildingId } = this.state
109 108
     queryHelpGroup({ buildingId: buildingId }).then(res => {
110 109
       console.log(res, "buildingId")
@@ -125,7 +124,7 @@ export default class Index extends Component {
125 124
     )
126 125
   }
127 126
 
128
-  loadDetail() {
127
+  loadDetail () {
129 128
     const { buildingId } = this.state
130 129
     const { dispatchProjectDetail } = this.props
131 130
     this.setState({
@@ -859,15 +858,24 @@ export default class Index extends Component {
859 858
   }
860 859
 
861 860
   renderVideo () {
861
+    console.log('-------props------', this.props)
862
+    const { projectDetail } = this.props
862 863
     return (
863
-      <View style={{
864
-        height: '278px'
865
-      }}>123
866
-      {/* <Video
867
-        style={{
868
-          height: '278px'
869
-        }}
870
-      ></Video> */}
864
+      <View
865
+        className="pro__banner"
866
+      >
867
+        { console.log('-------projectDetail.videoUrl------', projectDetail.videoUrl)}
868
+        <Video
869
+          src={projectDetail.videoUrl}
870
+          // src='http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400'
871
+          // poster='http://misc.aotu.io/booxood/mobile-video/cover_900x500.jpg'  
872
+          initial-time='0.01'
873
+          style={{
874
+            height: '278px',
875
+            width: '375px'
876
+          }}
877
+          show-mute-btn='true'
878
+        ></Video>
871 879
       </View>
872 880
     )
873 881
   }
@@ -888,13 +896,17 @@ export default class Index extends Component {
888 896
     const { total = 0, records = [] } = uvList
889 897
     const openDate = projectDetail.openingDate ? dayjs(projectDetail.openingDate).locale('zh-cn').format('YYYY年M月D日') : '暂无'
890 898
 
899
+    // if (projectDetail.videoUrl != null){
900
+    //   setState({ btnstate: 1 }
901
+    // },
902
+
891 903
     return (
892 904
       <Block>
893 905
         {
894 906
           loaded && (
895 907
             <View className='detail'>
896 908
               <Notice></Notice>
897
-              {btnstate && (
909
+              {(projectDetail.videoUrl == null || btnstate === 0) && (
898 910
                 <View
899 911
                   className="pro__banner"
900 912
                   onClick={this.previewImage.bind(this, projectDetail.buildingImg)}>
@@ -912,17 +924,17 @@ export default class Index extends Component {
912 924
                 </View>
913 925
               )}
914 926
 
915
-              {!btnstate && this.renderVideo()}
927
+              {btnstate === 1 && projectDetail.videoUrl != null &&  this.renderVideo()}
916 928
 
917
-              
918
-              {!btnstate && (<View className='media-btn'>
919
-                <View className='video-btn' onClick={() => this.setState({ btnstate: true })} style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }} >视频</View>
920
-                <View className='img-btn'>图片</View>
929
+              }
930
+              {btnstate === 1 && projectDetail.videoUrl != null && (<View className='media-btn'>
931
+                <View className='video-btn'  style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }} >视频</View>
932
+                <View className='img-btn' onClick={() => this.setState({ btnstate: 0 })}>图片</View>
921 933
               </View>)}
922 934
 
923
-              {btnstate && (<View className='media-btn'>
924
-                <View className='video-btn'  >视频</View>
925
-                <View className='img-btn' onClick={() => this.setState({ btnstate: false })} style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }}>图片</View>
935
+              {btnstate === 0 && projectDetail.videoUrl != null && (<View className='media-btn'>
936
+                <View className='video-btn' onClick={() => this.setState({ btnstate: 1 })} >视频</View>
937
+                <View className='img-btn'  style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }}>图片</View>
926 938
               </View>)}
927 939
 
928 940
 

+ 4
- 3
src/pages/project/detail/index.scss Vedi File

@@ -19,7 +19,7 @@
19 19
     height: 64px;
20 20
     background: rgba(255, 255, 255, 1);
21 21
     border-radius: 12px;
22
-    top: 440px;
22
+    top: 420px;
23 23
     left: 284px;
24 24
     font-size: 30px;
25 25
     font-family: PingFangSC-Regular, PingFang SC;
@@ -27,7 +27,8 @@
27 27
     text-align: center;
28 28
     line-height: 64px;
29 29
     color: rgba(53, 53, 53, 1);
30
-    display: flex;;
30
+    display: flex;
31
+    position: fixed;
31 32
     .video-btn {
32 33
       width: 92px;
33 34
       height: 64px;
@@ -46,7 +47,7 @@
46 47
 
47 48
 
48 49
   .wrap {
49
-    padding-top: 546px;
50
+    padding-top: 500px;
50 51
     background: transparent;
51 52
   }
52 53