Explorar el Código

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

张延森 hace 5 años
padre
commit
7101608c0d

+ 2
- 2
config/prod.js Ver fichero

@@ -3,8 +3,8 @@ module.exports = {
3 3
     NODE_ENV: '"production"'
4 4
   },
5 5
   defineConstants: {
6
-    HOST: '"http://192.168.0.218:8080"',
7
-    WSS_HOST: '"ws://192.168.0.218:8080"',
6
+    HOST: '"http://192.168.0.72:8080"',
7
+    WSS_HOST: '"ws://192.168.0.72:8080"',
8 8
     // HOST: '"https://lt.pawoma.cn"',
9 9
     // WSS_HOST: '"wss://lt.pawoma.cn"',
10 10
   },

+ 1
- 1
project.config.json Ver fichero

@@ -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/consultant.png Ver fichero


+ 9
- 3
src/pages/person/customerAnalysis/analysis.js Ver fichero

@@ -4,8 +4,9 @@ import { View } from "@tarojs/components";
4 4
 import MoveChart from '../../components/MoveChart'
5 5
 import LineChart from '../../components/LineChart'
6 6
 import './index.scss'
7
-import { AtTabs, AtTabsPane } from 'taro-ui'
7
+import { AtTabs, AtTabsPane, AtProgress } from 'taro-ui'
8 8
 import "taro-ui/dist/style/components/tabs.scss"
9
+import "taro-ui/dist/style/components/progress.scss";
9 10
 import { savePoint, updatePoint } from '@services/common'
10 11
 import { connect } from '@tarojs/redux'
11 12
 
@@ -32,7 +33,7 @@ export default class analysis extends Taro.Component {
32 33
       current: value
33 34
     }, )
34 35
   }
35
- 
36
+
36 37
 
37 38
   render() {
38 39
 
@@ -42,7 +43,12 @@ export default class analysis extends Taro.Component {
42 43
       <View>
43 44
         <AtTabs className="tab-bar" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
44 45
           <AtTabsPane current={this.state.current} index={0} >
45
-            <View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;' >标签22页一的内容</View>
46
+            <View>
47
+              <View className="sex-box">
48
+                <View className="sex">性别</View>
49
+                <AtProgress percent={25} strokeWidth={6} color='#FF4949' />
50
+              </View>
51
+            </View>
46 52
           </AtTabsPane>
47 53
           <AtTabsPane current={this.state.current} index={1}>
48 54
             <View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;'>标签页二的内容</View>

+ 1
- 1
src/pages/person/customerAnalysis/index.js Ver fichero

@@ -15,7 +15,7 @@ export default class customer extends Taro.Component {
15 15
   }
16 16
 
17 17
   state = {
18
-    current: 1,
18
+    current: 0,
19 19
     recordId: undefined, // 埋点ID
20 20
   }
21 21
 

+ 142
- 1
src/pages/person/customerAnalysis/index.scss Ver fichero

@@ -63,6 +63,7 @@
63 63
       flex: none;
64 64
       color: #666;
65 65
       font-size: 28px;
66
+      padding: 12px 20px;
66 67
     }
67 68
     .at-tabs__item--active{
68 69
       color: $primary-color;
@@ -76,7 +77,147 @@
76 77
     }
77 78
   
78 79
   }
80
+}
79 81
 
80 82
 
