Commit 69938cb69f317577562aafbe2f5104878b6c5eb3

Authored by wdn127929
1 parent f1b71c52

邀请函新UI

... ... @@ -41,10 +41,11 @@ class InvicationPageState extends State<InvicationPage> {
double couponHeight = 180.0;
CouponProvider couponProvider;
BaseIndoProvider _baseIndoProvider;
String name = '请填写姓名';
String position = '请填写职位';
String phone = '请填写电话';
String name = '填写姓名';
String position = '填写职位';
String phone = '填写电话';
String qiniuUrl = '';
final GlobalKey key = new GlobalKey();
@override
void initState() {
... ... @@ -223,6 +224,20 @@ class InvicationPageState extends State<InvicationPage> {
Utils.setBarStatus(true, color: Colors.white);
}
///浏览照片
///
_seePhoto() {
List<String> temp = [];
if (_baseIndoProvider.photoList.length > 0) {
for (int i = 0; i < _baseIndoProvider.photoList.length; i++) {
temp.add(_baseIndoProvider.photoList[i].image);
}
///没有上传完成的不可以点击
_showPhotoView(context, 0, temp);
}
}
@override
Widget build(BuildContext context) {
// TODO: implement build
... ... @@ -233,7 +248,7 @@ class InvicationPageState extends State<InvicationPage> {
// height: double.infinity,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/bg_invication.png"), fit: BoxFit.cover),
image: AssetImage("assets/yd_bg_new.png"), fit: BoxFit.fill),
),
child: Scaffold(
backgroundColor: Colors.transparent,
... ... @@ -241,7 +256,7 @@ class InvicationPageState extends State<InvicationPage> {
child: Stack(
children: [
Container(
margin: EdgeInsets.only(top: ScreenUtil().setWidth(10 * 2)),
margin: EdgeInsets.only(top: ScreenUtil().setWidth(13 * 2)),
padding:
EdgeInsets.only(top: ScreenUtil().setWidth(35 * 2)),
child: Column(children: [
... ... @@ -254,58 +269,57 @@ class InvicationPageState extends State<InvicationPage> {
child: Column(
children: <Widget>[
Image.asset(
"assets/img_ydap.png",
width: ScreenUtil().setWidth(220 * 2),
height: ScreenUtil().setHeight(98 * 2),
"assets/yd_logo.png",
width: ScreenUtil().setWidth(233 * 2),
height: ScreenUtil().setHeight(51 * 2),
),
VEmptyView(10),
VEmptyView(26),
Container(
margin: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40)),
// padding: EdgeInsets.all(
// ScreenUtil().setWidth(60)),
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [
MyColours.color_F7F1E8,
MyColours.color_E3D6C7,
],
),
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10))),
// decoration: BoxDecoration(
// gradient: LinearGradient(
// begin: Alignment.topCenter,
// end: Alignment.bottomCenter,
// colors: [
// MyColours.color_F7F1E8,
// MyColours.color_E3D6C7,
// ],
// ),
// borderRadius: BorderRadius.circular(
// ScreenUtil().setWidth(10))),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Container(
// color: Colors.red,
width:
ScreenUtil().setWidth(335 * 2),
height:
ScreenUtil().setWidth(200 * 2),
decoration: BoxDecoration(
image: DecorationImage(
alignment:
Alignment.topCenter,
image: AssetImage(
"assets/yd_baiinfo_bg.png"),
fit: BoxFit.cover),
),
// decoration: BoxDecoration(
// image: DecorationImage(
// alignment:
// Alignment.topCenter,
// image: AssetImage(
// "assets/yd_baiinfo_bg.png"),
// fit: BoxFit.cover),
// ),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(
top: ScreenUtil()
.setWidth(20),
left: ScreenUtil()
.setWidth(60)),
.setWidth(70)),
child: qiniuUrl == ''
? Image.asset(
Utils.getImgPath(
'person'),
'yd_person'),
width: ScreenUtil().setWidth(
143 * 2),
height: ScreenUtil()
... ... @@ -321,17 +335,20 @@ class InvicationPageState extends State<InvicationPage> {
HEmptyView(10),
Spacer(),
Container(
height: ScreenUtil()
.setWidth(200 * 2),
padding: EdgeInsets.only(
top: ScreenUtil()
.setWidth(37 * 2)),
// height: ScreenUtil()
// .setWidth(200 * 2),
child: Column(
mainAxisAlignment:
MainAxisAlignment
.start,
crossAxisAlignment:
CrossAxisAlignment
.start,
.end,
children: [
VEmptyView(60),
// VEmptyView(60),
GestureDetector(
behavior:
HitTestBehavior
... ... @@ -342,29 +359,29 @@ class InvicationPageState extends State<InvicationPage> {
child: Container(
width: ScreenUtil()
.setWidth(
100 * 2),
120 * 2),
height: ScreenUtil()
.setWidth(
24 * 2),
42 * 2),
child: Text(
name,
overflow:
TextOverflow
.ellipsis,
textAlign:
TextAlign
.right,
style: TextStyle(
fontWeight:
FontWeight
.bold,
color: MyColours
.color_794F28,
.color_ffffff,
fontSize:
ScreenUtil()
.setSp(
36)),
60)),
),
),
),
VEmptyView(6),
// VEmptyView(6),
InkWell(
onTap: () {
_goBaseInfoPage();
... ... @@ -372,26 +389,29 @@ class InvicationPageState extends State<InvicationPage> {
child: Container(
width: ScreenUtil()
.setWidth(
100 * 2),
120 * 2),
height:
ScreenUtil()
.setWidth(
18 *
22 *
2),
child: Text(
position,
phone,
overflow:
TextOverflow
.ellipsis,
textAlign:
TextAlign
.right,
style: TextStyle(
color: MyColours
.color_794F28,
.color_ffffff,
fontSize: ScreenUtil()
.setSp(
28)),
32)),
),
)),
VEmptyView(6),
// VEmptyView(6),
InkWell(
onTap: () {
_goBaseInfoPage();
... ... @@ -399,38 +419,43 @@ class InvicationPageState extends State<InvicationPage> {
child: Container(
width: ScreenUtil()
.setWidth(
100 * 2),
120 * 2),
height:
ScreenUtil()
.setWidth(
18 *
24 *
2),
child: Text(
phone,
position,
overflow:
TextOverflow
.ellipsis,
textAlign:
TextAlign
.right,
style: TextStyle(
color: MyColours
.color_794F28,
.color_ffffff,
fontSize: ScreenUtil()
.setSp(
28)),
34)),
),
)),
VEmptyView(14),
RoundButton(
// width: ScreenUtil().setWidth(95),
height: ScreenUtil()
.setWidth(94 * 2),
.setWidth(60 * 2),
image:
Utils.getImgPath(
'yd_bianji'),
'yd_edit_new'),
imgWidth: 24,
radius: 0,
space: ScreenUtil()
.setWidth(20),
text: '编辑',
textColor: MyColours
.color_794F28,
.color_BA9953,
isBold: false,
fontSize: 28,
gradientStart: Colors
... ... @@ -456,150 +481,147 @@ class InvicationPageState extends State<InvicationPage> {
// ))
// ],
// ),
// Container(
// color: MyColours.color_EEDBC4,
// width: double.infinity,
// height: ScreenUtil().setWidth(40),
// ),
VEmptyView(76),
// Image.asset(
// "assets/yd_up.png",
// width: ScreenUtil().setWidth(195 * 2),
// height:
// ScreenUtil().setHeight(33 * 2),
// ),
// VEmptyView(50),
Container(
color: MyColours.color_EEDBC4,
width: double.infinity,
height: ScreenUtil().setWidth(40),
),
VEmptyView(40),
Image.asset(
"assets/yd_up.png",
width: ScreenUtil().setWidth(195 * 2),
height:
ScreenUtil().setHeight(33 * 2),
),
VEmptyView(50),
Container(
height: ScreenUtil().setWidth(48),
height: ScreenUtil().setWidth(58),
child: Text(
user.sellername,
style: TextStyle(
letterSpacing: ScreenUtil()
.setWidth(2.13 * 2),
color: MyColours.color_794F28,
fontWeight: FontWeight.bold,
// letterSpacing: ScreenUtil()
// .setWidth(2.13 * 2),
color: MyColours.color_BA9953,
// fontWeight: FontWeight.bold,
fontSize:
ScreenUtil().setSp(36)),
ScreenUtil().setSp(42)),
),
),
VEmptyView(30),
VEmptyView(14),
Container(
height: ScreenUtil().setWidth(36),
height: ScreenUtil().setWidth(58),
child: Text(
'已为您安排在包间',
'${dateTimeStr}',
style: TextStyle(
letterSpacing: ScreenUtil()
.setWidth(1.7 * 2),
color: MyColours.color_C19E5B,
.setWidth(1.8 * 2),
color: MyColours.color_BA9953,
fontSize:
ScreenUtil().setSp(28)),
ScreenUtil().setSp(42)),
),
),
VEmptyView(12),
Row(
mainAxisAlignment:
MainAxisAlignment.center,
children: [
Image.asset(
"assets/bj_left.png",
width:
ScreenUtil().setWidth(30 * 2),
height: ScreenUtil()
.setHeight(58 * 2),
),
Container(
height: ScreenUtil().setWidth(48),
child: Text(
widget.tableInfo
.replaceAll("\n", ""),
style: TextStyle(
letterSpacing: ScreenUtil()
.setWidth(2.13 * 2),
color:
MyColours.color_794F28,
fontWeight: FontWeight.bold,
fontSize:
ScreenUtil().setSp(42)),
),
),
Image.asset(
"assets/bj_right.png",
width:
ScreenUtil().setWidth(30 * 2),
height: ScreenUtil()
.setHeight(58 * 2),
),
],
),
_baseIndoProvider.photoList.length > 0
? VEmptyView(18)
: Container(),
_baseIndoProvider.photoList.length > 0
? RoundButton(
onPressed: () {
List<String> temp = [];
if (_baseIndoProvider
.photoList.length >
0) {
for (int i = 0;
i <
_baseIndoProvider
.photoList
.length;
i++) {
temp.add(_baseIndoProvider
.photoList[i].image);
}
///没有上传完成的不可以点击
_showPhotoView(
context, 0, temp);
}
},
text: '浏览照片',
width: ScreenUtil()
.setWidth(68 * 2),
height: ScreenUtil()
.setWidth(24 * 2),
fontSize: 26,
textColor:
MyColours.color_794F28,
isBold: false,
gradientStart: Color.fromRGBO(
121, 79, 40, 0.1),
gradientEnd: Color.fromRGBO(
121, 79, 40, 0.1),
)
: Container(),
VEmptyView(60),
VEmptyView(26),
Container(
height: ScreenUtil().setWidth(40),
height: ScreenUtil().setWidth(44),
child: Text(
'时间:${dateTimeStr}',
'已为您安排在包间',
style: TextStyle(
letterSpacing: ScreenUtil()
.setWidth(1.8 * 2),
color: MyColours.color_794F28,
fontWeight: FontWeight.bold,
color: MyColours.color_ffffff,
fontSize:
ScreenUtil().setSp(30)),
ScreenUtil().setSp(32)),
),
),
VEmptyView(20),
VEmptyView(28),
GestureDetector(
onTap: () {
_seePhoto();
},
child: Container(
child: Stack(
alignment: Alignment.bottomCenter,
overflow: Overflow.visible,
children: [
Container(
constraints: BoxConstraints(
maxWidth: ScreenUtil()
.setWidth(195 * 2)),
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(60),
ScreenUtil().setWidth(30),
ScreenUtil().setWidth(60),
ScreenUtil()
.setWidth(24 * 2)),
// height:
// ScreenUtil().setWidth(84 * 2),
decoration: BoxDecoration(
borderRadius: BorderRadius
.all(Radius.circular(
ScreenUtil()
.setWidth(
13 * 2))),
border: Border.all(
color: MyColours
.color_BA9953,
width: ScreenUtil()
.setWidth(4))),
child: Text(
widget.tableInfo
.replaceAll("\n", ""),
style: TextStyle(
// letterSpacing: ScreenUtil()
// .setWidth(2.13 * 2),
color: MyColours
.color_BA9953,
fontWeight:
FontWeight.bold,
fontSize: ScreenUtil()
.setSp(52)),
),
),
Positioned(
key: key,
bottom: ScreenUtil()
.setWidth(-24),
child: _baseIndoProvider
.photoList
.length >
0
? RoundButton(
onPressed: () {
_seePhoto();
},
text: '浏览照片',
width: ScreenUtil()
.setWidth(68 * 2),
height: ScreenUtil()
.setWidth(24 * 2),
fontSize: 26,
textColor: MyColours
.color_333333,
isBold: false,
gradientStart:
MyColours
.color_BA9953,
gradientEnd: MyColours
.color_BA9953,
)
: Container(),
)
],
))),
VEmptyView(70),
Container(
// height: ScreenUtil().setWidth(40),
child: Text(
'地址:${user.sellerAddr}',
'${user.sellerAddr}',
maxLines: 3,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
style: TextStyle(
letterSpacing: ScreenUtil()
.setWidth(1.8 * 2),
color: MyColours.color_794F28,
fontWeight: FontWeight.bold,
color: MyColours.color_BA9953,
fontSize:
ScreenUtil().setSp(30)),
ScreenUtil().setSp(28)),
),
),
// VEmptyView(20),
... ... @@ -615,14 +637,14 @@ class InvicationPageState extends State<InvicationPage> {
// gradientEnd:
// Color.fromRGBO(121, 79, 40, 0.1),
// ),
VEmptyView(50),
Image.asset(
"assets/yd_down.png",
width: ScreenUtil().setWidth(195 * 2),
height:
ScreenUtil().setHeight(33 * 2),
),
VEmptyView(60),
// VEmptyView(50),
// Image.asset(
// "assets/yd_down.png",
// width: ScreenUtil().setWidth(195 * 2),
// height:
// ScreenUtil().setHeight(33 * 2),
// ),
// VEmptyView(60),
],
),
)
... ... @@ -761,14 +783,13 @@ class InvicationPageState extends State<InvicationPage> {
child: Container(
padding: EdgeInsets.fromLTRB(
ScreenUtil().setWidth(40),
ScreenUtil().setWidth(40),
ScreenUtil().setWidth(28),
ScreenUtil().setWidth(200),
ScreenUtil().setWidth(100),
),
alignment: Alignment.centerLeft,
// color: Colors.red,
child: Image.asset(
"assets/invication_back.png",
"assets/back_white.png",
width: ScreenUtil().setWidth(20),
height: ScreenUtil().setHeight(31),
)),
... ...
// import 'package:cached_network_image/cached_network_image.dart';
// import 'package:common_utils/common_utils.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter_screenutil/flutter_screenutil.dart';
// import 'package:one_key/models/seller_phone_model.dart';
// import 'package:one_key/models/user.dart';
// import 'package:one_key/pages/online_check/photo_view_wiget.dart';
// import 'package:one_key/provider/base_info_provider.dart';
// import 'package:one_key/provider/coupon_provider.dart';
// import 'package:one_key/provider/user_model.dart';
// import 'package:one_key/res/colors.dart';
// import 'package:one_key/utils/navigator_util.dart';
// import 'package:one_key/utils/utils.dart';
// import 'package:one_key/widgets/h_empty_view.dart';
// import 'package:one_key/widgets/round_button.dart';
// import 'package:one_key/widgets/v_empty_view.dart';
// import 'package:provider/provider.dart';
// class InvicationPage extends StatefulWidget {
// final String rid; //预订订单id
// final String tableInfo; //桌位信息
// final String ddate;
// final String ddateStr;
// final String phone;
// InvicationPage(
// this.rid, this.tableInfo, this.ddate, this.ddateStr, this.phone);
// @override
// State<StatefulWidget> createState() {
// // TODO: implement createState
// return new InvicationPageState();
// }
// }
// class InvicationPageState extends State<InvicationPage> {
// User user;
// DateTime dateTime;
// String dateTimeStr = "";
// ScrollController controller = ScrollController();
// double couponHeight = 180.0;
// CouponProvider couponProvider;
// BaseIndoProvider _baseIndoProvider;
// String name = '请填写姓名';
// String position = '请填写职位';
// String phone = '请填写电话';
// String qiniuUrl = '';
// @override
// void initState() {
// super.initState();
// WidgetsBinding.instance.addPostFrameCallback((_) {
// _getActivityByRid();
// _getCustomerActivityBaseinfo();
// _getSellerPhotoById();
// });
// Utils.changeStatusColor(color: Colors.transparent);
// dateTime =
// DateTime.fromMillisecondsSinceEpoch(int.parse(widget.ddate) * 1000);
// user = Provider.of<UserModel>(context, listen: false).user;
// dateTimeStr =
// "${dateTime.year}/${Utils.addZeroNumber(dateTime.month)}/${Utils.addZeroNumber(dateTime.day)} 星期${Utils.formatWeekDayNum(dateTime.weekday)} ${widget.ddateStr}";
// }
// _getSellerPhotoById() async {
// Map<String, String> params = {
// 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid,
// "type": '2',
// };
// bool success = await _baseIndoProvider.getSellerPhotoById(context, params);
// }
// _getCustomerActivityBaseinfo() async {
// Map<String, String> params = {
// 'sellerid': Provider.of<UserModel>(context, listen: false).user.sellerid,
// "uid": Provider.of<UserModel>(context, listen: false).user.openid,
// };
// bool success =
// await _baseIndoProvider.getCustomerActivityBaseinfo(context, params);
// if (success) {
// name = _baseIndoProvider.baseInfoSunModel.name;
// qiniuUrl = _baseIndoProvider.baseInfoSunModel.photo;
// // _uploadImageProvider.erweima.qiniuUrl =
// // _baseIndoProvider.baseInfoSunModel.qrcode;
// phone = _baseIndoProvider.baseInfoSunModel.phone;
// position = _baseIndoProvider.baseInfoSunModel.position;
// setState(() {});
// } else {
// // name = '请填写姓名';
// // position = '请填写职位';
// // phone = '请填写电话';
// // qiniuUrl = '';
// }
// }
// _getActivityByRid() async {
// Map<String, String> params = {
// "rid": widget.rid,
// };
// await couponProvider.getActivityByRid(context, params, isShowLoading: true);
// //flase默认5个 true 不默认5个
// if (!couponProvider.hasModify) {
// //没有绑定的券,默认给5个,获取优惠券列表
// _couponNetworkData(isShowLoading: true);
// }
// }
// ///消费券默认5张
// _couponNetworkData({bool isShowLoading = true}) async {
// Map<String, String> params = {
// "uid": Provider.of<UserModel>(context, listen: false).user.openid,
// 'status': '1'
// };
// await couponProvider.getCustomerSelectActivity(context, params,
// isShowLoading: isShowLoading);
// //此人已经新建好券
// if (couponProvider.couponListSelect.length > 0) {
// couponProvider.initCouponSelect(context);
// if (couponProvider.coupons.length == 0) {
// setState(() {
// couponHeight = 0;
// });
// } else {
// setState(() {
// couponHeight = 180.0;
// });
// }
// } else {
// //没有新建的优惠券
// setState(() {
// couponHeight = 0;
// });
// }
// }
// @override
// void dispose() {
// Utils.changeStatusColor();
// couponProvider.clearSelect();
// super.dispose();
// }
// //中间内容显示组件
// Widget _middleWidget(String title, String content) {
// return Column(
// children: <Widget>[
// VEmptyView(80),
// Row(
// mainAxisSize: MainAxisSize.min,
// children: <Widget>[
// Image.asset(
// "assets/invication_line_left.png",
// width: ScreenUtil().setWidth(44),
// height: ScreenUtil().setWidth(4),
// ),
// Container(
// margin:
// EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(13)),
// child: Text(title,
// style: TextStyle(
// color: MyColours.color_CEB689,
// fontSize: ScreenUtil().setSp(28))),
// ),
// Image.asset(
// "assets/invication_line_right.png",
// width: ScreenUtil().setWidth(44),
// height: ScreenUtil().setWidth(4),
// )
// ],
// ),
// Container(
// margin: EdgeInsets.only(top: ScreenUtil().setHeight(20)),
// child: Text(
// content,
// style: TextStyle(
// color: MyColours.color_F2F2F2,
// fontSize: ScreenUtil().setSp(36)),
// ),
// )
// ],
// );
// }
// _goBaseInfoPage() async {
// bool needRefresh = await NavigatorUtil.goBaseInfoPage(context);
// if (needRefresh != null && needRefresh) {
// //刷新页面数据
// _getCustomerActivityBaseinfo();
// }
// }
// //查看大图
// _showPhotoView(BuildContext context, int index, List imgs,
// {isShow = false, List dashName}) async {
// // if (imgs.length == 1 &&
// // imgs[0] ==
// // 'http://nosqn.colorcun.com/custom/lite-online/image/def-banner.png') {
// // imgs[0] = 'http://nosqn.colorcun.com/app/seller-hj-empty.png';
// // }
// Utils.setBarStatus(false, color: Colors.black);
// dynamic result = await showGeneralDialog(
// context: context,
// barrierDismissible: false,
// // barrierColor: Colors.red,
// barrierLabel:
// MaterialLocalizations.of(context).modalBarrierDismissLabel,
// transitionDuration: const Duration(milliseconds: 150),
// pageBuilder: (BuildContext context, Animation animation,
// Animation secondaryAnimation) {
// Widget child = Stack(
// children: <Widget>[
// PhotoPreview(
// initialIndex: index,
// photoList: imgs,
// isShow: isShow,
// dashName: dashName)
// ],
// );
// return child;
// });
// Utils.setBarStatus(true, color: Colors.white);
// }
// @override
// Widget build(BuildContext context) {
// // TODO: implement build
// _baseIndoProvider = Provider.of<BaseIndoProvider>(context, listen: true);
// couponProvider = Provider.of<CouponProvider>(context, listen: true);
// return Container(
// width: double.infinity,
// // height: double.infinity,
// decoration: BoxDecoration(
// image: DecorationImage(
// image: AssetImage("assets/bg_invication.png"), fit: BoxFit.cover),
// ),
// child: Scaffold(
// backgroundColor: Colors.transparent,
// body: SafeArea(
// child: Stack(
// children: [
// Container(
// margin: EdgeInsets.only(top: ScreenUtil().setWidth(10 * 2)),
// padding:
// EdgeInsets.only(top: ScreenUtil().setWidth(35 * 2)),
// child: Column(children: [
// Expanded(
// child: ListView(
// controller: controller,
// physics: BouncingScrollPhysics(),
// children: <Widget>[
// Center(
// child: Column(
// children: <Widget>[
// Image.asset(
// "assets/img_ydap.png",
// width: ScreenUtil().setWidth(220 * 2),
// height: ScreenUtil().setHeight(98 * 2),
// ),
// VEmptyView(10),
// Container(
// margin: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(40)),
// // padding: EdgeInsets.all(
// // ScreenUtil().setWidth(60)),
// decoration: BoxDecoration(
// gradient: LinearGradient(
// begin: Alignment.topCenter,
// end: Alignment.bottomCenter,
// colors: [
// MyColours.color_F7F1E8,
// MyColours.color_E3D6C7,
// ],
// ),
// borderRadius: BorderRadius.circular(
// ScreenUtil().setWidth(10))),
// child: Column(
// crossAxisAlignment:
// CrossAxisAlignment.center,
// children: [
// Container(
// width:
// ScreenUtil().setWidth(335 * 2),
// height:
// ScreenUtil().setWidth(200 * 2),
// decoration: BoxDecoration(
// image: DecorationImage(
// alignment:
// Alignment.topCenter,
// image: AssetImage(
// "assets/yd_baiinfo_bg.png"),
// fit: BoxFit.cover),
// ),
// child: Row(
// crossAxisAlignment:
// CrossAxisAlignment.start,
// children: [
// Padding(
// padding: EdgeInsets.only(
// top: ScreenUtil()
// .setWidth(20),
// left: ScreenUtil()
// .setWidth(60)),
// child: qiniuUrl == ''
// ? Image.asset(
// Utils.getImgPath(
// 'person'),
// width: ScreenUtil().setWidth(
// 143 * 2),
// height: ScreenUtil()
// .setWidth(
// 190 * 2))
// : Image.network(qiniuUrl,
// width: ScreenUtil()
// .setWidth(
// 143 * 2),
// height: ScreenUtil()
// .setWidth(190 * 2)),
// ),
// HEmptyView(10),
// Spacer(),
// Container(
// height: ScreenUtil()
// .setWidth(200 * 2),
// child: Column(
// mainAxisAlignment:
// MainAxisAlignment
// .start,
// crossAxisAlignment:
// CrossAxisAlignment
// .start,
// children: [
// VEmptyView(60),
// GestureDetector(
// behavior:
// HitTestBehavior
// .opaque,
// onTap: () {
// _goBaseInfoPage();
// },
// child: Container(
// width: ScreenUtil()
// .setWidth(
// 100 * 2),
// height: ScreenUtil()
// .setWidth(
// 24 * 2),
// child: Text(
// name,
// overflow:
// TextOverflow
// .ellipsis,
// style: TextStyle(
// fontWeight:
// FontWeight
// .bold,
// color: MyColours
// .color_794F28,
// fontSize:
// ScreenUtil()
// .setSp(
// 36)),
// ),
// ),
// ),
// VEmptyView(6),
// InkWell(
// onTap: () {
// _goBaseInfoPage();
// },
// child: Container(
// width: ScreenUtil()
// .setWidth(
// 100 * 2),
// height:
// ScreenUtil()
// .setWidth(
// 18 *
// 2),
// child: Text(
// position,
// overflow:
// TextOverflow
// .ellipsis,
// style: TextStyle(
// color: MyColours
// .color_794F28,
// fontSize: ScreenUtil()
// .setSp(
// 28)),
// ),
// )),
// VEmptyView(6),
// InkWell(
// onTap: () {
// _goBaseInfoPage();
// },
// child: Container(
// width: ScreenUtil()
// .setWidth(
// 100 * 2),
// height:
// ScreenUtil()
// .setWidth(
// 18 *
// 2),
// child: Text(
// phone,
// overflow:
// TextOverflow
// .ellipsis,
// style: TextStyle(
// color: MyColours
// .color_794F28,
// fontSize: ScreenUtil()
// .setSp(
// 28)),
// ),
// )),
// VEmptyView(14),
// RoundButton(
// height: ScreenUtil()
// .setWidth(94 * 2),
// image:
// Utils.getImgPath(
// 'yd_bianji'),
// imgWidth: 24,
// space: ScreenUtil()
// .setWidth(20),
// text: '编辑',
// textColor: MyColours
// .color_794F28,
// isBold: false,
// fontSize: 28,
// gradientStart: Colors
// .transparent,
// gradientEnd: Colors
// .transparent,
// onPressed: () {
// _goBaseInfoPage();
// },
// )
// ],
// )),
// HEmptyView(60),
// ],
// )),
// // Positioned(
// // bottom: 0,
// // child: Container(
// // color: MyColours.color_EEDBC4,
// // width: double.infinity,
// // height:
// // ScreenUtil().setWidth(40),
// // ))
// // ],
// // ),
// Container(
// color: MyColours.color_EEDBC4,
// width: double.infinity,
// height: ScreenUtil().setWidth(40),
// ),
// VEmptyView(40),
// Image.asset(
// "assets/yd_up.png",
// width: ScreenUtil().setWidth(195 * 2),
// height:
// ScreenUtil().setHeight(33 * 2),
// ),
// VEmptyView(50),
// Container(
// height: ScreenUtil().setWidth(48),
// child: Text(
// user.sellername,
// style: TextStyle(
// letterSpacing: ScreenUtil()
// .setWidth(2.13 * 2),
// color: MyColours.color_794F28,
// fontWeight: FontWeight.bold,
// fontSize:
// ScreenUtil().setSp(36)),
// ),
// ),
// VEmptyView(30),
// Container(
// height: ScreenUtil().setWidth(36),
// child: Text(
// '已为您安排在包间',
// style: TextStyle(
// letterSpacing: ScreenUtil()
// .setWidth(1.7 * 2),
// color: MyColours.color_C19E5B,
// fontSize:
// ScreenUtil().setSp(28)),
// ),
// ),
// VEmptyView(12),
// Row(
// mainAxisAlignment:
// MainAxisAlignment.center,
// children: [
// Image.asset(
// "assets/bj_left.png",
// width:
// ScreenUtil().setWidth(30 * 2),
// height: ScreenUtil()
// .setHeight(58 * 2),
// ),
// Container(
// height: ScreenUtil().setWidth(48),
// child: Text(
// widget.tableInfo
// .replaceAll("\n", ""),
// style: TextStyle(
// letterSpacing: ScreenUtil()
// .setWidth(2.13 * 2),
// color:
// MyColours.color_794F28,
// fontWeight: FontWeight.bold,
// fontSize:
// ScreenUtil().setSp(42)),
// ),
// ),
// Image.asset(
// "assets/bj_right.png",
// width:
// ScreenUtil().setWidth(30 * 2),
// height: ScreenUtil()
// .setHeight(58 * 2),
// ),
// ],
// ),
// _baseIndoProvider.photoList.length > 0
// ? VEmptyView(18)
// : Container(),
// _baseIndoProvider.photoList.length > 0
// ? RoundButton(
// onPressed: () {
// List<String> temp = [];
// if (_baseIndoProvider
// .photoList.length >
// 0) {
// for (int i = 0;
// i <
// _baseIndoProvider
// .photoList
// .length;
// i++) {
// temp.add(_baseIndoProvider
// .photoList[i].image);
// }
// ///没有上传完成的不可以点击
// _showPhotoView(
// context, 0, temp);
// }
// },
// text: '浏览照片',
// width: ScreenUtil()
// .setWidth(68 * 2),
// height: ScreenUtil()
// .setWidth(24 * 2),
// fontSize: 26,
// textColor:
// MyColours.color_794F28,
// isBold: false,
// gradientStart: Color.fromRGBO(
// 121, 79, 40, 0.1),
// gradientEnd: Color.fromRGBO(
// 121, 79, 40, 0.1),
// )
// : Container(),
// VEmptyView(60),
// Container(
// height: ScreenUtil().setWidth(40),
// child: Text(
// '时间:${dateTimeStr}',
// style: TextStyle(
// letterSpacing: ScreenUtil()
// .setWidth(1.8 * 2),
// color: MyColours.color_794F28,
// fontWeight: FontWeight.bold,
// fontSize:
// ScreenUtil().setSp(30)),
// ),
// ),
// VEmptyView(20),
// Container(
// // height: ScreenUtil().setWidth(40),
// child: Text(
// '地址:${user.sellerAddr}',
// maxLines: 3,
// overflow: TextOverflow.ellipsis,
// textAlign: TextAlign.center,
// style: TextStyle(
// letterSpacing: ScreenUtil()
// .setWidth(1.8 * 2),
// color: MyColours.color_794F28,
// fontWeight: FontWeight.bold,
// fontSize:
// ScreenUtil().setSp(30)),
// ),
// ),
// // VEmptyView(20),
// // RoundButton(
// // text: '一键导航',
// // width: ScreenUtil().setWidth(68 * 2),
// // height: ScreenUtil().setWidth(24 * 2),
// // fontSize: 24,
// // textColor: MyColours.color_794F28,
// // isBold: false,
// // gradientStart:
// // Color.fromRGBO(121, 79, 40, 0.1),
// // gradientEnd:
// // Color.fromRGBO(121, 79, 40, 0.1),
// // ),
// VEmptyView(50),
// Image.asset(
// "assets/yd_down.png",
// width: ScreenUtil().setWidth(195 * 2),
// height:
// ScreenUtil().setHeight(33 * 2),
// ),
// VEmptyView(60),
// ],
// ),
// )
// ],
// ),
// ),
// VEmptyView(couponHeight),
// ])),
// Container(
// width: double.infinity,
// height: ScreenUtil().setHeight(99),
// child: Row(
// children: <Widget>[
// GestureDetector(
// onTap: () {
// if (widget.phone.isEmpty) {
// Utils.showToast("没有预订人电话信息");
// return;
// }
// NavigatorUtil.goSmsPage(context, widget.rid);
// },
// child: Container(
// width: ScreenUtil().setWidth(135 * 2),
// height: double.infinity,
// alignment: Alignment.center,
// decoration: BoxDecoration(
// color: MyColours.color_262628,
// border: Border(
// top: BorderSide(
// width: ScreenUtil().setWidth(1),
// color: MyColours.color_ECD9B7))),
// child: Text(
// "发短信",
// style: TextStyle(
// color: MyColours.color_ECD9B7,
// fontSize: ScreenUtil().setSp(28)),
// ),
// ),
// ),
// Expanded(
// child: GestureDetector(
// onTap: () async {
// if (ObjectUtil.isEmpty(
// _baseIndoProvider.baseInfoSunModel)) {
// Utils.showToast('请输入个人资料');
// return;
// }
// if (ObjectUtil.isEmpty(_baseIndoProvider
// .baseInfoSunModel.name)) {
// Utils.showToast('请填写您的姓名');
// return;
// }
// if (ObjectUtil.isEmpty(_baseIndoProvider
// .baseInfoSunModel.phone)) {
// Utils.showToast('请填写您的联系电话');
// return;
// }
// if (ObjectUtil.isEmpty(_baseIndoProvider
// .baseInfoSunModel.position)) {
// Utils.showToast('请填写您在餐厅中的职位');
// return;
// }
// if (ObjectUtil.isEmpty(_baseIndoProvider
// .baseInfoSunModel.phone)) {
// Utils.showToast('请上传您的头像');
// return;
// }
// if (ObjectUtil.isEmpty(_baseIndoProvider
// .baseInfoSunModel.qrcode)) {
// Utils.showToast('请上传您的微信二维码');
// return;
// }
// if (!couponProvider.hasModify &&
// couponProvider.coupons.length > 0) {
// Map<String, String> params = {
// "rid": widget.rid,
// "aid": Utils.listToStringEnglish(
// couponProvider.coupons)
// };
// bool isSuc = await couponProvider
// .setActivityAsReserve(context, params);
// if (isSuc) {
// couponProvider.hasModify = true;
// bool isSuccess =
// await Utils.goShareInvicationToWeChat(
// widget.rid,
// Provider.of<UserModel>(context,
// listen: false)
// .user
// .openid);
// print(isSuccess);
// // couponProvider.couponsShow = [];
// // couponProvider.couponsShow
// // .addAll(couponProvider.coupons);
// // couponProvider.coupons = [];
// // couponProvider.notifyListeners();
// }
// } else {
// bool isSuccess =
// await Utils.goShareInvicationToWeChat(
// widget.rid,
// Provider.of<UserModel>(context,
// listen: false)
// .user
// .openid);
// print(isSuccess);
// }
// },
// child: Container(
// width: double.infinity,
// height: double.infinity,
// color: MyColours.color_ECD9B7,
// alignment: Alignment.center,
// child: Text(
// "通知客户",
// style: TextStyle(
// color: MyColours.color_7B512A,
// fontSize: ScreenUtil().setSp(30)),
// ),
// ),
// ),
// )
// ],
// ),
// )
// ])),
// Positioned(
// left: ScreenUtil().setWidth(0),
// top: ScreenUtil().setWidth(0),
// child: GestureDetector(
// onTap: () {
// Navigator.of(context).pop();
// },
// behavior: HitTestBehavior.opaque,
// child: Container(
// padding: EdgeInsets.fromLTRB(
// ScreenUtil().setWidth(40),
// ScreenUtil().setWidth(40),
// ScreenUtil().setWidth(200),
// ScreenUtil().setWidth(100),
// ),
// alignment: Alignment.centerLeft,
// // color: Colors.red,
// child: Image.asset(
// "assets/invication_back.png",
// width: ScreenUtil().setWidth(20),
// height: ScreenUtil().setHeight(31),
// )),
// ),
// ),
// Positioned(
// // left: ScreenUtil().setWidth(180),
// bottom: ScreenUtil().setWidth(110),
// right: ScreenUtil().setWidth(40),
// child: couponProvider.hasModify ||
// couponProvider.coupons.length > 0 ||
// couponProvider.couponListSelect.length > 0
// ? GestureDetector(
// onTap: () async {
// NavigatorUtil.goCouponSelectPage(context,
// rid: widget.rid,
// hasModify: couponProvider.hasModify);
// },
// behavior: HitTestBehavior.opaque,
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.center,
// children: [
// Container(
// padding: EdgeInsets.symmetric(
// horizontal: ScreenUtil().setWidth(40),
// vertical: ScreenUtil().setWidth(16)),
// height: ScreenUtil().setWidth(35 * 2),
// decoration: BoxDecoration(
// color: MyColours.color_000000,
// borderRadius: BorderRadius.circular(
// ScreenUtil().setWidth(20))),
// child: Row(
// children: [
// Text(
// '并赠送给顾客${couponProvider.coupons.length}张优惠券',
// textAlign: TextAlign.center,
// style: TextStyle(
// color: MyColours.color_f5f5f5,
// fontWeight: FontWeight.bold,
// fontSize: ScreenUtil().setSp(28),
// ),
// ),
// HEmptyView(40),
// RoundButton(
// width: ScreenUtil().setWidth(124),
// height: ScreenUtil().setWidth(46),
// text: '点击查看',
// textColor: MyColours.color_FDA31D,
// fontSize: 24,
// isBold: true,
// radius: ScreenUtil().setWidth(10),
// gradientStart: MyColours.color_f5f5f5,
// gradientEnd: MyColours.color_f5f5f5,
// onPressed: () async {
// NavigatorUtil.goCouponSelectPage(
// context,
// rid: widget.rid,
// hasModify:
// couponProvider.hasModify);
// },
// )
// ],
// )),
// Image.asset(Utils.getImgPath('jian'),
// width: ScreenUtil().setWidth(28),
// height: ScreenUtil().setWidth(20))
// ],
// ))
// : Container(),
// )
// ],
// ))));
// }
// }
... ...
... ... @@ -308,11 +308,11 @@ class _BaseInfoPageState extends State<BaseInfoPage> {
height: ScreenUtil().setWidth(imgSize * 2),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(radius),
color: Color.fromRGBO(0, 0, 0, 0.2)),
color: Color.fromRGBO(0, 0, 0, 0.6)),
child: Center(
child: Text('上传中',
style:
TextStyle(color: MyColours.color_333333)),
TextStyle(color: MyColours.color_999999)),
),
)
: Container(),
... ...
... ... @@ -83,4 +83,5 @@ class MyColours {
static const Color color_794F28 = Color(0xff794F28);
static const Color color_C19E5B = Color(0xffC19E5B);
static const Color color_EEDBC4 = Color(0xffEEDBC4);
static const Color color_BA9953 = Color(0xffBA9953);
}
... ...