Ver código fonte

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

许静 5 anos atrás
pai
commit
695c0f1cf4

+ 4
- 4
config/dev.js Ver arquivo

@@ -5,12 +5,12 @@ 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
-    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 15
   weapp: {},
16 16
   h5: {}

+ 4
- 4
config/prod.js Ver arquivo

@@ -3,10 +3,10 @@ module.exports = {
3 3
     NODE_ENV: '"production"'
4 4
   },
5 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 10
     //   HOST: '"https://lt.pawoma.cn"',
11 11
     //   WSS_HOST: '"wss://lt.pawoma.cn"',
12 12
   },

+ 1
- 1
project.config.json Ver arquivo

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

BIN
src/assets/mine/customerAnalysis.png Ver arquivo


BIN
src/assets/tuijiankehu.png Ver arquivo


+ 21
- 10
src/pages/agent/client/index.js Ver arquivo

@@ -20,7 +20,7 @@ export default class Index extends Component {
20 20
     floor: '',
21 21
     recordId: null
22 22
   }
23
-  componentWillMount() {
23
+  componentWillMount () {
24 24
     savePoint({
25 25
       event: 'list',
26 26
       eventType: 'agent',
@@ -35,15 +35,15 @@ export default class Index extends Component {
35 35
   }
36 36
 
37 37
 
38
-  componentWillUnmount() {
38
+  componentWillUnmount () {
39 39
     const { recordId } = this.state
40 40
     recordId && updatePoint(recordId)
41 41
   }
42
-  componentDidMount() {
42
+  componentDidMount () {
43 43
     this.loadList()
44 44
   }
45 45
   //获取楼盘列表
46
-  loadGetFloor() {
46
+  loadGetFloor () {
47 47
     const params = {
48 48
       pageNumber: 1,
49 49
       pageSize: 50,
@@ -55,7 +55,7 @@ export default class Index extends Component {
55 55
       })
56 56
     })
57 57
   }
58
-  loadList() {
58
+  loadList () {
59 59
     var that = this;
60 60
     const params = {
61 61
       pageNumber: 1,
@@ -71,19 +71,25 @@ export default class Index extends Component {
71 71
     })
72 72
   }
73 73
 
74
-  formatDate(value) {
74
+  formatDate (value) {
75 75
     return dayjs(value).format('YYYY-MM-DD')
76 76
   }
77
-  navigateTo(id) {
77
+  navigateTo (id) {
78 78
     Taro.navigateTo({ url: `/pages/agent/progress/index?customerId=${id}` })
79 79
   }
80
-  getName(dict, id) {
80
+  getName (dict, id) {
81 81
     dict = dict.records || []
82 82
     // let floorName = (dict.filter(({ buildingId: target }) => id === target)[0] || {}).name
83 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 93
     const { list, status, floorList } = this.state
88 94
     return (
89 95
       <View className='myClient'>
@@ -113,7 +119,7 @@ export default class Index extends Component {
113 119
               {
114 120
                 list.map((item, index) => {
115 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 123
                       <Image className='bg' src={item.verifyStatus == 2 ? require('@assets/person/card1.png') : require('@assets/person/card2.png')}></Image>
118 124
                       <View className='client'>
119 125
                         <View className='client__status2'>
@@ -145,6 +151,11 @@ export default class Index extends Component {
145 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 159
       </View>
149 160
     );
150 161
   }

+ 37
- 0
src/pages/agent/client/index.scss Ver arquivo

@@ -151,4 +151,41 @@
151 151
   left:0;
152 152
   tpop:0;
153 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 Ver arquivo

@@ -435,7 +435,7 @@ export default class Index extends Component {
435 435
                   <Image className='mycard__user__img' src={picture} mode="widthFix"></Image>
436 436
                   <Image src={picture} mode="aspectFill" className='head__img'></Image>
437 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 439
               </View>
440 440
 
441 441
               <View className='mycard__user__information'>

+ 3
- 2
src/pages/card/index.scss Ver arquivo

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

+ 9
- 6
src/pages/person/index.js Ver arquivo

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

+ 9
- 8
src/pages/person/menus.js Ver arquivo

@@ -15,6 +15,7 @@ const icons = {
15 15
   feedback: require('@assets/mine/feedback.png'),
16 16
   client: require('@assets/mine/client.png'),
17 17
   consultant: require('@assets/mine/consultant.png'),
18
+  customerAnalysis: require('@assets/mine/customerAnalysis.png'),
18 19
 }
19 20
 
20 21
 const DRIFT = ROLE_CODE['DRIFT']
@@ -43,7 +44,7 @@ const menus = [
43 44
     {
44 45
       name: '盘客工具',
45 46
       url: '/pages/person/customerAnalysis/index',
46
-      icon: icons.homepage,
47
+      icon: icons.customerAnalysis,
47 48
       extends: undefined,
48 49
       userTypes: [CONSULTANT],
49 50
       style: '',
@@ -72,13 +73,13 @@ const menus = [
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 84
       name: '我的活动',
84 85
       url: '/pages/activity/myActivity?from=mine',

+ 1
- 1
src/pages/project/album/index.js Ver arquivo

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

+ 2
- 2
src/pages/project/banner/index.js Ver arquivo

@@ -3,7 +3,7 @@ import { View, Swiper, SwiperItem, Image } from '@tarojs/components'
3 3
 // import { cdn } from '@constants/api'
4 4
 import './index.scss'
5 5
 import emptyImg from '@assets/empty.png'
6
-import { getThumbnail } from '@utils/tools'
6
+import { getThumbnail, resizeImage } from '@utils/tools'
7 7
 
8 8
 export default class SwiperBanner extends Component {
9 9
   static defaultProps = {
@@ -54,7 +54,7 @@ export default class SwiperBanner extends Component {
54 54
                 mode="widthFix"
55 55
                 style={style}
56 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 59
             </SwiperItem>
60 60
           ))}

+ 6
- 5
src/pages/project/detail/index.js Ver arquivo

@@ -47,7 +47,7 @@ export default class Index extends Component {
47 47
     activityList: [],
48 48
     helpList: [],
49 49
     groupList: [],
50
-    statusOpts: ['待定', '在建', '在售'],
50
+    statusOpts: ['待定', '售罄', '在售'],
51 51
     // circumOpts: [],
52 52
     curTab: 'Transport',
53 53
     recordId: null,
@@ -375,8 +375,8 @@ export default class Index extends Component {
375 375
     const {
376 376
       userInfo: { person: { personType } }
377 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 380
       Taro.navigateTo({
381 381
         url: `/pages/agent/become/index`
382 382
       })
@@ -790,13 +790,14 @@ export default class Index extends Component {
790 790
                       {
791 791
                         item && (
792 792
                           <View className='house__img-info'>
793
+                            {console.log(list,'-------')}
793 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 795
                             <View className='house-type__state'>{statusOpts[item.marketStatus - 1]}</View>
795 796
                           </View>
796 797
                         )
797 798
                       }
798 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 801
                         <View className='construction__area'>
801 802
                           <Text>建面{item.buildingArea || ''}m²</Text>
802 803
                           {
@@ -963,7 +964,7 @@ export default class Index extends Component {
963 964
           // controls={false}
964 965
           // autoplay={false}
965 966
           // initialTime='0'
966
-          // loop={false}
967
+          loop={true}
967 968
           // muted={false}
968 969
 
969 970
           show-mute-btn='true'

+ 1
- 1
src/pages/project/item/index.scss Ver arquivo

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

+ 0
- 1
src/utils/request.js Ver arquivo

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

+ 11
- 0
src/utils/tools.js Ver arquivo

@@ -19,6 +19,17 @@ export function getThumbnail(img, quality) {
19 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 34
  * 解析 queryString   a=b&c=d  ==> { a:b, c:d }
24 35
  * @param {*} queryString