Преглед изворни кода

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

张延森 пре 5 година
родитељ
комит
4461af81eb

+ 3
- 3
config/dev.js Прегледај датотеку

5
   defineConstants: {
5
   defineConstants: {
6
     HOST: '"https://dev.fangdeal.cn"',//测试
6
     HOST: '"https://dev.fangdeal.cn"',//测试
7
     WSS_HOST: '"wss://dev.fangdeal.cn"',
7
     WSS_HOST: '"wss://dev.fangdeal.cn"',
8
-    // HOST: '"http://192.168.2.41:8080"',
9
-    // WSS_HOST: '"ws://192.168.2.41:8080"',
8
+    // HOST: '"http://192.168.2.43:8080"',
9
+    // WSS_HOST: '"ws://192.168.2.43:8080"',
10
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
10
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
11
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
11
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
12
-    Version: 'V3.5.22'
12
+    Version: 'V3.5.21'
13
   },
13
   },
14
   weapp: {},
14
   weapp: {},
15
   h5: {}
15
   h5: {}

+ 3
- 3
config/prod.js Прегледај датотеку

3
     NODE_ENV: '"production"'
3
     NODE_ENV: '"production"'
4
   },
4
   },
5
   defineConstants: {
5
   defineConstants: {
6
-    HOST: '"https://dev.fangdeal.cn"',//正式
7
-    WSS_HOST: '"wss://dev.fangdeal.cn"',
6
+    HOST: '"https://wx.fangdeal.cn"',//正式
7
+    WSS_HOST: '"wss://wx.fangdeal.cn"',
8
     // HOST: '"https://wx.fangdeal.cn"',//正式
8
     // HOST: '"https://wx.fangdeal.cn"',//正式
9
     // WSS_HOST: '"wss://wx.fangdeal.cn"',
9
     // WSS_HOST: '"wss://wx.fangdeal.cn"',
10
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
10
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
11
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
11
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
12
-    Version: 'V3.5.22'
12
+    Version: 'V3.5.24'
13
   },
13
   },
14
   weapp: {},
14
   weapp: {},
15
   h5: {}
15
   h5: {}

+ 1
- 1
package.json Прегледај датотеку

32
     "@tarojs/plugin-babel": "1.3.25",
32
     "@tarojs/plugin-babel": "1.3.25",
33
     "@tarojs/plugin-csso": "1.3.25",
33
     "@tarojs/plugin-csso": "1.3.25",
34
     "@tarojs/plugin-less": "1.3.25",
34
     "@tarojs/plugin-less": "1.3.25",
35
-    "@tarojs/plugin-sass": "^1.3.25",
35
+    "@tarojs/plugin-sass": "^2.1.5",
36
     "@tarojs/plugin-uglifyjs": "1.3.25",
36
     "@tarojs/plugin-uglifyjs": "1.3.25",
37
     "@tarojs/webpack-runner": "1.3.25",
37
     "@tarojs/webpack-runner": "1.3.25",
38
     "@types/react": "^16.4.6",
38
     "@types/react": "^16.4.6",

+ 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": "wxda1f84b79b3edeb3",
5
+	"appid": "wxd9ee3a9480a4e544",
6
 	"setting": {
6
 	"setting": {
7
 		"urlCheck": false,
7
 		"urlCheck": false,
8
 		"es6": false,
8
 		"es6": false,

BIN
src/assets/mine/development.png Прегледај датотеку


+ 14
- 1
src/pages/person/index.js Прегледај датотеку

156
       case ROLE_CODE['CONSULTANT']:
156
       case ROLE_CODE['CONSULTANT']:
157
         return [{ consultant: true }, '置业顾问']
157
         return [{ consultant: true }, '置业顾问']
158
       case ROLE_CODE['ESTATE_AGENT']:
158
       case ROLE_CODE['ESTATE_AGENT']:
159
-        return [{ isAgent: true }, '普通用户']
159
+        return [{ isAgent: true }, '专业经纪人']
160
       case ROLE_CODE['CHANNEL_AGENT']:
160
       case ROLE_CODE['CHANNEL_AGENT']:
161
         return [{ isAgent: true }, '专业经纪人']
161
         return [{ isAgent: true }, '专业经纪人']
162
       default:
162
       default:
164
     }
164
     }
165
   }
165
   }
166
 
166
 
