瀏覽代碼

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

周立森 5 年之前
父節點
當前提交
aada97a230

+ 1
- 1
project.config.json 查看文件

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

+ 9
- 0
project.config.json.rej 查看文件

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,

二進制
src/assets/person/female.png 查看文件


二進制
src/assets/person/male.png 查看文件


二進制
src/assets/person/phone.png 查看文件


+ 40
- 43
src/pages/person/customerAnalysis/analysis.js 查看文件

166
         <AtTabs className="tab-bar" current={current} tabList={tabList} onClick={this.handleClick.bind(this)} swipeable="false">
166
         <AtTabs className="tab-bar" current={current} tabList={tabList} onClick={this.handleClick.bind(this)} swipeable="false">
167
           <AtTabsPane current={current} index={0} >
167
           <AtTabsPane current={current} index={0} >
168
             <View>
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
                 chartInfo.length &&
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
                 !chartInfo.length &&
189
                 !chartInfo.length &&
212
           </AtTabsPane>
213
           </AtTabsPane>
213
           <AtTabsPane current={current} index={1}>
214
           <AtTabsPane current={current} index={1}>
214
             <View>
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
               {chartInfo2.length &&
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
                 </View>
229
                 </View>
231
               }
230
               }
232
               {
231
               {
256
           </AtTabsPane>
255
           </AtTabsPane>
257
           <AtTabsPane current={current} index={2}>
256
           <AtTabsPane current={current} index={2}>
258
             <View>
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
                 chartInfo3.length &&
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
                 </View>
272
                 </View>
276
               }
273
               }
277
               {
274
               {

+ 7
- 7
src/pages/person/customerAnalysis/followUpCustomer/index.js 查看文件

6
 import { connect } from '@tarojs/redux'
6
 import { connect } from '@tarojs/redux'
7
 import { View, Text, Picker } from '@tarojs/components';
7
 import { View, Text, Picker } from '@tarojs/components';
8
 import { queryCustomerList, addFollowRecord } from '@services/person'
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
 @connect(({ user, city }) => ({ user, city }))
13
 @connect(({ user, city }) => ({ user, city }))
12
 export default class transactionCustomer extends Taro.Component {
14
 export default class transactionCustomer extends Taro.Component {
281
                     <View className="name">
283
                     <View className="name">
282
                       {item.name}
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
                     </View>
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
                   </View>
294
                   </View>
293
                 ))
295
                 ))
294
               }
296
               }
295
             </View>
297
             </View>
296
           </ListView>
298
           </ListView>
297
-
298
-
299
         </View>
299
         </View>
300
       </View>
300
       </View>
301
     )
301
     )

+ 6
- 4
src/pages/person/customerAnalysis/myCustomer.js 查看文件

8
 import './index.scss'
8
 import './index.scss'
9
 import ActivityItem from './item'
9
 import ActivityItem from './item'
10
 import dayjs from 'dayjs'
10
 import dayjs from 'dayjs'
11
-const iconImg = require('@assets/person/icon.png')
12
 import { getThumbnail } from '@utils/tools'
11
 import { getThumbnail } from '@utils/tools'
13
 import emptyImg from '@assets/empty.png'
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
 @connect(({ user, city }) => ({ user, city }))
17
 @connect(({ user, city }) => ({ user, city }))
16
 export default class myCustomer extends Taro.Component {
18
 export default class myCustomer extends Taro.Component {
449
           <View className='user__left__name'>
451
           <View className='user__left__name'>
450
             {customerDetail.name}
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
           </View>
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
         </View>
461
         </View>
460
         <AtTabs height="calc(100vh - 400rpx)" className="my-tab" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
462
         <AtTabs height="calc(100vh - 400rpx)" className="my-tab" current={this.state.current} tabList={tabList} onClick={this.handleClick.bind(this)}>
461
           <AtTabsPane current={this.state.current} index={0} >
463
           <AtTabsPane current={this.state.current} index={0} >

+ 26
- 5
src/pages/person/customerAnalysis/transactionCustomer/index.js 查看文件

4
 import './index.scss'
4
 import './index.scss'
5
 import { savePoint, updatePoint } from '@services/common'
5
 import { savePoint, updatePoint } from '@services/common'
6
 import { connect } from '@tarojs/redux'
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
 @connect(({ user, city }) => ({ user, city }))
13
 @connect(({ user, city }) => ({ user, city }))
70
       url: `/pages/person/customerAnalysis/myCustomer?customerId=` + customerId
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
   render() {
94
   render() {
75
     const { customerList, isEmpty, hasMore } = this.state
95
     const { customerList, isEmpty, hasMore } = this.state
99
                   <View className="name">
119
                   <View className="name">
100
                     {item.name}
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
                   </View>
127
                   </View>
108
                   <View className="phone">{item.phone} </View>
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
                 </View>
131
                 </View>
111
               ))
132
               ))
112
             }
133
             }

+ 3
- 3
src/utils/request.js 查看文件

71
         }
71
         }
72
       }
72
       }
73
       console.error(res.data)
73
       console.error(res.data)
74
-      throw new Error(res.message)
74
+      throw new Error(data)
75
     }
75
     }
76
   }).catch((err) => {
76
   }).catch((err) => {
77
     console.error(err)
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
       errMessage = '请检查网络'
81
       errMessage = '请检查网络'
82
     }
82
     }
83
 
83
 

二進制
xiangsong.zip 查看文件