zlisen hace 4 años
padre
commit
556b08c854

+ 2
- 2
config/dev.js Ver fichero

@@ -6,8 +6,8 @@ module.exports = {
6 6
   defineConstants: {
7 7
     // HOST: '"http://localhost:7080"',
8 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 12
     // OSS_PATH: "https://njcj.oss-cn-shanghai.aliyuncs.com/",
13 13
     // OSS_FAST_PATH: "https://njcj.oss-accelerate.aliyuncs.com/",

+ 25
- 3
src/pages/house/addnewhouse/index.jsx Ver fichero

@@ -167,8 +167,27 @@ const index = (props) => {
167 167
                 </View>
168 168
                 <View className='inputstyle-view'>
169 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 191
                             count: 1,
173 192
                             // sizeType: ['original', 'compressed'],
174 193
                             sourceType: ['album'],
@@ -185,7 +204,10 @@ const index = (props) => {
185 204
 
186 205
                                 // setImgurl(tempFilePaths[0])
187 206
                             }
188
-                        })} src={imgUrl || uploadicon}></Image>
207
+                        })} src={uploadicon}></Image>
208
+                        <View>上传图片</View>
209
+                        </View>}
210
+                        
189 211
                         {/* <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' /> */}
190 212
                     </Container>
191 213
                 </View>

+ 4
- 3
src/pages/house/list/index.jsx Ver fichero

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

+ 2
- 2
src/pages/index/index.jsx Ver fichero

@@ -44,8 +44,8 @@ const index = (props) => {
44 44
 
45 45
     {user.personId && <View>
46 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 49
     </View>}
50 50
 
51 51
 

+ 4
- 5
src/pages/recommend/index.jsx Ver fichero

@@ -71,10 +71,10 @@ const recommend = (props) => {
71 71
         {
72 72
             true && list.map((x) => {
73 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 80
                             {userRloe.customer == user.role ? <Image className='icon' src={more} onClick={() => onClick(x)}></Image>
@@ -86,8 +86,7 @@ const recommend = (props) => {
86 86
 
87 87
                         </View> :
88 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 91
                             </View>
93 92
                         }