Browse Source

静态页面

1002884655 4 years ago
parent
commit
9c5144e370

+ 11
- 11
project.config.json View File

@@ -5,30 +5,30 @@
5 5
 	"appid": "wx1d9348230d6a0da6",
6 6
 	"setting": {
7 7
 		"urlCheck": false,
8
-		"scopeDataCheck": false,
9
-		"coverView": true,
10 8
 		"es6": false,
9
+		"enhance": false,
11 10
 		"postcss": false,
12
-		"compileHotReLoad": false,
13 11
 		"preloadBackgroundData": false,
14 12
 		"minified": false,
15
-		"autoAudits": false,
16 13
 		"newFeature": true,
17
-		"uglifyFileName": false,
18
-		"uploadWithSourceMap": true,
19
-		"useIsolateContext": true,
14
+		"coverView": true,
20 15
 		"nodeModules": false,
21
-		"enhance": false,
22
-		"useCompilerModule": true,
23
-		"userConfirmedUseCompilerModuleSwitch": false,
16
+		"autoAudits": false,
24 17
 		"showShadowRootInWxmlPanel": true,
18
+		"scopeDataCheck": false,
19
+		"uglifyFileName": false,
25 20
 		"checkInvalidKey": true,
26 21
 		"checkSiteMap": true,
22
+		"uploadWithSourceMap": true,
23
+		"compileHotReLoad": false,
27 24
 		"babelSetting": {
28 25
 			"ignore": [],
29 26
 			"disablePlugins": [],
30 27
 			"outputPath": ""
31
-		}
28
+		},
29
+		"useIsolateContext": true,
30
+		"useCompilerModule": false,
31
+		"userConfirmedUseCompilerModuleSwitch": false
32 32
 	},
33 33
 	"compileType": "miniprogram",
34 34
 	"simulatorType": "wechat",

BIN
src/assets/img/icon17.png View File


BIN
src/assets/img/icon18.png View File


BIN
src/assets/img/icon19.png View File


BIN
src/assets/img/icon20.png View File


BIN
src/assets/img/icon21.png View File


BIN
src/assets/img/icon22.png View File


BIN
src/assets/img/icon23.png View File


BIN
src/assets/img/icon24.png View File


BIN
src/assets/img/icon25.png View File


BIN
src/assets/img/icon26.png View File


BIN
src/assets/img/logo1.png View File


+ 2
- 0
src/constants/api.js View File

@@ -31,6 +31,7 @@ export const API_QUERY_DOCUMENTVERIFY = resolvePath('documentVerify')
31 31
 
32 32
 export const API_QUERY_DOCUMENTVERIFY_list = resolvePath('documentVerify/list')
33 33
 export const API_QUERY_TADRAINGE = resolvePath('taDrainage')
34
+export const API_USER_LEVEL = resolvePath('person-level')
34 35
 
35 36
 
36 37
 // chat
@@ -239,3 +240,4 @@ export const API_TEMPLATE_TYPE = resolvePath('template/of/')
239 240
 // 商家
240 241
 export const API_STORE_LIST = resolvePath('shop')
241 242
 export const API_STORE_TYPE_LIST = resolvePath('shop-type')
243
+export const API_STORE_DETAIL = resolvePath('shop')

+ 1
- 1
src/pages/activity/assemblePage.js View File

@@ -120,7 +120,7 @@ export default class Index extends Component {
120 120
           }
121 121
         </View>
122 122
         <View>
123
-          <Image className='Logo' mode='widthFix' src={require('@/assets/img/logo.png')}></Image>
123
+          <Image className='Logo' mode='widthFix' src={require('@/assets/img/logo1.png')}></Image>
124 124
         </View>
125 125
       </ListView>
126 126
     );

+ 1
- 1
src/pages/activity/assistancePage.js View File

@@ -120,7 +120,7 @@ export default class Index extends Component {
120 120
           }
121 121
         </View>
122 122
         <View>
