Sfoglia il codice sorgente

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

张延森 5 anni fa
parent
commit
7d4de1e4b4

+ 7
- 7
config/dev.js Vedi File

@@ -5,13 +5,13 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://47.101.36.130:8085"',//测试
7 7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
-    // HOST: '"https://dev.jinchengjiaye.com"',//测试
9
-    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
-    HOST: '"https://lt.pawoma.cn"',
11
-    WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    // HOST: '"http://192.168.2.52:8080"',
13
-    // WSS_HOST: '"ws://192.168.2.52:8080"',
14
-    Version:'V3.5.2.2_12121'
8
+    HOST: '"https://dev.jinchengjiaye.com"',//测试
9
+    WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
+    // HOST: '"https://lt.pawoma.cn"',
11
+    // WSS_HOST: '"wss://lt.pawoma.cn"',
12
+    // HOST: '"http://192.168.2.51:8080"',
13
+    // WSS_HOST: '"ws://192.168.2.51:8080"',
14
+    Version: 'V3.5.2.2_12122'
15 15
   },
16 16
   weapp: {},
17 17
   h5: {}

+ 4
- 4
config/prod.js Vedi File

@@ -5,10 +5,10 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://192.168.0.218:8080"',
7 7
     // WSS_HOST: '"ws://192.168.0.218:8080"',
8
-    // HOST: '"https://dev.jinchengjiaye.com"',//测试
9
-    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
-    HOST: '"https://lt.pawoma.cn"',
11
-    WSS_HOST: '"wss://lt.pawoma.cn"',
8
+    HOST: '"https://dev.jinchengjiaye.com"',//测试
9
+    WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
+    // HOST: '"https://lt.pawoma.cn"',
11
+    // WSS_HOST: '"wss://lt.pawoma.cn"',
12 12
     Version:'V3.5.2.2_2019-12-12'
13 13
   },
14 14
   weapp: {},

+ 2
- 2
project.config.json Vedi File

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

+ 1
- 1
src/app.js Vedi File

@@ -134,7 +134,7 @@ class App extends Component {
134 134
         },
135 135
         {
136 136
           pagePath: "pages/activity/activity",
137
-          text: "活动",
137
+          text: "活动资讯",
138 138
           iconPath: './assets/tabbar/activity1.png',
139 139
           selectedIconPath: './assets/tabbar/activity2.png',
140 140
         },

+ 3
- 0
src/app.scss Vedi File

@@ -58,4 +58,7 @@
58 58
       color: #666;
59 59
     }
60 60
   }
61
+}
62
+.wxParse-inline {
63
+  line-height: 50px;
61 64
 }

+ 4
- 2
src/pages/activity/detail/index.js Vedi File

