xujing 5 年前
父节点
当前提交
f1cb0ebbaf

+ 0
- 9
project.config.json.rej 查看文件

1
-diff a/project.config.json b/project.config.json	(rejected hunks)
2
-@@ -2,6 +2,7 @@
3
- 	"miniprogramRoot": "dist/",
4
- 	"projectname": "mini-chengjiao",
5
- 	"description": "知与行联调",
6
-+	"appid": "wxd9ee3a9480a4e544",
7
- 	"setting": {
8
- 		"urlCheck": false,
9
- 		"es6": false,

+ 2
- 1
src/components/empty-page/index.scss 查看文件

1
 @import "@styles/theme.scss";
1
 @import "@styles/theme.scss";
2
 .empty{
2
 .empty{
3
-  width:100vw;
3
+  width:100%;
4
   height:80vh;
4
   height:80vh;
5
   display: flex;
5
   display: flex;
6
+  margin:  0 auto;
6
   flex-direction: column;
7
   flex-direction: column;
7
   justify-content: center;
8
   justify-content: center;
8
   align-items: center;
9
   align-items: center;

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

4
 import './index.scss'
4
 import './index.scss'
5
 import { AtTabs, AtTabsPane } from 'taro-ui'
5
 import { AtTabs, AtTabsPane } from 'taro-ui'
6
 import "taro-ui/dist/style/components/tabs.scss"
6
 import "taro-ui/dist/style/components/tabs.scss"
7
-import { queryActivityList } from '@services/activity'
7
+// import { queryActivityList } from '@services/activity'
8
 import Activity from './index'
8
 import Activity from './index'
9
 import News from '../news/index'
9
 import News from '../news/index'
10
 import { savePoint, updatePoint } from '@services/common'
10
 import { savePoint, updatePoint } from '@services/common'
39
     })
39
     })
40
   }
40
   }
