|
@@ -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
|
}
|