zlisen 4 年之前
父節點
當前提交
d42b3684c1

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

@@ -7,7 +7,7 @@ module.exports = {
7 7
     // HOST: '"http://localhost:7080"',
8 8
     // HOST: '"https://sgl.ycjcjy.com"',
9 9
     HOST: '"http://192.168.31.68:7080"',
10
-    // HOST: '"http://192.168.211.181:7080"',
10
+    HOST: '"http://192.168.211.105: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/",

+ 1
- 1
src/app.config.js 查看文件

@@ -17,7 +17,7 @@ export default {
17 17
   window: {
18 18
     backgroundTextStyle: 'light',
19 19
     navigationBarBackgroundColor: '#fff',
20
-    navigationBarTitleText: 'WeChat',
20
+    navigationBarTitleText: '十公里',
21 21
     navigationBarTextStyle: 'black'
22 22
   },
23 23
   usingComponents: {

+ 6
- 1
src/app.scss 查看文件

@@ -61,4 +61,9 @@ page {
61 61
    text-align: center;
62 62
    margin: auto;
63 63
    margin-top: 90px;
64
- }
64
+ }
65
+
66
+
67
+ .scrol{
68
+  height: calc(100vh - 173.33px)
69
+ }

+ 2
- 1
src/layout/index.jsx 查看文件

@@ -2,10 +2,11 @@ import React from 'react';
2 2
 import { View, ScrollView } from '@tarojs/components'
3 3
 
4 4
 const Layout = ({ children }) => {
5
-    return <ScrollView scrollY style={{ height: 'calc(100vh - 162rpx)' }} >
5
+    return <ScrollView className='scrol' scrollY  >
6 6
         <View className='page-container' >
7 7
             {children}
8 8
         </View>
9
+        <View style={{height:'10rpx'}}></View>
9 10
     </ScrollView>
10 11
 }
11 12
 

+ 2
- 4
src/pages/account/index.jsx 查看文件

@@ -19,9 +19,7 @@ const house = (props) => {
19 19
 
20 20
 
21 21
   const radioHouseState = useMemo(() => props.radioHouseState, [props.radioHouseState])
22
-  wx.setNavigationBarTitle({
23
-    title: '民宿房源管理'
24
-  })
22
+
25 23
   console.log(props, radioHouseState)
26 24
   useEffect(() => {
27 25
     setList([
@@ -117,7 +115,7 @@ const house = (props) => {
117 115
       })}
118 116
     </Layout>
119 117
     {/* onClick={(e)=>(e) */}
120
-    <Tab value={['+新增宿老板账号']} color='#ffffff' onClick={() => { Taro.navigateTo({ url: `/pages/account/edit/index` }) }} ></Tab>
118
+    <Tab value={['+新增宿老板账号']} color='#ffffff' onClick={() => { Taro.navigateTo({ url: `/pages/account/edit/index` }) }} ></Tab>
121 119
   </View>
122 120
 }
123 121
 

+ 1
- 1
src/pages/addimg/index.config.js 查看文件

@@ -4,5 +4,5 @@
4 4
 //   },
5 5
 
6 6
 export default {
7
-    enableShareAppMessage: true
7
+    navigationBarTitleText: '图片列表',
8 8
 }

+ 1
- 1
src/pages/adminUser/index.jsx 查看文件

@@ -13,7 +13,7 @@ import './index.scss'
13 13
 import { xor } from 'lodash';
14 14
 
15 15
 const menuList = [{
16
-  title: '宿老板账号管理',
16
+  title: '民宿宿老板账号管理',
17 17
   icon: usericon,
18 18
   url: '/pages/account/index'
19 19
 }, {

+ 32
- 11
src/pages/guide/index.jsx 查看文件

@@ -6,7 +6,7 @@ import icon from '../../assets/icon.png'
6 6
 import './index.scss'
7 7
 import userRloe from '../../util/userRole'
8 8
 import { useSelector } from 'react-redux'
9
-import request from '@/util/request'
9
+import request,{uploadFiles } from '@/util/request'
10 10
 import uploadicon from '../../assets/uploadicon.png'
11 11
 const guide = (props) => {
12 12
 
@@ -72,26 +72,47 @@ const guide = (props) => {
72 72
                     sizeType: ['original', 'compressed'],
73 73
                     sourceType: ['album',],
74 74
                     success: (res) => {
75
-                        // tempFilePath可以作为img标签的src属性显示图片
76
-
77
-                        console.log(res)
78
-                        const tempFilePaths = res.tempFilePaths
79
-                        setImgurl(tempFilePaths[0])
75
+                                // tempFilePath可以作为img标签的src属性显示图片
76
+                                const tempFilePaths = res.tempFilePaths
77
+
78
+                        uploadFiles(tempFilePaths).then((res) => {
79
+                            console.log(res, 'uploadFiles')
80
+                            // setImgUrl(res[0])
81
+                            setImgurl(res[0])
82
+                            request({ url: `/taHouse/${houseId}`, method: 'put', data: { ...detail, desc:res[0] } }).then((res) => {
83
+                                
84
+                            })
85
+                        }).catch((e) => {
86
+                            console.log(e, 'err')
87
+                        })
88
+
89
+                        // setImgurl(tempFilePaths[0])
80 90
                     }
91
+                    // success: (res) => {
92
+                    //     // tempFilePath可以作为img标签的src属性显示图片
93
+
94
+                    //     console.log(res)
95
+                    //     const tempFilePaths = res.tempFilePaths
96
+                    //     setImgurl(tempFilePaths[0])
97
+
98
+
99
+                        
100
+                    // }
81 101
                 }); break;
82 102
             }
83 103
         }
84 104
         // Taro.navigateTo({ url: `/pages/map/index?type=${type}` })
85 105
     }
86
-    // 
106
+     const [addressName,addressDetail] = (detail.address||'').split('____')
107
+     const [parkingName,parkingDetail] = (detail.parking||'').split('____')
87 108
     return <View className='guide'>
88 109
         {!!houseId&&<View>
89 110
             <View className='guide-view'>
90 111
                 <Text className='guide-view-info'>房屋位置</Text>
91 112
                 <ContainerLayout className='guide-view-layout' style={{ display: 'flex', justifyContent: 'space-between' }} onClick={() => onToMap('address')}>
92 113
                     <View  >
93
-                        <View className='guide-view-layout-text1' >{detail.address}</View>
94
-                        {/* <View className='guide-view-layout-text2'>{detail.lngLat}</View> */}
114
+                        <View className='guide-view-layout-text1' >{addressName}</View>
115
+                        <View className='guide-view-layout-text2'>{addressDetail}</View>
95 116
                     </View>
96 117
                     {user.role == userRloe.customer && <View style={{ float: 'right' }} onClick={() => onOpenLocation(detail.lngLat)}>
97 118
                         <Image className='icon' src={icon} />
@@ -103,8 +124,8 @@ const guide = (props) => {
103 124
                 <Text className='guide-view-info'>停车位置</Text>
104 125
                 <ContainerLayout className='guide-view-layout' style={{ display: 'flex', justifyContent: 'space-between' }} onClick={() => onToMap('park')}>
105 126
                     <View  >
106
-                        <View className='guide-view-layout-text1' >{detail.parking}</View>
107
-                        {/* <View className='guide-view-layout-text2'>{detail.parkLngLat}</View> */}
127
+                        <View className='guide-view-layout-text1' >{parkingName}</View>
128
+                        <View className='guide-view-layout-text2'>{parkingDetail}</View>
108 129
                     </View>
109 130
                     {user.role == userRloe.customer && <View style={{ float: 'right' }} onClick={() => onOpenLocation(detail.parkLngLat)}>
110 131
                         <Image className='icon' src={icon} />

+ 3
- 3
src/pages/house/addnewhouse/index.config.js 查看文件

@@ -1,4 +1,4 @@
1 1
 export default {
2
-
3
-  
4
-}
2
+ 
3
+    navigationBarTitleText: '新增房源',
4
+  }

+ 12
- 9
src/pages/house/addnewhouse/index.jsx 查看文件

@@ -46,15 +46,18 @@ const index = (props) => {
46 46
         })
47 47
     }
48 48
     const formSubmit = (e) => {
49
-        console.log(e.detail, 'formSubmit')
49
+        // console.log(e.detail, 'formSubmit')
50
+        const value = e.detail.value
50 51
         const data = {
51
-            ...e.detail.value,
52
+            ...value,
53
+            address: `${value.address}____${value.addressdetail}`,
54
+            parking: `${value.parking}____${value.parkingdetail}`,
52 55
             lngLat: `${address.latitude},${address.longitude}`,
53 56
             parkLngLat: `${address.latitude},${address.longitude}`,
57
+            
54 58
             desc:imgUrl,
55 59
         }
56
-        // latitude
57
-        // longitude
60
+        console.log(data,e.detail.value,'formSubmit')
58 61
         request({ url: '/taHouse', method: 'post', data }).then((res) => {
59 62
             if (res.data.code == 1000)
60 63
                 Taro.navigateBack({
@@ -103,7 +106,7 @@ const index = (props) => {
103 106
             <Layout>
104 107
 
105 108
                 <View className='inputstyle-view'>
106
-                    <Text className='title'>民宿名称</Text>
109
+                    <Text className='title'>房源名称</Text>
107 110
                     <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
108 111
                         <Input name='title' placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
109 112
                     </Container>
@@ -118,7 +121,7 @@ const index = (props) => {
118 121
                     <Text className='title'>位置信息</Text>
119 122
                     <View style={{ display: 'flex' }}>
120 123
                         <Container className='inputstyle-view-card' style={{ width: '100%', borderRadius: '20rpx', padding: '0 40rpx' }}>
121
-                            <Input name='address' value={address.address} disabled placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
124
+                            <Input name='address' value={address.name} disabled placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
122 125
 
123 126
                         </Container>
124 127
                         <Container className='map-view-icon' onClick={() => onChooseLocation('address')}>
@@ -130,14 +133,14 @@ const index = (props) => {
130 133
                 <View className='inputstyle-view'>
131 134
                     <Text className='title'>具体地址</Text>
132 135
                     <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
133
-                        <Input name='lngLat' placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
136
+                        <Input name='addressdetail' value={address.address} placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
134 137
                     </Container>
135 138
                 </View>
136 139
                 <View className='inputstyle-view'>
137 140
                     <Text className='title'>停车场地址</Text>
138 141
                     <View style={{ display: 'flex' }}>
139 142
                         <Container className='inputstyle-view-card' style={{ width: '100%', borderRadius: '20rpx', padding: '0 40rpx' }}>
140
-                            <Input name='parking' value={parking.address} disabled placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
143
+                            <Input name='parking' value={parking.name} disabled placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
141 144
 
142 145
                         </Container>
143 146
                         <Container className='map-view-icon' onClick={() => onChooseLocation('parking')}>
@@ -149,7 +152,7 @@ const index = (props) => {
149 152
                 <View className='inputstyle-view'>
150 153
                     <Text className='title'>具体地址</Text>
151 154
                     <Container className='inputstyle-view-card ' style={{ borderRadius: '20rpx', padding: '0 40rpx' }} >
152
-                        <Input name='parkLngLat' placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
155
+                        <Input name='parkingdetail' value={parking.address} placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
153 156
                     </Container>
154 157
                 </View>
155 158
                 <View className='inputstyle-view'>

+ 2
- 3
src/pages/house/household/index.config.js 查看文件

@@ -1,4 +1,3 @@
1 1
 export default {
2
-
3
-  
4
-}
2
+    navigationBarTitleText: '民宿房源管理',
3
+}

+ 4
- 4
src/pages/house/index.config.js 查看文件

@@ -1,5 +1,5 @@
1
-// export default {
2
-//     navigationStyle: "custom"
3
-    
4
-//   }
1
+export default {
2
+    // navigationStyle: "custom"
3
+    navigationBarTitleText: '',
4
+  }
5 5
   

+ 16
- 3
src/pages/house/index.jsx 查看文件

@@ -6,6 +6,7 @@ import Layout from '../../layout/index'
6 6
 import Tab from '../../compents/tab/index'
7 7
 import Guide from '../guide/index'
8 8
 import Recommend from '../recommend/index'
9
+import roleList from '../../util/userRole'
9 10
 
10 11
 // import HouseLIst from '../house/list'
11 12
 
@@ -13,6 +14,7 @@ import './index.scss'
13 14
 import request from '../../util/request'
14 15
 
15 16
 const house = (props) => {
17
+    
16 18
     const router = useRouter()
17 19
     const { houseId } = router.params
18 20
     const user = useSelector(state => state.user)
@@ -22,6 +24,20 @@ const house = (props) => {
22 24
     const [list, setList] = useState([])
23 25
     const [dataSource, setDataSource] = useState([])
24 26
     const [imgSource, setImgSource] = useState([])
27
+
28
+    useEffect(() => {
29
+        if (user.role == roleList.landlord) {
30
+          wx.setNavigationBarTitle({
31
+            title: '民宿房源管理'
32
+          });
33
+        }
34
+        if (user.role == roleList.customer) {
35
+          wx.setNavigationBarTitle({
36
+            title: '十公里周边指南'
37
+          });
38
+        }
39
+      }, [user.role]);
40
+
25 41
     useDidShow(() => {
26 42
         if (houseId) {
27 43
             getDetail()
@@ -40,9 +56,6 @@ const house = (props) => {
40 56
         request({ url: `/taHouse/${houseId}` }).then((res) => {
41 57
             setDataSource(res.data.data)
42 58
 
43
-            wx.setNavigationBarTitle({
44
-                title: res.data.data.title
45
-            })
46 59
         })
47 60
     }
48 61
     

+ 1
- 1
src/pages/house/list/index.jsx 查看文件

@@ -59,7 +59,7 @@ let house = (props, ref) => {
59 59
   }
60 60
 
61 61
   useEffect(() => {
62
-    console.log(props, ref,'props, ref')
62
+
63 63
     getHouseList()
64 64
 
65 65
     Taro.nextTick(() => {

+ 6
- 6
src/pages/house/list/index.scss 查看文件

@@ -23,15 +23,15 @@
23 23
       position: relative;
24 24
 
25 25
       &-radio {
26
-          width: 50px;
27
-          height: 50px;
26
+          width: 40px;
27
+          height: 40px;
28 28
         background-color: #274291;
29 29
         text-align: center;
30
-        line-height: 50px;
30
+        line-height: 40px;
31 31
         position: absolute;
32
-        border-radius: 25px;
33
-        top: -12.5px;
34
-        right: -12.5px;
32
+        border-radius: 20px;
33
+        top: -2px;
34
+        right: 2px;
35 35
       }
36 36
 
37 37
       .top {

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

@@ -1,4 +1,4 @@
1 1
 export default {
2
-  navigationBarTitleText: '首页',
2
+  // navigationBarTitleText: '首页',
3 3
   
4 4
 }

+ 69
- 53
src/pages/index/index.jsx 查看文件

@@ -1,58 +1,75 @@
1
-import React, { useEffect, useMemo, useState } from 'react'
2
-import Taro,{useRouter} from '@tarojs/taro'
3
-import { useSelector, useDispatch } from 'react-redux'
4
-import { View, ScrollView } from '@tarojs/components'
5
-import Tab from '../../compents/tab/index'
6
-import Customer from '../customer/index'
7
-import Landlord from '../landlord/index'
8
-import roleList from '../../util/userRole'
9
-import './index.scss'
10
-import request from '../../util/request'
11
-import GetPhone from '@/compents/getPhone'
12
-const index = (props) => {
1
+import React, { useEffect, useMemo, useState } from "react";
2
+import Taro, { useRouter } from "@tarojs/taro";
3
+import { useSelector, useDispatch } from "react-redux";
4
+import { View, ScrollView } from "@tarojs/components";
5
+import Tab from "../../compents/tab/index";
6
+import Customer from "../customer/index";
7
+import Landlord from "../landlord/index";
8
+import roleList from "../../util/userRole";
9
+import "./index.scss";
10
+import request from "../../util/request";
11
+import GetPhone from "@/compents/getPhone";
12
+const index = props => {
13
+  const router = useRouter();
14
+
15
+  const { houseId, orderId } = router.params;
16
+  const user = useSelector(state => state.user);
17
+
18
+  console.log(user);
19
+
20
+  const dispatch = useDispatch();
13 21
 
14
-
15
-  const router = useRouter()
16
-
17
-  const { houseId ,orderId} = router.params
18
-  const user = useSelector(state => state.user)
19
-
20
-  console.log(user)
21
-
22
-  const dispatch = useDispatch()
22
+  useEffect(() => {
23
+    if (user.role == roleList.landlord) {
24
+      wx.setNavigationBarTitle({
25
+        title: '名宿房源管理'
26
+      });
27
+    }
28
+    if (user.role == roleList.customer) {
29
+      wx.setNavigationBarTitle({
30
+        title: '十公里周边指南'
31
+      });
32
+    }
33
+  }, [user.role]);
23 34
 
24 35
   // const [userRole, setUserRole] = useState('1')
25 36
   // const [pageState, SetPageState] = useState('1')
26 37
   // const [list, setList] = useState([])
27 38
   // const [visible, setVisible] = useState(false)
28
-  const [showAuthPhone, setShowAuthPhone] = useState(false)
39
+  const [showAuthPhone, setShowAuthPhone] = useState(false);
29 40
 
30 41
   useEffect(() => {
31
-    setShowAuthPhone(!user.phone)
32
-  }, [user.phone])
33
-
34
-  const onOk = (res) => {
35
-    dispatch({ type: 'LOGIN', user: res.data.data })
36
-    setShowAuthPhone(false)
37
-  }
38
-
39
-  const onCancel = (e) => {
40
-    setShowAuthPhone(false)
41
-  }
42
-
43
-  return <View className='index'>
44
-
45
-    {user.personId && <View>
46
-      <GetPhone visible={showAuthPhone} onOk={onOk} onCancel={onCancel} ></GetPhone>
47
-      {user.role == roleList.customer &&!showAuthPhone&& <Customer houseId={houseId} orderId={orderId}></Customer>}
48
-      {user.role == roleList.landlord &&!showAuthPhone&& <Landlord ></Landlord>}
49
-    </View>}
50
-
51
-
52
-
53
-
54
-
55
-    {/* {userRole == 1 ? <Register userRole={userRole} list={list} onChange={(e) => onRegisterChange(e)}></Register> :
42
+    setShowAuthPhone(!user.phone);
43
+  }, [user.phone]);
44
+
45
+  const onOk = res => {
46
+    dispatch({ type: "LOGIN", user: res.data.data });
47
+    setShowAuthPhone(false);
48
+  };
49
+
50
+  const onCancel = e => {
51
+    setShowAuthPhone(false);
52
+  };
53
+
54
+  return (
55
+    <View className="index">
56
+      {user.personId && (
57
+        <View>
58
+          <GetPhone
59
+            visible={showAuthPhone}
60
+            onOk={onOk}
61
+            onCancel={onCancel}
62
+          ></GetPhone>
63
+          {user.role == roleList.customer && !showAuthPhone && (
64
+            <Customer houseId={houseId} orderId={orderId}></Customer>
65
+          )}
66
+          {user.role == roleList.landlord && !showAuthPhone && (
67
+            <Landlord></Landlord>
68
+          )}
69
+        </View>
70
+      )}
71
+
72
+      {/* {userRole == 1 ? <Register userRole={userRole} list={list} onChange={(e) => onRegisterChange(e)}></Register> :
56 73
           <View>userRole={userRole} list={list} onChange={(e) => onRegisterChange(e)}
57 74
             {(userRole == 'guide' || userRole == 2) && <Guide userRole={userRole}/>}
58 75
             {userRole == 'recommend' && <Recommend userRole={userRole}/>}
@@ -66,12 +83,11 @@ const index = (props) => {
66 83
         }
67 84
      <HouseLIst userRole={userRole} list={list} onChange={(e) => onRegisterChange(e)}></HouseLIst>  */}
68 85
 
69
-
70
-
71
-    {/* </View>
86
+      {/* </View>
72 87
     </ScrollView>
73 88
     <Tab value={userRole} onClick={(e) => onTabClick(e)}></Tab> */}
74
-  </View>
75
-}
89
+    </View>
90
+  );
91
+};
76 92
 
77
-export default index
93
+export default index;

+ 3
- 3
src/pages/landlord/index.jsx 查看文件

@@ -105,9 +105,9 @@ const index = (props) => {
105 105
 
106 106
     <AtFloatLayout isOpened={isOpened} onClose={() => handleClose()} style={{ zIndex: '1000' }}>
107 107
       <View className='floatmodel' >
108
-        <View onClick={() => Taro.navigateTo({ url: '/pages/house/addnewhouse/index' })}>新增房源</View>
109
-        <View onClick={() => { setIsOpened(false); setRadioHouseState(true) }}>复制房源</View>
110
-        <View style={{ color: '#d2d2d2' }} onClick={() => setIsOpened(false)}>取消</View>
108
+        <View style={{width:"50%" ,textAlign:'center'}} onClick={() => Taro.navigateTo({ url: '/pages/house/addnewhouse/index' })}>新增房源</View>
109
+        <View style={{width:"50%" ,textAlign:'center'}}  onClick={() => { setIsOpened(false); setRadioHouseState(true) }}>复制房源</View>
110
+        <View style={{width:"50%" ,textAlign:'center', color: '#d2d2d2' }} onClick={() => setIsOpened(false)}>取消</View>
111 111
       </View>
112 112
 
113 113
     </AtFloatLayout>

+ 3
- 3
src/pages/map/index.config.js 查看文件

@@ -1,4 +1,4 @@
1 1
 export default {
2
-
3
-  
4
-}
2
+ 
3
+    navigationBarTitleText: '修改地址',
4
+  }

+ 18
- 19
src/pages/map/index.jsx 查看文件

@@ -18,8 +18,11 @@ const index = (props) => {
18 18
     const [userRole, setUserRole] = useState('1')
19 19
     const [pageState, setPageState] = useState('1')
20 20
     const [address, setAddress] = useState({})
21
-    // const [lngLat, setLngLat] = useState('')
22 21
 
22
+    // 在onInput详细地址时有bug,不能放在adderss里,所有加了个value
23
+    const [value,setValue] = useState('')
24
+    // const [lngLat, setLngLat] = useState('')
25
+console.log(address,'setAddress')
23 26
     useDidShow(() => {
24 27
 
25 28
     })
@@ -35,18 +38,24 @@ const index = (props) => {
35 38
         request({ url: `/taHouse/${houseId}` }).then((res) => {
36 39
             console.log(res.data.data,type, 'getDetail')
37 40
             if (type == "address") {
41
+                const [addressName,addressDetail] = (res.data.data.address||'').split('____')
38 42
                 setAddress({
39
-                    address:res.data.data.address,
43
+                    name:addressName,
44
+                    address:addressDetail,
40 45
                     lngLat:res.data.data.lngLat
41 46
                 })
47
+
48
+                setValue(addressDetail)
42 49
                 // setAddress(res.data.data.address)
43 50
                 // setLngLat(res.data.data.lngLat)
44 51
             }else if (type == 'park'){
45
-
52
+                const [addressName,addressDetail] = (res.data.data.parking||'').split('____')
46 53
                 setAddress({
47
-                    address:res.data.data.parking,
54
+                    name:addressName,
55
+                    address:addressDetail,
48 56
                     lngLat:res.data.data.parkLngLat
49 57
                 })
58
+                setValue(addressDetail)
50 59
                 // address(res.data.data)
51 60
                 // setAddress(res.data.data.parking)
52 61
                 // setLngLat(res.data.data.parkLngLat)
@@ -61,12 +70,12 @@ const index = (props) => {
61 70
         let data = {}
62 71
         if (type == 'address') {
63 72
             data = {
64
-                address: address.address,
73
+                address: `${address.name}____${value}`,
65 74
                 lngLat:`${address.latitude},${address.longitude}`
66 75
             }
67 76
         } else if (type == 'park') {
68 77
             data = {
69
-                parking: address.address,
78
+                parking: `${address.name}____${value}`,
70 79
                 parkLngLat:`${address.latitude},${address.longitude}`
71 80
             }
72 81
         }
@@ -79,10 +88,6 @@ const index = (props) => {
79 88
         })
80 89
     }
81 90
 
82
-    const onChange = (e) => {
83
-        console.log(e, '111')
84
-        // setLngLat(e.detail.value)
85
-    }
86 91
     const onChooseLocation = () => {
87 92
         console.log(333)
88 93
         wx.chooseLocation({
@@ -90,6 +95,7 @@ const index = (props) => {
90 95
                 console.log(res)
91 96
 
92 97
                 setAddress(res)
98
+                setValue(res.address)
93 99
             },
94 100
             fail: (err) => {
95 101
                 console.log(err)
@@ -99,24 +105,17 @@ const index = (props) => {
99 105
         })
100 106
     }
101 107
 
102
-
103 108
     return <View className='map'>
104 109
 
105 110
 
106 111
 
107 112
 
108 113
         <Layout>
109
-            {/* <View className='map-view'>
110
-                <Text className='title'></Text>
111
-                <Container className='map-view-card'>
112
-                <Input placeholderClass='placeholderinput' className='input' type='text' placeholder='小区/写字楼/大厦等' />
113
-                </Container>
114
-            </View> */}
115 114
             <View className='map-view' >
116 115
                 <Text className='title'>位置信息</Text>
117 116
                 <View style={{ display: 'flex' }}>
118 117
                     <Container className='map-view-card' style={{ width: '100%' }}>
119
-                        {address.address&&<Input value={address.address} disabled placeholderClass='placeholderinput' className='input' type='text' placeholder='' />}
118
+                        {address.address&&<Input value={address.name} disabled placeholderClass='placeholderinput' className='input' type='text' placeholder='' />}
120 119
 
121 120
                     </Container>
122 121
                     <Container className='map-view-icon' onClick={() => onChooseLocation()}>
@@ -128,7 +127,7 @@ const index = (props) => {
128 127
             <View className='map-view'>
129 128
                 <Text className='title'>具体地址</Text>
130 129
                 <Container className='map-view-card'>
131
-                    <Input  onInput={onChange} placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
130
+                    <Input value={value} onInput={(e)=>setValue(e.detail.value)} placeholderClass='placeholderinput' className='input' type='text' placeholder='' />
132 131
                 </Container>
133 132
             </View>
134 133
         </Layout>

+ 1
- 1
src/pages/material/index.config.js 查看文件

@@ -1,4 +1,4 @@
1 1
 export default {
2 2
 
3
-  
3
+  navigationBarTitleText: '选择分类标签',
4 4
 }

+ 3
- 5
src/pages/recommend/index.jsx 查看文件

@@ -72,20 +72,18 @@ const recommend = (props) => {
72 72
             true && list.map((x) => {
73 73
                 return <View className='recommend-view'>
74 74
                     <ContainerLayout className='recommend-view-layout'  >
75
-                        {id != x.surroundId ? <View className='recommend-view-card' style={{ height: "300rpx",overflow:'hidden' }}>
75
+                        {id != x.surroundId ? <View className='recommend-view-card' style={userRloe.customer == user.role ? { height: "300rpx",overflow:'hidden' }:''}>
76 76
 
77 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>
81 81
 
82
-                                : <Image className='icon' src={deleteicon} style={{ width: '40rpx' }} onClick={() => onClick(x)}></Image>
82
+                                : <Image className='icon' src={deleteicon} mode='widthFix' style={{ width: '40rpx' }} onClick={() => onClick(x)}></Image>
83 83
                             }
84 84
 
85
-
86
-
87 85
                         </View> :
88
-                            <View style={{ height: "700rpx" }}>
86
+                            <View  >
89 87
                                 <Image className='recommend-view-img' mode='widthFix' src={x.image}></Image>
90 88
 
91 89
                             </View>

+ 1
- 1
src/pages/recommend/index.scss 查看文件

@@ -5,7 +5,7 @@
5 5
     position: relative;
6 6
     &-card{
7 7
       width: 100%;
8
-      height: 420px;
8
+      // height: 420px;
9 9
     }
10 10
     &-img{
11 11
       width: 100%;

+ 1
- 4
src/pages/share/index.config.js 查看文件

@@ -1,8 +1,5 @@
1
-// onShareAppMessage: function () {
2
-// return custom share data when user share.
3
-//     console.log('44444444')
4
-//   },
5 1
 
6 2
 export default {
3
+    navigationBarTitleText: '分享',
7 4
     enableShareAppMessage: true
8 5
 }

+ 3
- 3
src/pages/wifi/index.config.js 查看文件

@@ -1,4 +1,4 @@
1 1
 export default {
2
-
3
-  
4
-}
2
+ 
3
+    navigationBarTitleText: '修改wifi',
4
+  }

+ 3
- 0
src/reducers/user.js 查看文件

@@ -37,6 +37,9 @@ export default function user(state = INITIAL_STATE, action) {
37 37
     case 'LOGIN': {
38 38
 
39 39
       if (action.user.shopKeeperList && action.user.shopKeeperList.length) {
40
+          wx.setNavigationBarTitle({
41
+            title: '民宿房源管理'
42
+          })
40 43
         return {
41 44
           ...state,
42 45
           ...action.user,