123
-          <Image className='Logo' mode='widthFix' src={require('@/assets/img/logo.png')}></Image>
123
+          <Image className='Logo' mode='widthFix' src={require('@/assets/img/logo1.png')}></Image>
124 124
         </View>
125 125
       </ListView>
126 126
     );

+ 1
- 1
src/pages/activity/detail/assemble.js View File

@@ -28,7 +28,7 @@ import * as noticeType from '@/constants/common.js'
28 28
 import { report as reportCustomer } from '@/utils/customer'
29 29
 import { share as shareSavePoint } from '@/utils/shareSavePoint'
30 30
 
31
-const waitImg = require('@/assets/helpgroup/wait.png')
31
+const waitImg = require('@/assets/img/icon26.png')
32 32
 const memberImg = require('@/assets/helpgroup/group/member.png')
33 33
 const successImg = 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/group/success.png'
34 34
 const failImg = 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/group/fail.png'

+ 1
- 1
src/pages/activity/detail/assistance.js View File

@@ -32,7 +32,7 @@ import { share as shareSavePoint } from '@/utils/shareSavePoint'
32 32
 const successImg = 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/help/success2.png'
33 33
 const failImg = 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/images/helpgroup/help/help%20failure.png'
34 34
 const quoteImg = 'https://njcj.oss-cn-shanghai.aliyuncs.com/miniapp/images/quota.png';
35
-const waitImg = require('@/assets/helpgroup/wait.png')
35
+const waitImg = require('@/assets/img/icon26.png')
36 36
 
37 37
 // 活动状态
38 38
 const ActBeforeStart = 0;

+ 1
- 1
src/pages/activity/myActivity.js View File

@@ -144,7 +144,7 @@ export default class Index extends Component {
144 144
               // </ActivityItem>
145 145
             ))
146 146
           }
147
-          <Image mode="widthFix" className='Logo' src={require('@/assets/img/logo.png')}></Image>
147
+          <Image mode="widthFix" className='Logo' src={require('@/assets/img/logo1.png')}></Image>
148 148
         </View>
149 149
       </ListView>
150 150
     );

+ 4
- 1
src/pages/dichan/index.js View File

@@ -5,7 +5,9 @@ import { getItemList } from '@/services/item'
5 5
 import ready from '@/utils/ready'
6 6
 import { connect } from '@tarojs/redux'
7 7
 
