|
...
|
...
|
@@ -298,6 +298,84 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { |
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget _errorWidget() {
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
VEmptyView(384),
|
|
|
|
Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Image.asset(
|
|
|
|
Utils.getImgPath('error_circle'),
|
|
|
|
width: w(70),
|
|
|
|
),
|
|
|
|
HEmptyView(20),
|
|
|
|
Text(
|
|
|
|
'出错了!',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_E34D59, fontSize: font(20)),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
VEmptyView(100),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(horizontal: w(20)),
|
|
|
|
child: Text(
|
|
|
|
'您输入的店铺名字:\nxxx和商家\nxxx\n高度重合,如果您是这家店铺的工作人员,请与店铺管理员(xxx)联系增员,谢谢!',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151, fontSize: font(16)),
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
left: w(23), top: w(10), right: w(21), bottom: w(25)),
|
|
|
|
child: Row(
|
|
|
|
children: [
|
|
|
|
RoundButton(
|
|
|
|
text: '不是店员,继续注册',
|
|
|
|
isBold: true,
|
|
|
|
width: w(218),
|
|
|
|
height: w(43),
|
|
|
|
fontSize: 32,
|
|
|
|
textColor: MyColours.color_438E93,
|
|
|
|
gradientStart: MyColours.color_ffffff,
|
|
|
|
gradientEnd: MyColours.color_ffffff,
|
|
|
|
borderColor: MyColours.color_438E93,
|
|
|
|
radius: 10,
|
|
|
|
onPressed: () {
|
|
|
|
//再一次提交原来的数据,标识是第二次提交
|
|
|
|
},
|
|
|
|
),
|
|
|
|
HEmptyView(28),
|
|
|
|
Expanded(
|
|
|
|
child: RoundButton(
|
|
|
|
text: '朕知道了',
|
|
|
|
isBold: true,
|
|
|
|
height: w(43),
|
|
|
|
fontSize: 32,
|
|
|
|
radius: 10,
|
|
|
|
textColor: MyColours.color_ffffff,
|
|
|
|
gradientStart: MyColours.color_438E93,
|
|
|
|
gradientEnd: MyColours.color_438E93,
|
|
|
|
borderColor: MyColours.color_438E93,
|
|
|
|
onPressed: () {
|
|
|
|
//
|
|
|
|
Navigator.pop(context);
|
|
|
|
},
|
|
|
|
))
|
|
|
|
],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
collectStoreProvider =
|
|
...
|
...
|
@@ -307,287 +385,292 @@ class _CollectStoreInfoPageState extends State<CollectStoreInfoPage> { |
|
|
|
child: Scaffold(
|
|
|
|
backgroundColor: MyColours.color_ffffff,
|
|
|
|
appBar: SystemAppBar('店铺信息'),
|
|
|
|
body: Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
VEmptyView(50),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(20), vertical: w(15)),
|
|
|
|
child: Text('在开始之前,请告诉我们关于您的一些信息,以方便专属客服给您提供周到的服务。',
|
|
|
|
style: TextStyle(
|
|
|
|
height: 1.5,
|
|
|
|
fontSize: font(16),
|
|
|
|
color: MyColours.color_000000))),
|
|
|
|
VEmptyView(40),
|
|
|
|
_textFeildWidget(nameC, '店铺名称:', '点击输入店铺名称'),
|
|
|
|
_divider(),
|
|
|
|
VEmptyView(20),
|
|
|
|
_addressWidget('店铺地址:', storeAddress, () {
|
|
|
|
//
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
Utils.getPickPermission(context, () async {
|
|
|
|
var address =
|
|
|
|
await NavigatorUtil.goMapChoicePointPage(context);
|
|
|
|
if (address != null && address is Map) {
|
|
|
|
setState(() {
|
|
|
|
storeAddress = address['address'];
|
|
|
|
body: true
|
|
|
|
? _errorWidget()
|
|
|
|
: Column(
|
|
|
|
children: [
|
|
|
|
Expanded(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
VEmptyView(50),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(20), vertical: w(15)),
|
|
|
|
child: Text(
|
|
|
|
'在开始之前,请告诉我们关于您的一些信息,以方便专属客服给您提供周到的服务。',
|
|
|
|
style: TextStyle(
|
|
|
|
height: 1.5,
|
|
|
|
fontSize: font(16),
|
|
|
|
color: MyColours.color_000000))),
|
|
|
|
VEmptyView(40),
|
|
|
|
_textFeildWidget(nameC, '店铺名称:', '点击输入店铺名称'),
|
|
|
|
_divider(),
|
|
|
|
VEmptyView(20),
|
|
|
|
_addressWidget('店铺地址:', storeAddress, () {
|
|
|
|
//
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
Utils.getPickPermission(context, () async {
|
|
|
|
var address =
|
|
|
|
await NavigatorUtil.goMapChoicePointPage(
|
|
|
|
context);
|
|
|
|
if (address != null && address is Map) {
|
|
|
|
setState(() {
|
|
|
|
storeAddress = address['address'];
|
|
|
|
|
|
|
|
lat = double.parse(address['lat'].toString());
|
|
|
|
lng = double.parse(address['lng'].toString());
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}, Permission.location);
|
|
|
|
}),
|
|
|
|
_divider(),
|
|
|
|
VEmptyView(20),
|
|
|
|
_addressWidget('城市选择:', cityString, () async {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
Result result = await CityPickers.showCityPicker(
|
|
|
|
context: context,
|
|
|
|
borderRadius: r(8),
|
|
|
|
cancelWidget: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(20), vertical: w(20)),
|
|
|
|
child: Text(
|
|
|
|
'取消',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
confirmWidget: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(20), vertical: w(20)),
|
|
|
|
child: Text(
|
|
|
|
'确定',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
theme: ThemeData(
|
|
|
|
textTheme: TextTheme(
|
|
|
|
bodyText1: TextStyle(
|
|
|
|
fontSize: font(11),
|
|
|
|
// fontWeight: FontWeight.w200,
|
|
|
|
),
|
|
|
|
)));
|
|
|
|
print(result);
|
|
|
|
if (result != null) {
|
|
|
|
proCode = result.provinceId;
|
|
|
|
cityCode = result.cityId;
|
|
|
|
disCode = result.areaId;
|
|
|
|
cityString = result.provinceName +
|
|
|
|
result.cityName +
|
|
|
|
result.areaName;
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
_divider(),
|
|
|
|
VEmptyView(20),
|
|
|
|
_textFeildWidget(personC, '联系人:', '点击输入您的姓名'),
|
|
|
|
_divider(),
|
|
|
|
VEmptyView(20),
|
|
|
|
_textFeildWidget(phoneC, '联系电话:', '点击输入您的电话号码'),
|
|
|
|
_divider(),
|
|
|
|
VEmptyView(20),
|
|
|
|
lat = double.parse(address['lat'].toString());
|
|
|
|
lng = double.parse(address['lng'].toString());
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}, Permission.location);
|
|
|
|
}),
|
|
|
|
_divider(),
|
|
|
|
VEmptyView(20),
|
|
|
|
_addressWidget('城市选择:', cityString, () async {
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
Result result = await CityPickers.showCityPicker(
|
|
|
|
context: context,
|
|
|
|
borderRadius: r(8),
|
|
|
|
cancelWidget: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(20), vertical: w(20)),
|
|
|
|
child: Text(
|
|
|
|
'取消',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_515151,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
confirmWidget: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(20), vertical: w(20)),
|
|
|
|
child: Text(
|
|
|
|
'确定',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_438E93,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
theme: ThemeData(
|
|
|
|
textTheme: TextTheme(
|
|
|
|
bodyText1: TextStyle(
|
|
|
|
fontSize: font(11),
|
|
|
|
// fontWeight: FontWeight.w200,
|
|
|
|
),
|
|
|
|
)));
|
|
|
|
print(result);
|
|
|
|
if (result != null) {
|
|
|
|
proCode = result.provinceId;
|
|
|
|
cityCode = result.cityId;
|
|
|
|
disCode = result.areaId;
|
|
|
|
cityString = result.provinceName +
|
|
|
|
result.cityName +
|
|
|
|
result.areaName;
|
|
|
|
setState(() {});
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
_divider(),
|
|
|
|
VEmptyView(20),
|
|
|
|
_textFeildWidget(personC, '联系人:', '点击输入您的姓名'),
|
|
|
|
_divider(),
|
|
|
|
VEmptyView(20),
|
|
|
|
_textFeildWidget(phoneC, '联系电话:', '点击输入您的电话号码'),
|
|
|
|
_divider(),
|
|
|
|
VEmptyView(20),
|
|
|
|
|
|
|
|
_textFeildWidgetBtn(codeC, '验证码:', '点击输入验证码'),
|
|
|
|
_divider(),
|
|
|
|
VEmptyView(20),
|
|
|
|
// Container(
|
|
|
|
// height: ScreenUtil().setHeight(52 * 2),
|
|
|
|
// // width: ScreenUtil().setWidth(611),
|
|
|
|
// padding:
|
|
|
|
// EdgeInsets.only(left: ScreenUtil().setWidth(20)),
|
|
|
|
// margin: EdgeInsets.only(top: ScreenUtil().setHeight(8)),
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// border: Border.all(
|
|
|
|
// color: MyColours.color_bff6f7,
|
|
|
|
// width: ScreenUtil().setWidth(2)),
|
|
|
|
// borderRadius: BorderRadius.circular(
|
|
|
|
// ScreenUtil().setWidth(10))),
|
|
|
|
// child: Row(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
// children: <Widget>[
|
|
|
|
// HEmptyView(30),
|
|
|
|
// Text(
|
|
|
|
// "验证码",
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_333333,
|
|
|
|
// fontSize: ScreenUtil().setSp(26)),
|
|
|
|
// ),
|
|
|
|
// HEmptyView(30),
|
|
|
|
// Expanded(
|
|
|
|
// child: TextField(
|
|
|
|
// focusNode: _codeNode,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_353535,
|
|
|
|
// fontSize: ScreenUtil().setSp(28)),
|
|
|
|
// decoration: InputDecoration(
|
|
|
|
// hintText: "请输入验证码",
|
|
|
|
// hintStyle: TextStyle(
|
|
|
|
// color: MyColours.color_999999,
|
|
|
|
// fontSize: ScreenUtil().setSp(26)),
|
|
|
|
// contentPadding: EdgeInsets.zero,
|
|
|
|
// border: OutlineInputBorder(
|
|
|
|
// borderSide: BorderSide.none),
|
|
|
|
// // contentPadding: EdgeInsets.fromLTRB(
|
|
|
|
// // 0,
|
|
|
|
// // ScreenUtil().setWidth(28),
|
|
|
|
// // ScreenUtil().setWidth(30),
|
|
|
|
// // ScreenUtil().setWidth(28)),
|
|
|
|
// ),
|
|
|
|
// onChanged: (value) {
|
|
|
|
// code = value;
|
|
|
|
// },
|
|
|
|
// onEditingComplete: () {
|
|
|
|
// FocusScope.of(context)
|
|
|
|
// .requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
// },
|
|
|
|
// keyboardType: TextInputType.numberWithOptions(
|
|
|
|
// decimal: true),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
_textFeildWidgetBtn(codeC, '验证码:', '点击输入验证码'),
|
|
|
|
_divider(),
|
|
|
|
VEmptyView(20),
|
|
|
|
// Container(
|
|
|
|
// height: ScreenUtil().setHeight(52 * 2),
|
|
|
|
// // width: ScreenUtil().setWidth(611),
|
|
|
|
// padding:
|
|
|
|
// EdgeInsets.only(left: ScreenUtil().setWidth(20)),
|
|
|
|
// margin: EdgeInsets.only(top: ScreenUtil().setHeight(8)),
|
|
|
|
// alignment: Alignment.center,
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
// border: Border.all(
|
|
|
|
// color: MyColours.color_bff6f7,
|
|
|
|
// width: ScreenUtil().setWidth(2)),
|
|
|
|
// borderRadius: BorderRadius.circular(
|
|
|
|
// ScreenUtil().setWidth(10))),
|
|
|
|
// child: Row(
|
|
|
|
// crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
// children: <Widget>[
|
|
|
|
// HEmptyView(30),
|
|
|
|
// Text(
|
|
|
|
// "验证码",
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_333333,
|
|
|
|
// fontSize: ScreenUtil().setSp(26)),
|
|
|
|
// ),
|
|
|
|
// HEmptyView(30),
|
|
|
|
// Expanded(
|
|
|
|
// child: TextField(
|
|
|
|
// focusNode: _codeNode,
|
|
|
|
// style: TextStyle(
|
|
|
|
// color: MyColours.color_353535,
|
|
|
|
// fontSize: ScreenUtil().setSp(28)),
|
|
|
|
// decoration: InputDecoration(
|
|
|
|
// hintText: "请输入验证码",
|
|
|
|
// hintStyle: TextStyle(
|
|
|
|
// color: MyColours.color_999999,
|
|
|
|
// fontSize: ScreenUtil().setSp(26)),
|
|
|
|
// contentPadding: EdgeInsets.zero,
|
|
|
|
// border: OutlineInputBorder(
|
|
|
|
// borderSide: BorderSide.none),
|
|
|
|
// // contentPadding: EdgeInsets.fromLTRB(
|
|
|
|
// // 0,
|
|
|
|
// // ScreenUtil().setWidth(28),
|
|
|
|
// // ScreenUtil().setWidth(30),
|
|
|
|
// // ScreenUtil().setWidth(28)),
|
|
|
|
// ),
|
|
|
|
// onChanged: (value) {
|
|
|
|
// code = value;
|
|
|
|
// },
|
|
|
|
// onEditingComplete: () {
|
|
|
|
// FocusScope.of(context)
|
|
|
|
// .requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
// },
|
|
|
|
// keyboardType: TextInputType.numberWithOptions(
|
|
|
|
// decimal: true),
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
|
|
|
|
// ],
|
|
|
|
// )),
|
|
|
|
],
|
|
|
|
))),
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(191 * 2),
|
|
|
|
width: double.infinity,
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(16 * 2),
|
|
|
|
bottom: ScreenUtil().setWidth(35 * 2),
|
|
|
|
// left: ScreenUtil().setWidth(45 * 2),
|
|
|
|
// right: ScreenUtil().setWidth(45 * 2),
|
|
|
|
),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
// boxShadow: [
|
|
|
|
// BoxShadow(
|
|
|
|
// spreadRadius: ScreenUtil().setWidth(2),
|
|
|
|
// color: Color.fromRGBO(0, 0, 0, 0.1),
|
|
|
|
// offset: Offset(0, ScreenUtil().setWidth(-2)),
|
|
|
|
// blurRadius: ScreenUtil().setWidth(8))
|
|
|
|
// ],
|
|
|
|
// borderRadius: BorderRadius.all(
|
|
|
|
// Radius.circular(ScreenUtil().setWidth(16)),
|
|
|
|
// ),
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(20), vertical: w(15)),
|
|
|
|
child: Text(
|
|
|
|
'注:如果您的店铺已经在使用周到安排为客户预订包间,请联系管理员给您创建使用账号。',
|
|
|
|
style: TextStyle(
|
|
|
|
height: 1.5,
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_000000))),
|
|
|
|
VEmptyView(24),
|
|
|
|
RoundButton(
|
|
|
|
text: '提交',
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
radius: ScreenUtil().setWidth(10),
|
|
|
|
isBold: true,
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(45 * 2),
|
|
|
|
right: ScreenUtil().setWidth(45 * 2),
|
|
|
|
// ],
|
|
|
|
// )),
|
|
|
|
],
|
|
|
|
))),
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(191 * 2),
|
|
|
|
width: double.infinity,
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(16 * 2),
|
|
|
|
bottom: ScreenUtil().setWidth(35 * 2),
|
|
|
|
// left: ScreenUtil().setWidth(45 * 2),
|
|
|
|
// right: ScreenUtil().setWidth(45 * 2),
|
|
|
|
),
|
|
|
|
fontSize: 32,
|
|
|
|
textColor: MyColours.color_F8F9FD,
|
|
|
|
onPressed: () async {
|
|
|
|
//判空
|
|
|
|
if (nameC.text.trim().length == 0) {
|
|
|
|
Utils.showToast('请输入店铺名称');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// if (storeAddress == '点击设置您的地址') {
|
|
|
|
// Utils.showToast('请设置您的地址');
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
if (cityString == '点击设置您的城市') {
|
|
|
|
Utils.showToast('请设置您的城市');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (personC.text.trim().length == 0) {
|
|
|
|
Utils.showToast('请输入联系人');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
// boxShadow: [
|
|
|
|
// BoxShadow(
|
|
|
|
// spreadRadius: ScreenUtil().setWidth(2),
|
|
|
|
// color: Color.fromRGBO(0, 0, 0, 0.1),
|
|
|
|
// offset: Offset(0, ScreenUtil().setWidth(-2)),
|
|
|
|
// blurRadius: ScreenUtil().setWidth(8))
|
|
|
|
// ],
|
|
|
|
// borderRadius: BorderRadius.all(
|
|
|
|
// Radius.circular(ScreenUtil().setWidth(16)),
|
|
|
|
// ),
|
|
|
|
),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: w(20), vertical: w(15)),
|
|
|
|
child: Text(
|
|
|
|
'注:如果您的店铺已经在使用周到安排为客户预订包间,请联系管理员给您创建使用账号。',
|
|
|
|
style: TextStyle(
|
|
|
|
height: 1.5,
|
|
|
|
fontSize: font(14),
|
|
|
|
color: MyColours.color_000000))),
|
|
|
|
VEmptyView(24),
|
|
|
|
RoundButton(
|
|
|
|
text: '提交',
|
|
|
|
height: ScreenUtil().setWidth(80),
|
|
|
|
radius: ScreenUtil().setWidth(10),
|
|
|
|
isBold: true,
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
left: ScreenUtil().setWidth(45 * 2),
|
|
|
|
right: ScreenUtil().setWidth(45 * 2),
|
|
|
|
),
|
|
|
|
fontSize: 32,
|
|
|
|
textColor: MyColours.color_F8F9FD,
|
|
|
|
onPressed: () async {
|
|
|
|
//判空
|
|
|
|
if (nameC.text.trim().length == 0) {
|
|
|
|
Utils.showToast('请输入店铺名称');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
// if (storeAddress == '点击设置您的地址') {
|
|
|
|
// Utils.showToast('请设置您的地址');
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
if (cityString == '点击设置您的城市') {
|
|
|
|
Utils.showToast('请设置您的城市');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (personC.text.trim().length == 0) {
|
|
|
|
Utils.showToast('请输入联系人');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (phoneC.text.trim().length == 0) {
|
|
|
|
Utils.showToast('请输入联系电话');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (phoneC.text.trim() != '18601216909') {
|
|
|
|
if (code == null || code.trim().length == 0) {
|
|
|
|
Utils.showToast('请输入验证码');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (otherLoginProvider.code != null &&
|
|
|
|
!codeEnabled) {
|
|
|
|
Utils.showToast('验证码已失效,请重新获取');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (otherLoginProvider.code == null) {
|
|
|
|
Utils.showToast('请获取验证码');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (otherLoginProvider.code != code) {
|
|
|
|
Utils.showToast('您输入的验证码不正确,请重新输入');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (phoneC.text.trim().length == 0) {
|
|
|
|
Utils.showToast('请输入联系电话');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (phoneC.text.trim() != '18601216909') {
|
|
|
|
if (code == null ||
|
|
|
|
code.trim().length == 0) {
|
|
|
|
Utils.showToast('请输入验证码');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (otherLoginProvider.code != null &&
|
|
|
|
!codeEnabled) {
|
|
|
|
Utils.showToast('验证码已失效,请重新获取');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (otherLoginProvider.code == null) {
|
|
|
|
Utils.showToast('请获取验证码');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (otherLoginProvider.code != code) {
|
|
|
|
Utils.showToast('您输入的验证码不正确,请重新输入');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
Map<String, String> params = {
|
|
|
|
'sellername': nameC.text,
|
|
|
|
'phone': phoneC.text,
|
|
|
|
'rname': personC.text,
|
|
|
|
'pro_code': proCode,
|
|
|
|
'city_code': cityCode,
|
|
|
|
'dis_code': disCode,
|
|
|
|
};
|
|
|
|
if (storeAddress != '点击设置您的地址') {
|
|
|
|
//填写了地址
|
|
|
|
params['map_address'] = storeAddress;
|
|
|
|
params['lat'] = lat.toString();
|
|
|
|
params['long'] = lng.toString();
|
|
|
|
}
|
|
|
|
bool success = await collectStoreProvider
|
|
|
|
.setSellerCollect(context, params);
|
|
|
|
if (success) {
|
|
|
|
if (phoneC.text.trim() != '18601216909') {
|
|
|
|
await collectStoreProvider
|
|
|
|
.sendIntention(context, {
|
|
|
|
"shopname": nameC.text,
|
|
|
|
"shopnumber": phoneC.text,
|
|
|
|
"name": personC.text,
|
|
|
|
"address": storeAddress,
|
|
|
|
"laiyuan": 'app'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
FocusScope.of(context)
|
|
|
|
.requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
Map<String, String> params = {
|
|
|
|
'sellername': nameC.text,
|
|
|
|
'phone': phoneC.text,
|
|
|
|
'rname': personC.text,
|
|
|
|
'pro_code': proCode,
|
|
|
|
'city_code': cityCode,
|
|
|
|
'dis_code': disCode,
|
|
|
|
};
|
|
|
|
if (storeAddress != '点击设置您的地址') {
|
|
|
|
//填写了地址
|
|
|
|
params['map_address'] = storeAddress;
|
|
|
|
params['lat'] = lat.toString();
|
|
|
|
params['long'] = lng.toString();
|
|
|
|
}
|
|
|
|
bool success = await collectStoreProvider
|
|
|
|
.setSellerCollect(context, params);
|
|
|
|
if (success) {
|
|
|
|
if (phoneC.text.trim() != '18601216909') {
|
|
|
|
await collectStoreProvider
|
|
|
|
.sendIntention(context, {
|
|
|
|
"shopname": nameC.text,
|
|
|
|
"shopnumber": phoneC.text,
|
|
|
|
"name": personC.text,
|
|
|
|
"address": storeAddress,
|
|
|
|
"laiyuan": 'app'
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
//成功
|
|
|
|
NavigatorUtil.goCompleteStorePage(context,
|
|
|
|
replace: true);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
|
|
)));
|
|
|
|
//成功
|
|
|
|
NavigatorUtil.goCompleteStorePage(context,
|
|
|
|
replace: true);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
),
|
|
|
|
],
|
|
|
|
))
|
|
|
|
],
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|