许静 5 anos atrás
pai
commit
3cdee4c043

+ 1
- 1
project.config.json Ver arquivo

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

+ 4
- 0
src/constants/api.js Ver arquivo

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

+ 1
- 1
src/pages/activity/index.js Ver arquivo

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

+ 1
- 0
src/pages/activity/item/index.js Ver arquivo

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

+ 39
- 32
src/pages/agent/become/index.js Ver arquivo

@@ -21,45 +21,52 @@ export default class Index extends Component {
21 21
     isChannel: false,
22 22
     user: {}
23 23
   }
24
-  componentDidMount() {
24
+  componentDidMount () {
25 25
     this.loadUserInfo()
26 26
 
27 27
 
28 28
   }
29
-  putMessage() {
29
+  putMessage () {
30 30
     const { recommendAgentCode, channelCode } = this.state
31 31
     const payload = {
32 32
       recommendAgentCode: recommendAgentCode,
33 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 70
     console.log(e.currentTarget.dataset.id)
64 71
     switch (e.currentTarget.dataset.id) {
65 72
       case 'recommendAgentCode':
@@ -76,7 +83,7 @@ export default class Index extends Component {
76 83
         break;
77 84
     }
78 85
   }
79
-  getPhoneNumber(e) {
86
+  getPhoneNumber (e) {
80 87
     getUserPhone(e, (phoneNumber) => {
81 88
       if (phoneNumber) {
82 89
         this.putMessage()
@@ -88,7 +95,7 @@ export default class Index extends Component {
88 95
       }
89 96
     })
90 97
   }
91
-  loadUserInfo() {
98
+  loadUserInfo () {
92 99
     queryUserInfo().then(user => {
93 100
       this.setState({
94 101
         user,
@@ -110,22 +117,22 @@ export default class Index extends Component {
110 117
       })
111 118
     })
112 119
   }
113
-  render() {
120
+  render () {
114 121
     const { isChannel, recommendAgentCode } = this.state
115 122
     const { userInfo: { person: { phone } } } = this.props
116 123
     return (
117 124
       <View className='page'>
118 125
         <Image src={bannerImg} className='banner' mode='widthFix'></Image>
119 126
         <View className='become_agent'>
120
-          <View className='agent_type'>
127
+          {/* <View className='agent_type'>
121 128
             <Text className='agent_title'>经纪人类型</Text>
122 129
             <Picker mode='selector' className='selector' range={this.state.selector} onChange={this.onChange}>
123 130
               <View className='picker'>
124 131
                 {this.state.selectorChecked}
125 132
               </View>
126 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 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 Ver arquivo

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

+ 16
- 16
src/pages/person/menus.js Ver arquivo

@@ -25,13 +25,13 @@ const CHANNEL_AGENT = ROLE_CODE['CHANNEL_AGENT']
25 25
 
26 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 36
       name: '我的主页',
37 37
       url: ({ id }) => `/pages/card/index?id=${id}`,
@@ -60,13 +60,13 @@ const menus = [
60 60
       extends: undefined,
61 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,14 +148,14 @@ const menus = [
148 148
       url: '/pages/agent/become/index',
149 149
       icon: icons.development,
150 150
       extends: undefined,
151
-      userTypes: [CUSTOMER],
151
+      userTypes: [CUSTOMER,ESTATE_AGENT],
152 152
     },
153 153
     {
154 154
       name: '成为置业顾问',
155 155
       url: '',
156 156
       icon: icons.consultant,
157 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 Ver arquivo

@@ -17,11 +17,14 @@ export default class SwiperBanner extends Component {
17 17
   }
18 18
 
19 19
   changeCurrent (event) {
20
-   
20
+
21
+ 
21 22
     const current = event.detail.current
22 23
    
23 24
     this.props.onChange(current)
24 25
   
26
+   
27
+  
25 28
   }
26 29
 
27 30
   onBannerClick (item) {

+ 17
- 22
src/pages/project/detail/index.js Ver arquivo

@@ -169,7 +169,7 @@ export default class Index extends Component {
169 169
   }
170 170
   // 海报预览图
171 171
   previewImage (arr) {
172
-    console.log('arr:' + arr)
172
+    // console.log('arr:' + arr)
173 173
     if (arr[0].length > 1) {
174 174
       Taro.previewImage({
175 175
         current: arr,
@@ -575,23 +575,10 @@ export default class Index extends Component {
575 575
     const { albumCurrent } = this.state
576 576
 
577 577
   
578
-    // console.log(this.props, '2222222222222')
578
+  
579 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 582
       <Block>
596 583
         { list.length > 0 &&
597 584
           (
@@ -599,13 +586,13 @@ export default class Index extends Component {
599 586
               <View className='photos__type__title'>相册</View>
600 587
               <ScrollView scrollX>
601 588
                 <View className='photos__type__content' onClick={this.toViewAlbum}>
602
-                {console.log(list, '2222222222222')}
589
+          
603 590
                   <View className="around-tab">
604 591
                     {list.map((item, index) => {
605 592
                       const { apartmentName} = item || {}
606 593
                       const  buildingImgList = item.buildingImgList
607 594
                      
608
-                      console.log(buildingImgList, '22333333222')
595
+                    
609 596
                       return (
610 597
                         <View
611 598
                           style={{ marginRight: '8px' }}                  
@@ -877,15 +864,23 @@ export default class Index extends Component {
877 864
       <View
878 865
         className="pro__banner"
879 866
       >
867
+        {console.log(projectDetail)}
880 868
         <Video
881 869
           src={projectDetail.videoUrl}
882 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 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 884
           show-mute-btn='true'
890 885
         ></Video>
891 886
       </View>

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

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

+ 14
- 3
src/pages/project/index.js Ver arquivo

@@ -519,12 +519,16 @@ export default class Index extends Component {
519 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 527
   toRecomonedPage() {
524 528
     const {
525 529
       userInfo: { person: { personType } }
526 530
     } = this.props
527
-    if (personType === ROLE_CODE['DRIFT'] || personType === ROLE_CODE['CUSTOMER'] || !personType) {
531
+    if (personType === ROLE_CODE['DRIFT'] ||  !personType) {
528 532
       // 游客或者客户 区别是否有电话
529 533
       Taro.navigateTo({
530 534
         url: `/pages/agent/become/index`
@@ -546,6 +550,7 @@ export default class Index extends Component {
546 550
   renderProjectList() {
547 551
     const { proList: { records } } = this.props
548 552
     const { helpGroupList } = this.state
553
+    console.log(records,'proList')
549 554
     return (
550 555
       <Block>
551 556
         {
@@ -574,6 +579,8 @@ export default class Index extends Component {
574 579
             </View >
575 580
           )
576 581
         }
582
+
583
+        {console.log(helpGroupList,'helpGroupList')}
577 584
         {
578 585
           helpGroupList.length > 0 &&
579 586
           <View
@@ -603,6 +610,7 @@ export default class Index extends Component {
603 610
     return (
604 611
       <View className="mask-banner">
605 612
         <View className="content">
613
+          {console.log(maskBanner,'maskBanner')}
606 614
           <Image
607 615
             mode="widthFix"
608 616
             className="img"
@@ -642,7 +650,10 @@ export default class Index extends Component {
642 650
                         }}
643 651
                         indicatorDots={true}
644 652
                         list={this.state.bannerList}
645
-                        onClick={this.handleBannerClick}>
653
+                        onClick={this.handleBannerClick}
654
+                        onChange={()=>(1)}
655
+                        >
656
+                    
646 657
                       </Banner>
647 658
                     )
648 659
                   }

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

@@ -18,13 +18,14 @@ export default class Index extends Component {
18 18
 
19 19
   render() {
20 20
     const { data, onClick } = this.props
21
-    const { uvList = {}, buildingTag = [], buildingImg, shareList = {} } = data
21
+    const { uvList = {}, buildingTag = [], buildingListImg, shareList = {} } = data
22 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 25
     return (
26 26
       <View className='item' onClick={onClick.bind(this, data)}>
27 27
         <View className='item__top'>
28
+          {console.log(data,'data')}
28 29
           <Image className='item__img' mode="aspectFill" src={getThumbnail(imgSrc)}></Image>
29 30
           {data.marketStatus &&
30 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 Ver arquivo

@@ -2,8 +2,8 @@ import Taro, { Component } from '@tarojs/taro'
2 2
 import { View, Swiper, SwiperItem, Image } from '@tarojs/components'
3 3
 // import { cdn } from '@constants/api'
4 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 8
 export default class SwiperBanner extends Component {
9 9
   static defaultProps = {
@@ -15,13 +15,14 @@ export default class SwiperBanner extends Component {
15 15
     onClick: function () { }
16 16
   }
17 17
 
18
-  onBannerClick(item) {
18
+  onBannerClick (item) {
19 19
     this.props.onClick(item)
20 20
   }
21
-  render() {
21
+  render () {
22 22
     const { list, style, indicatorDots, current } = this.props
23 23
     return (
24 24
       <View className='home-banner' style={style}>
25
+        {console.log(this.props, '---list---')}
25 26
         <Swiper
26 27
           className='home-banner__swiper'
27 28
           circular
@@ -30,21 +31,22 @@ export default class SwiperBanner extends Component {
30 31
           indicatorActiveColor='rgb(256,256,256)'
31 32
         >
32 33
           {list.map((item, index) => (
34
+
33 35
             <SwiperItem
34 36
               key={index}
35 37
               onClick={this.onBannerClick.bind(this, item)}
36 38
               className='home-banner__swiper-item'
37
-            >
39
+            >  {console.log(item, '---item1111---')}
38 40
               <Image
39 41
                 mode="aspectFill"
40 42
                 style={style}
41 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 46
             </SwiperItem>
45 47
           ))}
46 48
         </Swiper>
47
-      </View> 
49
+      </View>
48 50
     )
49 51
   }
50 52
 }

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

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

+ 2
- 0
src/pages/shop/index.js Ver arquivo

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

+ 5
- 1
src/services/getCode.js Ver arquivo

@@ -1,7 +1,8 @@
1 1
 import { fetch } from '@utils/request'
2 2
 import {
3 3
   API_GET_CODE,
4
-  API_PUT_REGISTER
4
+  API_PUT_REGISTER,
5
+  API_PUT_REGISTERCONSULTANT
5 6
 } from '@constants/api'
6 7
 
7 8
 /**
@@ -11,3 +12,6 @@ import {
11 12
 export const getCodeMessage = tel => fetch({ url: `${API_GET_CODE}?tel=${tel}`, method: 'POST' })
12 13
 
13 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