8
-@connect(({ city }) => ({ ...city }))
8
+@connect(
9
+  state => ({ ...state.userInfo })
10
+)
9 11
 export default class Index extends Component {
10 12
   config = {
11 13
     navigationBarTitleText: '地产'
@@ -17,6 +19,7 @@ export default class Index extends Component {
17 19
   }
18 20
   componentWillMount () {
19 21
     ready.queue(async () => {
22
+      console.log(userInfo, `-----------------------11111111111111111111111`)
20 23
       const { records: list } = await this.loadList(1, 10)
21 24
       this.setState({
22 25
         PageList: list

+ 106
- 7
src/pages/league/detail.js View File

@@ -1,20 +1,119 @@
1
-import { View } from '@tarojs/components'
2 1
 import { Component } from '@tarojs/taro'
3 2
 import './index.scss'
3
+import { GetShopDetail } from '@/services/shop'
4
+import ready from '@/utils/ready'
4 5
 
5 6
 export default class Index extends Component {
6 7
   config = {
7
-    navigationBarTitleText: '商家名称'
8
+    navigationBarTitleText: '商家详情'
8 9
   }
9 10
   state = {
11
+    DetailInfo: null
12
+  }
13
+  componentWillMount () {
14
+    ready.queue(() => {
15
+      GetShopDetail({ id: this.$router.params.id }).then((res) => {
16
+        this.setState({
17
+          DetailInfo: { ...res, tags: res.tags.split(',') || [] } || null
18
+        })
19
+        Taro.setNavigationBarTitle({ title: res.shopName })
20
+      })
21
+    })
22
+  }
23
+  OpenMap () {
24
+    const coord = this.state.DetailInfo.lngLat.split(',')
25
+    const latitude = parseFloat(coord[1])
26
+    const longitude = parseFloat(coord[0])
27
+    Taro.openLocation({
28
+      latitude,
29
+      longitude,
30
+      name: this.state.DetailInfo.shopName,
31
+      address: this.state.DetailInfo.address,
32
+      scale: 18
33
+    })
34
+  }
35
+  CallShop () {
36
+    Taro.makePhoneCall({
37
+      phoneNumber: this.state.DetailInfo.phone
38
+    })
10 39
   }
11 40
   render () {
12
-    const { } = this.state
41
+    const { DetailInfo } = this.state
13 42
     return (
14
-      <View className='Page'>
15
-
16
-        商家详情
17
-
43
+      <View className='Page ShopDetailPage'>
44
+        {
45
+          DetailInfo !== null &&
46
+          <View>
47
+            <Image mode='widthFix' src={DetailInfo.shopLogo}></Image>
48
+            <View className='ShopInfo'>
49
+              <Text>{DetailInfo.shopName}</Text>
50
+              <View className='Tag flex-h'>
51
+                <View className='flex-item'>
52
+                  <Text>
53
+                    {
54
+                      DetailInfo.tags.map((item) => (
55
+                        item + ' '
56
+                      ))
57
+                    }
58
+                  </Text>
59
+                </View>
60
+                {
61
+                  DetailInfo.score - 0 > 0 ?
62
+                    <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
63
+                    :
64
+                    <Image mode='widthFix' src={require('@/assets/img/icon7.png')} />
65
+                }
66
+                {
67
+                  DetailInfo.score - 0 > 1 ?
68
+                    <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
69
+                    :
70
+                    <Image mode='widthFix' src={require('@/assets/img/icon7.png')} />
71
+                }
72
+                {
73
+                  DetailInfo.score - 0 > 2 ?
74
+                    <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
75
+                    :
76
+                    <Image mode='widthFix' src={require('@/assets/img/icon7.png')} />
77
+                }
78
+                {
79
+                  DetailInfo.score - 0 > 3 ?
80
+                    <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
81
+                    :
82
+                    <Image mode='widthFix' src={require('@/assets/img/icon7.png')} />
83
+                }
84
+                {
85
+                  DetailInfo.score - 0 > 4 ?
86
+                    <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
87
+                    :
88
+                    <Image mode='widthFix' src={require('@/assets/img/icon7.png')} />
89
+                }
90
+                <Text className='Score'>¥{DetailInfo.costAvg || 0}/人</Text>
91
+              </View>
92
+              <View className='Address flex-h'>
93
+                <View className='flex-item'>
94
+                  <Text>地址:{DetailInfo.address}</Text>
95
+                </View>
96
+                <View className='ToMap' onClick={this.OpenMap}>地图导航</View>
97
+                <Image mode='widthFix' src={require('@/assets/img/more.png')} />
98
+              </View>
99
+              <View className='Phone flex-h' onClick={this.CallShop}>
100
+                <View className='flex-item'>
101
+                  <Text>电话:{DetailInfo.phone}</Text>
102
+                </View>
103
+                <Image mode='widthFix' src={require('@/assets/img/icon13.png')} />
104
+              </View>
105
+            </View>
106
+            <View className='Line'></View>
107
+            <View className='DescTop'>
108
+              <Text>商户信息</Text>
109
+              <View></View>
110
+            </View>
111
+            <Image mode='widthFix' src={DetailInfo.shopDesc}></Image>
112
+            <View className='ShopPhone'>
113
+              <Text onClick={this.CallShop}>联系商家</Text>
114
+            </View>
115
+          </View>
116
+        }
18 117
       </View>
19 118
     )
20 119
   }

+ 159
- 0
src/pages/league/index.scss View File

@@ -404,3 +404,162 @@
404 404
     }
405 405
   }
406 406
 }
407
+
408
+.ShopDetailPage {
409
+  width: 100%;
410
+  position: relative;
411
+  overflow: hidden;
412
+  min-height: 100vh;
413
+  > view {
414
+    width: 100%;
415
+    position: relative;
416
+    overflow: hidden;
417
+    padding: 0;
418
+    > image {
419
+      width: 100%;
420
+      display: block;
421
+      height: auto;
422
+    }
423
+    > .ShopInfo {
424
+      padding: 30px;
425
+      position: relative;
426
+      overflow: hidden;
427
+      background: #fff;
428
+      > text {
429
+        display: block;
430
+        width: 100%;
431
+        font-size: 32px;
432
+        color: #333;
433
+        font-weight: bold;
434
+        line-height: 40px;
435
+      }
436
+      > view {
437
+        margin-top: 10px;
438
+      }
439
+      > .Tag {
440
+        align-items: center;
441
+        > .flex-item {
442
+          position: relative;
443
+          overflow: hidden;
444
+          margin-right: 10px;
445
+          > text {
446
+            width: 100%;
447
+            display: block;
448
+            font-size: 28px;
449
+            color: #999;
450
+            line-height: 40px;
451
+            overflow: hidden;
452
+            text-overflow: ellipsis;
453
+          }
454
+        }
455
+        > image {
456
+          display: inline-block;
457
+          vertical-align: middle;
458
+          width: 14px;
459
+          height: auto;
460
+          margin-right: 6px;
461
+        }
462
+        > .Score {
463
+          font-size: 30px;
464
+          color: #fdac2e;
465
+        }
466
+      }
467
+      > .Address {
468
+        align-items: center;
469
+        > .flex-item {
470
+          position: relative;
471
+          overflow: hidden;
472
+          margin-right: 10px;
473
+          > text {
474
+            display: block;
475
+            width: 100%;
476
+            font-size: 24px;
477
+            line-height: 40px;
478
+            overflow: hidden;
479
+            text-overflow: ellipsis;
480
+            color: #333;
481
+          }
482
+        }
483
+        > .ToMap {
484
+          font-size: 24;
485
+          color: #666;
486
+        }
487
+        > image {
488
+          width: 12px;
489
+          height: auto;
490
+          margin-left: 10px;
491
+        }
492
+      }
493
+      > .Phone {
494
+        align-items: center;
495
+        > .flex-item {
496
+          position: relative;
497
+          overflow: hidden;
498
+          margin-right: 10px;
499
+          > text {
500
+            display: block;
501
+            width: 100%;
502
+            font-size: 24px;
503
+            line-height: 40px;
504
+            overflow: hidden;
505
+            text-overflow: ellipsis;
506
+            color: #333;
507
+          }
508
+        }
509
+        > image {
510
+          width: 21px;
511
+          height: auto;
512
+          margin-left: 10px;
513
+        }
514
+      }
515
+    }
516
+    > .Line {
517
+      width: 100%;
518
+      height: 30px;
519
+      background: #f8f8f8;
520
+    }
521
+    > .DescTop {
522
+      width: 100%;
523
+      position: relative;
524
+      overflow: hidden;
525
+      font-size: 0;
526
+      text-align: center;
527
+      margin-top: 10px;
528
+      > view {
529
+        position: absolute;
530
+        left: 30px;
531
+        right: 30px;
532
+        z-index: 1;
533
+        height: 2px;
534
+        color: #f8f8f8;
535
+        top: 50%;
536
+        transform: translateY(-50%);
537
+        -webkit-transform: translateY(-50%);
538
+      }
539
+      > text {
540
+        display: inline-block;
541
+        position: relative;
542
+        z-index: 2;
543
+        background: #fff;
544
+        font-size: 28px;
545
+        line-height: 80px;
546
+        padding: 0 40px;
547
+      }
548
+    }
549
+    > .ShopPhone {
550
+      padding: 30px;
551
+      position: relative;
552
+      overflow: hidden;
553
+      > text {
554
+        width: 100%;
555
+        display: block;
556
+        font-size: 32px;
557
+        color: #fff;
558
+        line-height: 92px;
559
+        border-radius: 8px;
560
+        background: #1bc5d4;
561
+        text-align: center;
562
+      }
563
+    }
564
+  }
565
+}

+ 30
- 5
src/pages/league/item.js View File

@@ -36,11 +36,36 @@ export default class Index extends Component {
36 36
               }
37 37
             </View>
38 38
             <View className='Score'>
39
-              <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
40
-              <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
41
-              <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
42
-              <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
43
-              <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
39
+              {
40
+                item.score - 0 > 0 ?
41
+                  <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
42
+                  :
43
+                  <Image mode='widthFix' src={require('@/assets/img/icon7.png')} />
44
+              }
45
+              {
46
+                item.score - 0 > 1 ?
47
+                  <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
48
+                  :
49
+                  <Image mode='widthFix' src={require('@/assets/img/icon7.png')} />
50
+              }
51
+              {
52
+                item.score - 0 > 2 ?
53
+                  <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
54
+                  :
55
+                  <Image mode='widthFix' src={require('@/assets/img/icon7.png')} />
56
+              }
57
+              {
58
+                item.score - 0 > 3 ?
59
+                  <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
60
+                  :
61
+                  <Image mode='widthFix' src={require('@/assets/img/icon7.png')} />
62
+              }
63
+              {
64
+                item.score - 0 > 4 ?
65
+                  <Image mode='widthFix' src={require('@/assets/img/icon6.png')} />
66
+                  :
67
+                  <Image mode='widthFix' src={require('@/assets/img/icon7.png')} />
68
+              }
44 69
               <Text>¥{item.costAvg || 0}/人</Text>
45 70
             </View>
46 71
             <View className='flex-h'>

+ 17
- 8
src/pages/person/index.js View File

@@ -2,6 +2,7 @@ import Taro, { Component } from '@tarojs/taro';
2 2
 import './index.scss'
3 3
 import { ROLE_CODE } from '@/constants/user'
4 4
 import { queryUserInfo, doUserSignin } from '@/services/user'
5
+import { GetUserLevel } from '@/services/person'
5 6
 import { connect } from '@tarojs/redux'
6 7
 import Notice from '@/components/Notice'
7 8
 import { getCodeMessage, putRegisterConsultant } from '@/services/getCode'
@@ -39,6 +40,7 @@ export default class Person extends Component {
39 40
     roleName: '普通用户',
40 41
     pageVisible: false,
41 42
     loading: true,
43
+    UserLevelIcon: null,
42 44
     UserMenus: [
43 45
       [
44 46
         {
@@ -123,12 +125,12 @@ export default class Person extends Component {
123 125
     Taro.showLoading()
124 126
     this.loadUserInfo()
125 127
     Taro.hideLoading()
126
-    console.log(this.props, "wwwwwwwwwwwwwwwwww")
127 128
   }
128 129
 
129 130
   loadUserInfo () {
130 131
     queryUserInfo().then(users => {
131 132
       const [roleSetting, roleName] = this.getRoleName(users.personType)
133
+      console.log(users, `---------------------------------------------`)
132 134
       this.setState({
133 135
         users,
134 136
         phone: users.phone,
@@ -138,6 +140,15 @@ export default class Person extends Component {
138 140
         roleName,
139 141
         ...roleSetting,
140 142
       })
143
+      GetUserLevel({ pageNum: 1, pageSize: 10000 }).then((res) => {
144
+        res.records.map((item) => {
145
+          if (users.points - 0 >= item.pointRule.split(',')[0] && users.points - 0 <= item.pointRule.split(',')[1]) {
146
+            this.setState({
147
+              UserLevelIcon: item.levelIcon
148
+            })
149
+          }
150
+        })
151
+      })
141 152
     })
142 153
   }
143 154
 
@@ -308,7 +319,7 @@ export default class Person extends Component {
308 319
   }
309 320
 
310 321
   renderDetail () {
311
-    const { users, menus, roleName, UserMenus } = this.state
322
+    const { users, menus, roleName, UserMenus, UserLevelIcon } = this.state
312 323
     const { user: { userInfo: { person: { avatarurl, org: { waterMark } = {} }, miniApp: { name } } } } = this.props
313 324
 
314 325
     // const showQRCode = user.personType === ROLE_CODE['CONSULTANT'] || ROLE_CODE['ESTATE_AGENT'] || ROLE_CODE['CHANNEL_AGENT']
@@ -331,12 +342,10 @@ export default class Person extends Component {
331 342
               <View className="info-text" onClick={this.goPersonDetail}>
332 343
                 <View className="UserName">
333 344
                   <Text>{users.name ? users.name : users.nickname}</Text>
334
-                  <Image src={require('@/assets/img/userlevel1.png')} mode='widthFix'></Image>
335
-                  <Image src={require('@/assets/img/userlevel2.png')} mode='widthFix'></Image>
336
-                  <Image src={require('@/assets/img/userlevel3.png')} mode='widthFix'></Image>
337
-                  <Image src={require('@/assets/img/userlevel4.png')} mode='widthFix'></Image>
338
-                  <Image src={require('@/assets/img/userlevel5.png')} mode='widthFix'></Image>
339
-                  <Image src={require('@/assets/img/userlevel6.png')} mode='widthFix'></Image>
345
+                  {
346
+                    UserLevelIcon !== null &&
347
+                    <Image src={UserLevelIcon} mode='widthFix'></Image>
348
+                  }
340 349
                 </View>
341 350
                 <View className="info-text__intro" style='color: #666;'>积分 {users.points || 0}</View>
342 351
               </View>

+ 1
- 1
src/pages/person/myShare/index.js View File

@@ -140,7 +140,7 @@ export default class Person extends Taro.Component {
140 140
             ))
141 141
           }
142 142
         </View>
143
-        <Image mode="widthFix" className='Logo' src={require('@/assets/img/logo.png')}></Image>
143
+        <Image mode="widthFix" className='Logo' src={require('@/assets/img/logo1.png')}></Image>
144 144
       </ListView>
145 145
     )
146 146
   }

+ 8
- 1
src/services/person.js View File

@@ -14,10 +14,17 @@ import {
14 14
   API_MORE_ACTIVITY,
15 15
   API_SHARE_LIST,
16 16
   API_SHARE_INFOLIST,
17
-  API_BIND_CUSTOMER
17
+  API_BIND_CUSTOMER,
18
+  API_USER_LEVEL
18 19
 } from '@/constants/api'
19 20
 
20 21
 
22
+/**
23
+ * 获取用户积分等级
24
+ * @param {*} type
25
+ */
26
+export const GetUserLevel = (type, payload) => fetch({ url: `${API_USER_LEVEL}`, payload })
27
+
21 28
 /**
22 29
  * 获取客户分析性别数据
23 30
  * @param {*} type

+ 5
- 1
src/services/shop.js View File

@@ -1,7 +1,8 @@
1 1
 import { fetch } from "@/utils/request";
2 2
 import {
3 3
   API_STORE_LIST,
4
-  API_STORE_TYPE_LIST
4
+  API_STORE_TYPE_LIST,
5
+  API_STORE_DETAIL
5 6
 } from "@/constants/api";
6 7
 
7 8
 /**
@@ -15,3 +16,6 @@ export const GetShopList = payload =>
15 16
 export const GetShopTypeList = payload =>
16 17
   fetch({ url: API_STORE_TYPE_LIST, payload, method: "GET" });
17 18
 
19
+export const GetShopDetail = payload =>
20
+  fetch({ url: `${API_STORE_DETAIL}/${payload.id}`, method: 'get' });
21
+