Browse Source

Merge branch 'new_revision_app' into dev

# Conflicts:
#	lib/main.dart
#	lib/order/write_off_page.dart
new_revision_app
wurong 2 years ago
parent
commit
90656357c5
  1. 3
      lib/main.dart
  2. 12
      lib/order/write_off_page.dart
  3. 75
      lib/store/store_html.dart
  4. 90
      lib/store/store_view/store_info.dart

3
lib/main.dart

@ -66,6 +66,7 @@ import 'package:huixiang/store/shopping/shopping_home/group_page_details.dart';
import 'package:huixiang/store/shopping/shopping_home/search_page.dart';
import 'package:huixiang/store/shopping/shopping_mall_home.dart';
import 'package:huixiang/setting/user_service_page.dart';
import 'package:huixiang/store/store_html.dart';
import 'package:huixiang/store/store_order.dart';
import 'package:huixiang/settlement/settlement.dart';
import 'package:huixiang/store/store_view/product_meals_sku.dart';
@ -429,4 +430,6 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
SystemNotice(),
'/router/video_edit': (context, {arguments}) =>
VideoEdit(),
'/router/store_html': (context, {arguments}) =>
StoreHtml(arguments:arguments),
};

12
lib/order/write_off_page.dart

@ -104,16 +104,16 @@ class _WriteOffPage extends State<WriteOffPage> {
children: [
Container(
alignment: Alignment.topCenter,
height: 470.h,
// height:530.h
// height: 530.h,
height:470.h,
child: Stack(
alignment: Alignment.topCenter,
children: [
Image.asset(
"assets/image/write_off_bg.webp",
width: MediaQuery.of(context).size.width * 0.912,
// height: 540.h,
height: 480.h,
// height:540.h
fit: BoxFit.fill,
),
LayoutBuilder(builder: (context, constraints) {
@ -199,9 +199,9 @@ class _WriteOffPage extends State<WriteOffPage> {
// color: Colors.black,
// drawText: false,
// ),
// SizedBox(
// height: 16.h,
// ),
SizedBox(
height: 16.h,
),
Expanded(child: QrImage(
data: "{\"type\":\"wiped\",\"memberCouponId\":\"${coupon["memberCouponId"]}\"}",
version: QrVersions.auto,

75
lib/store/store_html.dart

@ -0,0 +1,75 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/utils/font_weight.dart';
class StoreHtml extends StatefulWidget {
final Map<String, dynamic> arguments;
StoreHtml({this.arguments});
@override
State<StatefulWidget> createState() {
return _StoreHtml();
}
}
class _StoreHtml extends State<StoreHtml> with WidgetsBindingObserver {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return Container(
color: Colors.white,
padding:EdgeInsets.only(top:MediaQuery.of(context).padding.top+17.h,left: 16.w,right: 16.w),
child: Column(
children: [
Row(
children: [
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap:(){
Navigator.of(context).pop();
},
child:Image.asset(
"assets/image/integral_return.webp",
height: 24,
width: 24,
)
),
Expanded(child:
Container(
alignment: Alignment.center,
margin: EdgeInsets.only(right: 24.w),
child: Text(
"店铺详情",
style: TextStyle(
color: Colors.black,
fontSize: 17.sp,
fontWeight: MyFontWeight.regular,
),
),
),),
],
),
Container(
child: Html(
data: widget.arguments["remark"] ?? "",
customImageRenders: {
networkSourceMatcher(): networkImageRender(
loadingWidget: () {
return Container();
},
),
},
),
)
],
),
);
}
}

90
lib/store/store_view/store_info.dart

@ -25,12 +25,12 @@ class _StoreInfoView extends State<StoreInfoView> {
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.only(
// left: 16.w,
// right: 16.w,
// top: 5.h,
// bottom: 6.h,
),
height: MediaQuery.of(context).size.width >= 650 ? 180.h :166.h,
// left: 16.w,
// right: 16.w,
// top: 5.h,
// bottom: 6.h,
),
height: MediaQuery.of(context).size.width >= 650 ? 180.h : 166.h,
padding: EdgeInsets.all(12.w),
decoration: BoxDecoration(
color: Colors.white,
@ -54,19 +54,56 @@ class _StoreInfoView extends State<StoreInfoView> {
Expanded(
child: Column(
children: [
Container(
alignment: Alignment.centerLeft,
child: Text(
widget.storeInfo != null
? (widget.storeInfo.storeName ?? "")
: "",
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 18.sp,
color: Colors.black,
fontWeight: MyFontWeight.medium,
),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child: Container(
alignment: Alignment.centerLeft,
child: Text(
widget.storeInfo != null
? (widget.storeInfo.storeName ?? "")
: "",
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 18.sp,
color: Colors.black,
fontWeight: MyFontWeight.medium,
),
),
)),
// GestureDetector(
// behavior: HitTestBehavior.opaque,
// onTap: (){
// Navigator.of(context).pushNamed('/router/store_html',arguments: {"remark":widget.storeInfo.remark});
// },
// child: Container(
// padding: EdgeInsets.symmetric(horizontal:8.w,vertical:3.h),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(2),
// border: Border.all(
// color:Color(0xFFEDEDED),
// )
// ),
// child: Row(
// children: [
// Text(
// "店铺详情",
// style: TextStyle(
// fontWeight: MyFontWeight.regular,
// fontSize: 12.sp,
// color: Color(0xFF4C4C4C),
// ),
// ),
// Image.asset(
// "assets/image/icon_right_z.webp",
// height:12.h,
// width:12.w,
// )
// ],
// ),
// ),
// )
],
),
Row(
children: [
@ -94,10 +131,10 @@ class _StoreInfoView extends State<StoreInfoView> {
S.of(context).yingyeshijian(widget.storeInfo == null
? ""
: (widget.storeInfo.openStartTime == null &&
widget.storeInfo.openEndTime == null)
? S.of(context).quantian
: "${widget.storeInfo.openStartTime.substring(0, widget.storeInfo.openStartTime.lastIndexOf(":"))} "
"- ${widget.storeInfo.openEndTime.substring(0, widget.storeInfo.openEndTime.lastIndexOf(":"))}"),
widget.storeInfo.openEndTime == null)
? S.of(context).quantian
: "${widget.storeInfo.openStartTime.substring(0, widget.storeInfo.openStartTime.lastIndexOf(":"))} "
"- ${widget.storeInfo.openEndTime.substring(0, widget.storeInfo.openEndTime.lastIndexOf(":"))}"),
style: TextStyle(
color: Color(0xFF353535),
fontWeight: MyFontWeight.regular,
@ -128,10 +165,8 @@ class _StoreInfoView extends State<StoreInfoView> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child:Text(
"${S.of(context).dizhi}:${widget.storeInfo != null
? widget.storeInfo.address
: ""}",
child: Text(
"${S.of(context).dizhi}:${widget.storeInfo != null ? widget.storeInfo.address : ""}",
maxLines: 2,
textAlign: TextAlign.justify,
style: TextStyle(
@ -187,7 +222,6 @@ class _StoreInfoView extends State<StoreInfoView> {
);
}
showCallMobile() {
showCupertinoModalPopup(
context: context,

Loading…
Cancel
Save