许静 před 5 roky
rodič
revize
57bae27e14

+ 1
- 1
project.config.json Zobrazit soubor

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

+ 9
- 0
project.config.json.rej Zobrazit soubor

@@ -0,0 +1,9 @@
1
+diff a/project.config.json b/project.config.json	(rejected hunks)
2
+@@ -2,6 +2,7 @@
3
+ 	"miniprogramRoot": "dist/",
4
+ 	"projectname": "mini-chengjiao",
5
+ 	"description": "知与行联调",
6
++	"appid": "wxd9ee3a9480a4e544",
7
+ 	"setting": {
8
+ 		"urlCheck": false,
9
+ 		"es6": false,

binární
src/assets/person/female.png Zobrazit soubor


binární
src/assets/person/male.png Zobrazit soubor


binární
src/assets/person/phone.png Zobrazit soubor


+ 40
- 43
src/pages/person/customerAnalysis/analysis.js Zobrazit soubor

@@ -166,23 +166,24 @@ export default class analysis extends Taro.Component {
166 166
         <AtTabs className="tab-bar" current={current} tabList={tabList} onClick={this.handleClick.bind(this)} swipeable="false">
167 167
           <AtTabsPane current={current} index={0} >
168 168
             <View>
169
+              <View style="height:40rpx;position: relative;margin-top:20rpx">
170
+                <View className="daily-month" >
171
+                  {
172
+                    dailyMonth.map((item, index) => (
173
+                      <View key={index + 'daily'} className={checkedWhich == index ? 'checked' : 'item'} onClick={this.changeDailyMonth.bind(this, index)}>
174
+                        {item}
175
+                      </View>))
176
+                  }
177
+                </View>
178
+              </View>
169 179
               {
170 180
                 chartInfo.length &&
171
-                <View>
172
-                  <View style="height:40rpx;position: relative;margin-top:20rpx">
173
-                    <View className="daily-month" >
174
-                      {
175
-                        dailyMonth.map((item, index) => (
176
-                          <View key={index + 'daily'} className={checkedWhich == index ? 'checked' : 'item'} onClick={this.changeDailyMonth.bind(this, index)}>
177
-                            {item}
178
-                          </View>))
179
-                      }
180
-                    </View>
181
-                  </View>
182
-                  <View style="width:100vw;height:530rpx;position: relative;">
183
-                    <LineChart source={chartInfo} />
184
-                  </View>
185
-                </View>
181
+
182
+
183
+                // <View style="width:100vw;height:530rpx;position: relative;">
184
+                <LineChart source={chartInfo} />
185
+                // </View>
186
+
186 187
               }
187 188
               {
188 189
                 !chartInfo.length &&
@@ -212,21 +213,19 @@ export default class analysis extends Taro.Component {
212 213
           </AtTabsPane>
213 214
           <AtTabsPane current={current} index={1}>
214 215
             <View>
216
+              <View style="height:40rpx;position: relative;margin-top:20rpx">
217
+                <View className="daily-month" >
218
+                  {
219
+                    dailyMonth.map((item, index) => (
220
+                      <View key={index + 'month'} className={checkedWhich == index ? 'checked' : 'item'} onClick={this.changeDailyMonth.bind(this, index)}>
221
+                        {item}
222
+                      </View>))
223
+                  }
224
+                </View>
225
+              </View>
215 226
               {chartInfo2.length &&
216
-                <View>
217
-                  <View style="height:40rpx;position: relative;margin-top:20rpx">
218
-                    <View className="daily-month" >
219
-                      {
220
-                        dailyMonth.map((item, index) => (
221
-                          <View key={index + 'month'} className={checkedWhich == index ? 'checked' : 'item'} onClick={this.changeDailyMonth.bind(this, index)}>
222
-                            {item}
223
-                          </View>))
224
-                      }
225
-                    </View>
226
-                  </View>
227
-                  <View style="width:100vw;height:530rpx;position: relative;">
228
-                    <LineChart source={chartInfo2} />
229
-                  </View>
227
+                <View style="width:100vw;height:530rpx;position: relative;">
228
+                  <LineChart source={chartInfo2} />
230 229
                 </View>
231 230
               }
232 231
               {
@@ -256,22 +255,20 @@ export default class analysis extends Taro.Component {
256 255
           </AtTabsPane>
257 256
           <AtTabsPane current={current} index={2}>
258 257
             <View>
258
+              <View style="height:40rpx;position: relative;margin-top:20rpx">
259
+                <View className="daily-month" >
260
+                  {
261
+                    dailyMonth.map((item, index) => (
262
+                      <View key={index + 'day'} className={checkedWhich == index ? 'checked' : 'item'} onClick={this.changeDailyMonth.bind(this, index)}>
263
+                        {item}
264
+                      </View>))
265
+                  }
266
+                </View>
267
+              </View>
259 268
               {
260 269
                 chartInfo3.length &&
261
-                <View>
262
-                  <View style="height:40rpx;position: relative;margin-top:20rpx">
263
-                    <View className="daily-month" >
264
-                      {
265
-                        dailyMonth.map((item, index) => (
266
-                          <View key={index + 'day'} className={checkedWhich == index ? 'checked' : 'item'} onClick={this.changeDailyMonth.bind(this, index)}>
267
-                            {item}
268
-                          </View>))
269
-                      }
270
-                    </View>
271
-                  </View>
272
-                  <View style="width:100vw;height:530rpx;position: relative;">
273
-                    <LineChart source={chartInfo3} />
274
-                  </View>
270
+                <View style="width:100vw;height:530rpx;position: relative;">
271
+                  <LineChart source={chartInfo3} />
275 272
                 </View>
276 273
               }
277 274
               {

+ 7
- 7
src/pages/person/customerAnalysis/followUpCustomer/index.js Zobrazit soubor

@@ -6,7 +6,9 @@ import { savePoint, updatePoint } from '@services/common'
6 6
 import { connect } from '@tarojs/redux'
7 7
 import { View, Text, Picker } from '@tarojs/components';
8 8
 import { queryCustomerList, addFollowRecord } from '@services/person'
9
-const iconImg = require('@assets/person/icon.png')
9
+const maleImg = require('@assets/person/male.png')
10
+const femaleImg = require('@assets/person/female.png')
11
+const phoneImg = require('@assets/person/phone.png')
10 12
 
11 13
 @connect(({ user, city }) => ({ user, city }))
12 14
 export default class transactionCustomer extends Taro.Component {
@@ -281,21 +283,19 @@ export default class transactionCustomer extends Taro.Component {
281 283
                     <View className="name">
282 284
                       {item.name}
283 285
                       {
284
-                        item.sex == '1' && <View style={`margin-left:20rpx;background-image: url(${iconImg});background-size: 100%;background-position: 0rpx -40rpx;width: 36rpx;height: 36rpx;`}></View>
286
+                        item.sex == '1' && <Image style="width:36rpx;height:38rpx;margin-left:10rpx" src={maleImg} />
285 287
                       }
286 288
                       {
287
-                        item.sex == '2' && <View style={`margin-left:20rpx;background-image: url(${iconImg});background-size: 100%;background-position: 0rpx 0px;width: 36rpx;height: 36rpx;`}></View>
289
+                        item.sex == '2' && <Image src={femaleImg} style="width:36rpx;height:36rpx;margin-left:10rpx" />
288 290
                       }
289 291
                     </View>
290
-                    <View className="phone" onClick={this.handleTelClick.bind(this, item)}>{item.phone}<View style={`background-image: url(${iconImg});background-size: 100%;background-position: 0rpx -88rpx;width: 44rpx;height: 44rpx;margin-left:10rpx`}></View> </View>
291
-                    <View className="status">报备</View>
292
+                    <View className="phone" onClick={this.handleTelClick.bind(this, item)}>{item.phone}<Image style="width:36rpx;height:36rpx;margin-left:20rpx;" src={phoneImg} /></View>
293
+                    <View className="status">{item.status == 1 ? '报备' : item.status == 2 ? '到访' : item.status == 3 ? '认筹' : '签约'}</View>
292 294
                   </View>
293 295
                 ))
294 296
               }
295 297
             </View>
296 298
           </ListView>
297
-
298
-
299 299
         </View>
300 300
       </View>
301 301
     )

+ 6
- 4
src/pages/person/customerAnalysis/myCustomer.js Zobrazit soubor

@@ -8,9 +8,11 @@ import { connect } from '@tarojs/redux'
8 8
 import './index.scss'
9 9
 import ActivityItem from './item'
10 10
 import dayjs from 'dayjs'
11
-const iconImg = require('@assets/person/icon.png')
12 11
 import { getThumbnail } from '@utils/tools'
13 12
 import emptyImg from '@assets/empty.png'
13
+const maleImg = require('@assets/person/male.png')
14
+const femaleImg = require('@assets/person/female.png')
15
+const phoneImg = require('@assets/person/phone.png')
14 16
 
15 17
 @connect(({ user, city }) => ({ user, city }))
16 18
 export default class myCustomer extends Taro.Component {
@@ -449,13 +451,13 @@ export default class myCustomer extends Taro.Component {
449 451
           <View className='user__left__name'>
450 452
             {customerDetail.name}
451 453
             {
452
-              customerDetail.sex == '1' && <View style={`margin-left:10px;background-image: url(${iconImg});background-size: 100%;background-position: 0px -20px;width: 18px;height: 18px;`}></View>
454
+              customerDetail.sex == '1' && <Image style="width:36rpx;height:38rpx;margin-left:10rpx" src={maleImg} />
453 455
             }
454 456
             {
455
-              customerDetail.sex == '2' && <View style={`margin-left:10px;background-image: url(${iconImg});background-size: 100%;background-position: 0px 0px;width: 18px;height: 18px;`}></View>
457
+              customerDetail.sex == '2' && <Image style="width:36rpx;height:36rpx;margin-left:10rpx" src={femaleImg} />
456 458
             }
457 459
           </View>
458
-          <View onClick={this.handleTelClick.bind(this, customerDetail)} className='user__left__phone'>{customerDetail.phone}<View style={`background-image: url(${iconImg});background-size: 100%;background-position: 0rpx -88rpx;width: 44rpx;height: 44rpx;margin-left:10rpx`}></View></View>
460
+          <View onClick={this.handleTelClick.bind(this, customerDetail)} className='user__left__phone'>{customerDetail.phone}<Image style="width:36rpx;height:36rpx;margin-left:20rpx;" src={phoneImg} /></View>
459 461
         </View>
460 462
         <AtTabs height="calc(100vh - 400rpx)" className="my-tab" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
461 463
           <AtTabsPane current={this.state.current} index={0} >

+ 26
- 5
src/pages/person/customerAnalysis/transactionCustomer/index.js Zobrazit soubor

@@ -4,8 +4,10 @@ import ListView from '@components/ListView'
4 4
 import './index.scss'
5 5
 import { savePoint, updatePoint } from '@services/common'
6 6
 import { connect } from '@tarojs/redux'
7
-import { queryCustomerList } from '@services/person'
8
-const iconImg = require('@assets/person/icon.png')
7
+import { queryCustomerList, addFollowRecord } from '@services/person'
8
+const maleImg = require('@assets/person/male.png')
9
+const femaleImg = require('@assets/person/female.png')
10
+const phoneImg = require('@assets/person/phone.png')
9 11
 
10 12
 
11 13
 @connect(({ user, city }) => ({ user, city }))
@@ -70,6 +72,24 @@ export default class transactionCustomer extends Taro.Component {
70 72
       url: `/pages/person/customerAnalysis/myCustomer?customerId=` + customerId
71 73
     })
72 74
   }
75
+  // 拨打电话
76
+  handleTelClick(item, e) {
77
+    e.stopPropagation()
78
+    Taro.makePhoneCall({
79
+      phoneNumber: item.phone
80
+    })
81
+    const params = {
82
+      recordType: '拨打电话',
83
+      customerSex: item.sex,
84
+      customerId: item.customerId,
85
+    }
86
+    addFollowRecord(params).then(res => {
87
+
88
+    })
89
+    this.setState({
90
+      followVisible: false,
91
+    })
92
+  }
73 93
 
74 94
   render() {
75 95
     const { customerList, isEmpty, hasMore } = this.state
@@ -99,14 +119,15 @@ export default class transactionCustomer extends Taro.Component {
99 119
                   <View className="name">
100 120
                     {item.name}
101 121
                     {
102
-                      item.sex == '1' && <View style={`margin-left:10px;background-image: url(${iconImg});background-size: 100%;background-position: 0px -20px;width: 18px;height: 18px;`}></View>
122
+                      item.sex == '1' && <Image style="width:36rpx;height:38rpx;margin-left:10rpx" src={maleImg} />
103 123
                     }
104 124
                     {
105
-                      item.sex == '2' && <View style={`margin-left:10px;background-image: url(${iconImg});background-size: 100%;background-position: 0px 0px;width: 18px;height: 18px;`}></View>
125
+                      item.sex == '2' && <Image style="width:36rpx;height:36rpx;margin-left:10rpx" src={femaleImg} />
106 126
                     }
107 127
                   </View>
108 128
                   <View className="phone">{item.phone} </View>
109
-                  <View style={`background-image: url(${iconImg});background-size: 100%;background-position: 0px -44px;width: 22px;height: 22px;`}></View>
129
+                  <Image style="width:36rpx;height:36rpx;margin-right:20rpx" src={phoneImg} onClick={this.handleTelClick.bind(this, item)} />
130
+
110 131
                 </View>
111 132
               ))
112 133
             }

+ 3
- 3
src/utils/request.js Zobrazit soubor

@@ -71,13 +71,13 @@ export const fetch = async (options) => {
71 71
         }
72 72
       }
73 73
       console.error(res.data)
74
-      throw new Error(res.message)
74
+      throw new Error(data)
75 75
     }
76 76
   }).catch((err) => {
77 77
     console.error(err)
78 78
 
79
-    let errMessage = `请求失败: ${err.errMsg || err.message}`
80
-    if (err.errMsg === 'request:fail timeout' || err.message === 'request:fail timeout') {
79
+    let errMessage = `请求失败: ${err.errMsg}`
80
+    if (err.errMsg === 'request:fail timeout') {
81 81
       errMessage = '请检查网络'
82 82
     }
83 83
 

binární
xiangsong.zip Zobrazit soubor