diff --git a/lib/main.dart b/lib/main.dart index 81f8619e..d6c35ebc 100644 --- a/lib/main.dart +++ b/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 routers = { SystemNotice(), '/router/video_edit': (context, {arguments}) => VideoEdit(), + '/router/store_html': (context, {arguments}) => + StoreHtml(arguments:arguments), }; diff --git a/lib/order/write_off_page.dart b/lib/order/write_off_page.dart index ef485ba0..e254c86c 100644 --- a/lib/order/write_off_page.dart +++ b/lib/order/write_off_page.dart @@ -104,16 +104,16 @@ class _WriteOffPage extends State { 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 { // 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, diff --git a/lib/store/store_html.dart b/lib/store/store_html.dart new file mode 100644 index 00000000..409ca0ae --- /dev/null +++ b/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 arguments; + + StoreHtml({this.arguments}); + + @override + State createState() { + return _StoreHtml(); + } +} + +class _StoreHtml extends State 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(); + }, + ), + }, + ), + ) + ], + ), + ); + } +} diff --git a/lib/store/store_view/store_info.dart b/lib/store/store_view/store_info.dart index 3a7dd426..dfef1d7e 100644 --- a/lib/store/store_view/store_info.dart +++ b/lib/store/store_view/store_info.dart @@ -25,12 +25,12 @@ class _StoreInfoView extends State { 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 { 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 { 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 { 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 { ); } - showCallMobile() { showCupertinoModalPopup( context: context,