周立森 5 年之前
父節點
當前提交
1477b90748

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

@@ -3,7 +3,7 @@ module.exports = {
3 3
     NODE_ENV: '"development"'
4 4
   },
5 5
   defineConstants: {
6
-		// HOST: '"http://47.101.36.130:8085"',//测试
6
+    // HOST: '"http://47.101.36.130:8085"',//测试
7 7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8 8
     // HOST: '"https://dev.jinchengjiaye.com"',//测试
9 9
     // WSS_HOST: '"wss://dev.jinchengjiaye.com"',

+ 1
- 1
project.config.json 查看文件

@@ -2,7 +2,7 @@
2 2
 	"miniprogramRoot": "dist/",
3 3
 	"projectname": "mini-chengjiao",
4 4
 	"description": "dev环境",
5
-	"appid": "wxda1f84b79b3edeb3",
5
+	"appid": "wxd9ee3a9480a4e544",
6 6
 	"setting": {
7 7
 		"urlCheck": false,
8 8
 		"es6": false,

+ 21
- 0
src/pages/activity/activity.js 查看文件

@@ -21,6 +21,27 @@ export default class active extends Component {
21 21
 
22 22
   state = {
23 23
     current: 0,
24
+    recordId: undefined, // 埋点ID
25
+  }
26
+  
27
+  componentWillMount() {
28
+    // App.zhuge.track('查看活动列表页面')
29
+    savePoint({
30
+      event: 'list',
31
+      eventType: 'activity',
32
+      propertyName: '活动列表',
33
+      data: '{}'
34
+    }).then(res => {
35
+      this.setState({
36
+        recordId: res.recordId
37
+      })
38
+      console.log('活动列表')
39
+    })
40
+  }
41
+
42
+  componentWillUnmount() {
43
+    const { recordId } = this.state
44
+    recordId && updatePoint(recordId)
24 45
   }
25 46
 
26 47
   handleClick(value) {

+ 9
- 5
src/pages/activity/detail/assemble.js 查看文件

@@ -63,6 +63,7 @@ export default class Detail extends Component {
63 63
     posterVisible: false, // 海报分享
64 64
     grantPhoneVisible: false, // 授权电话
65 65
     grantAvatarVisible: false, // 授权头像
66
+    pointRecordId: undefined, // 埋点ID
66 67
   }
67 68
 
68 69
   componentWillMount() {
@@ -76,6 +77,7 @@ export default class Detail extends Component {
76 77
 
77 78
   componentWillUnmount() {
78 79
     this.clearTicker()
80
+    this.state.pointRecordId && updatePoint(pointRecordId)
79 81
   }
80 82
 
81 83
   // 初始化页面数据
@@ -218,7 +220,9 @@ export default class Detail extends Component {
218 220
         buildingId: res.taShareActivity.buildingId,
219 221
         targetId: id,
220 222
         data: '{"recordId":"' + recordId + '"}'
221
-      }).then(() => { })
223
+      }).then((res) => {
224
+        this.setState({ pointRecordId: res.recordId })
225
+      })
222 226
     })
223 227
   }
224 228
 
@@ -334,11 +338,11 @@ export default class Detail extends Component {
334 338
           avatarurl: person.avatarurl,
335 339
         }).then(res => {
336 340
           this.setState({
337
-            recordDetail: res,
338
-            recordId: res.recordId,
339
-            memberList: [],
341
+            recordDetail: res.taShareRecord,
342
+            recordId: res.taShareRecord.recordId,
343
+            memberList: res.shareChildRecordList || [],
340 344
             isStarter: true,
341
-            groupState: GroupInProcess,
345
+            groupState: res.taShareRecord.status === undefined ? GroupInProcess : res.taShareRecord.status,
342 346
           }, resolve)
343 347
         }).catch(err => {
344 348
           console.log('err:', err)

+ 9
- 6
src/pages/activity/detail/assistance.js 查看文件

@@ -62,6 +62,7 @@ export default class Detail extends Component {
62 62
     grantPhoneVisible: false, // 授权电话
63 63
     grantAvatarVisible: false, // 授权头像
64 64
     handleHelpBtn: true, // 立即助力好友
65
+    pointRecordId: undefined, // 埋点ID
65 66
   }
66 67
 
67 68
   componentWillMount() {
@@ -75,6 +76,7 @@ export default class Detail extends Component {
75 76
 
76 77
   componentWillUnmount() {
77 78
     this.clearTicker()
79
+    this.state.pointRecordId && updatePoint(pointRecordId)
78 80
   }
79 81
 
80 82
   // 初始化页面数据
@@ -220,7 +222,9 @@ export default class Detail extends Component {
220 222
         buildingId: res.helpActivity.buildingId,
221 223
         targetId: id,
222 224
         data: '{"initiateId":"' + initiateId + '"}'
223
-      }).then(() => { })
225
+      }).then((res) => {
226
+        this.setState({ pointRecordId: res.recordId })
227
+      })
224 228
     })
