Преглед на файлове

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

张延森 преди 5 години
родител
ревизия
4461af81eb

+ 3
- 3
config/dev.js Целия файл

@@ -5,11 +5,11 @@ module.exports = {
5 5
   defineConstants: {
6 6
     HOST: '"https://dev.fangdeal.cn"',//测试
7 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 10
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
11 11
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
12
-    Version: 'V3.5.22'
12
+    Version: 'V3.5.21'
13 13
   },
14 14
   weapp: {},
15 15
   h5: {}

+ 3
- 3
config/prod.js Целия файл

@@ -3,13 +3,13 @@ module.exports = {
3 3
     NODE_ENV: '"production"'
4 4
   },
5 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 8
     // HOST: '"https://wx.fangdeal.cn"',//正式
9 9
     // WSS_HOST: '"wss://wx.fangdeal.cn"',
10 10
     OSS_PATH: 'https://njcj.oss-cn-shanghai.aliyuncs.com/',
11 11
     OSS_FAST_PATH: 'https://njcj.oss-accelerate.aliyuncs.com/',
12
-    Version: 'V3.5.22'
12
+    Version: 'V3.5.24'
13 13
   },
14 14
   weapp: {},
15 15
   h5: {}

+ 1
- 1
package.json Целия файл

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

+ 1
- 1
project.config.json Целия файл

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

BIN
src/assets/mine/development.png Целия файл


+ 14
- 1
src/pages/person/index.js Целия файл