81
-}
83
+.user_con{
84
+  margin: 0 20px 40px 20px;
85
+  height:256px;
86
+  box-shadow:0px 4px 12px 0px rgba(0,0,0,0.12);
87
+  border-radius:12px;
88
+  position: relative;
89
+ 
90
+  .bg{
91
+    position: absolute;
92
+    top:0;
93
+    left:0;
94
+    width: 100%;
95
+    height: 100%;
96
+    border-radius: 12px;
97
+
98
+  }
99
+  .user__left__headimg{
100
+    width: 176px;
101
+    height: 176px;
102
+    border-radius: 50%;
103
+    position: absolute;
104
+    top:50%;
105
+    left: 128px;
106
+    margin-top: -88px;
107
+  }
108
+  .user__left__name{
109
+    font-size:32px;
110
+    color: $primary-color;
111
+    position: absolute;
112
+    top:76px;
113
+    left:320px;
114
+  }
115
+  .user__left__phone{
116
+    font-size:32px;
117
+    color: #333;
118
+    position: absolute;
119
+    bottom:76px;
120
+    left:320px;
121
+  }
122
+  }
123
+  .my-tab{
124
+    .btn{
125
+      width:360px;
126
+      text-align: center;
127
+      height:70px;
128
+      line-height: 70px;
129
+      margin: 200px auto 40px auto;
130
+      background:$primary-color;
131
+      color: #fff;
132
+      border-radius:8px;
133
+      font-size: 32px;
134
+
135
+    }
136
+    .pane{
137
+      padding-bottom: 240px;
138
+    }
139
+    .at-tabs__item{
140
+      padding: 12px 20px;
141
+      color: #666;
142
+      font-size: 30px;
143
+    }
144
+    .at-tabs__item-underline{
145
+      width: 64%;
146
+      margin-left: 18%;
147
+      background-color: $primary-color;
148
+    }
149
+    .at-tabs__item--active{
150
+      color: $primary-color;
151
+    }
152
+    .at-tabs__underline{
153
+      height: 0px!important;
154
+    }
155
+    .tab-pane1{
156
+      position: relative;
157
+      .status{
158
+        font-size: 36px;
159
+        color: $primary-color;
160
+        position: absolute;
161
+        right:30px;
162
+        top:0px;
163
+      }
164
+      .base-item{
165
+        margin-top: 30px;
166
+        display: flex;
167
+        padding: 0 28px;
168
+        align-items: center;
169
+        color: #666;
170
+        font-size: 30px;
171
+        .con{
172
+          margin-left: 20px;
173
+        }
174
+      }
175
+      
82 176
 
177
+    }
178
+    .tab-pane2{
179
+      padding: 0 40px;
180
+      .date{
181
+        font-size: 26px;
182
+        color: #999;
183
+        margin-top: 30px;
184
+      }
185
+      .record-item{
186
+        font-size: 30px;
187
+        margin-top: 20px;
188
+        color: #333;
189
+        display: flex;
190
+        align-items: center;
191
+        justify-content: space-between;
192
+        .time{
193
+          font-size: 26px;
194
+          color: #999;
195
+        }
196
+      }
197
+    }
198
+    .tab-pane3{
199
+      padding: 20px 40px;
200
+    }
201
+  }
202
+  .tab-pane4{
203
+    padding: 0 40px;
204
+    // .genjin-item{
205
+    //   display: flex;
206
+    //   justify-content: space-between;
207
+    //   align-items: center;
208
+    //   color: #333;
209
+    //   font-size: 34px;
210
+    //   .dot{
211
+    //     width:16px;
212
+    //     height:16px;
213
+    //     display: inline-block;
214
+    //     background:rgba(246,182,29,1);
215
+    //     border-radius: 50%;
216
+    //   }
217
+    //   .time{
218
+    //     font-size: 26px;
219
+    //     color: #999;
220
+    //   }
221
+    // }
222
+    
223
+  }

+ 45
- 0
src/pages/person/customerAnalysis/item/index.js Ver fichero

@@ -0,0 +1,45 @@
1
+import Taro, { Component } from '@tarojs/taro';
2
+import './index.scss'
3
+import dayjs from 'dayjs'
4
+import { getThumbnail } from '@utils/tools'
5
+
6
+export default class Item extends Component {
7
+  static defaultProps = {
8
+    data: {},
9
+    style: {}
10
+  }
11
+  handleClick(data) {
12
+
13
+    this.props.onClick(data)
14
+  }
15
+  render() {
16
+    const { data, style } = this.props
17
+    return (
18
+      <View className="item" style={style} onClick={this.handleClick.bind(this, data)}>
19
+        {(data.type == 'help' || data.type == 'group') &&
20
+          <View className={data.type == 'help' ? 'type' : 'type2'}>{data.type == 'help' ? '助力' : '拼团'}</View>
21
+        }
22
+
23
+        <Image className="pic" mode="aspectFill" src={getThumbnail(data.mainImg || data.imgUrl)}></Image>
24
+
25
+        <View className="box">
26
+
27
+          <View className="left">
28
+            <View className="title">{data.title}</View>
29
+            {data.startDate &&
30
+              <View className={data.activityStatus == 0 ? "status signed " : data.activityStatus == 1 ? "status nostart" : data.activityStatus == 2 ? "status fail" : "status"}>{data.activityStatus == 0 ? "立即参与" : data.activityStatus == 1 ? "未开始" : data.activityStatus == 2 ? "已结束" : "已参与"}</View>
31
+            }
32
+          </View>
33
+
34
+          {data.startDate &&
35
+            <View className="time">参与时间:{`${dayjs(data.startDate).format('YYYY年MM月DD日 HH:mm:ss')}`}</View>
36
+          }
37
+          {!data.startDate &&
38
+            <View className="time">{data.type != 'dynamic' ? '参与时间:' : ''}</View>
39
+          }
40
+        </View>
41
+
42
+      </View >
43
+    );
44
+  }
45
+}