@@ -373,8 +373,10 @@ export default class Detail extends Component {
373 373
                   </View>
374 374
                   <View className="detail-con">
375 375
                     <View className="detail-con__title">活动详情</View>
376
-                    <import src='../../../components/wxParse/wxParse.wxml' />
377
-                    <template is='wxParse' data='{{wxParseData:article.nodes}}' />
376
+                    {/* <View >{detail.desc}</View> */}
377
+                    <richText nodes={detail.desc} ></richText>
378
+                    {/* <import src='../../../components/wxParse/wxParse.wxml' />
379
+                    <template is='wxParse' data='{{wxParseData:article.nodes}}' /> */}
378 380
                   </View>
379 381
                   <View style="color:#999;font-size:15px;margin:0 auto 90px auto;text-align:center">已经到底了~</View>
380 382
 

+ 1
- 0
src/pages/person/accessRecord.js Vedi File

@@ -7,6 +7,7 @@ import { savePoint, updatePoint } from '@services/common'
7 7
 import dayjs from 'dayjs';
8 8
 
9 9
 @connect(state => state.user)
10
+
10 11
 export default class Person extends Component {
11 12
   config = {
12 13
     navigationBarTitleText: '访客信息'

+ 15
- 3
src/pages/person/index.js Vedi File

@@ -10,6 +10,7 @@ import * as actions from '@actions/user'
10 10
 import Authorize from '@components/authorize'
11 11
 import { transferImage } from '@utils/tools'
12 12
 import { menus } from './menus'
13
+import login from '@utils/login'
13 14
 export const version = Version
14 15
 
15 16
 @connect(({ user, city }) => ({ user, city }), { ...actions })
@@ -36,7 +37,6 @@ export default class Person extends Component {
36 37
   }
37 38
 
38 39
   loadUserInfo () {
39
-
40 40
     queryUserInfo().then(user => {
41 41
       const [roleSetting, roleName] = this.getRoleName(user.personType)
42 42
 
@@ -83,7 +83,6 @@ export default class Person extends Component {
83 83
       url: '/pages/shop/index'
84 84
     })
85 85
   }
86
-
87 86
   redirectTo = (url) => {
88 87
     if (url) {
89 88
       if (typeof url === 'function') {
@@ -94,8 +93,21 @@ export default class Person extends Component {
94 93
     }
95 94
     else {
96 95
       putRegisterConsultant().then(res => {
96
+        Taro.showToast({
97
+          title: "匹配成功",
98
+          icon: "none",
99
+          duration: 3000
100
+        })
97 101
         Taro.setStorageSync('userId',res.userId)
98
-        this.loadUserInfo()
102
+        const  payload={
103
+          path:'',
104
+          scene:''
105
+        }
106
+
107
+        login(payload, res => {
108
+          this.loadUserInfo()
109
+        })
110
+
99 111
 
100 112
         // this.setState({
101 113
         //   consultant:true,

+ 1
- 1
src/pages/person/login/index.js Vedi File

@@ -33,7 +33,7 @@ export default class Index extends Component {
33 33
     const {isClick}=this.state
34 34
     const Phone=this.state.tel
35 35
 
36
-    if (!(/^1[3|4|5|7|8|9][0-9]\d{4,8}$/.test(Phone)) || Phone.length != 11) {
36
+    if (!(/^1[3|4|5|6|7|8|9][0-9]\d{4,8}$/.test(Phone)) || Phone.length != 11) {
37 37
         Taro.showToast({
38 38
           title: '输入的手机号格式不对,请重新输入',
39 39
           icon: 'none'

+ 1
- 1
src/pages/person/personDetail/editDetail/index.js Vedi File

@@ -89,7 +89,7 @@ export default class editDetail extends Component {
89 89
       this.Alert('请输入电话号码')
90 90
       return;
91 91
     }
92
-    if (!(/^1[3|4|5|7|8|9][0-9]\d{4,8}$/.test(this.state.phone)) || this.state.phone.length != 11) {
92
+    if (!(/^1[3|4|5|6|7|8|9][0-9]\d{4,8}$/.test(this.state.phone)) || this.state.phone.length != 11) {
93 93
       this.Alert('请输入正确的手机号码');
94 94
       return false;
95 95
     }

+ 2
- 6
src/pages/person/personDetail/editDetail/index.scss Vedi File

@@ -13,12 +13,8 @@
13 13
       margin-top: 40px;
14 14
       margin-bottom: 32px;
15 15
     }
16
-    // edit-name
17 16
 
18
-    // edit-phone
19
-
20
-    // edit-name
21
-    Input,.selector{
17
+  Input,.selector{
22 18
       height: 80px;
23 19
       line-height: 80px;
24 20
     }
@@ -26,7 +22,7 @@
26 22
   .comfire{
27 23
     width:680px;
28 24
     height:90px;
29
-    background:rgba(255,71,64,1);
25
+    background:$primary-color;
30 26
     border-radius:14px;
31 27
     margin: 0 auto;
32 28
     text-align: center;

+ 2
- 20
src/pages/project/detail/index.js Vedi File

@@ -692,14 +692,14 @@ export default class Index extends Component {
692 692
     }
693 693
 
694 694
     return (
695
-      <Block>
695
+      <View style="margin-bottom:-5px">
696 696
         <View className="section circum">
697 697
           <View className="section-head">
698 698
             <Text className="section-head__title">位置及周边配套</Text>
699 699
           </View>
700 700
         </View>
701 701
         <Around building={building} onAction={this.openMap.bind(this)}></Around>
702
-      </Block>
702
+      </View>
703 703
     )
704 704
   }
705 705
 
@@ -887,10 +887,7 @@ export default class Index extends Component {
887 887
     )
888 888
   }
889 889
   renderActivities() {
890
-
891
-
892 890
     const { activityList } = this.state
893
-
894 891
     return (
895 892
       <Block>
896 893
         {
@@ -914,10 +911,8 @@ export default class Index extends Component {
914 911
                   onClick={this.handActivityItemClick}
915 912
                 >
916 913
                 </HelpGroupBanner>
917
-
918 914
               </View>
919 915
             </View>
920
-
921 916
           )
922 917
         }
923 918
       </Block>
@@ -1002,8 +997,6 @@ export default class Index extends Component {
1002 997
   //     videoPlayShow: 'flex'e.detail
1003 998
   //   })
1004 999
   // }
1005
-
1006
-
1007 1000
   renderVideo() {
1008 1001
     const { videoPlayShow } = this.state
1009 1002
     const { projectDetail } = this.props
@@ -1193,41 +1186,30 @@ export default class Index extends Component {
1193 1186
                   </View>
1194 1187
                   {/* 项目顾问 */}
1195 1188
                   {this.renderConsuler()}
1196
-
1197 1189
                   {/* 周边 */}
1198 1190
                   {this.rendercircum()}
1199
-
1200 1191
                   {/* 户型介绍 */}
1201 1192
                   {this.renderHouseTypeList()}
1202
-
1203 1193
                   {/* 助力活动 */}
1204 1194
                   {this.renderHelp()}
1205
-
1206 1195
                   {/* 拼团活动 */}
1207 1196
                   {this.renderGroup()}
1208
-
1209 1197
                   {/* 新鲜资讯 */}
1210 1198
                   {this.renderNews()}
1211
-
1212 1199
                   {/* 热门活动 */}
1213 1200
                   {this.renderActivities()}
1214
-
1215 1201
                   {/* 相册 */}
1216 1202
                   {this.renderPhotoAlbum()}
1217
-
1218 1203
                   {/* 免责声明 */}
1219 1204
                   {this.renderStatement()}
1220 1205
                 </View>
1221 1206
               </ScrollView>
1222
-
1223 1207
               {/* 生成海报 */}
1224 1208
               {
1225 1209
                 posterStatus && (<Poster data={posterData} toggle={this.togglePosterStatus}></Poster>)
1226 1210
               }
1227
-
1228 1211
               {/* 底部菜单 */}
1229 1212
               {this.renderBottomMenu()}
1230
-
1231 1213
               {/* <View className="tel-entrance" onClick={this.makePhoneCall}>
1232 1214
                 <Text className="iconfont icon-dianhua2"></Text>
1233 1215
                 <Text className="text">电话</Text>

+ 4
- 6
src/pages/project/detail/index.scss Vedi File

@@ -860,10 +860,11 @@
860 860
 
861 861
   .house-type__title {
862 862
     width: 100%;
863
-    font-size: 35px;
863
+    font-size: 40px;
864 864
     color: #000;
865 865
     font-weight: bold;
866
-    height: 76px;
866
+    height: 86px;
867
+    margin-top: 10px;
867 868
   }
868 869
 
869 870
   .house-type__list {
@@ -968,7 +969,7 @@
968 969
 
969 970
   .photos__type__title {
970 971
     width: 100%;
971
-    font-size: 35px;
972
+    font-size: 40px;
972 973
     color: #000;
973 974
     font-weight: bold;
974 975
     height: 76px;
@@ -1066,17 +1067,14 @@
1066 1067
 
1067 1068
   &__item {
1068 1069
     flex: 1 0 auto;
1069
-
1070 1070
     font-size: 32px;
1071 1071
     color: #666;
1072 1072
     line-height: 44px;
1073 1073
     padding: 4px 0;
1074
-
1075 1074
     &.active {
1076 1075
       color: #BB9C79;
1077 1076
       border-bottom: 1px solid #C8B299;
1078 1077
     }
1079
-
1080 1078
     &+& {
1081 1079
       margin-left: 64px;
1082 1080
     }

+ 10
- 6
src/pages/project/h5Page.js Vedi File

@@ -7,6 +7,7 @@ import ready from '@utils/ready'
7 7
 import { reportClient } from '@services/report'
8 8
 import { connect } from '@tarojs/redux'
9 9
 import { ROLE_CODE } from '@constants/user'
10
+import { getQrCodeParams } from '@utils/qrcode'
10 11
 import { getMiniQrcode, savePoint, updatePoint } from '@services/common'
11 12
 const bgImg = require('@assets/helpgroup/bg.png')
12 13
 
@@ -55,6 +56,7 @@ export default class Index extends Component {
55 56
   onShareAppMessage = () => {
56 57
     const { pageInfo } = this.state
57 58
     const currentPage = this.currentPageAndParams().join('?')
59
+    console.log(currentPage)
58 60
     return {
59 61
       title: pageInfo.shareTitle,
60 62
       path: currentPage,
@@ -114,7 +116,7 @@ export default class Index extends Component {
114 116
       console.log(router, "router")
115 117
       const hFiveId = this.$router.params.id || router.query.id || ""
116 118
       console.log(hFiveId, "hFiveId")
117
-      // h5id 、第一个分享人ID、置业顾问ID、分享人ID 
119
+      // h5id 、第一个分享人ID、置业顾问ID、分享人ID
118 120
       getHFiveDetail(hFiveId).then(res => {
119 121
         Taro.hideLoading()
120 122
         if (res.status == 1) {
@@ -241,12 +243,13 @@ export default class Index extends Component {
241 243
   }
242 244
   // 报备客户
243 245
   reportClient() {
246
+
244 247
     const router = Taro.getStorageSync('router')
245 248
     const consultant = this.$router.params.consultant || router.query.consultant || ""
246 249
     const {
247 250
       userInfo: { person: { phone, tel, userId } }
248 251
     } = this.props
249
-
252
+    // debugger
250 253
     if (consultant && consultant != userId) {
251 254
       const realPhone = phone || tel
252 255
       const payload = {
@@ -254,13 +257,12 @@ export default class Index extends Component {
254 257
         phone: realPhone,
255 258
         showToast: false
256 259
       }
260
+
257 261
       reportClient(payload).then(res => {
258 262
         console.log('恭喜您绑定成功')
263
+      }).catch(err => {
264
+        console.error(err)
259 265
       })
260
-      // .catch(err => {
261
-      //   console.error(err)
262
-
263
-      // })
264 266
     }
265 267
   }
266 268
 
@@ -288,9 +290,11 @@ export default class Index extends Component {
288 290
   render() {
289 291
     const { pageInfo, webViewVisible, codeParams } = this.state
290 292
     const { userInfo: { person } } = this.props
293
+    const consultant = person.personType == ROLE_CODE['CONSULTANT'] ? person.userId : ""
291 294
     const webUrlParams = [
292 295
       `personId=${person.personId}`,
293 296
       `h5id=${this.$router.params.id}`,
297
+      `consultant=${consultant}`,
294 298
       `codeParams=${encodeURIComponent(codeParams)}`,
295 299
     ].join('&')
296 300
 

+ 19
- 5
src/pages/project/index.js Vedi File

@@ -37,8 +37,7 @@ export default class Index extends Component {
37 37
     loaded: false,
38 38
     maskBanner: '',
39 39
     // shareImg: 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/cff400dab32e9230f6bf7498b8291d7.jpg',
40
-    // shareImg: 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1574145199853-97feda7895c65be33aa234a7b81b37f.jpg',
41
-    shareImg: 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1576128320527-d9287eea5fb1bab389601ed1d31cf70.jpg', // 融创
40
+    shareImg: 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1574145199853-97feda7895c65be33aa234a7b81b37f.jpg',
42 41
     // shareImg: 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/upload/images/1565358322510-share.jpg',
43 42
     // adImage: 'https://estateagents.oss-cn-shanghai.aliyuncs.com/miniapp/f58480ff83787b64235b729bca5d805.jpg',
44 43
     bannerList: [],
@@ -82,6 +81,7 @@ export default class Index extends Component {
82 81
     })
83 82
   }
84 83
   componentDidShow() {
84
+<<<<<<< HEAD
85 85
     Taro.showTabBar({
86 86
       animation: false
87 87
     })
@@ -89,14 +89,25 @@ export default class Index extends Component {
89 89
       ready.queue(() => {
90 90
         // debugger
91 91
         this.loadData()
92
+=======
93
+    if (Taro.getStorageSync('firstLoading') != '8') {
94
+      Taro.showTabBar({
95
+        animation: false
96
+>>>>>>> 931b162337bc2aed1029d4f6257d9a1807a6e7ef
92 97
       })
98
+      if (this.props.curCity.id) {
99
+        ready.queue(() => {
100
+          // debugger
101
+          this.loadData()
102
+        })
103
+      }
104
+      Taro.setStorageSync('firstLoading', '6')
93 105
     }
94 106
   }
95 107
 
96 108
   componentWillUnmount() {
97 109
     const { recordId } = this.state
98 110
     recordId && updatePoint(recordId)
99
-
100 111
   }
101 112
 
102 113
   getLocation() {
@@ -176,7 +187,6 @@ export default class Index extends Component {
176 187
       const banner = res[0]
177 188
 
178 189
       const maskVisible = banner && this.props.screenShow !== (banner || {}).contentId
179
-      // debugger
180 190
       if (maskVisible) {
181 191
         Taro.hideTabBar({
182 192
           animation: true
@@ -187,8 +197,12 @@ export default class Index extends Component {
187 197
         maskVisible,
188 198
         maskBanner: banner || {}
189 199
       }, () => {
200
+
201
+
190 202
         const { dispatch } = getStore()
191 203
         dispatch({ type: SET_SCREEN_SHOWED, payload: (banner || {}).contentId })
204
+
205
+
192 206
       })
193 207
     })
194 208
   }
@@ -702,4 +716,4 @@ export default class Index extends Component {
702 716
       </Block>
703 717
     )
704 718
   }
705
-}
719
+}

+ 1
- 1
src/pages/report/detail/index.js Vedi File

@@ -163,7 +163,7 @@ export default class ReportDetail extends Component {
163 163
       this.Alert("请输入客户电话");
164 164
       return false;
165 165
     }
166
-    if (!(/^1[3|4|5|7|8|9][0-9]\d{4,8}$/.test(phone)) || phone.length != 11) {
166
+    if (!(/^1[3|4|5|6|7|8|9][0-9]\d{4,8}$/.test(phone)) || phone.length != 11) {
167 167
       this.Alert('请输入正确的手机号码');
168 168
       return false;
169 169
     }

+ 3
- 3
src/pages/shop/index.js Vedi File

@@ -143,9 +143,9 @@ export default class Shop extends Component {
143 143
   }
144 144
 
145 145
   goPointRecords() {
146
-    const { person: { points } } = this.props.userInfo
146
+    // const { person: { points } } = this.props.userInfo
147 147
     Taro.navigateTo({
148
-      url: `/pages/shop/integralDetail/index?points=` + points
148
+      url: `/pages/shop/integralDetail/index?points=` + this.state.points
149 149
     })
150 150
   }
151 151
 
@@ -358,7 +358,7 @@ export default class Shop extends Component {
358 358
               <View className='user__left__name'>{person.nickname}</View>
359 359
               {
360 360
                 user.havaSigned ?
361
-                  (<View className="qiandao__btn">已签到</View>) :
361
+                  (<View className="reday-qiandao-btn">已签到</View>) :
362 362
                   (<View className="qiandao__btn" onClick={this.doSign}>签到</View>)
363 363
               }
364 364
               <View className='message'>

+ 10
- 0
src/pages/shop/index.scss Vedi File

@@ -70,6 +70,16 @@
70 70
         border-radius: 12px;
71 71
         color: #fff;
72 72
       }
73
+      .reday-qiandao-btn{
74
+        padding: 6px 18px;
75
+        font-size: 28px;
76
+        color: #fff;
77
+        position: absolute;
78
+        top:64px;
79
+        right:70px;
80
+        background-color: #DADADA;
81
+        border-radius: 12px;
82
+      }
73 83
       .message{
74 84
         width: 100%;
75 85
         display: flex;

+ 3
- 1
src/utils/login.js Vedi File

@@ -46,6 +46,8 @@ export default function (payload, callback) {
46 46
           ]
47 47
 
48 48
           if (noAuthPages.indexOf(path) === -1 || !sceneInShare(scene)) {
49
+
50
+            Taro.setStorageSync('firstLoading', '8')
49 51
             Taro.reLaunch({
50 52
               url: '/pages/auth/index'
51 53
             })
@@ -58,4 +60,4 @@ export default function (payload, callback) {
58 60
       })
59 61
     }
60 62
   })
61
-}
63
+}

+ 11
- 8
src/utils/request.js Vedi File

@@ -27,7 +27,9 @@ export const setStorage = function (key, data) {
27 27
  * @param {*} options
28 28
  */
29 29
 export const fetch = async (options) => {
30
-  const { url, payload, method = 'GET', showToast = true, autoLogin = true } = options
30
+  const { url, payload = {}, method = 'GET', showToast = true, autoLogin = true } = options
31
+  const showMessage = Object.prototype.hasOwnProperty.call(payload, 'showToast') ? payload.showToast : showToast
32
+  // debugger
31 33
   return Taro.request({
32 34
     url,
33 35
     method,
@@ -44,7 +46,6 @@ export const fetch = async (options) => {
44 46
         title: "请检查网络",
45 47
         icon: 'none'
46 48
       })
47
-
48 49
       console.error(res)
49 50
       throw new Error('请检查网络')
50 51
     }
@@ -63,14 +64,14 @@ export const fetch = async (options) => {
63 64
           })
64 65
         })
65 66
       } else {
66
-        if (showToast) {
67
+        if (showMessage) {
67 68
           Taro.showToast({
68 69
             title: defaultMsg,
69 70
             icon: 'none'
70 71
           })
71 72
         }
72 73
       }
73
-      if (showToast) {
74
+      if (showMessage) {
74 75
 
75 76
         Taro.showToast({
76 77
           title: message,
@@ -91,11 +92,13 @@ export const fetch = async (options) => {
91 92
     if (err.message) {
92 93
       errMessage = err.message
93 94
     }
95
+    if (showMessage) {
94 96
 
95
-    Taro.showToast({
96
-      title: errMessage,
97
-      icon: 'none'
98
-    })
97
+      Taro.showToast({
98
+        title: errMessage,
99
+        icon: 'none'
100
+      })
101
+    }
99 102
 
100 103
     throw new Error(errMessage)
101 104
   })