@@ -156,7 +156,7 @@ export default class Person extends Component {
156 156
       case ROLE_CODE['CONSULTANT']:
157 157
         return [{ consultant: true }, '置业顾问']
158 158
       case ROLE_CODE['ESTATE_AGENT']:
159
-        return [{ isAgent: true }, '普通用户']
159
+        return [{ isAgent: true }, '专业经纪人']
160 160
       case ROLE_CODE['CHANNEL_AGENT']:
161 161
         return [{ isAgent: true }, '专业经纪人']
162 162
       default:
@@ -164,6 +164,19 @@ export default class Person extends Component {
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 180
   goShop() {
168 181
     Taro.switchTab({
169 182
       url: `/pages/shop/index`

+ 9
- 10
src/pages/person/menus.js Целия файл

@@ -173,23 +173,22 @@ const menus = [
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 177
       name: '成为置业顾问',
186 178
       url: '',
187 179
       icon: icons.consultant,
188 180
       extends: undefined,
189 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,6 +72,15 @@ export default class personDetail extends Component {
72 72
             <Image src={require('@/assets/person/arrow2.png')} mode="widthFix"></Image>
73 73
           </View>
74 74
         </View>
75
+        {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 85
           (user.personType == ROLE_CODE['CHANNEL_AGENT'] || user.personType == ROLE_CODE['ESTATE_AGENT']) &&
77 86
 

+ 7
- 2
src/pages/project/index.js Целия файл

@@ -33,6 +33,7 @@ export default class Index extends Component {
33 33
     maskBanner: '',
34 34
     shareImg: '',
35 35
     imgDocument: '',
36
+    newImg:'',
36 37
     // adImage: advImageOfApp,
37 38
     bannerList: [],
38 39
     helpGroupList: [],
@@ -87,10 +88,14 @@ export default class Index extends Component {
87 88
     getIndexShare().then(res => {
88 89
 
89 90
       const shareInfo = (res || []).filter(item => item.imgType === 'index')[0]
91
+      const newsInfo = (res || []).filter(item => item.imgType === 'indexNews')[0]
90 92
       this.setState({
91 93
         shareImg: (shareInfo || {}).imgUrl,
92 94
         imgDocument: (shareInfo || {}).imgDocument,
95
+        newImg: (newsInfo || {}).imgUrl,
93 96
       })
97
+      
98
+      // indexNews
94 99
       console.log(shareInfo, '首页分享信息')
95 100
     })
96 101
   }
@@ -503,7 +508,7 @@ export default class Index extends Component {
503 508
   }
504 509
 
505 510
   render() {
506
-    const { achieve, helpGroupList, propagandaBanner, newsShow, iconList } = this.state
511
+    const { achieve, helpGroupList, propagandaBanner, newsShow, iconList,newImg } = this.state
507 512
     const { curCity, unReadNum, userInfo: { person: { personType } } } = this.props
508 513
 
509 514
     return (
@@ -572,7 +577,7 @@ export default class Index extends Component {
572 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 581
               </View >
577 582
               {/* 参加活动*/}
578 583
               {

+ 6
- 4
src/pages/project/newsbanner/index.js Целия файл

@@ -4,7 +4,7 @@ import { queryNewsList } from '@/services/news'
4 4
 import dayjs from 'dayjs'
5 5
 import { connect } from '@tarojs/redux'
6 6
 
7
-@connect(state => ({...state.city, ...state.user }))
7
+@connect(state => ({ ...state.city, ...state.user }))
8 8
 export default class SwiperBanner extends Component {
9 9
   static options = {
10 10
     addGlobalClass: true,
@@ -48,13 +48,15 @@ export default class SwiperBanner extends Component {
48 48
 
49 49
   render() {
50 50
     if (!this.state.list.length) return null;
51
-
51
+    const { newImg } = this.props
52
+    console.log(newImg,'newImg')
52 53
     return (
53 54
       <View className="notice-box" >
54 55
         <View style="display: flex;align-items: center;">
55 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 60
           </View >
59 61
           <Swiper
60 62
             className='notice-swiper'

+ 22
- 14
src/useless/pages/agent/become/index.js Целия файл

@@ -32,18 +32,26 @@ export default class Index extends Component {
32 32
       recommendAgentCode: recommendAgentCode,
33 33
       channelCode: channelCode
34 34
     }
35
-    if (payload.channelCode)
35
+    if (payload.channelCode) {
36 36
       registerAgent(payload).then(res => {
37
-        // debugger
38 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 52
       console.log('11111')
45 53
       Taro.showToast({
46
-        title: '请输入渠道码',
54
+        title: '请输入渠道验证码',
47 55
         icon: 'none'
48 56
       })
49 57
     }
@@ -126,7 +134,7 @@ export default class Index extends Component {
126 134
     const { userInfo: { person: { phone } } } = this.props
127 135
     return (
128 136
       <View className='page'>
129
-        <Image src={bannerImg} className='banner' mode='aspectFill'></Image>
137
+        <Image src={bannerImg} className='banner' mode='widthFix'></Image>
130 138
         <View className='become_agent'>
131 139
           {/* <View className='agent_type'>
132 140
             <Text className='agent_title'>经纪人类型</Text>
@@ -136,16 +144,16 @@ export default class Index extends Component {
136 144
               </View>
137 145
             </Picker>
138 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 154
                 <Button open-type="getPhoneNumber" onGetphonenumber={this.getPhoneNumber} className='become_btn'>立即成为经纪人</Button>
147 155
               )
148
-          }
156
+          } */}
149 157
         </View>
150 158
 
151 159
       </View>

+ 10
- 8
src/useless/pages/agent/become/index.scss Целия файл

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

+ 2
- 2
yarn.lock Целия файл

@@ -4064,7 +4064,7 @@ eslint-scope@^5.0.0:
4064 4064
 
4065 4065
 eslint-utils@^1.3.1, eslint-utils@^1.4.3:
4066 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 4068
   integrity sha1-dP7HxU0Hdrb2fgJRBAtYBlZOmB8=
4069 4069
   dependencies:
4070 4070
     eslint-visitor-keys "^1.1.0"
@@ -4488,7 +4488,7 @@ fast-json-stable-stringify@^2.0.0:
4488 4488
 
4489 4489
 fast-levenshtein@~2.0.4, fast-levenshtein@~2.0.6:
4490 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 4492
   integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
4493 4493
 
4494 4494
 fastparse@^1.1.1: