zlisen 4 years ago
parent
commit
556b08c854

+ 2
- 2
config/dev.js View File

6
   defineConstants: {
6
   defineConstants: {
7
     // HOST: '"http://localhost:7080"',
7
     // HOST: '"http://localhost:7080"',
8
     // HOST: '"https://sgl.ycjcjy.com"',
8
     // HOST: '"https://sgl.ycjcjy.com"',
9
-    // HOST: '"http://192.168.31.68:7080"',
10
-    HOST: '"http://192.168.211.181:7080"',
9
+    HOST: '"http://192.168.1.109:7080"',
10
+    // HOST: '"http://192.168.211.181:7080"',
11
  
11
  
12
     // OSS_PATH: "https://njcj.oss-cn-shanghai.aliyuncs.com/",
12
     // OSS_PATH: "https://njcj.oss-cn-shanghai.aliyuncs.com/",
13
     // OSS_FAST_PATH: "https://njcj.oss-accelerate.aliyuncs.com/",
13
     // OSS_FAST_PATH: "https://njcj.oss-accelerate.aliyuncs.com/",

+ 25
- 3
src/pages/house/addnewhouse/index.jsx View File

167
                 </View>
167
                 </View>
168
                 <View className='inputstyle-view'>
168
                 <View className='inputstyle-view'>
169
                     <Text className='title'>其他指引</Text>
169
                     <Text className='title'>其他指引</Text>
170
-                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
171
-                        <Image className='guide-view-img' mode='widthFix' onClick={() => Taro.chooseImage({
170
+                    <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx',textAlign:'center', padding: '0 40rpx' }} >
171
+                        {imgUrl&&<Image className='guide-view-img' mode='widthFix' onClick={() => Taro.chooseImage({
172
+                            count: 1,
173
+                            // sizeType: ['original', 'compressed'],
174
+                            sourceType: ['album'],
175
+                            success: (res) => {
176
+                                // tempFilePath可以作为img标签的src属性显示图片
177
+                                const tempFilePaths = res.tempFilePaths
178
+
179
+                                uploadFiles(tempFilePaths).then((res) => {
180
+                                    console.log(res, 'uploadFiles')
181
+                                    setImgUrl(res[0])
182
+                                }).catch((e) => {
183
+                                    console.log(e, 'err')
184
+                                })
185
+
186
+                                // setImgurl(tempFilePaths[0])
187
+                            }
188
+                        })} src={imgUrl}></Image>}
189
+                        {!imgUrl&&<View style={{minHeight:'400rpx',paddingTop:'150rpx'}}>
190
+                            <Image className='guide-view-img' mode='widthFix' style={{width:'100rpx'}} onClick={() => Taro.chooseImage({
172
                             count: 1,
191
                             count: 1,
173
                             // sizeType: ['original', 'compressed'],
192
                             // sizeType: ['original', 'compressed'],
174
                             sourceType: ['album'],
193
                             sourceType: ['album'],
185
 
204
 
186
                                 // setImgurl(tempFilePaths[0])
205
                                 // setImgurl(tempFilePaths[0])
187
                             }
206
                             }
188
-                        })} src={imgUrl || uploadicon}></Image>
207
+                        })} src={uploadicon}></Image>
208
+                        <View>上传图片</View>
209
+                        </View>}
210
+                        
189
                         {/* <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' /> */}
211
                         {/* <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' /> */}
190
                     </Container>
212
                     </Container>
191
                 </View>
213
                 </View>

+ 4
- 3
src/pages/house/list/index.jsx View File

86
 
86
 
87
   return (
87
   return (
88
     <View className='houselist'>
88
     <View className='houselist'>
89
+       {
90
+        (!list || !list.length) && < View className='nodata'> 暂无数据</View>
91
+      }
89
       <RecycleList
92
       <RecycleList
90
         height={508}
93
         height={508}
91
         width={width}
94
         width={width}
111
         )}
114
         )}
112
       />
115
       />
113
 
116
 
114
-      {
115
-        (!list || !list.length) && < View className='nodata'> 暂无数据</View>
116
-      }
117
+     
117
     </View>
118
     </View>
118
   )
119
   )
119
   
120
   

+ 2
- 2
src/pages/index/index.jsx View File

44
 
44
 
45
     {user.personId && <View>
45
     {user.personId && <View>
46
       <GetPhone visible={showAuthPhone} onOk={onOk} onCancel={onCancel} ></GetPhone>
46
       <GetPhone visible={showAuthPhone} onOk={onOk} onCancel={onCancel} ></GetPhone>
47
-      {user.role == roleList.customer && <Customer houseId={houseId} orderId={orderId}></Customer>}
48
-      {user.role == roleList.landlord && <Landlord ></Landlord>}
47
+      {user.role == roleList.customer &&!showAuthPhone&& <Customer houseId={houseId} orderId={orderId}></Customer>}
48
+      {user.role == roleList.landlord &&!showAuthPhone&& <Landlord ></Landlord>}
49
     </View>}
49
     </View>}
50
 
50
 
51
 
51
 

+ 4
- 5
src/pages/recommend/index.jsx View File

71
         {
71
         {
72
             true && list.map((x) => {
72
             true && list.map((x) => {
73
                 return <View className='recommend-view'>
73
                 return <View className='recommend-view'>
74
-                    <ContainerLayout className='recommend-view-layout' >
75
-                        {id != x.surroundId ? <View className='recommend-view-card'>
74
+                    <ContainerLayout className='recommend-view-layout'  >
75
+                        {id != x.surroundId ? <View className='recommend-view-card' style={{ height: "300rpx",overflow:'hidden' }}>
76
 
76
 
77
-                            <Image className='recommend-view-img' src={x.image} ></Image>
77
+                            <Image className='recommend-view-img' mode='widthFix' src={x.image} ></Image>
78
 
78
 
79
 
79
 
80
                             {userRloe.customer == user.role ? <Image className='icon' src={more} onClick={() => onClick(x)}></Image>
80
                             {userRloe.customer == user.role ? <Image className='icon' src={more} onClick={() => onClick(x)}></Image>
86
 
86
 
87
                         </View> :
87
                         </View> :
88
                             <View style={{ height: "700rpx" }}>
88
                             <View style={{ height: "700rpx" }}>
89
-                                <Image className='recommend-view-img'
90
-                                    src="https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=3184265929,203096592&fm=26&gp=0.jpg"></Image>
89
+                                <Image className='recommend-view-img' mode='widthFix' src={x.image}></Image>
91
 
90
 
92
                             </View>
91
                             </View>
93
                         }
92
                         }