Commit e0b5c9dd753bec87cfa5c691970fe7c9fcc1119e

Authored by wdn127929
1 parent 2b2b06f6

预订安排页刷新基本信息

@@ -100,12 +100,20 @@ class _ContantLeftPageState extends State<ContantLeftPage> { @@ -100,12 +100,20 @@ class _ContantLeftPageState extends State<ContantLeftPage> {
100 child: Column( 100 child: Column(
101 crossAxisAlignment: CrossAxisAlignment.start, 101 crossAxisAlignment: CrossAxisAlignment.start,
102 children: [ 102 children: [
103 - Text(model.userHistorys[index].rname, 103 + Text(
  104 + model.userHistorys[index].rname == null ||
  105 + model.userHistorys[index].rname == ''
  106 + ? ''
  107 + : model.userHistorys[index].rname,
104 style: TextStyle( 108 style: TextStyle(
105 color: MyColours.color_333333, 109 color: MyColours.color_333333,
106 fontSize: ScreenUtil().setSp(32))), 110 fontSize: ScreenUtil().setSp(32))),
107 VEmptyView(10), 111 VEmptyView(10),
108 - Text(model.userHistorys[index].phone, 112 + Text(
  113 + model.userHistorys[index].phone == null ||
  114 + model.userHistorys[index].phone == ''
  115 + ? ''
  116 + : model.userHistorys[index].phone,
109 style: TextStyle( 117 style: TextStyle(
110 color: MyColours.color_999999, 118 color: MyColours.color_999999,
111 fontSize: ScreenUtil().setSp(30))) 119 fontSize: ScreenUtil().setSp(30)))
@@ -136,8 +136,6 @@ class _ContantRightPageState extends State<ContantRightPage> { @@ -136,8 +136,6 @@ class _ContantRightPageState extends State<ContantRightPage> {
136 // } 136 // }
137 } 137 }
138 138
139 -  
140 -  
141 _openContactForm() async { 139 _openContactForm() async {
142 try { 140 try {
143 var contact = 141 var contact =
@@ -258,12 +256,19 @@ class _ContantRightPageState extends State<ContantRightPage> { @@ -258,12 +256,19 @@ class _ContantRightPageState extends State<ContantRightPage> {
258 child: Column( 256 child: Column(
259 crossAxisAlignment: CrossAxisAlignment.start, 257 crossAxisAlignment: CrossAxisAlignment.start,
260 children: [ 258 children: [
261 - Text(c.displayName, 259 + Text(
  260 + c.displayName == null || c.displayName == ''
  261 + ? ''
  262 + : c.displayName,
262 style: TextStyle( 263 style: TextStyle(
263 color: MyColours.color_333333, 264 color: MyColours.color_333333,
264 fontSize: ScreenUtil().setSp(32))), 265 fontSize: ScreenUtil().setSp(32))),
265 VEmptyView(10), 266 VEmptyView(10),
266 - Text(c.phones.first.value, 267 + Text(
  268 + c.phones.first.value == null ||
  269 + c.phones.first.value == ''
  270 + ? ''
  271 + : c.phones.first.value,
267 style: TextStyle( 272 style: TextStyle(
268 color: MyColours.color_999999, 273 color: MyColours.color_999999,
269 fontSize: ScreenUtil().setSp(30))) 274 fontSize: ScreenUtil().setSp(30)))
@@ -6,14 +6,14 @@ import 'package:one_key/models/seller_phone_model.dart'; @@ -6,14 +6,14 @@ import 'package:one_key/models/seller_phone_model.dart';
6 import 'package:one_key/net/base_resp.dart'; 6 import 'package:one_key/net/base_resp.dart';
7 import 'package:one_key/net/dio_util.dart'; 7 import 'package:one_key/net/dio_util.dart';
8 import 'package:one_key/net/http_url.dart'; 8 import 'package:one_key/net/http_url.dart';
  9 +import 'package:one_key/provider/user_model.dart';
9 import 'package:one_key/utils/utils.dart'; 10 import 'package:one_key/utils/utils.dart';
  11 +import 'package:provider/provider.dart';
10 12
11 class BaseIndoProvider with ChangeNotifier { 13 class BaseIndoProvider with ChangeNotifier {
12 BaseInfoSunModel baseInfoSunModel; //客户经理基础信息 14 BaseInfoSunModel baseInfoSunModel; //客户经理基础信息
13 List<SellerPhoneSunModel> photoList = []; //商家图片信息 15 List<SellerPhoneSunModel> photoList = []; //商家图片信息
14 16
15 -  
16 -  
17 ///客户经理添加/修改基本信息 17 ///客户经理添加/修改基本信息
18 Future<dynamic> setCustomerActivityBaseinfo( 18 Future<dynamic> setCustomerActivityBaseinfo(
19 BuildContext context, Map<String, String> params, 19 BuildContext context, Map<String, String> params,
@@ -53,6 +53,12 @@ class BaseIndoProvider with ChangeNotifier { @@ -53,6 +53,12 @@ class BaseIndoProvider with ChangeNotifier {
53 data: params, showLoading: isShowLoading) 53 data: params, showLoading: isShowLoading)
54 .catchError((error) { 54 .catchError((error) {
55 print(error.toString()); 55 print(error.toString());
  56 + Map<String, String> params = {
  57 + 'sellerid':
  58 + Provider.of<UserModel>(context, listen: false).user.sellerid,
  59 + "uid": Provider.of<UserModel>(context, listen: false).user.openid,
  60 + };
  61 + getCustomerActivityBaseinfo(context, params, isShowLoading: false);
56 if (error is MyError) {} 62 if (error is MyError) {}
57 }); 63 });
58 if (baseResp.code == Constant.status_success) { 64 if (baseResp.code == Constant.status_success) {