许静 5 年之前
父節點
當前提交
3cdee4c043

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

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

+ 4
- 0
src/constants/api.js 查看文件

123
 // getCode
123
 // getCode
124
 export const API_GET_CODE = resolvePath('captcha')
124
 export const API_GET_CODE = resolvePath('captcha')
125
 
125
 
126
+// /wx/registerConsultantOneClick
126
 // registerConsultant
127
 // registerConsultant
127
 export const API_PUT_REGISTER = resolvePath('registerConsultant')
128
 export const API_PUT_REGISTER = resolvePath('registerConsultant')
128
 
129
 
130
+// registerConsultantOneClick
131
+export const API_PUT_REGISTERCONSULTANT = resolvePath('registerConsultantOneClick')
132
+
129
 // city
133
 // city
130
 export const API_CITY_LIST = resolvePath('tdCity')
134
 export const API_CITY_LIST = resolvePath('tdCity')
131
 
135
 

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

114
       const {records, list, total, current, pages} = res || {}
114
       const {records, list, total, current, pages} = res || {}
115
       const _list = records || list || []
115
       const _list = records || list || []
116
       const newList = current <= 1 ? _list: this.state.list.concat(_list)
116
       const newList = current <= 1 ? _list: this.state.list.concat(_list)
117
-
117
+console.log(res,'---res-------')
118
       this.setState({
118
       this.setState({
119
         list: newList,
119
         list: newList,
120
         isEmpty: total == 0,
120
         isEmpty: total == 0,

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

16
     const { data, style } = this.props
16
     const { data, style } = this.props
17
     return (
17
     return (
18
       <View className="item" style={style} onClick={this.handleClick.bind(this, data)}>
18
       <View className="item" style={style} onClick={this.handleClick.bind(this, data)}>
19
+        {console.log(data,'----data-----')}
19
          <Image className="pic" mode="aspectFill" src={getThumbnail(data.mainImg || data.imgUrl)}></Image>
20
          <Image className="pic" mode="aspectFill" src={getThumbnail(data.mainImg || data.imgUrl)}></Image>
20
         <View className="box">
21
         <View className="box">
21
           <View className="title">{data.title}</View>
22
           <View className="title">{data.title}</View>

+ 39
- 32
src/pages/agent/become/index.js 查看文件

21
     isChannel: false,
21
     isChannel: false,
22
     user: {}
22
     user: {}
23
   }
23
   }
24
-  componentDidMount() {
24
+  componentDidMount () {
25
     this.loadUserInfo()
25
     this.loadUserInfo()
26
 
26
 
27
 
27
 
28
   }
28
   }
29
-  putMessage() {
29
+  putMessage () {
30
     const { recommendAgentCode, channelCode } = this.state
30
     const { recommendAgentCode, channelCode } = this.state
31
     const payload = {
31
     const payload = {
32
       recommendAgentCode: recommendAgentCode,
32
       recommendAgentCode: recommendAgentCode,
33
       channelCode: channelCode
33
       channelCode: channelCode
34
     }
34
     }
35
-    registerAgent(payload).then(res => {
36
-      // debugger
37
-      this.props.dispatchUpdateUserInfoNew(res.personId)
38
-      Taro.navigateTo({
39
-        url: '/pages/agent/index'
35
+    if (payload.channelCode)
36
+      registerAgent(payload).then(res => {
37
+        // debugger
38
+        this.props.dispatchUpdateUserInfoNew(res.personId)
39
+        Taro.navigateTo({
40
+          url: '/pages/agent/index'
41
+        })
40
       })
42
       })
41
-    })
43
+    else {
44
+      console.log('11111')
45
+      Taro.showToast({
46
+        title: '请输入渠道码'
47
+      })
48
+    }
42
   }
49
   }
43
 
50
 
44
-  onChange = e => {
45
-    this.setState({
46
-      selectorChecked: this.state.selector[e.detail.value]
47
-    }, () => {
48
-      const { selectorChecked } = this.state
49
-      if (selectorChecked == '渠道经纪人') {
50
-        this.setState({
51
-          isChannel: true
52
-        })
53
-      } else {
54
-        this.setState({
55
-          isChannel: false,
56
-          channelCode: ''
57
-        })
58
-      }
51
+  // onChange = e => {
52
+  //   this.setState({
53
+  //     selectorChecked: this.state.selector[e.detail.value]
54
+  //   }, () => {
55
+  //     const { selectorChecked } = this.state
56
+  //     if (selectorChecked == '渠道经纪人') {
57
+  //       this.setState({
58
+  //         isChannel: true
59
+  //       })
60
+  //     } else {
61
+  //       this.setState({
62
+  //         isChannel: false,
63
+  //         channelCode: ''
64
+  //       })
65
+  //     }
59
 
66
 
60
-    })
61
-  }
62
-  bindInfo(e) {
67
+  //   })
68
+  // }
69
+  bindInfo (e) {
63
     console.log(e.currentTarget.dataset.id)
70
     console.log(e.currentTarget.dataset.id)
64
     switch (e.currentTarget.dataset.id) {
71
     switch (e.currentTarget.dataset.id) {
65
       case 'recommendAgentCode':
72
       case 'recommendAgentCode':
76
         break;
83
         break;
77
     }
84
     }
78
   }
85
   }
79
-  getPhoneNumber(e) {
86
+  getPhoneNumber (e) {
80
     getUserPhone(e, (phoneNumber) => {
87
     getUserPhone(e, (phoneNumber) => {
81
       if (phoneNumber) {
88
       if (phoneNumber) {
82
         this.putMessage()
89
         this.putMessage()
88
       }
95
       }
89
     })
96
     })
90
   }
97
   }
91
-  loadUserInfo() {
98
+  loadUserInfo () {
92
     queryUserInfo().then(user => {
99
     queryUserInfo().then(user => {
93
       this.setState({
100
       this.setState({
94
         user,
101
         user,
110
       })
117
       })
111
     })
118
     })
112
   }
119
   }
113
-  render() {
120
+  render () {
114
     const { isChannel, recommendAgentCode } = this.state
121
     const { isChannel, recommendAgentCode } = this.state
115
     const { userInfo: { person: { phone } } } = this.props
122
     const { userInfo: { person: { phone } } } = this.props
116
     return (
123
     return (
117
       <View className='page'>
124
       <View className='page'>
118
         <Image src={bannerImg} className='banner' mode='widthFix'></Image>
125
         <Image src={bannerImg} className='banner' mode='widthFix'></Image>
119
         <View className='become_agent'>
126
         <View className='become_agent'>
120
-          <View className='agent_type'>
127
+          {/* <View className='agent_type'>
121
             <Text className='agent_title'>经纪人类型</Text>
128
             <Text className='agent_title'>经纪人类型</Text>
122
             <Picker mode='selector' className='selector' range={this.state.selector} onChange={this.onChange}>
129
             <Picker mode='selector' className='selector' range={this.state.selector} onChange={this.onChange}>
123
               <View className='picker'>
130
               <View className='picker'>
124
                 {this.state.selectorChecked}
131
                 {this.state.selectorChecked}
125
               </View>
132
               </View>
126
             </Picker>
133
             </Picker>
127
-          </View>
128
-          {isChannel && (<Input type='number' className='channel_code' placeholder='渠道验证码 (必填)' onInput={this.bindInfo.bind(this)} data-id='channelCode'></Input>)}
134
+          </View> */}
135
+          <Input type='number' className='channel_code' placeholder='渠道验证码 (必填)' onInput={this.bindInfo.bind(this)} data-id='channelCode'></Input>
129
 
136
 
130
           <Input type='number' className='input_code' value={recommendAgentCode} placeholder='输入推荐码 (选填)' onInput={this.bindInfo.bind(this)} data-id='recommendAgentCode'></Input>
137
           <Input type='number' className='input_code' value={recommendAgentCode} placeholder='输入推荐码 (选填)' onInput={this.bindInfo.bind(this)} data-id='recommendAgentCode'></Input>
131
           {
138
           {

+ 38
- 20
src/pages/person/index.js 查看文件

5
 import { queryUserInfo, doUserSignin } from '@services/user'
5
 import { queryUserInfo, doUserSignin } from '@services/user'
6
 import { connect } from '@tarojs/redux'
6
 import { connect } from '@tarojs/redux'
7
 import Notice from '@components/Notice'
7
 import Notice from '@components/Notice'
8
-
8
+import { getCodeMessage, putRegisterConsultant} from '@services/getCode'
9
 import * as actions from '@actions/user'
9
 import * as actions from '@actions/user'
10
 import Authorize from '@components/authorize'
10
 import Authorize from '@components/authorize'
11
 
11
 
27
     roleName: '普通用户',
27
     roleName: '普通用户',
28
   }
28
   }
29
 
29
 
30
-  componentDidShow() {
30
+  componentDidShow () {
31
     Taro.showLoading()
31
     Taro.showLoading()
32
     this.loadUserInfo()
32
     this.loadUserInfo()
33
     Taro.hideLoading()
33
     Taro.hideLoading()
34
   }
34
   }
35
 
35
 
36
-  loadUserInfo() {
36
+  loadUserInfo () {
37
     queryUserInfo().then(user => {
37
     queryUserInfo().then(user => {
38
       const [roleSetting, roleName] = this.getRoleName(user.personType)
38
       const [roleSetting, roleName] = this.getRoleName(user.personType)
39
 
39
 
42
         phone: user.phone,
42
         phone: user.phone,
43
         menus: menus.map(group => group.filter(x => x.userTypes.indexOf(user.personType) > -1)),
43
         menus: menus.map(group => group.filter(x => x.userTypes.indexOf(user.personType) > -1)),
44
         roleName,
44
         roleName,
45
-        ...roleSetting,        
45
+        ...roleSetting,
46
       })
46
       })
47
     })
47
     })
48
   }
48
   }
49
 
49
 
50
-  doSign() {
50
+  doSign () {
51
     const { user: { id, havaSigned } } = this.state
51
     const { user: { id, havaSigned } } = this.state
52
     if (havaSigned) {
52
     if (havaSigned) {
53
       return
53
       return
69
     })
69
     })
70
   }
70
   }
71
 
71
 
72
-  toHomePage() {
72
+  toHomePage () {
73
     Taro.switchTab({
73
     Taro.switchTab({
74
       url: '/pages/project/index'
74
       url: '/pages/project/index'
75
     })
75
     })
76
   }
76
   }
77
 
77
 
78
-  toShopPage() {
78
+  toShopPage () {
79
     Taro.switchTab({
79
     Taro.switchTab({
80
       url: '/pages/shop/index'
80
       url: '/pages/shop/index'
81
     })
81
     })
82
   }
82
   }
83
 
83
 
84
   redirectTo = (url) => {
84
   redirectTo = (url) => {
85
-    if (typeof url === 'function') {
86
-      Taro.navigateTo({ url: url(this.state.user) })
87
-    } else {
88
-      Taro.navigateTo({ url })
85
+    if (url) {
86
+      if (typeof url === 'function') {
87
+        Taro.navigateTo({ url: url(this.state.user) })
88
+      } else {
89
+        Taro.navigateTo({ url })
90
+      }
91
+    }
92
+    else {
93
+   
94
+    
95
+      putRegisterConsultant().then(res => {
96
+        // console.log("匹配成功,请退出小程序重新登录即可")
97
+        Taro.showToast({
98
+          title: "匹配成功,请退出小程序重新登录即可"
99
+        })
100
+      }).catch(err => {
101
+        console.error(err)
102
+        Taro.showToast({
103
+          title: "匹配失败,请联系相关管理人员"
104
+        })
105
+      })
89
     }
106
     }
107
+
90
   }
108
   }
91
 
109
 
92
-  getRoleName(type) {
110
+  getRoleName (type) {
93
     switch (type) {
111
     switch (type) {
94
       case ROLE_CODE['CONSULTANT']:
112
       case ROLE_CODE['CONSULTANT']:
95
         return [{ consultant: true }, '置业顾问']
113
         return [{ consultant: true }, '置业顾问']
96
       case ROLE_CODE['ESTATE_AGENT']:
114
       case ROLE_CODE['ESTATE_AGENT']:
97
-        return [{ isAgent: true }, '专业经纪人']
115
+        return [{ isAgent: true }, '普通用户']
98
       case ROLE_CODE['CHANNEL_AGENT']:
116
       case ROLE_CODE['CHANNEL_AGENT']:
99
         return [{ isAgent: true }, '专业经纪人']
117
         return [{ isAgent: true }, '专业经纪人']
100
       default:
118
       default:
102
     }
120
     }
103
   }
121
   }
104
 
122
 
105
-  goShop() {
123
+  goShop () {
106
     Taro.switchTab({
124
     Taro.switchTab({
107
       url: `/pages/shop/index`
125
       url: `/pages/shop/index`
108
     })
126
     })
109
   }
127
   }
110
-  handleMore() {
128
+  handleMore () {
111
     Taro.showModal({
129
     Taro.showModal({
112
       title: '温馨提示',
130
       title: '温馨提示',
113
       content: '敬请期待'
131
       content: '敬请期待'
114
     })
132
     })
115
   }
133
   }
116
 
134
 
117
-  goPersonDetail() {
135
+  goPersonDetail () {
118
 
136
 
119
     const { user: { personType } } = this.state
137
     const { user: { personType } } = this.state
120
 
138
 
126
 
144
 
127
   }
145
   }
128
 
146
 
129
-  renderLogin() {
147
+  renderLogin () {
130
     return <Authorize></Authorize>
148
     return <Authorize></Authorize>
131
   }
149
   }
132
 
150
 
133
-  renderDetail() {
151
+  renderDetail () {
134
     const { user, menus, roleName } = this.state
152
     const { user, menus, roleName } = this.state
135
     // const showQRCode = user.personType === ROLE_CODE['CONSULTANT'] || ROLE_CODE['ESTATE_AGENT'] || ROLE_CODE['CHANNEL_AGENT']
153
     // const showQRCode = user.personType === ROLE_CODE['CONSULTANT'] || ROLE_CODE['ESTATE_AGENT'] || ROLE_CODE['CHANNEL_AGENT']
136
     // const isConsultant = user.personType == ROLE_CODE['CONSULTANT']
154
     // const isConsultant = user.personType == ROLE_CODE['CONSULTANT']
177
         <View>
195
         <View>
178
           {
196
           {
179
             menus.map((group, ginx) => {
197
             menus.map((group, ginx) => {
180
-              console.log('----------------')
198
+           
181
               return (
199
               return (
182
                 <Block key={`grp-${ginx}`}>
200
                 <Block key={`grp-${ginx}`}>
183
                   {
201
                   {
203
     );
221
     );
204
   }
222
   }
205
 
223
 
206
-  render() {
224
+  render () {
207
     const { phone, tel } = this.state.user
225
     const { phone, tel } = this.state.user
208
     return (
226
     return (
209
       <View className='wrap'>
227
       <View className='wrap'>

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

25
 
25
 
26
 const menus = [
26
 const menus = [
27
   [
27
   [
28
-    {
29
-      name: '我的主页',
30
-      url: '/pages/agent/index',
31
-      icon: icons.homepage,
32
-      extends: undefined,
33
-      userTypes: [ESTATE_AGENT, CHANNEL_AGENT],
34
-    },
28
+    // {
29
+    //   name: '我的主页',
30
+    //   url: '/pages/agent/index',
31
+    //   icon: icons.homepage,
32
+    //   extends: undefined,
33
+    //   userTypes: [ESTATE_AGENT, CHANNEL_AGENT],
34
+    // },
35
     {
35
     {
36
       name: '我的主页',
36
       name: '我的主页',
37
       url: ({ id }) => `/pages/card/index?id=${id}`,
37
       url: ({ id }) => `/pages/card/index?id=${id}`,
60
       extends: undefined,
60
       extends: undefined,
61
       userTypes: [CUSTOMER,ESTATE_AGENT, CHANNEL_AGENT],
61
       userTypes: [CUSTOMER,ESTATE_AGENT, CHANNEL_AGENT],
62
     },
62
     },
63
-    {
64
-      name: '发展经纪人',
65
-      url: '/pages/agent/invitation/index',
66
-      icon: icons.development,
67
-      extends: undefined,
68
-      userTypes: [ESTATE_AGENT, CHANNEL_AGENT],
69
-    },
63
+    // {
64
+    //   name: '发展经纪人',
65
+    //   url: '/pages/agent/invitation/index',
66
+    //   icon: icons.development,
67
+    //   extends: undefined,
68
+    //   userTypes: [ESTATE_AGENT, CHANNEL_AGENT],
69
+    // },
70
   ],
70
   ],
71
   [
71
   [
72
     {
72
     {
148
       url: '/pages/agent/become/index',
148
       url: '/pages/agent/become/index',
149
       icon: icons.development,
149
       icon: icons.development,
150
       extends: undefined,
150
       extends: undefined,
151
-      userTypes: [CUSTOMER],
151
+      userTypes: [CUSTOMER,ESTATE_AGENT],
152
     },
152
     },
153
     {
153
     {
154
       name: '成为置业顾问',
154
       name: '成为置业顾问',
155
       url: '',
155
       url: '',
156
       icon: icons.consultant,
156
       icon: icons.consultant,
157
       extends: undefined,
157
       extends: undefined,
158
-      userTypes: [CUSTOMER],
158
+      userTypes: [CUSTOMER,ESTATE_AGENT],
159
     },
159
     },
160
 
160
 
161
   ]
161
   ]

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

17
   }
17
   }
18
 
18
 
19
   changeCurrent (event) {
19
   changeCurrent (event) {
20
-   
20
+
21
+ 
21
     const current = event.detail.current
22
     const current = event.detail.current
22
    
23
    
23
     this.props.onChange(current)
24
     this.props.onChange(current)
24
   
25
   
26
+   
27
+  
25
   }
28
   }
26
 
29
 
27
   onBannerClick (item) {
30
   onBannerClick (item) {

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

169
   }
169
   }
170
   // 海报预览图
170
   // 海报预览图
171
   previewImage (arr) {
171
   previewImage (arr) {
172
-    console.log('arr:' + arr)
172
+    // console.log('arr:' + arr)
173
     if (arr[0].length > 1) {
173
     if (arr[0].length > 1) {
174
       Taro.previewImage({
174
       Taro.previewImage({
175
         current: arr,
175
         current: arr,
575
     const { albumCurrent } = this.state
575
     const { albumCurrent } = this.state
576
 
576
 
577
   
577
   
578
-    // console.log(this.props, '2222222222222')
578
+  
579
     return (
579
     return (
580
 
580
 
581
-      //   <View className="around-tab">
582
-      //   {tabList.map((item, index) => {
583
-      //     const { key, label, num } = item || {}
584
-      //     return (
585
-      //       <View
586
-      //         key={key}
587
-      //         className={`around-tab__item ${current === index ? 'active' : ''}`}
588
-      //         onClick={handleClick(index)}
589
-      //       >
590
-      //         {`${label}(${num})`}
591
-      //       </View>
592
-      //     )
593
-      //   })}
594
-      // </View>    imgList.length > 0 &&
581
+   
595
       <Block>
582
       <Block>
596
         { list.length > 0 &&
583
         { list.length > 0 &&
597
           (
584
           (
599
               <View className='photos__type__title'>相册</View>
586
               <View className='photos__type__title'>相册</View>
600
               <ScrollView scrollX>
587
               <ScrollView scrollX>
601
                 <View className='photos__type__content' onClick={this.toViewAlbum}>
588
                 <View className='photos__type__content' onClick={this.toViewAlbum}>
602
-                {console.log(list, '2222222222222')}
589
+          
603
                   <View className="around-tab">
590
                   <View className="around-tab">
604
                     {list.map((item, index) => {
591
                     {list.map((item, index) => {
605
                       const { apartmentName} = item || {}
592
                       const { apartmentName} = item || {}
606
                       const  buildingImgList = item.buildingImgList
593
                       const  buildingImgList = item.buildingImgList
607
                      
594
                      
608
-                      console.log(buildingImgList, '22333333222')
595
+                    
609
                       return (
596
                       return (
610
                         <View
597
                         <View
611
                           style={{ marginRight: '8px' }}                  
598
                           style={{ marginRight: '8px' }}                  
877
       <View
864
       <View
878
         className="pro__banner"
865
         className="pro__banner"
879
       >
866
       >
867
+        {console.log(projectDetail)}
880
         <Video
868
         <Video
881
           src={projectDetail.videoUrl}
869
           src={projectDetail.videoUrl}
882
           // src='http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400'
870
           // src='http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400'
883
-          // poster='http://misc.aotu.io/booxood/mobile-video/cover_900x500.jpg'  
884
-          initial-time='0.01'
871
+          poster={getThumbnail(projectDetail.videoImage)}
872
+          // poster='http://misc.aotu.io/booxood/mobile-video/cover_900x500.jpg'
885
           style={{
873
           style={{
886
-            height: '278px',
887
-            width: '375px'
874
+            height: '278rpx',
875
+            width: '375rpx'
888
           }}
876
           }}
877
+          controls={true}
878
+          autoplay={false}
879
+        
880
+          initialTime='0'
881
+          id='video'
882
+          loop={false}
883
+          muted={false}
889
           show-mute-btn='true'
884
           show-mute-btn='true'
890
         ></Video>
885
         ></Video>
891
       </View>
886
       </View>

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

48
 
48
 
49
 
49
 
50
   .wrap {
50
   .wrap {
51
-    padding-top: 500px;
51
+    padding-top: 556px;
52
     background: transparent;
52
     background: transparent;
53
   }
53
   }
54
 
54
 

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

519
       url: '/pages/project/list/index'
519
       url: '/pages/project/list/index'
520
     })
520
     })
521
   }
521
   }
522
-
522
+  // CONSULTANT: 'Realty Consultant', // 置业顾问
523
+  // ESTATE_AGENT: 'estate agent', // 独立经纪人
524
+  // CHANNEL_AGENT: 'channel agent', // 渠道经纪人
525
+  // DRIFT: 'drift', // 游客
526
+  // CUSTOMER: 'customer' // 客户
523
   toRecomonedPage() {
527
   toRecomonedPage() {
524
     const {
528
     const {
525
       userInfo: { person: { personType } }
529
       userInfo: { person: { personType } }
526
     } = this.props
530
     } = this.props
527
-    if (personType === ROLE_CODE['DRIFT'] || personType === ROLE_CODE['CUSTOMER'] || !personType) {
531
+    if (personType === ROLE_CODE['DRIFT'] ||  !personType) {
528
       // 游客或者客户 区别是否有电话
532
       // 游客或者客户 区别是否有电话
529
       Taro.navigateTo({
533
       Taro.navigateTo({
530
         url: `/pages/agent/become/index`
534
         url: `/pages/agent/become/index`
546
   renderProjectList() {
550
   renderProjectList() {
547
     const { proList: { records } } = this.props
551
     const { proList: { records } } = this.props
548
     const { helpGroupList } = this.state
552
     const { helpGroupList } = this.state
553
+    console.log(records,'proList')
549
     return (
554
     return (
550
       <Block>
555
       <Block>
551
         {
556
         {
574
             </View >
579
             </View >
575
           )
580
           )
576
         }
581
         }
582
+
583
+        {console.log(helpGroupList,'helpGroupList')}
577
         {
584
         {
578
           helpGroupList.length > 0 &&
585
           helpGroupList.length > 0 &&
579
           <View
586
           <View
603
     return (
610
     return (
604
       <View className="mask-banner">
611
       <View className="mask-banner">
605
         <View className="content">
612
         <View className="content">
613
+          {console.log(maskBanner,'maskBanner')}
606
           <Image
614
           <Image
607
             mode="widthFix"
615
             mode="widthFix"
608
             className="img"
616
             className="img"
642
                         }}
650
                         }}
643
                         indicatorDots={true}
651
                         indicatorDots={true}
644
                         list={this.state.bannerList}
652
                         list={this.state.bannerList}
645
-                        onClick={this.handleBannerClick}>
653
+                        onClick={this.handleBannerClick}
654
+                        onChange={()=>(1)}
655
+                        >
656
+                    
646
                       </Banner>
657
                       </Banner>
647
                     )
658
                     )
648
                   }
659
                   }

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

18
 
18
 
19
   render() {
19
   render() {
20
     const { data, onClick } = this.props
20
     const { data, onClick } = this.props
21
-    const { uvList = {}, buildingTag = [], buildingImg, shareList = {} } = data
21
+    const { uvList = {}, buildingTag = [], buildingListImg, shareList = {} } = data
22
     const { records = [], total = 0 } = uvList
22
     const { records = [], total = 0 } = uvList
23
-    const imgSrc = (buildingImg && buildingImg[0]) ? buildingImg[0].url : require('@assets/default.jpg')
23
+    const imgSrc = (buildingListImg && buildingListImg[0]) ? buildingListImg[0].url : require('@assets/default.jpg')
24
 
24
 
25
     return (
25
     return (
26
       <View className='item' onClick={onClick.bind(this, data)}>
26
       <View className='item' onClick={onClick.bind(this, data)}>
27
         <View className='item__top'>
27
         <View className='item__top'>
28
+          {console.log(data,'data')}
28
           <Image className='item__img' mode="aspectFill" src={getThumbnail(imgSrc)}></Image>
29
           <Image className='item__img' mode="aspectFill" src={getThumbnail(imgSrc)}></Image>
29
           {data.marketStatus &&
30
           {data.marketStatus &&
30
             <View className={data.marketStatus == '在售' ? 'item__status sale' : data.marketStatus == '售罄' ? 'item__status soldout' : 'item__status waitsale'}>{data.marketStatus}</View>}
31
             <View className={data.marketStatus == '在售' ? 'item__status sale' : data.marketStatus == '售罄' ? 'item__status soldout' : 'item__status waitsale'}>{data.marketStatus}</View>}

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

2
 import { View, Swiper, SwiperItem, Image } from '@tarojs/components'
2
 import { View, Swiper, SwiperItem, Image } from '@tarojs/components'
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'
6
-import { getThumbnail} from '@utils/tools'
5
+import emptyImg from '@assets/empty.png'
6
+import { getThumbnail } 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 = {
15
     onClick: function () { }
15
     onClick: function () { }
16
   }
16
   }
17
 
17
 
18
-  onBannerClick(item) {
18
+  onBannerClick (item) {
19
     this.props.onClick(item)
19
     this.props.onClick(item)
20
   }
20
   }
21
-  render() {
21
+  render () {
22
     const { list, style, indicatorDots, current } = this.props
22
     const { list, style, indicatorDots, current } = this.props
23
     return (
23
     return (
24
       <View className='home-banner' style={style}>
24
       <View className='home-banner' style={style}>
25
+        {console.log(this.props, '---list---')}
25
         <Swiper
26
         <Swiper
26
           className='home-banner__swiper'
27
           className='home-banner__swiper'
27
           circular
28
           circular
30
           indicatorActiveColor='rgb(256,256,256)'
31
           indicatorActiveColor='rgb(256,256,256)'
31
         >
32
         >
32
           {list.map((item, index) => (
33
           {list.map((item, index) => (
34
+
33
             <SwiperItem
35
             <SwiperItem
34
               key={index}
36
               key={index}
35
               onClick={this.onBannerClick.bind(this, item)}
37
               onClick={this.onBannerClick.bind(this, item)}
36
               className='home-banner__swiper-item'
38
               className='home-banner__swiper-item'
37
-            >
39
+            >  {console.log(item, '---item1111---')}
38
               <Image
40
               <Image
39
                 mode="aspectFill"
41
                 mode="aspectFill"
40
                 style={style}
42
                 style={style}
41
                 className='home-banner__swiper-item-img'
43
                 className='home-banner__swiper-item-img'
42
-                src={getThumbnail(item.image || item.url ||item.img||emptyImg)}
44
+                src={getThumbnail(item.bannerListImg || item.image || item.url || item.img || emptyImg)}
43
               />
45
               />
44
             </SwiperItem>
46
             </SwiperItem>
45
           ))}
47
           ))}
46
         </Swiper>
48
         </Swiper>
47
-      </View> 
49
+      </View>
48
     )
50
     )
49
   }
51
   }
50
 }
52
 }

+ 6
- 6
src/pages/shop/detail/index.js 查看文件

19
     visibleExcBtn: true,
19
     visibleExcBtn: true,
20
   }
20
   }
21
 
21
 
22
-  componentWillMount() {
22
+  componentWillMount () {
23
     const { id, from } = this.$router.params
23
     const { id, from } = this.$router.params
24
     this.setState({
24
     this.setState({
25
       goodsId: id,
25
       goodsId: id,
27
     }, this.loadDetail)
27
     }, this.loadDetail)
28
   }
28
   }
29
 
29
 
30
-  loadDetail() {
30
+  loadDetail () {
31
     const { goodsId } = this.state
31
     const { goodsId } = this.state
32
     Taro.showLoading()
32
     Taro.showLoading()
33
     this.props.dispatchGoodsDetail(goodsId).then(res => {
33
     this.props.dispatchGoodsDetail(goodsId).then(res => {
41
     })
41
     })
42
   }
42
   }
43
 
43
 
44
-  onExchange() {
44
+  onExchange () {
45
     const { goodsId } = this.state
45
     const { goodsId } = this.state
46
     const { goodsDetail: { goodsName } } = this.props
46
     const { goodsDetail: { goodsName } } = this.props
47
     if (!hasClick) return
47
     if (!hasClick) return
59
     })
59
     })
60
   }
60
   }
61
 
61
 
62
-  render() {
62
+  render () {
63
     const { goodsDetail } = this.props
63
     const { goodsDetail } = this.props
64
     return (
64
     return (
65
       <View className="page">
65
       <View className="page">
73
             paddingBottom: `${this.state.visibleExcBtn ? '100rpx' : ''}`
73
             paddingBottom: `${this.state.visibleExcBtn ? '100rpx' : ''}`
74
           }}>
74
           }}>
75
           <View className="detail__head">
75
           <View className="detail__head">
76
-            <Image src={getThumbnail(goodsDetail.imgUrl)} mode="widthFix" className="detail__head-pic"></Image>
76
+            <Image src={getThumbnail(goodsDetail.detailImgUrl || goodsDetail.imgUrl)} mode="widthFix" className="detail__head-pic"></Image>
77
             <Image src={require('@assets/shop/hot.png')} className="detail__head-hot" />
77
             <Image src={require('@assets/shop/hot.png')} className="detail__head-hot" />
78
           </View>
78
           </View>
79
 
79
 
80
           <View className="detail__intro">
80
           <View className="detail__intro">
81
             <View className="detail__title">
81
             <View className="detail__title">
82
               <Text className="detail__title-bold">{goodsDetail.goodsName}</Text>
82
               <Text className="detail__title-bold">{goodsDetail.goodsName}</Text>
83
-              
83
+
84
             </View>
84
             </View>
85
             <View className="detail__int">
85
             <View className="detail__int">
86
               {/* <Text>所需积分</Text> */}
86
               {/* <Text>所需积分</Text> */}

+ 2
- 0
src/pages/shop/index.js 查看文件

264
             {
264
             {
265
               goodsList.length &&
265
               goodsList.length &&
266
               goodsList.map(item => (
266
               goodsList.map(item => (
267
+                
267
                 <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
268
                 <View className="item" key={item.goodsId} onClick={this.onViewDetail.bind(this, item)}>
269
+                  {console.log(item,'--item---')}
268
                   <Image className="item__img" mode="aspectFill" src={item.imgUrl} />
270
                   <Image className="item__img" mode="aspectFill" src={item.imgUrl} />
269
                   <View className="item__title">{item.goodsName}</View>
271
                   <View className="item__title">{item.goodsName}</View>
270
                   <View className="item__des">
272
                   <View className="item__des">

+ 5
- 1
src/services/getCode.js 查看文件

1
 import { fetch } from '@utils/request'
1
 import { fetch } from '@utils/request'
2
 import {
2
 import {
3
   API_GET_CODE,
3
   API_GET_CODE,
4
-  API_PUT_REGISTER
4
+  API_PUT_REGISTER,
5
+  API_PUT_REGISTERCONSULTANT
5
 } from '@constants/api'
6
 } from '@constants/api'
6
 
7
 
7
 /**
8
 /**
11
 export const getCodeMessage = tel => fetch({ url: `${API_GET_CODE}?tel=${tel}`, method: 'POST' })
12
 export const getCodeMessage = tel => fetch({ url: `${API_GET_CODE}?tel=${tel}`, method: 'POST' })
12
 
13
 
13
 export const putRegister = payload => fetch({ url: `${API_PUT_REGISTER}?phone=${payload.tel}&&code=${payload.code}`, payload, method: 'PUT' })
14
 export const putRegister = payload => fetch({ url: `${API_PUT_REGISTER}?phone=${payload.tel}&&code=${payload.code}`, payload, method: 'PUT' })
15
+
16
+export const putRegisterConsultant = payload => fetch({ url: `${API_PUT_REGISTERCONSULTANT}`, method: 'PUT' })
17
+// /wx/registerConsultantOneClick