+ 79
- 0
src/pages/person/customerAnalysis/item/index.scss Ver fichero

@@ -0,0 +1,79 @@
1
+@import "@styles/theme.scss";
2
+@import "@styles/mixins.scss";
3
+
4
+.flex {
5
+  display: flex;
6
+  justify-content: space-between;
7
+  align-items: center;
8
+}
9
+
10
+.item {
11
+  box-shadow:0px 4px 8px 0px rgba(0,0,0,0.12);
12
+  border-radius:  12px;
13
+  overflow: hidden;
14
+  margin-bottom: 20px;
15
+  width: 100%;
16
+  position: relative;
17
+  .type{
18
+    position: absolute;
19
+    left:0;
20
+    top:0;
21
+    color: #fff;
22
+    background:#F6B61D;
23
+    padding: 10px 36px;
24
+    border-radius: 12px 0 12px 0;
25
+    font-size: 24px;
26
+  }
27
+  .type2{
28
+    position: absolute;
29
+    left:0;
30
+    top:0;
31
+    color: #fff;
32
+    background:#BB9C79;
33
+    padding: 12px 36px;
34
+    border-radius: 12px 0 12px 0;
35
+    font-size: 24px;
36
+
37
+  }
38
+  .pic {
39
+    width: 100%;
40
+    height:376px;
41
+    display: block;
42
+  }
43
+
44
+  .box {
45
+    padding:20px 30px;
46
+    .title {
47
+      font-size: 28px;
48
+      color: #333;
49
+      width: 500px;
50
+      @include text-ellipsis;
51
+    }
52
+    .time {
53
+      margin-top: 20px;
54
+      font-size: 24px;
55
+      color: #8E8E8E;
56
+    }
57
+    .left {
58
+      width: 100%;
59
+      overflow: hidden;
60
+      display: flex;
61
+      justify-content: space-between;
62
+      align-items: center;
63
+    }
64
+
65
+    .status {
66
+      color: #E35E44;
67
+      font-size: 28px;
68
+    }
69
+    .signed{
70
+      color: #F6B61D;
71
+    }
72
+		.nostart {
73
+      color:$primary-color;
74
+    }
75
+    .fail{
76
+      color: #979797;
77
+    }
78
+  }
79
+}

+ 84
- 14
src/pages/person/customerAnalysis/myCustomer.js Ver fichero

@@ -1,14 +1,11 @@
1 1
 import Taro, { Component } from '@tarojs/taro';
2
-import Authorize from '@components/authorize'
3
-import { View } from "@tarojs/components";
4
-import MoveChart from '../../components/MoveChart'
5
-import LineChart from '../../components/LineChart'
6
-import './index.scss'
7 2
 import { AtTabs, AtTabsPane } from 'taro-ui'
8 3
 import "taro-ui/dist/style/components/tabs.scss"
9 4
 import { savePoint, updatePoint } from '@services/common'
10 5
 import { connect } from '@tarojs/redux'
11
-
6
+import './index.scss'
7
+import ActivityItem from './item'
8
+import { getActNewList } from '@services/activity'
12 9
 
13 10
 @connect(({ user, city }) => ({ user, city }))
