Browse Source

Merge branch 'v3.5.1' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into v3.5.1

许静 5 years ago
parent
commit
695c0f1cf4

+ 4
- 4
config/dev.js View File

5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://47.101.36.130:8085"',//测试
6
     // HOST: '"http://47.101.36.130:8085"',//测试
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
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
     // HOST: '"https://lt.pawoma.cn"',
10
     // HOST: '"https://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    HOST: '"http://192.168.0.84:8080"',
13
-    WSS_HOST: '"ws://192.168.0.84:8080"',
12
+    // HOST: '"http://192.168.0.84:8080"',
13
+    // WSS_HOST: '"ws://192.168.0.84:8080"',
14
   },
14
   },
15
   weapp: {},
15
   weapp: {},
16
   h5: {}
16
   h5: {}

+ 4
- 4
config/prod.js View File

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

+ 1
- 1
project.config.json View File

2
 	"miniprogramRoot": "dist/",
2
 	"miniprogramRoot": "dist/",
3
 	"projectname": "mini-chengjiao",
3
 	"projectname": "mini-chengjiao",
4
 	"description": "知与行联调",
4
 	"description": "知与行联调",
5
-	"appid": "wxda1f84b79b3edeb3",
5
+	"appid": "wxd9ee3a9480a4e544",
6
 	"setting": {
6
 	"setting": {
7
 		"urlCheck": false,
7
 		"urlCheck": false,
8
 		"es6": false,
8
 		"es6": false,

BIN
src/assets/mine/customerAnalysis.png View File


BIN
src/assets/tuijiankehu.png View File


+ 21
- 10
src/pages/agent/client/index.js View File

20
     floor: '',
20
     floor: '',
21
     recordId: null
21
     recordId: null
22
   }
22
   }
23
-  componentWillMount() {
23
+  componentWillMount () {
24
     savePoint({
24
     savePoint({
25
       event: 'list',
25
       event: 'list',
26
       eventType: 'agent',
26
       eventType: 'agent',
35
   }
35
   }
36
 
36
 
37
 
37
 
38
-  componentWillUnmount() {
38
+  componentWillUnmount () {
39
     const { recordId } = this.state
39
     const { recordId } = this.state
40
     recordId && updatePoint(recordId)
40
     recordId && updatePoint(recordId)
41
   }
41
   }
42
-  componentDidMount() {
42
+  componentDidMount () {
43
     this.loadList()
43
     this.loadList()
44
   }
44
   }
45
   //获取楼盘列表
45
   //获取楼盘列表
46
-  loadGetFloor() {
46
+  loadGetFloor () {
47
     const params = {
47
     const params = {
48
       pageNumber: 1,
48
       pageNumber: 1,
49
       pageSize: 50,
49
       pageSize: 50,
55
       })
55
       })
56
     })
56
     })
57
   }
57
   }
58
-  loadList() {
58
+  loadList () {
59
     var that = this;
59
     var that = this;
60
     const params = {
60
     const params = {
61
       pageNumber: 1,
61
       pageNumber: 1,
71
     })
71
     })
72
   }
72
   }
73
 
73
 
74
-  formatDate(value) {
74
+  formatDate (value) {
75
     return dayjs(value).format('YYYY-MM-DD')
75
     return dayjs(value).format('YYYY-MM-DD')
76
   }
76
   }
77
-  navigateTo(id) {
77
+  navigateTo (id) {
78
     Taro.navigateTo({ url: `/pages/agent/progress/index?customerId=${id}` })
78
     Taro.navigateTo({ url: `/pages/agent/progress/index?customerId=${id}` })
79
   }
79
   }
80
-  getName(dict, id) {
80
+  getName (dict, id) {
81
     dict = dict.records || []
81
     dict = dict.records || []
82
     // let floorName = (dict.filter(({ buildingId: target }) => id === target)[0] || {}).name
82
     // let floorName = (dict.filter(({ buildingId: target }) => id === target)[0] || {}).name
83
     return (dict.filter(({ buildingId: target }) => id === target)[0] || {}).buildingName
83
     return (dict.filter(({ buildingId: target }) => id === target)[0] || {}).buildingName
84
 
84
 
85
   }
85
   }