167
+  // getRoleName(type) {
168
+  //   switch (type) {
169
+  //     case ROLE_CODE['CONSULTANT']:
170
+  //       return [{ consultant: true }, '置业顾问']
171
+  //     case ROLE_CODE['ESTATE_AGENT']:
172
+  //       return [{ isAgent: true }, '普通用户']
173
+  //     case ROLE_CODE['CHANNEL_AGENT']:
174
+  //       return [{ isAgent: true }, '专业经纪人']
175
+  //     default:
176
+  //       return [{ tourist: true }, '普通用户']
177
+  //   }
178
+  // }
179
+
167
   goShop() {
180
   goShop() {
168
     Taro.switchTab({
181
     Taro.switchTab({
169
       url: `/pages/shop/index`
182
       url: `/pages/shop/index`

+ 9
- 10
src/pages/person/menus.js Прегледај датотеку

173
     },
173
     },
174
   ],
174
   ],
175
   [
175
   [
176
-    // {
177
-    //   name: '成为专业经纪人',
178
-    //   url: '/pages/agent/become/index',
179
-    //   icon: icons.development,
180
-    //   extends: undefined,
181
-    //   userTypes: [CUSTOMER, ESTATE_AGENT],
182
-    //   style: { color: '#888888' },
183
-    // },
184
     {
176
     {
185
       name: '成为置业顾问',
177
       name: '成为置业顾问',
186
       url: '',
178
       url: '',
187
       icon: icons.consultant,
179
       icon: icons.consultant,
188
       extends: undefined,
180
       extends: undefined,
189
       style: { color: '#888888' },
181
       style: { color: '#888888' },
190
-      userTypes: [CUSTOMER, ESTATE_AGENT],
182
+      userTypes: [CUSTOMER, ESTATE_AGENT, CHANNEL_AGENT],
183
+    },
184
+    {
185
+      name: '成为专业经纪人',
186
+      url: '/useless/pages/agent/become/index',
187
+      icon: icons.development,
188
+      extends: undefined,
189
+      userTypes: [CUSTOMER],
190
+      style: { color: '#888888' },
191
     },
191
     },
192
-
193
   ]
192
   ]
194
 ]
193
 ]
195
 
194
 

+ 9
- 0
src/pages/person/personDetail/index.js Прегледај датотеку

72
             <Image src={require('@/assets/person/arrow2.png')} mode="widthFix"></Image>
72
             <Image src={require('@/assets/person/arrow2.png')} mode="widthFix"></Image>
73
           </View>
73
           </View>
74
         </View>
74
         </View>
75
+        {user.personType == ROLE_CODE['ESTATE_AGENT'] &&
76
+          <View className='col_box' onClick={this.goEdit.bind(this)}>
77
+            <Text>所属渠道</Text>
78
+            <View className='col_right'>
79
+              <Text>{user.channelName || ''}</Text>
80
+            </View>
81
+          </View>
82
+        }
83
+
75
         {/* {
84
         {/* {
76
           (user.personType == ROLE_CODE['CHANNEL_AGENT'] || user.personType == ROLE_CODE['ESTATE_AGENT']) &&
85
           (user.personType == ROLE_CODE['CHANNEL_AGENT'] || user.personType == ROLE_CODE['ESTATE_AGENT']) &&
77
 
86
 

+ 7
- 2
src/pages/project/index.js Прегледај датотеку

33
     maskBanner: '',
33
     maskBanner: '',
34
     shareImg: '',
34
     shareImg: '',
35
     imgDocument: '',
35
     imgDocument: '',
36
+    newImg:'',
36
     // adImage: advImageOfApp,
37
     // adImage: advImageOfApp,
37
     bannerList: [],
38
     bannerList: [],
38
     helpGroupList: [],
39
     helpGroupList: [],
87
     getIndexShare().then(res => {
88
     getIndexShare().then(res => {
88
 
89
 
89
       const shareInfo = (res || []).filter(item => item.imgType === 'index')[0]
90
       const shareInfo = (res || []).filter(item => item.imgType === 'index')[0]
91
+      const newsInfo = (res || []).filter(item => item.imgType === 'indexNews')[0]
90
       this.setState({
92
       this.setState({
91
         shareImg: (shareInfo || {}).imgUrl,
93
         shareImg: (shareInfo || {}).imgUrl,
92
         imgDocument: (shareInfo || {}).imgDocument,
94
         imgDocument: (shareInfo || {}).imgDocument,
95
+        newImg: (newsInfo || {}).imgUrl,
93
       })
96
       })
97
+      
98
+      // indexNews
94
       console.log(shareInfo, '首页分享信息')
99
       console.log(shareInfo, '首页分享信息')
95
     })
100
     })
96
   }
101
   }
503
   }
508
   }
504
 
509
 
505
   render() {
510
   render() {
506
-    const { achieve, helpGroupList, propagandaBanner, newsShow, iconList } = this.state
511
+    const { achieve, helpGroupList, propagandaBanner, newsShow, iconList,newImg } = this.state
507
     const { curCity, unReadNum, userInfo: { person: { personType } } } = this.props
512
     const { curCity, unReadNum, userInfo: { person: { personType } } } = this.props
508
 
513
 
509
     return (
514
     return (
572
                   </View>
577
                   </View>
573
                 }
578
                 }
574
                 {/* 资讯 */}