14 11
 export default class myCustomer extends Taro.Component {
@@ -20,6 +17,7 @@ export default class myCustomer extends Taro.Component {
20 17
   state = {
21 18
     current: 0,
22 19
     recordId: undefined, // 埋点ID
20
+    list: []
23 21
   }
24 22
 
25 23
   componentWillUnmount() {
@@ -32,26 +30,98 @@ export default class myCustomer extends Taro.Component {
32 30
       current: value
33 31
     }, )
34 32
   }
35
- 
36 33
 
37
-  render() {
34
+  componentDidShow() {
35
+
36
+    this.loadList()
37
+  }
38
+  loadList() {
39
+    getActNewList().then(res => {
40
+      this.setState({
41
+        list: res.records || []
42
+      })
43
+    })
44
+  }
45
+  handleItemClick(item) {
46
+    switch (item.type) {
47
+      case 'help':
48
+        Taro.navigateTo({
49
+          url: '/pages/activity/detail/assistance?id=' + item.id
50
+        })
51
+        return
52
+      case 'group':
53
+        Taro.navigateTo({
54
+          url: '/pages/activity/detail/assemble?id=' + item.id
55
+        })
56
+        return
57
+      default:
58
+        Taro.navigateTo({
59
+          url: '/pages/activity/detail/index?id=' + item.id
60
+        })
61
+        return
62
+    }
63
+  }
38 64
 
39
-    const tabList = [{ title: '新增客户' }, { title: '跟进客户' }, { title: '到访客户' }]
65
+  render() {
40 66
 
67
+    const tabList = [{ title: '基本信息' }, { title: '访问记录' }, { title: '活动信息' }, { title: '跟进记录' }]
68
+    const { list } = this.state
41 69
     return (
42 70
       <View>
43
-        <AtTabs className="tab-bar" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
71
+        <View className="user_con">
72
+          <Image className="bg" src={require('@assets/shop/background.jpg')} ></Image>
73
+          <Image className="user__left__headimg" src={require('@assets/default-avatar.png')} />
74
+          <View className='user__left__name'>客户姓名</View>
75
+          <View className='user__left__phone'>175 1562 8701</View>
76
+        </View>
77
+        <AtTabs className="my-tab" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
44 78
           <AtTabsPane current={this.state.current} index={0} >
45
-            <View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;' >标签22页一的内容</View>
79
+            <View className="tab-pane1 pane">
80
+              <View className="status">到访</View>
81
+              <View className="base-item">意向项目:<View className="con">银城悦见山</View></View>
82
+              <View className="base-item">物业类型:<View className="con">自住</View></View>
83
+              <View className="base-item">项目类型:<View className="con">高层</View></View>
84
+              <View className="base-item">价格区间:<View className="con">{desc || '暂无'}</View></View>
85
+              <View className="base-item">客户描述:<View className="con">{desc || '暂无'}</View></View>
86
+              <View className="btn">完善信息</View>
87
+            </View>
46 88
           </AtTabsPane>
47 89
           <AtTabsPane current={this.state.current} index={1}>
48
-            <View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;'>标签页二的内容</View>
90
+            <View className="tab-pane2 pane">
91
+              <View className="date">2019年11月11日</View>
92
+              <View className="record-item"><View >查看项目详情:银城悦见山</View><View className="time">12:30:00</View> </View>
93
+              <View className="record-item"><View >查看项目详情:银城悦见山</View><View className="time">12:30:00</View> </View>
94
+              <View className="record-item"><View >查看项目详情:银城悦见山</View><View className="time">12:30:00</View> </View>
95
+              <View className="date">2019年11月11日</View>
96
+              <View className="record-item"><View >查看项目详情:银城悦见山</View><View className="time">12:30:00</View> </View>
97
+              <View className="record-item"><View >查看项目详情:银城悦见山</View><View className="time">12:30:00</View> </View>
98
+              <View className="record-item"><View >查看项目详情:银城悦见山</View><View className="time">12:30:00</View> </View>
99
+
100
+            </View>
49 101
           </AtTabsPane>
50 102
           <AtTabsPane current={this.state.current} index={2}>
51
-            <View style='padding: 100px 50px;background-color: #FAFBFC;text-align: center;'>标签页三的内容</View>
103
+            <View className="tab-pane3 pane">
104
+              {list.length > 0 &&
105
+                list.map(item => (
106
+                  <ActivityItem
107
+                    data={item}
108
+                    key={item.id}
109
+                    onClick={this.handleItemClick}>
110
+                  </ActivityItem>
111
+                ))
112
+              }
113
+            </View>
114
+          </AtTabsPane>
115
+          <AtTabsPane current={this.state.current} index={3}>
116
+            <View  style="padding:10px 20px 120px 20px">
117
+              <View style=" display: flex;justify-content: space-between;align-items: center;color: #333;font-size: 16px;">
118
+                <View style=" display: flex;align-items: center;"><View style="width:8px;height:8px;margin-right:10px;display:inline-block;background:rgba(246,182,29,1);border-radius: 50%;"></View>编辑客户信息</View>
119
+                <View classNam="time" style=" font-size: 13px;color: #999;">2019年11月11日 12:24:59</View>
120
+              </View>
121
+              <View className="btn">添加跟进</View>
122
+            </View>
52 123
           </AtTabsPane>
53 124
         </AtTabs>
54
-
55 125
       </View>
56 126
     )
57 127
   }

+ 2
- 2
src/pages/person/index.js Ver fichero

@@ -94,9 +94,9 @@ export default class Person extends Component {
94 94
       case ROLE_CODE['CONSULTANT']:
95 95
         return [{ consultant: true }, '置业顾问']
96 96
       case ROLE_CODE['ESTATE_AGENT']:
97
-        return [{ isAgent: true }, '独立经纪人']
97
+        return [{ isAgent: true }, '专业经纪人']
98 98
       case ROLE_CODE['CHANNEL_AGENT']:
99
-        return [{ isAgent: true }, '渠道经纪人']
99
+        return [{ isAgent: true }, '专业经纪人']
100 100
       default:
101 101
         return [{ tourist: true }, '普通用户']
102 102
     }

+ 3
- 2
src/pages/person/menus.js Ver fichero

@@ -14,6 +14,7 @@ const icons = {
14 14
   encyclopedia: require('@assets/mine/encyclopedia.png'),
15 15
   feedback: require('@assets/mine/feedback.png'),
16 16
   client: require('@assets/mine/client.png'),
17
+  consultant: require('@assets/mine/consultant.png'),
17 18
 }
18 19
 
19 20
 const DRIFT = ROLE_CODE['DRIFT']
@@ -145,14 +146,14 @@ const menus = [
145 146
     {
146 147
       name: '成为专业经纪人',
147 148
       url: '/pages/agent/become/index',
148
-      icon: icons.feedback,
149
+      icon: icons.development,
149 150
       extends: undefined,
150 151
       userTypes: [CUSTOMER],
151 152
     },
152 153
     {
153 154
       name: '成为置业顾问',
154 155
       url: '',
155
-      icon: icons.feedback,
156
+      icon: icons.consultant,
156 157
       extends: undefined,
157 158
       userTypes: [CUSTOMER],
158 159
     },

+ 3
- 3
src/pages/person/personDetail/editDetail/index.js Ver fichero

@@ -170,16 +170,16 @@ export default class editDetail extends Component {
170 170
       <View className='list'>
171 171
         <View className='col_box'>
172 172
           <View className='edit edit-name'>用户名</View>
173
-          <Input type='text' value={user.name ? user.name : user.nickname} onInput={this.BindInfo.bind(this)} data-id='name' />
173
+          <Input type='text' className='edit' value={user.name ? user.name : user.nickname} onInput={this.BindInfo.bind(this)} data-id='name' />
174 174
         </View>
175 175
         <View className='col_box'>
176 176
           <View className='edit edit-phone'>电话号码</View>
177
-          <Input type='text' value={user.tel ? user.tel : user.phone} data-id='phone' onInput={this.BindInfo.bind(this)} />
177
+          <Input type='text' className='edit' value={user.tel ? user.tel : user.phone} data-id='phone' onInput={this.BindInfo.bind(this)} />
178 178
         </View>
179 179
         {
180 180
           isAgent && (<View className='col_box'>
181 181
             <View className='edit edit-phone'>经纪人类型</View>
182
-            <Picker mode='selector' className='selector' range={this.state.selector} onChange={this.onChange}>
182
+            <Picker mode='selector' className='edit' className='selector' range={this.state.selector} onChange={this.onChange}>
183 183
               <View className='picker'>
184 184
                 {this.state.selectorChecked}
185 185
               </View>

+ 8
- 1
src/pages/person/personDetail/editDetail/index.scss Ver fichero

@@ -6,11 +6,18 @@
6 6
     width: 680px;
7 7
     margin: 0 auto;
8 8
     justify-content: space-between;
9
-    font-size: 28px;
9
+    font-size:32px;
10
+    line-height:44px;
10 11
     border-bottom: 1px solid #dbd7d7;
11 12
     .edit{
12 13
       margin-top: 40px;
14
+      margin-bottom: 32px;
13 15
     }
16
+    // edit-name
17
+
18
+    // edit-phone
19
+
20
+    // edit-name
14 21
     Input,.selector{
15 22
       height: 80px;
16 23
       line-height: 80px;

+ 45
- 43
src/pages/project/album/index.js Ver fichero

@@ -8,6 +8,9 @@ import { getThumbnail } from '@utils/tools'
8 8
 
9 9
 
10 10
 @connect(state => state.project, { ...actions })
11
+
12
+
13
+
11 14
 export default class Index extends Component {
12 15
 
13 16
   config = {
@@ -15,11 +18,12 @@ export default class Index extends Component {
15 18
   }
16 19
 
17 20
   state = {
18
-    recordId: null
21
+    recordId: null,
22
+    current: 0,
19 23
   }
20 24
 
21 25
 
22
-  componentWillMount() {
26
+  componentWillMount () {
23 27
     const { id = '369b7d7e5bc6e6b91f2e8f5e775035e2' } = this.$router.params
24 28
     const { projectDetail: { buildingId }, dispatchProjectDetail } = this.props
25 29
 
@@ -39,64 +43,62 @@ export default class Index extends Component {
39 43
       console.log('相册信息')
40 44
     })
41 45
   }
42
-  componentWillUnmount() {
46
+  componentWillUnmount () {
43 47
     const { recordId } = this.state
44 48
     recordId && updatePoint(recordId)
45 49
   }
46 50
   // 图片预览
47
-  previewImage(cur, urls) {
51
+  previewImage (cur, urls) {
48 52
     wx.previewImage({
49 53
       current: cur, // 当前显示图片的http链接   
50 54
       urls: urls // 需要预览的图片http链接列表   
51 55
     })
52 56
   }
53 57
 
54
-  render() {
55
-    const { projectDetail: { buildingImg = [], buildingApartment = [], mapImg, poster } } = this.props
56
-    const liveImgs = buildingImg.map(img => img.url)
57
-    let hxImgs = buildingApartment.filter(item => item.apartmentType === 'apart')
58
-    hxImgs = hxImgs.reduce((prev, cur) => {
59
-      prev = prev.concat(cur.buildingImgList)
60
-      return prev
61
-    }, [])
62
-    let _hxImgUrls = hxImgs.map(img => img.url)
63
-
64
-    let photosImgs = buildingApartment.filter(item => item.apartmentType === 'photo')
65
-    photosImgs = photosImgs.reduce((prev, cur) => {
66
-      prev = prev.concat(cur.buildingImgList)
67
-      return prev
68
-    }, [])
69
-    let _photosImgs = photosImgs.map(img => img.url)
58
+  render () {
59
+    const { projectDetail: { buildingApartment } } = this.props
60
+    const list = buildingApartment.filter(item => item.apartmentType === 'photo')
61
+    const { current } = this.state
62
+    const imgList = list[current].buildingImgList
63
+    let _photosImgs = imgList.map(img => img.url)
64
+
70 65
 
71 66
     return (
72 67
       <View className='photos'>
73
-        <ScrollView>
74
-          <View className='photos__item'>
75
-            <View className='photos__title'>效果图</View>
76
-            {photosImgs.map((item, index) => (
77
-              <Image className='photos__item-img' src={getThumbnail(item.url)} mode="aspectFill" key={item.imgId} onClick={this.previewImage.bind(this, item.url, _photosImgs)}></Image>
78
-            ))}
79
-          </View>
80
-
81
-          <View className='photos__item'>
82
-            <View className='photos__item-title'>实景图</View>
83
-            {liveImgs.map((item, index) => (
84
-              <Image className='photos__item-img' src={getThumbnail(item)} mode="aspectFill" key={index} onClick={this.previewImage.bind(this, item, liveImgs)}></Image>
85
-            ))}
86
-          </View>
68
+        <ScrollView scrollX>
69
+          <View className='photos__type__content'>
70
+            {console.log(list, '2225555555')}
71
+            <View className="around-tab">
72
+              {list.map((item, index) => {
73
+                const { apartmentName } = item || {}
74
+                const buildingImgList = item.buildingImgList
87 75
 
88
-          <View className='photos__item'>
89
-            <View className='photos__item-title'>户型图</View>
90
-            {hxImgs.map((item, index) => (
91
-              <Image className='photos__item-img' src={getThumbnail(item.url)} mode="aspectFill" key={item.imgId} onClick={this.previewImage.bind(this, item.url, _hxImgUrls)}></Image>
92
-            ))}
93
-          </View>
76
+                console.log(imgList, '22333333222')
77
+                return (
78
+                  <View
79
+                    style={{ width: '100px' }}
80
+                    key={current}
81
+                    className={`around-tab__item ${current === index ? 'active' : ''}`}
82
+                    onClick={() => this.setState({ current: index })}
83
+                  >
94 84
 
95
-          <View className='photos__item'>
96
-            <View className='photos__item-title'>地图</View>
97
-            <Image className='photos__item-img' src={getThumbnail(mapImg)} mode="aspectFill" onClick={this.previewImage.bind(this, mapImg, [mapImg])}></Image>
85
+                    <View>
86
+                      <View style={{ width: '100px', textAlign: 'center' }}>  {`${apartmentName}(${buildingImgList.length})`} </View>
87
+                    </View>
88
+                  </View>
89
+                )
90
+              })}
91
+            </View>
98 92
           </View>
99 93
         </ScrollView>
94
+        <View className='photos__item'>
95
+          {imgList.map((item, index) => {
96
+            console.log(item, '299999933333222')
97
+            return (
98
+              <Image className='photos__item-img' src={getThumbnail(item.url)} mode='widthFix' onClick={this.previewImage.bind(this, item.url, _photosImgs)}></Image>
99
+            )
100
+          })}
101
+        </View>
100 102
       </View>
101 103
     );
102 104
   }

+ 42
- 6
src/pages/project/album/index.scss Ver fichero

@@ -2,8 +2,8 @@
2 2
   position: relative;
3 3
   background: #ffffff;
4 4
   width: 100%;
5
-  padding: 50px;
6
-  padding:30px 40px;
5
+  padding: 30px;
6
+  padding: 30px 20px;
7 7
 
8 8
   &__item {
9 9
     position: relative;
@@ -16,10 +16,46 @@
16 16
     }
17 17
 
18 18
     &-img {
19
-      width: 200px;
20
-      height: 150px;
21
-      margin-right: 10px;
22
-      margin-bottom: 10px;
19
+      width: 336px;
20
+      height: 252px;
21
+      background: rgba(216, 216, 216, 1);
22
+      border-radius: 12px;
23
+
24
+      margin: 9px;
25
+      margin-bottom: 9px;
26
+    }
27
+  }
28
+}
29
+
30
+.around-tab {
31
+  display: flex;
32
+  flex-wrap: nowrap;
33
+  align-items: center;
34
+  overflow-x: scroll;
35
+  scroll-behavior: smooth;
36
+  padding: 24px 0;
37
+
38
+  &::-webkit-scrollbar {
39
+    width: 0;
40
+    height: 0;
41
+    color: transparent;
42
+  }
43
+
44
+  &__item {
45
+    flex: 1 0 auto;
46
+
47
+    font-size: 32px;
48
+    color: #666;
49
+    line-height: 44px;
50
+    padding: 4px 0;
51
+
52
+    &.active {
53
+      color: #BB9C79;
54
+      border-bottom: 1px solid #C8B299;
55
+    }
56
+
57
+    &+& {
58
+      margin-left: 64px;
23 59
     }
24 60
   }
25 61
 }

+ 1
- 0
src/pages/project/detail/Around/Tab.js Ver fichero

@@ -16,6 +16,7 @@ export default function Tab(props) {
16 16
     <View className="around-tab">
17 17
       {tabList.map((item, index) => {
18 18
         const { key, label, num } = item || {}
19
+        console.log(item,'123456')
19 20
         return (
20 21
           <View
21 22
             key={key}

+ 48
- 18
src/pages/project/detail/index.js Ver fichero

@@ -55,6 +55,7 @@ export default class Index extends Component {
55 55
     posterShow: 'none',
56 56
     current: 1,
57 57
     btnstate: 1,// 1显示视频 0显示图片
58
+    albumCurrent: 0,
58 59
   }
59 60
 
60 61
   componentWillMount () {
@@ -489,7 +490,7 @@ export default class Index extends Component {
489 490
     })
490 491
   }
491 492
 
492
-  renderBottomMenu() {
493
+  renderBottomMenu () {
493 494
     const { userInfo: { person: { personType } } } = this.props
494 495
     const { posterShow } = this.state
495 496
     return (
@@ -592,17 +593,53 @@ export default class Index extends Component {
592 593
       prev = prev.concat(cur.buildingImgList)
593 594
       return prev
594 595
     }, [])
596
+
597
+    const { albumCurrent } = this.state
598
+
599
+  
600
+    // console.log(this.props, '2222222222222')
595 601
     return (
602
+
603
+      //   <View className="around-tab">
604
+      //   {tabList.map((item, index) => {
605
+      //     const { key, label, num } = item || {}
606
+      //     return (
607
+      //       <View
608
+      //         key={key}
609
+      //         className={`around-tab__item ${current === index ? 'active' : ''}`}
610
+      //         onClick={handleClick(index)}
611
+      //       >
612
+      //         {`${label}(${num})`}
613
+      //       </View>
614
+      //     )
615
+      //   })}
616
+      // </View>    imgList.length > 0 &&
596 617
       <Block>
597
-        {
598
-          imgList.length > 0 && (
618
+        { list.length > 0 &&
619
+          (
599 620
             <View className='photos__type'>
600 621
               <View className='photos__type__title'>相册</View>
601 622
               <ScrollView scrollX>
602
-                <View className='photos__type__content'>
603
-                  <View className='photos__type__list'>11
604
-                    {/* <Image className='photos__img' src={getThumbnail(imgList[0].url)} mode="widthFix" onClick={this.toViewAlbum}></Image>
605
-                    <View className='photos__img__len'>共{imgList.length}张</View> */}
623
+                <View className='photos__type__content' onClick={this.toViewAlbum}>
624
+                {console.log(list, '2222222222222')}
625
+                  <View className="around-tab">
626
+                    {list.map((item, index) => {
627
+                      const { apartmentName} = item || {}
628
+                      const  buildingImgList = item.buildingImgList
629
+                     
630
+                      console.log(buildingImgList, '22333333222')
631
+                      return (
632
+                        <View
633
+                          style={{ marginRight: '8px' }}                  
634
+                        >
635
+                          {/* {`${label}(${num})`} */}
636
+                          <View>
637
+                            <Image className='albumimg' src={getThumbnail(buildingImgList[0].url)} ></Image>
638
+                            <View style={{ textAlign: 'center' }}>  {`${apartmentName}(${buildingImgList.length})`} </View>
639
+                          </View>
640
+                        </View>
641
+                      )
642
+                    })}
606 643
                   </View>
607 644
                 </View>
608 645
               </ScrollView>
@@ -858,13 +895,11 @@ export default class Index extends Component {
858 895
   }
859 896
 
860 897
   renderVideo () {
861
-    console.log('-------props------', this.props)
862 898
     const { projectDetail } = this.props
863 899
     return (
864 900
       <View
865 901
         className="pro__banner"
866 902
       >
867
-        { console.log('-------projectDetail.videoUrl------', projectDetail.videoUrl)}
868 903
         <Video
869 904
           src={projectDetail.videoUrl}
870 905
           // src='http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400'
@@ -881,7 +916,6 @@ export default class Index extends Component {
881 916
   }
882 917
 
883 918
   changeCurrent (current) {
884
-    // console.log('value:', current)
885 919
     this.setState({
886 920
       current: current + 1
887 921
     })
@@ -896,10 +930,6 @@ export default class Index extends Component {
896 930
     const { total = 0, records = [] } = uvList
897 931
     const openDate = projectDetail.openingDate ? dayjs(projectDetail.openingDate).locale('zh-cn').format('YYYY年M月D日') : '暂无'
898 932
 
899
-    // if (projectDetail.videoUrl != null){
900
-    //   setState({ btnstate: 1 }
901
-    // },
902
-
903 933
     return (
904 934
       <Block>
905 935
         {
@@ -924,17 +954,17 @@ export default class Index extends Component {
924 954
                 </View>
925 955
               )}
926 956
 
927
-              {btnstate === 1 && projectDetail.videoUrl != null &&  this.renderVideo()}
957
+              {btnstate === 1 && projectDetail.videoUrl != null && this.renderVideo()}
928 958
 
929
-              }
959
+        
930 960
               {btnstate === 1 && projectDetail.videoUrl != null && (<View className='media-btn'>
931
-                <View className='video-btn'  style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }} >视频</View>
961
+                <View className='video-btn' style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }} >视频</View>
932 962
                 <View className='img-btn' onClick={() => this.setState({ btnstate: 0 })}>图片</View>
933 963
               </View>)}
934 964
 
935 965
               {btnstate === 0 && projectDetail.videoUrl != null && (<View className='media-btn'>
936 966
                 <View className='video-btn' onClick={() => this.setState({ btnstate: 1 })} >视频</View>
937
-                <View className='img-btn'  style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }}>图片</View>
967
+                <View className='img-btn' style={{ background: ' rgba(187, 156, 121, 1)', color: 'rgba(255, 255, 255, 1)' }}>图片</View>
938 968
               </View>)}
939 969
 
940 970
 

+ 37
- 2
src/pages/project/detail/index.scss Ver fichero

@@ -29,12 +29,13 @@
29 29
     color: rgba(53, 53, 53, 1);
30 30
     display: flex;
31 31
     position: fixed;
32
+
32 33
     .video-btn {
33 34
       width: 92px;
34 35
       height: 64px;
35 36
       border-radius: 12px 0px 0px 12px;
36
-  
37
-    
37
+
38
+
38 39
     }
39 40
 
40 41
     .img-btn {
@@ -998,4 +999,38 @@
998 999
   100% {
999 1000
     transform: scale(1.1);
1000 1001
   }
1002
+}
1003
+
1004
+.around-tab {
1005
+  display: flex;
1006
+  flex-wrap: nowrap;
1007
+  align-items: center;
1008
+  overflow-x: scroll;
1009
+  scroll-behavior: smooth;
1010
+  padding: 24px 0;
1011
+
1012
+  &__item {
1013
+    flex: 1 0 auto;
1014
+
1015
+    font-size: 32px;
1016
+    color: #666;
1017
+    line-height: 44px;
1018
+    padding: 4px 0;
1019
+
1020
+    &.active {
1021
+      color: #BB9C79;
1022
+      border-bottom: 1px solid #C8B299;
1023
+    }
1024
+
1025
+    &+& {
1026
+      margin-left: 64px;
1027
+    }
1028
+  }
1029
+}
1030
+
1031
+.albumimg {
1032
+  width: 218px;
1033
+  height: 164px;
1034
+  background: rgba(216, 216, 216, 1);
1035
+  border-radius: 12px;
1001 1036
 }