86
-  render() {
86
+
87
+  toRecomonedPage () {
88
+    Taro.navigateTo({
89
+      url: `/pages/agent/recommend/index`
90
+    })
91
+  }
92
+  render () {
87
     const { list, status, floorList } = this.state
93
     const { list, status, floorList } = this.state
88
     return (
94
     return (
89
       <View className='myClient'>
95
       <View className='myClient'>
113
               {
119
               {
114
                 list.map((item, index) => {
120
                 list.map((item, index) => {
115
                   return (
121
                   return (
116
-                    <View className='client__list' key={index+'client'} onClick={this.navigateTo.bind(this, item.customerId)}>
122
+                    <View className='client__list' key={index + 'client'} onClick={this.navigateTo.bind(this, item.customerId)}>
117
                       <Image className='bg' src={item.verifyStatus == 2 ? require('@assets/person/card1.png') : require('@assets/person/card2.png')}></Image>
123
                       <Image className='bg' src={item.verifyStatus == 2 ? require('@assets/person/card1.png') : require('@assets/person/card2.png')}></Image>
118
                       <View className='client'>
124
                       <View className='client'>
119
                         <View className='client__status2'>
125
                         <View className='client__status2'>
145
           </View>
151
           </View>
146
         }
152
         }
147
 
153
 
154
+        {/* <View className='recommend' onClick={this.toRecomonedPage}>123</View> */}
155
+        <View className="recommend"  onClick={this.toRecomonedPage}  >
156
+        <Image src={require('@assets/tuijiankehu.png')} className='home-img'></Image>
157
+        <Text className="text">推荐</Text>
158
+      </View>
148
       </View>
159
       </View>
149
     );
160
     );
150
   }
161
   }

+ 37
- 0
src/pages/agent/client/index.scss View File

151
   left:0;
151
   left:0;
152
   tpop:0;
152
   tpop:0;
153
   padding:50px;
153
   padding:50px;
154
+}
155
+
156
+// .recommend{
157
+//   position:absolute;
158
+//   right: 0;
159
+//   bottom: 60px;
160
+//   k
161
+// }
162
+.recommend {
163
+  position: fixed;
164
+  bottom: 16%;
165
+  right: 5%;
166
+  width: 104px;
167
+  height: 104px;
168
+  border-radius: 50%;
169
+  background-color: $primary-color;
170
+  box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.25);
171
+  z-index: 99;
172
+  display: flex;
173
+  flex-direction: column;
174
+  justify-content: center;
175
+  align-items: center;
176
+
177
+  .iconfont {
178
+    color: white;
179
+    font-size: 40px;
180
+  }
181
+  .home-img{
182
+    width: 38px;
183
+    height: 34px;
184
+    margin: 3px 0;
185
+  }
186
+  .text {
187
+    color: white;
188
+    font-size: 22px;
189
+  }
190
+
154
 }
191
 }

+ 1
- 1
src/pages/card/index.js View File

435
                   <Image className='mycard__user__img' src={picture} mode="widthFix"></Image>
435
                   <Image className='mycard__user__img' src={picture} mode="widthFix"></Image>
436
                   <Image src={picture} mode="aspectFill" className='head__img'></Image>
436
                   <Image src={picture} mode="aspectFill" className='head__img'></Image>
437
                 </View>
437
                 </View>
438
-                <Image src={require('@assets/person/top.png')} className='top-img' mode="widthFix"></Image>
438
+                <Image src={require('@assets/person/top.png')} className='top-img' mode="aspectFill"></Image>
439
               </View>
439
               </View>
440
 
440
 
441
               <View className='mycard__user__information'>
441
               <View className='mycard__user__information'>

+ 3
- 2
src/pages/card/index.scss View File

67
       position: absolute;
67
       position: absolute;
68
       width: 100%;
68
       width: 100%;
69
       bottom: 0%;
69
       bottom: 0%;
70
-      height: 100px;
70
+      height: 101px;
71
+      
71
     }
72
     }
72
 
73
 
73
     .head__img {
74
     .head__img {
75
       bottom: 0%;
76
       bottom: 0%;
76
       left: 5%;
77
       left: 5%;
77
       width: 150px;
78
       width: 150px;
78
-      height: 150px;
79
+      height: 149px;
79
       border-radius: 50%;
80
       border-radius: 50%;
80
       border: 4px solid rgba(255, 255, 255, 1);
81
       border: 4px solid rgba(255, 255, 255, 1);
81
       z-index: 2;
82
       z-index: 2;

+ 9
- 6
src/pages/person/index.js View File

54
     }
54
     }
55
 
55
 
56
     doUserSignin({ id }).then(res => {
56
     doUserSignin({ id }).then(res => {
57
-      Taro.showToast({
57
+      Taro.Toast({
58
         title: '签到成功'
58
         title: '签到成功'
59
       })
59
       })
60
       // this.setState({
60
       // this.setState({
95
       putRegisterConsultant().then(res => {
95
       putRegisterConsultant().then(res => {
96
         // console.log("匹配成功,请退出小程序重新登录即可")
96
         // console.log("匹配成功,请退出小程序重新登录即可")
97
         Taro.showToast({
97
         Taro.showToast({
98
-          title: "匹配成功,请退出小程序重新登录即可"
98
+          title: "匹配成功,请退出小程序重新登录即可",
99
+          icon: "none",
100
+          duration:3000
99
         })
101
         })
100
       }).catch(err => {
102
       }).catch(err => {
101
         console.error(err)
103
         console.error(err)
102
         Taro.showToast({
104
         Taro.showToast({
103
           title: "匹配失败,请联系相关管理人员",
105
           title: "匹配失败,请联系相关管理人员",
104
-          icon: "none"
106
+          icon: "none",
107
+          duration:3000
105
         })
108
         })
106
       })
109
       })
107
     }
110
     }
170
                 <View className="info-text__name">{user.name ? user.name : user.nickname}</View>
173
                 <View className="info-text__name">{user.name ? user.name : user.nickname}</View>
171
                 <View className="info-text__intro">积分 {user.points || 0}</View>
174
                 <View className="info-text__intro">积分 {user.points || 0}</View>
172
               </View>
175
               </View>
173
-              {/* {
174
-                user.personType != 'customer' && (
176
+              {
177
+                user.personType == 'consultant' && (
175
                   <Navigator url={`/pages/person/spread/index`} className="tuiguang">
178
                   <Navigator url={`/pages/person/spread/index`} className="tuiguang">
176
                     <Image style="width:40px;height:36px" src={require('@assets/mine/tuiguangma.png')} ></Image>
179
                     <Image style="width:40px;height:36px" src={require('@assets/mine/tuiguangma.png')} ></Image>
177
                     <View className="info-text__intro" style="margin:4px 0 0 4px">推广码</View>
180
                     <View className="info-text__intro" style="margin:4px 0 0 4px">推广码</View>
178
                   </Navigator>
181
                   </Navigator>
179
                 )
182
                 )
180
-              } */}
183
+              }
181
             </View>
184
             </View>
182
             {/* <View
185
             {/* <View
183
               className={`sign__btn ${user.havaSigned && 'signed'}`}
186
               className={`sign__btn ${user.havaSigned && 'signed'}`}

+ 9
- 8
src/pages/person/menus.js View File

15
   feedback: require('@assets/mine/feedback.png'),
15
   feedback: require('@assets/mine/feedback.png'),
16
   client: require('@assets/mine/client.png'),
16
   client: require('@assets/mine/client.png'),
17
   consultant: require('@assets/mine/consultant.png'),
17
   consultant: require('@assets/mine/consultant.png'),
18
+  customerAnalysis: require('@assets/mine/customerAnalysis.png'),
18
 }
19
 }
19
 
20
 
20
 const DRIFT = ROLE_CODE['DRIFT']
21
 const DRIFT = ROLE_CODE['DRIFT']
43
     {
44
     {
44
       name: '盘客工具',
45
       name: '盘客工具',
45
       url: '/pages/person/customerAnalysis/index',
46
       url: '/pages/person/customerAnalysis/index',
46
-      icon: icons.homepage,
47
+      icon: icons.customerAnalysis,
47
       extends: undefined,
48
       extends: undefined,
48
       userTypes: [CONSULTANT],
49
       userTypes: [CONSULTANT],
49
       style: '',
50
       style: '',
72
     // },
73
     // },
73
   ],
74
   ],
74
   [
75
   [
75
-    {
76
-      name: '我的客户',
77
-      url: '/pages/person/myGuest/index',
78
-      icon: icons.client,
79
-      extends: undefined,
80
-      userTypes: [CONSULTANT],
81
-    },
76
+    // {
77
+    //   name: '我的客户',
78
+    //   url: '/pages/person/myGuest/index',
79
+    //   icon: icons.client,
80
+    //   extends: undefined,
81
+    //   userTypes: [CONSULTANT],
82
+    // },
82
     {
83
     {
83
       name: '我的活动',
84
       name: '我的活动',
84
       url: '/pages/activity/myActivity?from=mine',
85
       url: '/pages/activity/myActivity?from=mine',

+ 1
- 1
src/pages/project/album/index.js View File

76
                 return (<View>
76
                 return (<View>
77
                   {buildingImgList.length>0&&
77
                   {buildingImgList.length>0&&
78
                   <View
78
                   <View
79
-                    style={{ padding: '0 20px ' }}
79
+                    // style={{ padding: '0 20px ' }}
80
                     key={current}
80
                     key={current}
81
                     className={`around-tab__item ${current === index ? 'active' : ''}`}
81
                     className={`around-tab__item ${current === index ? 'active' : ''}`}
82
                     onClick={() => this.setState({ current: index })}
82
                     onClick={() => this.setState({ current: index })}

+ 2
- 2
src/pages/project/banner/index.js View File

3
 // import { cdn } from '@constants/api'
3
 // import { cdn } from '@constants/api'
4
 import './index.scss'
4
 import './index.scss'
5
 import emptyImg from '@assets/empty.png'
5
 import emptyImg from '@assets/empty.png'
6
-import { getThumbnail } from '@utils/tools'
6
+import { getThumbnail, resizeImage } from '@utils/tools'
7
 
7
 
8
 export default class SwiperBanner extends Component {
8
 export default class SwiperBanner extends Component {
9
   static defaultProps = {
9
   static defaultProps = {
54
                 mode="widthFix"
54
                 mode="widthFix"
55
                 style={style}
55
                 style={style}
56
                 className='home-banner__swiper-item-img'
56
                 className='home-banner__swiper-item-img'
57
-                src={getThumbnail(item.image || item.url || item.img || emptyImg)}
57
+                src={resizeImage(item.image || item.url || item.img || emptyImg)}
58
               />
58
               />
59
             </SwiperItem>
59
             </SwiperItem>
60
           ))}
60
           ))}

+ 6
- 5
src/pages/project/detail/index.js View File

47
     activityList: [],
47
     activityList: [],
48
     helpList: [],
48
     helpList: [],
49
     groupList: [],
49
     groupList: [],
50
-    statusOpts: ['待定', '在建', '在售'],
50
+    statusOpts: ['待定', '售罄', '在售'],
51
     // circumOpts: [],
51
     // circumOpts: [],
52
     curTab: 'Transport',
52
     curTab: 'Transport',
53
     recordId: null,
53
     recordId: null,
375
     const {
375
     const {
376
       userInfo: { person: { personType } }
376
       userInfo: { person: { personType } }
377
     } = this.props
377
     } = this.props
378
-    if (personType === ROLE_CODE['DRIFT'] || personType === ROLE_CODE['CUSTOMER']) {
379
-      // 游客或者客户 区别是否有电话
378
+    if (personType === ROLE_CODE['DRIFT'] ) {
379
+      // 游客或者客户 区别是否有电话|| personType === ROLE_CODE['CUSTOMER']
380
       Taro.navigateTo({
380
       Taro.navigateTo({
381
         url: `/pages/agent/become/index`
381
         url: `/pages/agent/become/index`
382
       })
382
       })
790
                       {
790
                       {
791
                         item && (
791
                         item && (
792
                           <View className='house__img-info'>
792
                           <View className='house__img-info'>
793
+                            {console.log(list,'-------')}
793
                             <Image className='house__img' src={getThumbnail(item.buildingImgList[0].url)} mode="widthFix" onClick={this.handlePreviewHxImage.bind(this, item.buildingImgList[0].url, imgUrls)}></Image>
794
                             <Image className='house__img' src={getThumbnail(item.buildingImgList[0].url)} mode="widthFix" onClick={this.handlePreviewHxImage.bind(this, item.buildingImgList[0].url, imgUrls)}></Image>
794
                             <View className='house-type__state'>{statusOpts[item.marketStatus - 1]}</View>
795
                             <View className='house-type__state'>{statusOpts[item.marketStatus - 1]}</View>
795
                           </View>
796
                           </View>
796
                         )
797
                         )
797
                       }
798
                       }
798
                       <View className="rest-info">
799
                       <View className="rest-info">
799
-                        <View className='house-type__name'><Text style="color:#FA5431;margin-right:10px">{item.buildingArea || ''}</Text>{item.apartmentName || ''}</View>
800
+                        <View className='house-type__name'>{item.apartmentName || ''}</View>
800
                         <View className='construction__area'>
801
                         <View className='construction__area'>
801
                           <Text>建面{item.buildingArea || ''}m²</Text>
802
                           <Text>建面{item.buildingArea || ''}m²</Text>
802
                           {
803
                           {
963
           // controls={false}
964
           // controls={false}
964
           // autoplay={false}
965
           // autoplay={false}
965
           // initialTime='0'
966
           // initialTime='0'
966
-          // loop={false}
967
+          loop={true}
967
           // muted={false}
968
           // muted={false}
968
 
969
 
969
           show-mute-btn='true'
970
           show-mute-btn='true'

+ 1
- 1
src/pages/project/item/index.scss View File

23
       top:0 ;
23
       top:0 ;
24
       left:0;
24
       left:0;
25
       background:rgba(246,182,29,1);
25
       background:rgba(246,182,29,1);
26
-      border-radius:18px 0px 12px 0px;
26
+      border-radius:12px 0px 12px 0px;
27
       padding: 10px 36px;
27
       padding: 10px 36px;
28
       color: #fff;
28
       color: #fff;
29
       font-size: 26px;
29
       font-size: 26px;

+ 0
- 1
src/utils/request.js View File

28
  */
28
  */
29
 export const fetch = async (options) => {
29
 export const fetch = async (options) => {
30
   const { url, payload, method = 'GET', showToast = true, autoLogin = true } = options
30
   const { url, payload, method = 'GET', showToast = true, autoLogin = true } = options
31
-  // console.log(Taro.getStorageSync('token'),'----token---')
32
   return Taro.request({
31
   return Taro.request({
33
     url,
32
     url,
34
     method,
33
     method,

+ 11
- 0
src/utils/tools.js View File

19
   return img
19
   return img
20
 }
20
 }
21
 
21
 
22
+
23
+export function resizeImage(img, size) {
24
+  if (!img) return img
25
+
26
+  if (img.indexOf('https://estateagents.oss-cn-shanghai.aliyuncs.com') === 0) {
27
+    return `${img}?x-oss-process=style/resize${size || 750}`
28
+  }
29
+
30
+  return img
31
+}
32
+
22
 /**
33
 /**
23
  * 解析 queryString   a=b&c=d  ==> { a:b, c:d }
34
  * 解析 queryString   a=b&c=d  ==> { a:b, c:d }
24
  * @param {*} queryString 
35
  * @param {*} queryString