579
                 {/* 资讯 */}
575
-                <Newsbanner showNesBox={this.handleNewsbannerShow} cityId={curCity.id} onClick={this.handleNoticeClick} onClickMore={this.toNewsList} />
580
+                <Newsbanner showNesBox={this.handleNewsbannerShow} cityId={curCity.id} newImg = {newImg} onClick={this.handleNoticeClick} onClickMore={this.toNewsList} />
576
               </View >
581
               </View >
577
               {/* 参加活动*/}
582
               {/* 参加活动*/}
578
               {
583
               {

+ 6
- 4
src/pages/project/newsbanner/index.js Прегледај датотеку

4
 import dayjs from 'dayjs'
4
 import dayjs from 'dayjs'
5
 import { connect } from '@tarojs/redux'
5
 import { connect } from '@tarojs/redux'
6
 
6
 
7
-@connect(state => ({...state.city, ...state.user }))
7
+@connect(state => ({ ...state.city, ...state.user }))
8
 export default class SwiperBanner extends Component {
8
 export default class SwiperBanner extends Component {
9
   static options = {
9
   static options = {
10
     addGlobalClass: true,
10
     addGlobalClass: true,
48
 
48
 
49
   render() {
49
   render() {
50
     if (!this.state.list.length) return null;
50
     if (!this.state.list.length) return null;
51
-
51
+    const { newImg } = this.props
52
+    console.log(newImg,'newImg')
52
     return (
53
     return (
53
       <View className="notice-box" >
54
       <View className="notice-box" >
54
         <View style="display: flex;align-items: center;">
55
         <View style="display: flex;align-items: center;">
55
           <View className="left-text">
56
           <View className="left-text">
56
-            <View className="up"> 地产</View >
57
-            <View className="down"> 头条</View >
57
+            {newImg  && <Image style="width:76rpx ; height:76rpx" src={newImg} >{console.log(newImg,'newImg')}</Image>}
58
+            {!newImg  && <View><View className="up"> 地产</View >
59
+              <View className="down"> 头条</View ></View >}
58
           </View >
60
           </View >
59
           <Swiper
61
           <Swiper
60
             className='notice-swiper'
62
             className='notice-swiper'

+ 22
- 14
src/useless/pages/agent/become/index.js Прегледај датотеку

32
       recommendAgentCode: recommendAgentCode,
32
       recommendAgentCode: recommendAgentCode,
33
       channelCode: channelCode
33
       channelCode: channelCode
34
     }
34
     }
35
-    if (payload.channelCode)
35
+    if (payload.channelCode) {
36
       registerAgent(payload).then(res => {
36
       registerAgent(payload).then(res => {
37
-        // debugger
38
         this.props.dispatchUpdateUserInfoNew(res.personId)
37
         this.props.dispatchUpdateUserInfoNew(res.personId)
39
-        Taro.navigateTo({
40
-          url: '/useless/pages/agent/index'
38
+        Taro.showToast({
39
+          title: '验证成功,恭喜成为专业经纪人',
40
+          icon: 'none'
41
         })
41
         })
42
+        setTimeout(() => {
43
+          Taro.navigateBack({
44
+            delta: 1
45
+          })
46
+        }, 2000)
47
+        // Taro.navigateTo({
48
+        //   url: '/useless/pages/agent/index'
49
+        // })
42
       })
50
       })
43
-    else {
51
+    } else {
44
       console.log('11111')
52
       console.log('11111')
45
       Taro.showToast({
53
       Taro.showToast({
46
-        title: '请输入渠道码',
54
+        title: '请输入渠道验证码',
47
         icon: 'none'
55
         icon: 'none'
48
       })
56
       })
49
     }
57
     }
126
     const { userInfo: { person: { phone } } } = this.props
134
     const { userInfo: { person: { phone } } } = this.props
127
     return (
135
     return (
128
       <View className='page'>
136
       <View className='page'>
129
-        <Image src={bannerImg} className='banner' mode='aspectFill'></Image>
137
+        <Image src={bannerImg} className='banner' mode='widthFix'></Image>
130
         <View className='become_agent'>
138
         <View className='become_agent'>
131
           {/* <View className='agent_type'>
139
           {/* <View className='agent_type'>
132
             <Text className='agent_title'>经纪人类型</Text>
140
             <Text className='agent_title'>经纪人类型</Text>
136
               </View>
144
               </View>
137
             </Picker>
145
             </Picker>
138
           </View> */}
146
           </View> */}
139
-          <Input type='number' className='channel_code' placeholder='渠道验证码 (必填)' onInput={this.bindInfo.bind(this)} data-id='channelCode'></Input>
147
+          <Input type='number' className='channel_code' placeholder-style='color:#999' placeholder='请输入渠道验证码 (必填)' onInput={this.bindInfo.bind(this)} data-id='channelCode'></Input>
140
 
148
 
141
-          <Input type='number' className='input_code' value={recommendAgentCode} placeholder='输入推荐码 (选填)' onInput={this.bindInfo.bind(this)} data-id='recommendAgentCode'></Input>
142
-          {
143
-            phone ? (
144
-              <Button onClick={this.putMessage} className='become_btn'>立即成为经纪人</Button>
145
-            ) : (
149
+          {/* <Input type='number' className='input_code' value={recommendAgentCode} placeholder='输入推荐码 (选填)' onInput={this.bindInfo.bind(this)} data-id='recommendAgentCode'></Input> */}
150
+          {/* {
151
+            phone ? ( */}
152
+          <Button onClick={this.putMessage} className='become_btn'>立即成为经纪人</Button>
153
+          {/* ) : (
146
                 <Button open-type="getPhoneNumber" onGetphonenumber={this.getPhoneNumber} className='become_btn'>立即成为经纪人</Button>
154
                 <Button open-type="getPhoneNumber" onGetphonenumber={this.getPhoneNumber} className='become_btn'>立即成为经纪人</Button>
147
               )
155
               )
148
-          }
156
+          } */}
149
         </View>
157
         </View>
150
 
158
 
151
       </View>
159
       </View>

+ 10
- 8
src/useless/pages/agent/become/index.scss Прегледај датотеку

1
+@import "@/styles/mixins.scss";
2
+@import "@/styles/theme.scss";
3
+
1
 .page {
4
 .page {
2
   position: relative;
5
   position: relative;
3
   width: 100%;
6
   width: 100%;
33
       height: 80px;
36
       height: 80px;
34
       line-height: 80px;
37
       line-height: 80px;
35
       text-align: center;
38
       text-align: center;
36
-      border-radius: 20px;
37
-      border: 1px solid #979797;
38
-      font-size: 32px;
39
+      // border-radius: 20px;
40
+      border-bottom: 1px solid #eee;
41
+      font-size: 30px;
39
       margin-bottom: 40px;
42
       margin-bottom: 40px;
43
+      text-align: center;
40
     }
44
     }
41
     .become_btn {
45
     .become_btn {
42
       width: 100%;
46
       width: 100%;
43
-
44
       height: 90px;
47
       height: 90px;
45
-      background: #ff4740;
46
-      border-radius: 20px;
48
+      background:  $primary-color;
49
+      border-radius: 12px;
47
       color: #fff;
50
       color: #fff;
48
-      font-size: 32px;
51
+      font-size: 30px;
49
       font-weight: 500;
52
       font-weight: 500;
50
       line-height: 90px;
53
       line-height: 90px;
51
       text-align: center;
54
       text-align: center;
52
-      margin-top: 120px;
53
     }
55
     }
54
   }
56
   }
55
 }
57
 }

+ 2
- 2
yarn.lock Прегледај датотеку

4064
 
4064
 
4065
 eslint-utils@^1.3.1, eslint-utils@^1.4.3:
4065
 eslint-utils@^1.3.1, eslint-utils@^1.4.3:
4066
   version "1.4.3"
4066
   version "1.4.3"
4067
-  resolved "http://r.cnpmjs.org/eslint-utils/download/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f"
4067
+  resolved "https://registry.npm.taobao.org/eslint-utils/download/eslint-utils-1.4.3.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Feslint-utils%2Fdownload%2Feslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f"
4068
   integrity sha1-dP7HxU0Hdrb2fgJRBAtYBlZOmB8=
4068
   integrity sha1-dP7HxU0Hdrb2fgJRBAtYBlZOmB8=
4069
   dependencies:
4069
   dependencies:
4070
     eslint-visitor-keys "^1.1.0"
4070
     eslint-visitor-keys "^1.1.0"
4488
 
4488
 
4489
 fast-levenshtein@~2.0.4, fast-levenshtein@~2.0.6:
4489
 fast-levenshtein@~2.0.4, fast-levenshtein@~2.0.6:
4490
   version "2.0.6"
4490
   version "2.0.6"
4491
-  resolved "http://r.cnpmjs.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
4491
+  resolved "https://registry.npm.taobao.org/fast-levenshtein/download/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
4492
   integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
4492
   integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
4493
 
4493
 
4494
 fastparse@^1.1.1:
4494
 fastparse@^1.1.1: