Commit e067aed2c2a3b2736b2b23a2dda5e8ca5352f2b9

Authored by wdn127929
1 parent c2cba53a

调整预定安排部分UI

55.6 KB | W: | H:

198 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
... ... @@ -158,101 +158,183 @@ class InvicationPageState extends State<InvicationPage> {
child: Stack(
children: [
Padding(
padding: EdgeInsets.only(top: ScreenUtil().setWidth(0)),
padding:
EdgeInsets.only(top: ScreenUtil().setWidth(35 * 2)),
child: Column(children: [
Expanded(
child: ListView(
controller: controller,
physics: BouncingScrollPhysics(),
children: <Widget>[
VEmptyView(60),
Center(
child: Column(
children: <Widget>[
Image.asset(
"assets/img_ydap.png",
width: ScreenUtil().setWidth(190 * 2),
height: ScreenUtil().setHeight(200),
width: ScreenUtil().setWidth(220 * 2),
height: ScreenUtil().setHeight(120 * 2),
),
VEmptyView(69),
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Container(
width: ScreenUtil().setWidth(108),
height: ScreenUtil().setHeight(2),
color: MyColours.color_979797,
),
Container(
width: ScreenUtil().setWidth(442),
height: ScreenUtil().setHeight(43),
alignment: Alignment.center,
decoration: BoxDecoration(
border: Border.all(
color: MyColours.color_979797,
width:
ScreenUtil().setWidth(2)),
borderRadius: BorderRadius.all(
Radius.circular(ScreenUtil()
.setWidth(18)))),
child: Text(
"订包间,用周到安排",
style: TextStyle(
color: MyColours.color_999999,
fontSize: ScreenUtil().setSp(28)),
VEmptyView(20),
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,
],
),
),
Container(
width: ScreenUtil().setWidth(108),
height: ScreenUtil().setHeight(2),
color: MyColours.color_979797,
),
],
),
_middleWidget("餐厅", user.sellername),
_middleWidget("包间",
widget.tableInfo.replaceAll("\n", "")),
_middleWidget("时间", dateTimeStr),
VEmptyView(80),
Column(
children: <Widget>[
Row(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
Image.asset(
"assets/invication_map.png",
width: ScreenUtil().setWidth(22),
height: ScreenUtil().setWidth(28),
borderRadius: BorderRadius.circular(
ScreenUtil().setWidth(10))),
child: Column(
crossAxisAlignment:
CrossAxisAlignment.center,
children: [
Container(
color: Colors.red,
height: 160,
),
VEmptyView(40),
Image.asset(
"assets/yd_up.png",
width: ScreenUtil().setWidth(195 * 2),
height:
ScreenUtil().setHeight(33 * 2),
),
VEmptyView(60),
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(34)),
),
),
VEmptyView(30),
Container(
height: ScreenUtil().setWidth(36),
child: Text(
'已为您安排在包间',
style: TextStyle(
letterSpacing: ScreenUtil()
.setWidth(1.7 * 2),
color: MyColours.color_C19E5B,
fontSize:
ScreenUtil().setSp(26)),
),
Container(
margin: EdgeInsets.symmetric(
horizontal:
ScreenUtil().setWidth(13)),
child: Text("地址导航",
),
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_CEB689,
fontSize: ScreenUtil()
.setSp(28))),
MyColours.color_794F28,
fontWeight: FontWeight.bold,
fontSize:
ScreenUtil().setSp(34)),
),
),
Image.asset(
"assets/bj_right.png",
width:
ScreenUtil().setWidth(30 * 2),
height: ScreenUtil()
.setHeight(58 * 2),
),
],
),
VEmptyView(18),
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(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(28)),
),
Image.asset(
"assets/invication_arrow_right.png",
width: ScreenUtil().setWidth(14),
height: ScreenUtil().setWidth(22),
),
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(28)),
),
],
),
Container(
margin: EdgeInsets.only(
top: ScreenUtil().setHeight(20)),
child: Text(
user.sellerAddr,
style: TextStyle(
color: MyColours.color_F2F2F2,
fontSize: ScreenUtil().setSp(36)),
),
)
],
// 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(60),
Image.asset(
"assets/yd_down.png",
width: ScreenUtil().setWidth(195 * 2),
height:
ScreenUtil().setHeight(33 * 2),
),
],
),
)
],
),
... ...
... ... @@ -4,6 +4,7 @@ import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/screenutil.dart';
import 'package:one_key/models/upload_img_model.dart';
import 'package:one_key/pages/online_check/photo_view_wiget.dart';
import 'package:one_key/pages/online_check/progress.dart';
import 'package:one_key/provider/base_info_provider.dart';
import 'package:one_key/provider/upload_img_provider.dart';
... ... @@ -165,6 +166,38 @@ class _BaseInfoPageState extends State<BaseInfoPage> {
);
}
//查看大图
_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);
}
///#相机拍照,单图选择
Future _getFromPictureOrCamera(
String title, UploadImgModel imgModel, imageSource) async {
... ... @@ -211,30 +244,51 @@ class _BaseInfoPageState extends State<BaseInfoPage> {
Spacer(),
Stack(
children: [
ClipRRect(
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(radius)),
child: model.file == null
? model.qiniuUrl != null
? CachedNetworkImage(
imageUrl: model.qiniuUrl,
fit: BoxFit.cover,
width: ScreenUtil().setWidth(imgSize * 2),
height: ScreenUtil().setWidth(imgSize * 2),
)
: Image.asset(
Utils.getImgPath(
title == '头像' ? 'touxiang' : 'erweima'),
fit: BoxFit.cover,
width: ScreenUtil().setWidth(imgSize * 2),
height: ScreenUtil().setWidth(imgSize * 2),
)
: Image.file(
model.file,
fit: BoxFit.cover,
width: ScreenUtil().setWidth(imgSize * 2),
height: ScreenUtil().setWidth(imgSize * 2),
),
InkWell(
onTap: () {
double process;
String qiniuUrl;
List<String> tempList = [];
if (title == '头像') {
process = _uploadImageProvider.touxiang.process;
qiniuUrl = _uploadImageProvider.touxiang.qiniuUrl;
} else {
process = _uploadImageProvider.erweima.process;
qiniuUrl = _uploadImageProvider.erweima.qiniuUrl;
}
if (qiniuUrl != null) {
tempList.add(qiniuUrl);
///没有上传完成的不可以点击
_showPhotoView(context, 0, tempList);
}
},
child: ClipRRect(
borderRadius:
BorderRadius.circular(ScreenUtil().setWidth(radius)),
child: model.file == null
? model.qiniuUrl != null
? CachedNetworkImage(
imageUrl: model.qiniuUrl,
fit: BoxFit.cover,
width: ScreenUtil().setWidth(imgSize * 2),
height: ScreenUtil().setWidth(imgSize * 2),
)
: Image.asset(
Utils.getImgPath(
title == '头像' ? 'touxiang' : 'erweima'),
fit: BoxFit.cover,
width: ScreenUtil().setWidth(imgSize * 2),
height: ScreenUtil().setWidth(imgSize * 2),
)
: Image.file(
model.file,
fit: BoxFit.cover,
width: ScreenUtil().setWidth(imgSize * 2),
height: ScreenUtil().setWidth(imgSize * 2),
),
),
),
model.file == null && model.qiniuUrl == null
? Offstage(
... ...
... ... @@ -78,4 +78,8 @@ class MyColours {
static const Color color_7B512A = Color(0xff7B512A);
static const Color color_262628 = Color(0xff262628);
static const Color color_FDA31D = Color(0xffFDA31D);
static const Color color_F7F1E8 = Color(0xffF7F1E8);
static const Color color_E3D6C7 = Color(0xffE3D6C7);
static const Color color_794F28 = Color(0xff794F28);
static const Color color_C19E5B = Color(0xffC19E5B);
}
... ...
... ... @@ -269,22 +269,22 @@ class Utils {
String _path = "pages/customer/index?id=$rid&hasInvitation=1";
String _description = "进入查看包间详情,转发同行好友,还可一键导航到饭店";
//跳转小程序
// var model = new WeChatShareMiniProgramModel(
// webPageUrl: _webPageUrl,
// userName: _userName,
// title: _title,
// path: _path,
// description: _description,
// thumbnail: WeChatImage.network(_thumbnail));
var model = new WeChatShareMiniProgramModel(
webPageUrl: _webPageUrl,
userName: _userName,
title: _title,
path: _path,
description: _description,
thumbnail: WeChatImage.network(_thumbnail));
//分享链接
var model = WeChatShareWebPageModel(
// 'https://xt04.colorcun.com/h5/index.html#/?id=$rid&hasInvitation=1',
'https://xt04.colorcun.com/h5/index.html?id=$rid&hasInvitation=1&hasSellerShare=1',
title: _title,
description: _description,
thumbnail: WeChatImage.network(_thumbnail),
scene: WeChatScene.SESSION,
);
// var model = WeChatShareWebPageModel(
// // 'https://xt04.colorcun.com/h5/index.html#/?id=$rid&hasInvitation=1',
// 'https://xt04.colorcun.com/h5/index.html?id=$rid&hasInvitation=1&hasSellerShare=1',
// title: _title,
// description: _description,
// thumbnail: WeChatImage.network(_thumbnail),
// scene: WeChatScene.SESSION,
// );
bool isSuccess = await shareToWeChat(model);
return isSuccess;
... ...