41
   componentWillMount() {
41
   componentWillMount() {
42
-    if (this.$router.params.projectIndex) {
42
+    if (Taro.getApp().props.projectIndex) {
43
       this.setState({
43
       this.setState({
44
         current: 1
44
         current: 1
45
       })
45
       })

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

127
 
127
 
128
       // 获取聊天对象信息
128
       // 获取聊天对象信息
129
       fetch({ url: `${API_QUERY_USERINFO_BYID}/${chatting.personId}` }).then(res => {
129
       fetch({ url: `${API_QUERY_USERINFO_BYID}/${chatting.personId}` }).then(res => {
130
+        console.log(res, "rees")
130
         // res 为 person 信息
131
         // res 为 person 信息
131
         chatting.avatarurl = res.avatarurl
132
         chatting.avatarurl = res.avatarurl
132
         chatting.personType = res.personType
133
         chatting.personType = res.personType
357
   sendMessage = (message, messageType = MESSAGETYPE.TEXT) => {
358
   sendMessage = (message, messageType = MESSAGETYPE.TEXT) => {
358
     const { me, chatting } = this.state
359
     const { me, chatting } = this.state
359
 
360
 
361
+    if (!message || !message.trim()) {
362
+      console.log(message.trim(), "messagemessagemessage")
363
+      // Taro.showToast({
364
+      //   icon: 'none',
365
+      //   title: '不能发空消息哦~'
366
+      // })
367
+      return
368
+    }
369
+  
360
     const payload = {
370
     const payload = {
361
       sendPerson: me.personId,
371
       sendPerson: me.personId,
362
       receivePerson: chatting.personId,
372
       receivePerson: chatting.personId,

+ 5
- 5
src/pages/person/accessRecord.js 查看文件

9
 @connect(state => state.user)
9
 @connect(state => state.user)
10
 export default class Person extends Component {
10
 export default class Person extends Component {
11
   config = {
11
   config = {
12
-    navigationBarTitleText: '访问记录'
12
+    navigationBarTitleText: '访客信息'
13
   }
13
   }
14
 
14
 
15
   state = {
15
   state = {
27
     savePoint({
27
     savePoint({
28
       event: 'list',
28
       event: 'list',
29
       eventType: 'activity',
29
       eventType: 'activity',
30
-      propertyName: '访问记录',
30
+      propertyName: '访客信息',
31
       data: '{}'
31
       data: '{}'
32
     }).then(res => {
32
     }).then(res => {
33
       this.setState({
33
       this.setState({
34
         recordId: res.recordId
34
         recordId: res.recordId
35
       })
35
       })
36
-      console.log('访问记录')
36
+      console.log('访客信息')
37
     })
37
     })
38
   }
38
   }
39
   componentWillUnmount() {
39
   componentWillUnmount() {
105
       })
105
       })
106
 
106
 
107
     }).catch(err => {
107
     }).catch(err => {
108
-      console.log(err, "获取更多访问记录err")
108
+      console.log(err, "获取更多访客信息err")
109
       Taro.hideLoading()
109
       Taro.hideLoading()
110
     })
110
     })
111
   }
111
   }
146
           className="wrap"
146
           className="wrap"
147
           needInit
147
           needInit
148
           isEmpty={isEmpty}
148
           isEmpty={isEmpty}
149
-          emptyText="暂无访问记录~"
149
+          emptyText="暂无访客信息~"
150
           hasMore={hasMore}
150
           hasMore={hasMore}
151
           onPullDownRefresh={fn => this.onPullDownRefresh(fn)}
151
           onPullDownRefresh={fn => this.onPullDownRefresh(fn)}
152
           onScrollToLower={fn => this.onScrollToLower(fn)}
152
           onScrollToLower={fn => this.onScrollToLower(fn)}

+ 1
- 1
src/pages/person/customerAnalysis/followUpCustomer/index.js 查看文件

261
           <Input class="input" placeholderClass='placeholder' autoFocus onInput={this.changeInput} placeholder="请输入用户名/手机号" />
261
           <Input class="input" placeholderClass='placeholder' autoFocus onInput={this.changeInput} placeholder="请输入用户名/手机号" />
262
           <Button className="btn" onClick={this.searchBtn} >搜索</Button>
262
           <Button className="btn" onClick={this.searchBtn} >搜索</Button>
263
         </View>
263
         </View>
264
-        <View style="padding:10px">
264
+        <View style="padding:0 10px 10px 10px">
265
           <ListView
265
           <ListView
266
             className="wrap"
266
             className="wrap"
267
             needInit
267
             needInit

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

64
     const tabList = [{ title: '跟进客户' }, { title: '成交客户' }]
64
     const tabList = [{ title: '跟进客户' }, { title: '成交客户' }]
65
     const { customerNum, current } = this.state
65
     const { customerNum, current } = this.state
66
     return (
66
     return (
67
-      <AtTabs className="tab-box overflow-tab" current={current} tabList={tabList} onClick={this.handleClick.bind(this)} swipeable={false}>
67
+      <AtTabs className="tab-customer" current={current} tabList={tabList} onClick={this.handleClick.bind(this)} swipeable={false}>
68
         <AtTabsPane current={current} index={0}>
68
         <AtTabsPane current={current} index={0}>
69
           <Followup />
69
           <Followup />
70
           {/* <View style="padding:10px 20px; display: flex;flex-wrap: wrap;align-content: flex-start;justify-content: space-between;">
70
           {/* <View style="padding:10px 20px; display: flex;flex-wrap: wrap;align-content: flex-start;justify-content: space-between;">

+ 29
- 9
src/pages/person/customerAnalysis/index.scss 查看文件

23
 }
23
 }
24
 
24
 
25
 
25
 
26
-
27
-
28
-
29
-
30
-
31
 .daily-month{
26
 .daily-month{
32
   display: flex;
27
   display: flex;
33
   align-items: center;
28
   align-items: center;
65
     width: 86%;
60
     width: 86%;
66
     background-color: #fff;
61
     background-color: #fff;
67
     box-shadow:0px 4px 12px 0px rgba(0,0,0,0.12);
62
     box-shadow:0px 4px 12px 0px rgba(0,0,0,0.12);
68
-    margin: 20px auto 10px auto;
63
+    margin: 20px auto 20px auto;
69
     border-radius: 44px;
64
     border-radius: 44px;
70
   }
65
   }
71
   .at-tabs__item{
66
   .at-tabs__item{
91
     height: 0!important;
86
     height: 0!important;
92
   }
87
   }
93
 
88
 
94
- 
95
 }
89
 }
96
 .tab-bar{
90
 .tab-bar{
97
-  margin-top: 30px;
98
   .at-tabs__header{
91
   .at-tabs__header{
99
     width: 80%;
92
     width: 80%;
100
     background-color: none;
93
     background-color: none;
108
     flex: none;
101
     flex: none;
109
     color: #666;
102
     color: #666;
110
     font-size: 28px;
103
     font-size: 28px;
111
-    padding: 12px 20px;
104
+    padding: 20px;
105
+  }
106
+  .at-tabs__item--active{
107
+    color: $primary-color;
108
+    background-color: #fff;
109
+  }
110
+  .at-tabs__item-underline{
111
+    height: 4px;
112
+    background-color: $primary-color;
113
+    width: 60%;
114
+    margin-left: 20%;
115
+  }
116
+}
117
+.tab-customer{
118
+  .at-tabs__header{
119
+    width: 80%;
120
+    background-color: none;
121
+    box-shadow:none;
122
+    margin: 0 auto;
123
+    border-radius: 0;
124
+    border: none;
125
+  }
126
+  .at-tabs__item{
127
+    width:50%;
128
+    flex: none;
129
+    color: #666;
130
+    font-size: 28px;
131
+    padding: 20px;
112
   }
132
   }
113
   .at-tabs__item--active{
133
   .at-tabs__item--active{
114
     color: $primary-color;
134
     color: $primary-color;

+ 1
- 7
src/pages/person/customerAnalysis/transactionCustomer/index.js 查看文件

1
 import Taro, { Component } from '@tarojs/taro';
1
 import Taro, { Component } from '@tarojs/taro';
2
-import Authorize from '@components/authorize'
3
 import ListView from '@components/ListView'
2
 import ListView from '@components/ListView'
4
 import './index.scss'
3
 import './index.scss'
5
-import { savePoint, updatePoint } from '@services/common'
6
 import { connect } from '@tarojs/redux'
4
 import { connect } from '@tarojs/redux'
7
 import { queryCustomerList, addFollowRecord } from '@services/person'
5
 import { queryCustomerList, addFollowRecord } from '@services/person'
8
 import { transferImage } from '@utils/tools'
6
 import { transferImage } from '@utils/tools'
27
     pageIndex: 1
25
     pageIndex: 1
28
   }
26
   }
29
 
27
 
30
-  componentWillUnmount() {
31
-    const { recordId } = this.state
32
-    recordId && updatePoint(recordId)
33
-  }
34
   componentDidShow() {
28
   componentDidShow() {
35
     Taro.showLoading()
29
     Taro.showLoading()
36
     this.loadList(1)
30
     this.loadList(1)
97
     const { customerList, isEmpty, hasMore } = this.state
91
     const { customerList, isEmpty, hasMore } = this.state
98
 
92
 
99
     return (
93
     return (
100
-      <View style="padding:10px">
94
+      <View style="padding:0 10px 10px 10px">
101
         <ListView
95
         <ListView
102
           className="wrap"
96
           className="wrap"
103
           needInit
97
           needInit

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

60
       style: '',
60
       style: '',
61
     },
61
     },
62
     {
62
     {
63
-      name: '访问记录',
63
+      name: '访客信息',
64
       url: '/pages/person/accessRecord',
64
       url: '/pages/person/accessRecord',
65
       icon: icons.accessrecord,
65
       icon: icons.accessrecord,
66
       extends: undefined,
66
       extends: undefined,

+ 63
- 44
src/pages/project/h5Page.js 查看文件

5
 import { getHFiveDetail } from '@services/user'
5
 import { getHFiveDetail } from '@services/user'
6
 import ready from '@utils/ready'
6
 import ready from '@utils/ready'
7
 import { reportClient } from '@services/report'
7
 import { reportClient } from '@services/report'
8
-import { connect, getStore } from '@tarojs/redux'
8
+import { connect } from '@tarojs/redux'
9
 import { ROLE_CODE } from '@constants/user'
9
 import { ROLE_CODE } from '@constants/user'
10
 import { getMiniQrcode, savePoint, updatePoint } from '@services/common'
10
 import { getMiniQrcode, savePoint, updatePoint } from '@services/common'
11
 const bgImg = require('@assets/helpgroup/bg.png')
11
 const bgImg = require('@assets/helpgroup/bg.png')
14
 export default class Index extends Component {
14
 export default class Index extends Component {
15
 
15
 
16
   state = {
16
   state = {
17
+    recordId: undefined, // 埋点ID
17
     avatarVisible: true,
18
     avatarVisible: true,
18
     phoneVisible: false,
19
     phoneVisible: false,
19
     webViewVisible: false,
20
     webViewVisible: false,
20
-    pageInfo: {}
21
+    pageInfo: {},
22
+    codeParams: '', // 解析二维码参数
21
   }
23
   }
22
 
24
 
23
-
24
-
25
+  componentWillUnmount() {
26
+    const { recordId } = this.state
27
+    recordId && updatePoint(recordId)
28
+  }
25
   // 埋点
29
   // 埋点
26
   success() {
30
   success() {
27
     const { userInfo: { person } } = this.props
31
     const { userInfo: { person } } = this.props
28
-    const consultant = person.personType == ROLE_CODE['CONSULTANT'] ? person.userId : ""
29
-    const firstShare = this.$router.params.firstShare || ""
32
+
33
+    const router = Taro.getStorageSync('router')
34
+    const firstShare = this.$router.params.firstShare || router.query.firstShare || ""
35
+    const consultant = this.$router.params.consultant || router.query.consultant || ""
36
+    const sharePersonId = this.$router.params.sharePersonId || router.query.sharePersonId || ""
30
     savePoint({
37
     savePoint({
31
       event: 'detail',
38
       event: 'detail',
32
       eventType: 'h5',
39
       eventType: 'h5',
33
       propertyName: 'h5活动',
40
       propertyName: 'h5活动',
34
       consultantId: consultant,
41
       consultantId: consultant,
35
-      sharePersonId: this.$router.params.sharePersonId,
42
+      sharePersonId: sharePersonId,
36
       data: '{"firstShare":"' + firstShare + '"}'
43
       data: '{"firstShare":"' + firstShare + '"}'
37
     }).then(res => {
44
     }).then(res => {
38
       this.setState({
45
       this.setState({
41
       console.log('访问记录')
48
       console.log('访问记录')
42
     })
49
     })
43
   }
50
   }
51
+  // 分享好友
44
   onShareAppMessage = () => {
52
   onShareAppMessage = () => {
45
     const { pageInfo } = this.state
53
     const { pageInfo } = this.state
46
     const currentPage = this.currentPageAndParams().join('?')
54
     const currentPage = this.currentPageAndParams().join('?')
50
       imageUrl: pageInfo.shareImg
58
       imageUrl: pageInfo.shareImg
51
     }
59
     }
52
   }
60
   }
53
-  getQRCode() {
54
-    const [page, scene] = this.currentPageAndParams()
55
-    const payload = { page, scene }
56
-    return new Promise((resolve) => {
57
-      getMiniQrcode(payload).then(qrCode => {
58
-        this.setState({ qrCode }, resolve)
59
-      })
60
-    })
61
-  }
61
+  // // 生成二维码
62
+  // getQRCode() {
63
+  //   const [page, scene] = this.currentPageAndParams()
64
+  //   const payload = { page, scene }
65
+  //   return new Promise((resolve) => {
66
+  //     getMiniQrcode(payload).then(qrCode => {
67
+  //       this.setState({ qrCode }, resolve)
68
+  //     })
69
+  //   })
70
+  // }
62
 
71
 
63
 
72
 
64
   currentPageAndParams() {
73
   currentPageAndParams() {
82
     return res
91
     return res
83
   }
92
   }
84
   componentWillMount() {
93
   componentWillMount() {
85
-
86
     ready.queue(() => {
94
     ready.queue(() => {
95
+
96
+      if (this.$router.params.scene) {
97
+        getQrCodeParams(this.$router.params.scene).then((_, codeParams) => {
98
+          this.setState({
99
+            codeParams: codeParams || ''
100
+          })
101
+          console.log(res, "解析二维码返回值")
102
+        })
103
+      }
87
       // h5id 、第一个分享人ID、置业顾问ID、分享人ID 
104
       // h5id 、第一个分享人ID、置业顾问ID、分享人ID 
88
       getHFiveDetail(this.$router.params.id).then(res => {
105
       getHFiveDetail(this.$router.params.id).then(res => {
89
         this.setState({
106
         this.setState({
90
           pageInfo: res
107
           pageInfo: res
91
         })
108
         })
92
       })
109
       })
93
-      const { userInfo: { person, miniAuthorized } } = this.props
110
+      const { userInfo: { person: { avatarurl, phone } } } = this.props
94
       console.log(this.props, "this.props")
111
       console.log(this.props, "this.props")
95
-      // if(person.avatarurl)
96
-      if (miniAuthorized) {
112
+      if (avatarurl && avatarurl.indexOf('wx.qlogo.cn') != -1) {
113
+        console.log(avatarurl, "有头像哦~")
114
+        this.setState({
115
+          avatarVisible: false,
116
+        })
97
         // 头像手机号都有
117
         // 头像手机号都有
98
-        if (person.phone) {
99
-          this.onAvatarSuccess();
118
+        if (phone) {
119
+
120
+          this.reportClient()
100
           this.success()
121
           this.success()
101
           this.setState({
122
           this.setState({
102
-            avatarVisible: false,
103
             phoneVisible: false,
123
             phoneVisible: false,
104
             webViewVisible: true,
124
             webViewVisible: true,
105
           })
125
           })
106
         } else {
126
         } else {
107
-          this.onAvatarSuccess();
127
+          this.setState({
128
+            phoneVisible: true,
129
+          })
108
         }
130
         }
109
       } else {
131
       } else {
110
-        if (person.phone) {
132
+        if (phone) {
111
           this.setState({
133
           this.setState({
112
             phoneVisible: false,
134
             phoneVisible: false,
113
           })
135
           })
115
       }
137
       }
116
     })
138
     })
117
   }
139
   }
118
-
119
   // 授权头像成功
140
   // 授权头像成功
120
   onAvatarSuccess() {
141
   onAvatarSuccess() {
121
     this.setState({
142
     this.setState({
126
   }
147
   }
127
   // 授权用户信息
148
   // 授权用户信息
128
   getUserInfo() {
149
   getUserInfo() {
129
-    const { dispatchUpdateUserInfo, extraInfo, miniApp, person, miniAuthorized } = this.props
150
+    const { dispatchUpdateUserInfo } = this.props
130
     const sessionKey = Taro.getStorageSync('sessionKey')
151
     const sessionKey = Taro.getStorageSync('sessionKey')
131
 
152
 
132
-    const { dispatch } = getStore()
133
-
134
-    dispatch({ type: USER_INFO, payload: { extraInfo, person, miniApp, miniAuthorized } })
135
     Taro.showLoading()
153
     Taro.showLoading()
136
     Taro.getUserInfo({
154
     Taro.getUserInfo({
137
       lang: 'zh_CN',
155
       lang: 'zh_CN',
156
       }
174
       }
157
     })
175
     })
158
   }
176
   }
159
-
177
+  // 授权手机号
160
   getPhoneNumber(e) {
178
   getPhoneNumber(e) {
161
     getUserPhone(e, (phoneNumber) => {
179
     getUserPhone(e, (phoneNumber) => {
162
       if (!phoneNumber) {
180
       if (!phoneNumber) {
167
       } else {
185
       } else {
168
         console.log('授权手机成功')
186
         console.log('授权手机成功')
169
         this.success()
187
         this.success()
188
+        this.reportClient()
170
         this.setState({
189
         this.setState({
171
           phoneVisible: false,
190
           phoneVisible: false,
172
           webViewVisible: true,
191
           webViewVisible: true,
176
   }
195
   }
177
   // 报备客户
196
   // 报备客户
178
   reportClient() {
197
   reportClient() {
198
+    const router = Taro.getStorageSync('router')
199
+    const consultant = this.$router.params.consultant || router.query.consultant || ""
179
     const {
200
     const {
180
-      cardInfo: { id, projects = [] },
181
-      userInfo: { person: { phone, tel } }
201
+      userInfo: { person: { phone, tel, userId } }
182
     } = this.props
202
     } = this.props
183
-    const buildingId = projects[0]
184
-    const realPhone = phoneNumber || phone || tel
185
-    const payload = {
186
-      realtyConsultant: id, //报备人 置业顾问
187
-      buildingId,
188
-      phone: realPhone
189
-    }
190
-    if (person.personId != cardInfo.id) {
203
+
204
+    if (consultant && consultant != userId) {
205
+      const realPhone = phone || tel
206
+      const payload = {
207
+        realtyConsultant: consultant, //报备人 置业顾问
208
+        phone: realPhone
209
+      }
191
       reportClient(payload).then(res => {
210
       reportClient(payload).then(res => {
192
         console.log('恭喜您绑定成功')
211
         console.log('恭喜您绑定成功')
193
       }).catch(err => {
212
       }).catch(err => {
219
     )
238
     )
220
   }
239
   }
221
   render() {
240
   render() {
222
-    const { pageInfo, webViewVisible, qrCode } = this.state
241
+    const { pageInfo, webViewVisible, codeParams } = this.state
223
     const { userInfo: { person } } = this.props
242
     const { userInfo: { person } } = this.props
224
     const webUrlParams = [
243
     const webUrlParams = [
225
       `personId=${person.personId}`,
244
       `personId=${person.personId}`,
226
       `h5id=${this.$router.params.id}`,
245
       `h5id=${this.$router.params.id}`,
227
-      `qrCode=${qrCode}`,
246
+      `codeParams=${encodeURIComponent(codeParams)}`,
228
     ].join('&')
247
     ].join('&')
229
 
248
 
230
     return (
249
     return (
231
       <Block>
250
       <Block>
232
         {this.renderMaskBanner()}
251
         {this.renderMaskBanner()}
233
-        {webViewVisible && <WebView src={`${pageInfo.h5Address}?${encodeURIComponent(webUrlParams)}`} />}
252
+        {webViewVisible && <WebView src={`${pageInfo.h5Address}?${webUrlParams}`} />}
234
       </Block>
253
       </Block>
235
     )
254
     )
236
   }
255
   }

+ 25
- 6
src/pages/project/index.js 查看文件

54
     this.qqmapsdk = new QQMapWX({
54
     this.qqmapsdk = new QQMapWX({
55
       key: 'TIIBZ-ZJG33-52T3L-Y3X4Q-NWKLV-KUB3B'
55
       key: 'TIIBZ-ZJG33-52T3L-Y3X4Q-NWKLV-KUB3B'
56
     })
56
     })
57
-
58
     ready.queue(() => {
57
     ready.queue(() => {
59
-      this.loadOpenScreenBanner()
60
       this.getLocation()
58
       this.getLocation()
61
 
59
 
62
       savePoint({
60
       savePoint({
70
         })
68
         })
71
         console.log('进入首页')
69
         console.log('进入首页')
72
       })
70
       })
71
+
73
     })
72
     })
74
   }
73
   }
74
+
75
+
75
   toChatList() {
76
   toChatList() {
76
     // const { dispatch } = getStore()
77
     // const { dispatch } = getStore()
77
     // dispatch({ type: DECREASE_UNREADNUM })
78
     // dispatch({ type: DECREASE_UNREADNUM })
90
   componentWillUnmount() {
91
   componentWillUnmount() {
91
     const { recordId } = this.state
92
     const { recordId } = this.state
92
     recordId && updatePoint(recordId)
93
     recordId && updatePoint(recordId)
94
+
93
   }
95
   }
94
 
96
 
95
   getLocation() {
97
   getLocation() {
151
     this.loadNewsList()
153
     this.loadNewsList()
152
     this.loadActivityList()
154
     this.loadActivityList()
153
     this.loadList()
155
     this.loadList()
154
-  }
155
 
156
 
157
+  }
156
   loadOpenScreenBanner() {
158
   loadOpenScreenBanner() {
157
-    const payload = {
158
-      // showPosition: 'index'
159
+    const { curCity } = this.props
160
+
161
+    const payload = {}
162
+    if (curCity.id) {
163
+      payload.cityId = curCity.id
164
+    } else {
165
+
159
     }
166
     }
160
     // 获取开屏广告图
167
     // 获取开屏广告图
161
     queryBanners('screen', payload).then(res => {
168
     queryBanners('screen', payload).then(res => {
171
       })
178
       })
172
     })
179
     })
173
   }
180
   }
181
+  componentWillReceiveProps(nextProps) {
182
+    console.log(nextProps.curCity, "curCitycurCitycurCitycurCitycurCity")
183
+    console.log(this.state.maskBanner, "maskBannermaskBannermaskBannermaskBannermaskBanner")
184
+
185
+    if (!this.state.maskBanner && JSON.stringify(nextProps.curCity) != '{}') {
186
+
187
+      this.loadOpenScreenBanner()
188
+    }
189
+  }
174
   loadBannerList() {
190
   loadBannerList() {
175
     const { curCity } = this.props
191
     const { curCity } = this.props
176
     console.log(this.props, 'this.props')
192
     console.log(this.props, 'this.props')
462
   }
478
   }
463
   toNewsList() {
479
   toNewsList() {
464
     Taro.switchTab({
480
     Taro.switchTab({
465
-      url: `/pages/activity/activity?projectIndex=1`
481
+      url: `/pages/activity/activity?projectIndex=1`,
482
+      success: res => {
483
+        Taro.getApp().props.projectIndex = 1
484
+      }
466
     })
485
     })
467
   }
486
   }
468
 
487
 

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

186
     box-shadow:0px 2px 4px 0px rgba(187,156,121,0.22);
186
     box-shadow:0px 2px 4px 0px rgba(187,156,121,0.22);
187
     border-radius:12px;
187
     border-radius:12px;
188
     width:690px;
188
     width:690px;
189
-height:172px;
189
+    height:172px;
190
     // padding: 0px 20px;
190
     // padding: 0px 20px;
191
 
191
 
192
     .section-content_img{
192
     .section-content_img{

+ 1
- 1
src/utils/login.js 查看文件

28
         Taro.setStorageSync('token', token)
28
         Taro.setStorageSync('token', token)
29
         Taro.setStorageSync('sessionKey', sessionKey)
29
         Taro.setStorageSync('sessionKey', sessionKey)
30
 
30
 
31
-        dispatch({ type: USER_INFO, payload: { extraInfo, person, miniApp, miniAuthorized } })
31
+        dispatch({ type: USER_INFO, payload: { extraInfo, person, miniApp } })
32
 
32
 
33
         // 用户信息已授权获取成功
33
         // 用户信息已授权获取成功
34
         if (miniAuthorized) {
34
         if (miniAuthorized) {

+ 30
- 0
src/utils/qrcode.js 查看文件

1
+import { parseQueryString } from './tools'
2
+import { getCodeScene  } from '@services/common'
3
+
4
+/**
5
+ * 获取二维码参数
6
+ * 微信小程序  基础库 2.1.2 开始支持
7
+ * @param {*} scene 场景值
8
+ */
9
+export function getQrCodeParams(sceneID) {
10
+  if (!sceneID) {
11
+    console.error('未解析到二维码场景值')
12
+    return Promise.reject('未解析到二维码场景值')
13
+  }
14
+
15
+  console.log('解析到二维码场景 ID', sceneID)
16
+
17
+  return new Promise((resolve, reject) => {
18
+    getCodeScene(sceneID).then((res) => {
19
+      const data = typeof res === 'string' ? JSON.parse(res) : res
20
+      const params = parseQueryString(data.scene || '')
21
+
22
+      console.log('解析到二维码场景参数: ', params)
23
+
24
+      resolve(params, data.scene)
25
+    }).catch(err => {
26
+      console.error('解析二维码场景参数失败', err)
27
+      reject('解析二维码场景参数失败')
28
+    })
29
+  })
30
+}