225 229
   }
226 230
 
@@ -337,12 +341,11 @@ export default class Detail extends Component {
337 341
           avatarurl: person.avatarurl,
338 342
         }).then(res => {
339 343
           this.setState({
340
-            initiateDetail: res,
341
-            initiateId: res.helpRecordInitiateId,
342
-            // helpList: res.helpRecordList,  // bug #5282
343
-            helpList: [],
344
+            initiateDetail: res.helpInitiateRecord,
345
+            initiateId: res.helpInitiateRecord.helpRecordInitiateId,
346
+            helpList: res.helpRecordList,
344 347
             isStarter: true,
345
-            helpState: HelpInProcess,
348
+            helpState: res.helpInitiateRecord.status === undefined ? HelpInProcess : res.helpInitiateRecord.status,
346 349
           }, resolve)
347 350
         }).catch(err => {
348 351
           console.log('err:', err)

+ 29
- 28
src/pages/activity/detail/index.js 查看文件

@@ -317,37 +317,38 @@ export default class Detail extends Component {
317 317
               <ScrollView
318 318
                 scrollY
319 319
                 className="detail-wrap">
320
-              <View className="detail">
321
-                {detail.isEnlist == 0 &&
322
-                  <View className="detail-sign__num">不需要报名</View>
323
-                }
324
-                {detail.isEnlist != 0 &&
325
-                  <View className="detail-sign__num">{detail.enlisted || 0}人已报名</View>
326
-                }
327
-                <View class="detail-title">{detail.title}</View>
328
-                <View className="detail-top">
329
-                  <View className="detail-top__row">
330
-                    <Text className="row-label">活动时间:</Text>
331
-                    <Text className="row-content">{dayjs(detail.startDate).format('YYYY-MM-DD HH:mm:ss')}</Text>
332
-                  </View>
333
-                  <View className="detail-top__row">
334
-                    <Text className="row-label">活动地址:</Text>
335
-                    <Text className="row-content">{detail.address}</Text>
336
-                  </View>
337
-                  <View className="detail-top__row">
338
-                    <Text className="row-label">报名截止:</Text>
339
-                    {detail.enlistEnd &&
340
-                      <Text className="row-content">{dayjs(detail.enlistEnd).format('YYYY-MM-DD HH:mm:ss')}</Text>
320
+                <View className="detail">
321
+                  {detail.isEnlist == 0 &&
322
+                    <View className="detail-sign__num">不需要报名</View>
323
+                  }
324
+                  {detail.isEnlist != 0 &&
325
+                    <View className="detail-sign__num">{detail.enlisted || 0}人已报名</View>
326
+                  }
327
+                  <View class="detail-title">{detail.title}</View>
328
+                  <View className="detail-top">
329
+                    <View className="detail-top__row">
330
+                      <Text className="row-label">活动时间:</Text>
331
+                      <Text className="row-content">{dayjs(detail.startDate).format('YYYY-MM-DD HH:mm:ss')}</Text>
332
+                    </View>
333
+                    <View className="detail-top__row">
334
+                      <Text className="row-label">活动地址:</Text>
335
+                      <Text className="row-content">{detail.address}</Text>
336
+                    </View>
337
+                    {detail.isEnlist != 0 &&
338
+                      <View className="detail-top__row">
339
+                        <Text className="row-label">报名截止:</Text>
340
+                        {detail.enlistEnd &&
341
+                          <Text className="row-content">{dayjs(detail.enlistEnd).format('YYYY-MM-DD HH:mm:ss')}</Text>
342
+                        }
343
+                      </View>
341 344
                     }
342
-
345
+                  </View>
346
+                  <View className="detail-con">
347
+                    <View className="detail-con__title">活动详情</View>
348
+                    <import src='../../../components/wxParse/wxParse.wxml' />
349
+                    <template is='wxParse' data='{{wxParseData:article.nodes}}' />
343 350
                   </View>
344 351
                 </View>
345
-                <View className="detail-con">
346
-                  <View className="detail-con__title">活动详情</View>
347
-                  <import src='../../../components/wxParse/wxParse.wxml' />
348
-                  <template is='wxParse' data='{{wxParseData:article.nodes}}' />
349
-                </View>
350
-              </View>
351 352
               </ScrollView>
352 353
 
353 354
               <View className="chat-entrance" onClick={this.handleMoreClick}>

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

@@ -44,7 +44,7 @@ export default class Index extends Component {
44 44
   
45 45
   componentWillUnmount() {
46 46
     const { recordId } = this.state
47
-    updatePoint(recordId)
47
+    recordId && updatePoint(recordId)
48 48
   }
49 49
 
50 50
   loadList(pageNumber) {

+ 2
- 2
src/pages/activity/item/index.js 查看文件

@@ -40,8 +40,8 @@ export default class Item extends Component {
40 40
             {data.endDate &&
41 41
               <View className="time">参与截止时间:{`${dayjs(data.endDate).format('YYYY年MM月DD日 HH:mm:ss')}`}</View>
42 42
             }
43
-            {!data.endDate &&
44
-              <View className="time">参与截止时间:</View>
43
+            {!data.endDate  &&
44
+              <View className="time">{data.type != 'dynamic'?'参与截止时间:':''}</View>
45 45
             }
46 46
             <View className={data.activityStatus == 0 ? "btn jionin " : data.activityStatus == 1 ? "btn nostart" : data.activityStatus == 2 ? "btn jioned" : "btn"}>{data.activityStatus == 0 ? "立即参与" : data.activityStatus == 1 ? "未开始" : data.activityStatus == 2 ? "已结束" : "已参与"}</View>
47 47
           </View>

+ 3
- 0
src/pages/agent/client/index.scss 查看文件

@@ -124,6 +124,9 @@
124 124
 
125 125
 .phone{
126 126
   line-height:50px;
127
+  width: 480px;
128
+  @include text-ellipsis; 
129
+
127 130
 }
128 131
 
129 132
 .time{

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

@@ -470,9 +470,9 @@ export default class Index extends Component {
470 470
 
471 471
                 {/* 职位 */}
472 472
                 <View className='mycard__work'>
473
-                  <View className='row mycard__work-department'>{cardInfo.department}<Text className='txt'>部门</Text></View>
474
-                  <View className='row mycard__work-position'>{cardInfo.post}<Text className='txt'>职位</Text></View>
475
-                  <View className='row mycard__work-company'>{projectDetail.buildingName}<Text className='txt'>楼盘</Text></View>
473
+                  <View className='row mycard__work-department'>{cardInfo.department || ''}<Text className='txt'>部门</Text></View>
474
+                  <View className='row mycard__work-position'>{cardInfo.post || ''}<Text className='txt'>职位</Text></View>
475
+                  <View className='row mycard__work-company'>{projectDetail.buildingName || ''}<Text className='txt'>楼盘</Text></View>
476 476
                 </View>
477 477
 
478 478
                 {/* 人气 */}

+ 10
- 14
src/pages/checkin/index.js 查看文件

@@ -71,9 +71,7 @@ export default class checkin extends Component {
71 71
   }
72 72
 
73 73
   render () {
74
-    const { data, style } = this.props
75
-
76
-
74
+    const { data = { person: {}, dynamic: {} }, style } = this.props
77 75
 
78 76
     return (
79 77
       <View className="checkin" style="width:100vw;height:100vh;" >
@@ -81,13 +79,13 @@ export default class checkin extends Component {
81 79
         {/* <checkinsuccess></checkinsuccess> */}
82 80
         {/* <achievePhone></achievePhone> */}
83 81
         <View>
84
-          <Image className="img" src={this.state.data.dynamic.imgUrl}  ></Image>
82
+          <Image className="img" src={data.dynamic.imgUrl}  ></Image>
85 83
         </View>
86 84
         <View style="margin-bottom:20px"  >
87
-          <View className="text1"> <Text>{this.state.data.dynamic.title}</Text></View>
85
+          <View className="text1"> <Text>{data.dynamic.title}</Text></View>
88 86
         </View >
89 87
 
90
-        {this.state.data.enlist != null && <View>
88
+        {data.enlist != null && <View>
91 89
           <View style="text-align: center;">
92 90
             <Text className="line">- - - - - - - - - </Text>
93 91
             <Text className="text2">活动报名信息</Text>
@@ -97,24 +95,22 @@ export default class checkin extends Component {
97 95
           <View className="text3">
98 96
             <View className='at-row'>
99 97
               <View className='at-col at-col-3'>用户名:</View>
100
-              <View className='at-col at-col-9'>{this.state.data.person.name || this.state.data.person.nickname}</View>
98
+              <View className='at-col at-col-9'>{data.person.name || data.person.nickname}</View>
101 99
             </View>
102 100
             <View className='at-row'>
103 101
               <View className='at-col at-col-3'>手机号:</View>
104
-              <View className='at-col at-col-9'>{this.state.data.person.tel || this.state.data.person.phone}</View>
102
+              <View className='at-col at-col-9'>{data.person.tel || data.person.phone}</View>
105 103
             </View>
106 104
             <View className='at-row'>
107 105
               <View className='at-col at-col-3'>参与人数:</View>
108
-              <View className='at-col at-col-9'>{this.state.data.enlist.attendNum}</View>
106
+              <View className='at-col at-col-9'>{(data.enlist || {}).attendNum}</View>
109 107
             </View>
110 108
           </View>
111 109
 
112
-
113
-
114
-          {!this.state.data.person.status && <Image className="checkinImg" src={require('@assets/checkin/checkin.png')} onClick={this.checkinActive}   ></Image>}
115
-          {this.state.data.person.status && <Image className="checkinImg" src={require('@assets/checkin/checkined.png')}></Image>}
110
+          {!data.person.status && <Image className="checkinImg" src={require('@assets/checkin/checkin.png')} onClick={this.checkinActive}   ></Image>}
111
+          {data.person.status && <Image className="checkinImg" src={require('@assets/checkin/checkined.png')}></Image>}
116 112
         </View>}
117
-        {this.state.data.enlist == null && <View className="unregistered">
113
+        {data.enlist == null && <View className="unregistered">
118 114
           <View>
119 115
             <Image className="img1" src={require('@assets/checkin/noentry.png')} ></Image>
120 116
           </View>

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

@@ -23,7 +23,7 @@
23 23
 
24 24
   .search-list {
25 25
     position: absolute;
26
-    top: 136px;
26
+    top: 114px;
27 27
     width: 100%;
28 28
     background: white;
29 29
     min-height: 100vh;

+ 0
- 3
src/pages/im/index.js 查看文件

@@ -375,9 +375,6 @@ export default class Chat extends Component {
375 375
     // 发送消息
376 376
     socket.sendNotice(payload, res => {
377 377
       console.log('发送成功')
378
-      this.setState({
379
-        inputText:'',
380
-      })
381 378
       this.appendData(payload)
382 379
     })
383 380
   }

+ 25
- 31
src/pages/person/index.js 查看文件

@@ -75,21 +75,12 @@ export default class Person extends Component {
75 75
     })
76 76
   }
77 77
 
78
-  toClientPage() {
79
-    const { user: { customerNum } } = this.state
80
-
81
-    if (customerNum <= 0) {
82
-      Taro.showToast({ title: '暂无客户', icon: 'none' })
83
-      return
78
+  redirectTo = (url) => {
79
+    if (typeof url === 'function') {
80
+      Taro.navigateTo({ url: url(this.state.user) })
81
+    } else {
82
+      Taro.navigateTo({ url })
84 83
     }
85
-
86
-    Taro.navigateTo({
87
-      url: '/pages/person/myGuest/index'
88
-    })
89
-  }
90
-
91
-  redirectTo(url) {
92
-    Taro.navigateTo({ url })
93 84
   }
94 85
 
95 86
   getRoleName(type) {
@@ -97,18 +88,14 @@ export default class Person extends Component {
97 88
       case ROLE_CODE['CONSULTANT']:
98 89
         this.setState({ consultant: true })
99 90
         return '置业顾问'
100
-        break;
101 91
       case ROLE_CODE['ESTATE_AGENT']:
102 92
         this.setState({ isAgent: true })
103 93
         return '独立经纪人'
104
-        break;
105 94
       case ROLE_CODE['CHANNEL_AGENT']:
106 95
         this.setState({ isAgent: true })
107 96
         return '渠道经纪人'
108
-        break;
109 97
       default:
110 98
         return '普通用户'
111
-        break;
112 99
     }
113 100
   }
114 101
 
@@ -125,12 +112,14 @@ export default class Person extends Component {
125 112
   }
126 113
 
127 114
   goPersonDetail() {
115
+
128 116
     const { user: { personType } } = this.state
129
-    if (personType == ROLE_CODE['CHANNEL_AGENT'] || personType == ROLE_CODE['ESTATE_AGENT']) {
130
-      Taro.navigateTo({
131
-        url: '/pages/person/personDetail/index'
132
-      })
133
-    }
117
+
118
+    // if (personType == ROLE_CODE['CHANNEL_AGENT'] || personType == ROLE_CODE['ESTATE_AGENT']) {
119
+    Taro.navigateTo({
120
+      url: '/pages/person/personDetail/index'
121
+    })
122
+    // }
134 123
 
135 124
   }
136 125
 
@@ -140,6 +129,7 @@ export default class Person extends Component {
140 129
 
141 130
   renderDetail() {
142 131
     const { user, menus, isAgent, consultant, tourist } = this.state
132
+    const showQRCode = user.personType === ROLE_CODE['CONSULTANT'] || ROLE_CODE['ESTATE_AGENT'] || ROLE_CODE['CHANNEL_AGENT']
143 133
     // const isConsultant = user.personType == ROLE_CODE['CONSULTANT']
144 134
     // const isConsultant = user.personType
145 135
     return (
@@ -155,13 +145,17 @@ export default class Person extends Component {
155 145
               </View>
156 146
 
157 147
               <View className="info-text" onClick={this.goPersonDetail}>
158
-                <View className="info-text__name">{user.name ? user.name : user.nickname} {/* <Text className="iconfont icon-more"></Text> */}</View>
148
+                <View className="info-text__name">{user.name ? user.name : user.nickname}</View>
159 149
                 <View className="info-text__intro">积分 {user.points || 0}</View>
160 150
               </View>
161
-              <Navigator url={`/pages/person/spread/index`} className="tuiguang">
162
-                <Image style="width:40px;height:36px" src={require('@assets/mine/tuiguangma.png')} ></Image>
163
-                <View className="info-text__intro" style="margin:4px 0 0 4px">推广码</View>
164
-              </Navigator>
151
+              {
152
+                showQRCode && (
153
+                  <Navigator url={`/pages/person/spread/index`} className="tuiguang">
154
+                    <Image style="width:40px;height:36px" src={require('@assets/mine/tuiguangma.png')} ></Image>
155
+                    <View className="info-text__intro" style="margin:4px 0 0 4px">推广码</View>
156
+                  </Navigator>
157
+                )
158
+              }
165 159
             </View>
166 160
             {/* <View
167 161
               className={`sign__btn ${user.havaSigned && 'signed'}`}
@@ -171,7 +165,7 @@ export default class Person extends Component {
171 165
           </View>
172 166
           <View className='qiandao-con'>
173 167
             <Text className='qiandao-text'>签到得积分,积分兑好礼,马上去签到吧!</Text>
174
-            <View className={user.havaSigned?'reday-qiandao-btn' : 'qiandao-btn'} onClick={this.doSign}>{user.havaSigned ? '已签到' : '签到'}</View>
168
+            <View className={user.havaSigned ? 'reday-qiandao-btn' : 'qiandao-btn'} onClick={this.doSign}>{user.havaSigned ? '已签到' : '签到'}</View>
175 169
 
176 170
             {/* <Text className='integral-cont_btn' onClick={this.goShop}>去兑换</Text> */}
177 171
 
@@ -190,7 +184,7 @@ export default class Person extends Component {
190 184
                           <View className="menu-maintext">
191 185
                             <Text className="menu-name">{menu.name}</Text>
192 186
                             <Text className="right-icon"></Text>
193
-                          </View>        
187
+                          </View>
194 188
                         </View>
195 189
                       )
196 190
                     })
@@ -210,7 +204,7 @@ export default class Person extends Component {
210 204
     return (
211 205
       <View className='wrap'>
212 206
         {(phone || tel) && this.renderDetail()}
213
-        {!phone && !tel  && this.renderLogin()}
207
+        {!phone && !tel && this.renderLogin()}
214 208
       </View>
215 209
     )
216 210
   }

+ 16
- 2
src/pages/person/menus.js 查看文件

@@ -28,7 +28,14 @@ const menus = [
28 28
       url: '/pages/agent/index',
29 29
       icon: icons.homepage,
30 30
       extends: undefined,
31
-      userTypes: [CONSULTANT, ESTATE_AGENT, CHANNEL_AGENT],
31
+      userTypes: [ESTATE_AGENT, CHANNEL_AGENT],
32
+    },
33
+    {
34
+      name: '我的主页',
35
+      url: ({id}) => `/pages/card/index?id=${id}`,
36
+      icon: icons.homepage,
37
+      extends: undefined,
38
+      userTypes: [CONSULTANT],
32 39
     },
33 40
     {
34 41
       name: '成为经纪人',
@@ -53,6 +60,13 @@ const menus = [
53 60
     },
54 61
   ],
55 62
   [
63
+    {
64
+      name: '我的客户',
65
+      url: '/pages/person/myGuest/index',
66
+      icon: icons.activities,
67
+      extends: undefined,
68
+      userTypes: [CONSULTANT],
69
+    },
56 70
     {
57 71
       name: '我的活动',
58 72
       url: '/pages/activity/myActivity?from=mine',
@@ -88,7 +102,7 @@ const menus = [
88 102
       url: '/pages/person/profile/index',
89 103
       icon: icons.profile,
90 104
       extends: undefined,
91
-      userTypes: [CUSTOMER, ESTATE_AGENT, CHANNEL_AGENT],
105
+      userTypes: [CUSTOMER, CONSULTANT, ESTATE_AGENT, CHANNEL_AGENT],
92 106
     },
93 107
     {
94 108
       name: '兑换记录',

+ 11
- 7
src/pages/person/personDetail/index.js 查看文件

@@ -11,7 +11,7 @@ export default class personDetail extends Component {
11 11
     userName: '用户名',
12 12
     phone: '电话号码',
13 13
     manType: '经纪人类型',
14
-    user:{}
14
+    user: {}
15 15
   }
16 16
   config = {
17 17
     navigationBarTitleText: '个人资料',
@@ -72,13 +72,17 @@ export default class personDetail extends Component {
72 72
             <Image src={require('@assets/person/arrow2.png')} mode="widthFix"></Image>
73 73
           </View>
74 74
         </View>
75
-        <View className='col_box' onClick={this.goEdit.bind(this)}>
76
-          <Text>{manType}</Text>
77
-          <View className='col_right'>
78
-            <Text>{this.getRoleName(user.personType)}</Text>
79
-            <Image src={require('@assets/person/arrow2.png')} mode="widthFix"></Image>
75
+        {
76
+          (user.personType == ROLE_CODE['CHANNEL_AGENT'] || user.personType == ROLE_CODE['ESTATE_AGENT']) &&
77
+
78
+          <View className='col_box' onClick={this.goEdit.bind(this)}>
79
+            <Text>{manType}</Text>
80
+            <View className='col_right'>
81
+              <Text>{this.getRoleName(user.personType)}</Text>
82
+              <Image src={require('@assets/person/arrow2.png')} mode="widthFix"></Image>
83
+            </View>
80 84
           </View>
81
-        </View>
85
+        }
82 86
       </View>
83 87
     )
84 88
   }

+ 4
- 4
src/pages/person/profile/detail/index.js 查看文件

@@ -42,7 +42,7 @@ export default class Profile extends Component {
42 42
       getProfileDetail(id).then(res => {
43 43
         this.setState({
44 44
           detail: res,
45
-          imgList: res.imgList,
45
+          imgList: res.imgList || [],
46 46
           documentTitle: res.documentTitle,
47 47
         })
48 48
       })
@@ -66,7 +66,7 @@ export default class Profile extends Component {
66 66
           this.setState({
67 67
             marginTop: 0,
68 68
             messageType: 'image',
69
-            imgList: imgList
69
+            imgList: imgList|| []
70 70
           }, this.onSendMsg)
71 71
         })
72 72
       }
@@ -78,7 +78,7 @@ export default class Profile extends Component {
78 78
     const imgList = this.state.imgList;
79 79
     imgList.splice(inx, 1);
80 80
     this.setState({
81
-      imgList: imgList
81
+      imgList: imgList || []
82 82
     })
83 83
   }
84 84
 
@@ -100,7 +100,7 @@ export default class Profile extends Component {
100 100
       editDocumentVerify(payload).then(res => {
101 101
         this.setState({
102 102
           detail: res,
103
-          imgList: res.imgList,
103
+          imgList: res.imgList || [],
104 104
           documentTitle: res.documentTitle,
105 105
         })
106 106
         Taro.showToast({ icon: 'none', title: '提交成功' });

+ 24
- 12
src/pages/person/profile/index.js 查看文件

@@ -14,13 +14,13 @@ export default class Profile extends Component {
14 14
   }
15 15
 
16 16
   state = {
17
-    files: [],
18
-    auditStatus: 0,
17
+   
19 18
     documentVerifyId: '',
20 19
     imgList: [],
21 20
     documentTitle: '',
22 21
     verfyList: [], // 审核列表
23 22
     descVisible: false,
23
+    showWhich: true,
24 24
 
25 25
   }
26 26
 
@@ -32,7 +32,18 @@ export default class Profile extends Component {
32 32
     Taro.showLoading()
33 33
     getVerifyList().then(res => {
34 34
       this.setState({
35
-        verfyList: res
35
+        verfyList: res || []
36
+      }, () => {
37
+        if (this.state.verfyList.length == 0) {
38
+          this.setState({
39
+            showWhich: true
40
+          })
41
+        } else {
42
+          this.setState({
43
+            showWhich: false
44
+          })
45
+        }
46
+
36 47
       })
37 48
       Taro.hideLoading()
38 49
     }).catch((err) => {
@@ -47,7 +58,8 @@ export default class Profile extends Component {
47 58
   // 选择图片
48 59
   bindAlbumClick(e) {
49 60
     this.setState({
50
-      descVisible: true
61
+      descVisible: true,
62
+      showWhich: false
51 63
     })
52 64
     e.stopPropagation()
53 65
     Taro.chooseImage({
@@ -63,7 +75,7 @@ export default class Profile extends Component {
63 75
           this.setState({
64 76
             marginTop: 0,
65 77
             messageType: 'image',
66
-            imgList: imgList
78
+            imgList: imgList || []
67 79
           }, this.onSendMsg)
68 80
         })
69 81
       }
@@ -75,7 +87,7 @@ export default class Profile extends Component {
75 87
     const imgList = this.state.imgList;
76 88
     imgList.splice(inx, 1);
77 89
     this.setState({
78
-      imgList: imgList
90
+      imgList: imgList || []
79 91
     })
80 92
   }
81 93
   toProfileDetail(item) {
@@ -99,7 +111,7 @@ export default class Profile extends Component {
99 111
   }
100 112
   // 提交资料审核
101 113
   commitBtn() {
102
-    console.log(this.state.auditStatus, "this.state.auditStatus")
114
+
103 115
     if (this.state.imgList.length == 0) {
104 116
       Taro.showToast({ icon: 'none', title: '请先上传图片' });
105 117
     } else if (this.state.documentTitle == "") {
@@ -174,25 +186,25 @@ export default class Profile extends Component {
174 186
 
175 187
 
176 188
   render() {
177
-    const { imgList, documentTitle, verfyList, descVisible } = this.state
189
+    const { imgList, documentTitle, verfyList, descVisible,showWhich } = this.state
178 190
 
179 191
     return (
180 192
       <View className="profile-page" style={`background: url(${profileBg}) no-repeat top;background-size: 100% 100%;`}>
181 193
         <ScrollView scrollY scrollWithAnimation style="height: 100vh">
182 194
 
183
-          {!verfyList.length &&
195
+          {(!verfyList.length && showWhich) &&
184 196
             <View className="up-images">
185 197
               {this.renderUpImages()}
186 198
 
187 199
               <View className="tip">
188 200
                 建议上传相关购房资格等相关资料,审核
189
-          </View>
201
+              </View>
190 202
               <View className="tip">
191 203
                 通过后将获取更多积分、兑换好礼~
192
-          </View>
204
+              </View>
193 205
             </View>
194 206
           }
195
-          {verfyList.length &&
207
+          {(verfyList.length || !showWhich) &&
196 208
             <View>
197 209
 
198 210
               {descVisible &&

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

@@ -279,7 +279,7 @@ export default class Index extends Component {
279 279
     getUserPhone(e, (phoneNumber) => {
280 280
       const { userInfo: { person: { personId, nickname, name } } } = this.props
281 281
       Taro.navigateTo({
282
-        url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${item.id}&receiverName=${encodeURIComponent(item.name)}`
282
+        url: `/pages/im/index?sendId=${personId}&sendName=${encodeURIComponent(name || nickname)}&receiverId=${item.id}&receiverName=${encodeURIComponent(item.userName)}`
283 283
       })
284 284
     })
285 285
   }

+ 14
- 7
src/pages/project/index.js 查看文件

@@ -7,7 +7,7 @@ import ActivityItem from '../activity/item'
7 7
 
8 8
 import ready from '@utils/ready'
9 9
 
10
-import { queryBanners, savePoint } from '@services/common'
10
+import { queryBanners, savePoint, updatePoint } from '@services/common'
11 11
 import { queryNewsList, queryHelpGroup } from '@services/news'
12 12
 import { queryActivityList } from '@services/activity'
13 13
 import { dispatchCitySelected } from '@actions/city'
@@ -66,6 +66,7 @@ export default class Index extends Component {
66 66
       })
67 67
     })
68 68
   }
69
+
69 70
   componentDidShow() {
70 71
     if (this.props.curCity.id) {
71 72
       ready.queue(() => {
@@ -74,6 +75,11 @@ export default class Index extends Component {
74 75
     }
75 76
   }
76 77
 
78
+  componentWillUnmount() {
79
+    const { recordId } = this.state
80
+    recordId && updatePoint(recordId)
81
+  }
82
+
77 83
   getLocation() {
78 84
     const { cityList } = this.props
79 85
     Taro.getLocation().then(location => {
@@ -255,11 +261,12 @@ export default class Index extends Component {
255 261
     })
256 262
   }
257 263
 
258
-  handleBannerClick(item) {
264
+  handleBannerClick=(item) =>{
265
+    console.log(this,"this")
259 266
     this.redirectTo(item)
260 267
   }
261 268
 
262
-  redirectTo({ contentId, contentType, buildingId } = {}) {
269
+  redirectTo({ targetId, contentType, buildingId } = {}) {
263 270
     switch (contentType) {
264 271
       // 项目
265 272
       case 'project':
@@ -271,28 +278,28 @@ export default class Index extends Component {
271 278
       // 活动
272 279
       case 'activity':
273 280
         Taro.navigateTo({
274
-          url: '/pages/activity/detail/index?id=' + contentId
281
+          url: '/pages/activity/detail/index?id=' + targetId
275 282
         })
276 283
         return;
277 284
 
278 285
       // 助力
279 286
       case 'help':
280 287
         Taro.navigateTo({
281
-          url: '/pages/activity/detail/assistance?id=' + contentId
288
+          url: '/pages/activity/detail/assistance?id=' + targetId
282 289
         })
283 290
         return;
284 291
 
285 292
       // 拼团
286 293
       case 'group':
287 294
         Taro.navigateTo({
288
-          url: '/pages/activity/detail/assemble?id=' + contentId
295
+          url: '/pages/activity/detail/assemble?id=' + targetId
289 296
         })
290 297
         return;
291 298
 
292 299
       // 资讯
293 300
       case 'news':
294 301
         Taro.navigateTo({
295
-          url: 'pages/news/detail/index?id=' + contentId
302
+          url: 'pages/news/detail/index?id=' + targetId
296 303
         })
297 304
         return;
298 305
 

+ 36
- 16
src/pages/shop/index.js 查看文件

@@ -12,7 +12,7 @@ import { queryBanners } from '@services/common'
12 12
 import { getGoodsBuilding, getGoodsList } from '@services/item'
13 13
 import { connect } from '@tarojs/redux'
14 14
 import * as actions from '@actions/shop'
15
-// import { queryUserInfo, doUserSignin } from '@services/user'
15
+import { queryUserInfo, doUserSignin } from '@services/user'
16 16
 
17 17
 // import getUserPhone from '@utils/getUserPhone'
18 18
 import Authorize from '@components/authorize'
@@ -32,20 +32,21 @@ export default class Shop extends Component {
32 32
       'https://estateagents.oss-cn-shanghai.aliyuncs.com/images/banner/4.jpg',
33 33
       'https://estateagents.oss-cn-shanghai.aliyuncs.com/images/banner/5.jpg'
34 34
     ],
35
-    user: {},
36 35
     cityName: '',
37 36
     goodsBuilding: [],
38 37
     goodsList: [],
38
+    user: {},
39 39
   }
40 40
 
41 41
   componentDidShow() {
42
+
42 43
     Taro.showLoading()
43 44
     ready.queue(() => {
44 45
       this.loadBannerList()
45 46
       this.loadGoodsBuilding()
46 47
 
47 48
       //    this.loadCity()
48
-      // this.loadUserInfo()
49
+      this.loadUserInfo()
49 50
     })
50 51
     Taro.hideLoading()
51 52
   }
@@ -63,14 +64,15 @@ export default class Shop extends Component {
63 64
 
64 65
   loadList() {
65 66
 
67
+
66 68
     Taro.showLoading()
67 69
     const params = {
68 70
       pageNum: '1',
69 71
       pageSize: '9999',
70
-      buildingId: this.state.goodsBuilding[0].buildingId
72
+      buildingId: this.state.goodsBuilding[0].buildingId,
73
+      cityId: this.props.curCity.id
71 74
     }
72 75
 
73
-    console.log(params, "params")
74 76
     getGoodsList(params).then(res => {
75 77
       this.setState({
76 78
         goodsList: res.records || []
@@ -83,7 +85,13 @@ export default class Shop extends Component {
83 85
   }
84 86
 
85 87
   loadGoodsBuilding() {
86
-    getGoodsBuilding().then(res => {
88
+    const payload = {
89
+
90
+      cityId: this.props.curCity.id
91
+    }
92
+
93
+    console.log(payload, "999999999999")
94
+    getGoodsBuilding(payload).then(res => {
87 95
       res.map(item => {
88 96
         item.title = item.buildingName
89 97
       })
@@ -108,10 +116,10 @@ export default class Shop extends Component {
108 116
     const payload = {
109 117
       pageNum: '1',
110 118
       pageSize: '9999',
111
-      buildingId: this.state.goodsBuilding[value].buildingId
119
+      buildingId: this.state.goodsBuilding[value].buildingId,
120
+      cityId: this.props.curCity.id
112 121
     }
113 122
     getGoodsList(payload).then(res => {
114
-      console.log(res.records, "22222222222222222222222222222222")
115 123
       this.setState({
116 124
         goodsList: res.records || []
117 125
       })
@@ -144,13 +152,10 @@ export default class Shop extends Component {
144 152
       url: `/pages/city/index`
145 153
     })
146 154
   }
155
+
147 156
   doSign() {
148 157
     const { user: { id, havaSigned } } = this.state
149 158
     if (havaSigned) {
150
-      Taro.showToast({
151
-        title: '你已经签到过了',
152
-        icon: 'none'
153
-      })
154 159
       return
155 160
     }
156 161
 
@@ -161,9 +166,17 @@ export default class Shop extends Component {
161 166
 
162 167
       this.loadUserInfo()
163 168
 
169
+      // App.zhuge.track('签到成功')
170
+    })
171
+  }
172
+  
173
+  loadUserInfo() {
174
+    // debugger
175
+    queryUserInfo().then(user => {
176
+      // debugger
177
+      this.setState({ user })
164 178
     })
165 179
   }
166
-
167 180
 
168 181
   renderLogin() {
169 182
     return <Authorize></Authorize>
@@ -242,8 +255,9 @@ export default class Shop extends Component {
242 255
   }
243 256
 
244 257
   renderDetail() {
245
-    // const { user } = this.state
258
+    const { user } = this.state
246 259
     const { userInfo: { person }, curCity } = this.props
260
+    const { bannerList = [] } = this.state
247 261
     return (
248 262
       <View className="page">
249 263
         {/* <Search placeholder="请输入要搜索的商品名称" onSearch={this.onSearch} /> */}
@@ -260,7 +274,11 @@ export default class Shop extends Component {
260 274
               <Image className="bg" src={require('@assets/shop/background.jpg')} ></Image>
261 275
               <Image className="user__left__headimg" src={person.avatarurl} />
262 276
               <View className='user__left__name'>{person.nickname}</View>
263
-              <View className="qiandao__btn" onClick={this.doSign}>签到</View>
277
+              {
278
+                user.havaSigned ?
279
+                (<View className="qiandao__btn">已签到</View>) :
280
+                (<View className="qiandao__btn" onClick={this.doSign}>签到</View>)
281
+              }
264 282
               <View className='message'>
265 283
                 <View className='message__left'>
266 284
                   <View className='user__jifen'>
@@ -285,8 +303,10 @@ export default class Shop extends Component {
285 303
           </View>
286 304
 
287 305
 
306
+          {bannerList.length > 0 &&
307
+            <Banner list={bannerList} indicatorDots={false}></Banner>
308
+          }
288 309
 
289
-          <Banner list={this.state.bannerList} indicatorDots={false}></Banner>
290 310
 
291 311
           {this.renderGoods()}
292 312
         </ScrollView>