Commit f08df9ec86478015579363b5d89c587f98452e2b

Authored by wdn127929
1 parent 73df1692

图片缓存

... ... @@ -107,6 +107,8 @@ class _BaseInfoPageState extends State<BaseInfoPage> {
@override
void dispose() {
EventBus().emit('changeStatusColor');
_uploadImageProvider.touxiang = UploadImgModel(); //头像
_uploadImageProvider.erweima = UploadImgModel(); //二维码
super.dispose();
}
... ...
... ... @@ -144,6 +144,7 @@ class _BookInfoPageState extends State<BookInfoPage> {
@override
void dispose() {
_uploadImageProvider.firstImage = UploadImgModel();
_uploadImageProvider.logo = UploadImgModel();
super.dispose();
}
... ...
... ... @@ -71,6 +71,8 @@ class _DishShowPageState extends State<DishShowPage> {
_uploadImageProvider.storeImage2 = UploadImgModel();
_uploadImageProvider.storeImage3 = UploadImgModel();
_uploadImageProvider.storeImage4 = UploadImgModel();
_uploadImageProvider.storeImage5 = UploadImgModel();
_uploadImageProvider.storeImage6 = UploadImgModel();
super.dispose();
}
... ...
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/models/seller_template_color_list_model.dart';
import 'package:one_key/pages/my/marketing_center/theme_model.dart';
import 'package:one_key/route/navigator_util.dart';
import 'package:one_key/widgets/system_app_bar.dart';
import 'package:one_key/widgets/v_empty_view.dart';
import 'package:photo_view/photo_view_gallery.dart';
import 'package:provider/provider.dart';
import '../../../constant/state.dart';
import '../../../models/seller_template_color_list_model.dart';
import '../../../provider/marketing_center_provider.dart';
import '../../../provider/user_model.dart';
import '../../../res/colors.dart';
import '../../../utils/dialog_util.dart';
import '../../../utils/event_bus.dart';
import '../../../utils/screen_util.dart';
import '../../../utils/utils.dart';
import '../../../widgets/MyDivider.dart';
import '../../../widgets/h_empty_view.dart';
import '../../../widgets/page_exception.dart';
import '../../../widgets/round_button.dart';
import '../../online_check/photo_view_wiget.dart';
// import 'package:card_swiper/card_swiper.dart';
import 'dart:convert' as convert;
import 'dart:math' as math;
import 'package:flutter_swiper/flutter_swiper.dart';
/**
*
* 邀请函主题选择页面
* 邀请函主题选择页面预览
*/
class InvitationThemeHomePage extends StatefulWidget {
// final SellerTemplateColorListSunModel themeSunModel;
InvitationThemeHomePage({Key key}) : super(key: key);
@override
... ... @@ -35,52 +44,60 @@ class InvitationThemeHomePage extends StatefulWidget {
}
class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
ScrollController controller = ScrollController();
MarketingCenterProvider marketingCenterProvider;
ScrollController controller = ScrollController();
//当前店铺选中的颜色和板式
String themeColor;
String themeType = '1'; //模版类型
// int indexSelectColor = 0; //选中第几个模版 (有配色选中index)
// int indexSelectNoColor = 0; //选中第几个模版 (无配色选中index)
// List<ThemeSunModel> marketingCenterProvider.templeteDatas = [];
String themeColor = '当前主题不可用';
String themeType; //模版类型
String url;
String themeTitle = '当前主题不可用'; //标题样式
ThemeModel themeModelCurrunt; //有配色对应的当前页面模版数据
PageController pageController;
double pageOffset = 0;
// ThemeModel themeModelCurrunt; //有配色对应的当前页面模版数据
SwiperController swiperController = SwiperController();
List movies = [
'https://q0.itc.cn/images01/20240605/50e704be01504cf2b2d8ba3999a0a681.jpeg',
'https://img1.baidu.com/it/u=364594147,3505938130&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1200',
'https://q0.itc.cn/images01/20240605/b94b61c5c766401698725d5b53c8f37d.jpeg',
'https://q0.itc.cn/images01/20240605/50e704be01504cf2b2d8ba3999a0a681.jpeg',
'https://img1.baidu.com/it/u=364594147,3505938130&fm=253&fmt=auto&app=138&f=JPEG?w=800&h=1200',
'https://q0.itc.cn/images01/20240605/b94b61c5c766401698725d5b53c8f37d.jpeg'
];
@override
void initState() {
super.initState();
pageController = PageController(viewportFraction: 1);
pageController.addListener(() {
setState(() => pageOffset = pageController.page);
});
WidgetsBinding.instance.addPostFrameCallback((_) {
_getThemeData();
bus.on("theme_color_type", (arg) {
themeColor = arg['themeColor'];
themeType = arg['themeType'];
SellerTemplateColorListSunModel themeSunModel =
marketingCenterProvider.templeteDatas[marketingCenterProvider
.templeteDatas
.indexWhere((element) => element.id == themeType)];
themeSunModel.themeColorDefault = themeColor;
bus.emit('theme_color_type_name', {
'templateName': themeSunModel.templateName,
'url': themeSunModel.colors.length == 0
? themeSunModel.url
: themeSunModel
.colors[themeSunModel.colors
.indexWhere((element) => element.colorName == themeColor)]
.url
});
setState(() {});
});
});
}
@override
void dispose() {
bus.off('theme_color_type');
super.dispose();
// if (themeSunModel.themeColorDefault != null) {
// themeColor = themeSunModel.themeColorDefault;
// url = themeSunModel
// .colors[themeSunModel.colors
// .indexWhere((element) => element.colorName == themeColor)]
// .url;
// } else {
// if (themeSunModel.colors.length > 0) {
// themeColor = themeSunModel.colors[0].colorName;
// url = themeSunModel.colors[0].url;
// } else {
// url = themeSunModel.url;
// }
// }
// themeType = themeSunModel.id;
}
_getThemeData() async {
... ... @@ -95,6 +112,7 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
(element) =>
element.id == marketingCenterProvider.markDataModel.type);
themeType = marketingCenterProvider.templeteDatas[index].id;
swiperController.index = index;
List<ColorListModel> colors =
marketingCenterProvider.templeteDatas[index].colors;
... ... @@ -143,8 +161,46 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
return false;
}
// _selectTheme(String id) {
// List<ThemeSunModel> temp = [];
// temp.addAll(themeModelCurrunt.urls);
// temp.addAll(themeDatasno);
// List<String> tempUrls = temp.map((e) => e.url).toList();
// // List<String> temp =
// // themeModel.urls.map((e) => e.url).toList();
// // print(temp);
// // List<String> temp =
// // themeDatasno.map((e) => e.url).toList();
// print(temp);
// _showPhotoView(
// context, temp.indexWhere((element) => element.id == id), tempUrls,
// (index) {
// //选中的index
// themeType = temp[index].id; //当前选中模版的id
// setState(() {});
// });
// }
double _scale = 1.0;
double _previousScale = 1.0;
Offset _panOffset = Offset(0, 0);
Offset _previousPanOffset = Offset(0, 0);
void _onScaleUpdate(ScaleUpdateDetails details) {
setState(() {
_previousScale = _scale;
_scale *= details.scale;
_previousPanOffset = _panOffset;
_panOffset = _panOffset -
details.focalPoint -
_panOffset +
details.localFocalPoint;
});
}
_showPhotoView(BuildContext context, int index, List<String> imgs,
CustomCallBack callback,
{isShow = false, List dashName}) async {
// if (imgs.length == 1 &&
// imgs[0] ==
... ... @@ -173,7 +229,7 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
needTap: false,
callback: (curruntIndex) {
//选中某个模版
callback(curruntIndex);
// callback(curruntIndex);
},
),
// Positioned(
... ... @@ -205,75 +261,6 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
Utils.setBarStatus(true, color: Colors.white);
}
List<Widget> imagesWidgets() {
List<Widget> images = [];
for (int i = 0; i < marketingCenterProvider.templeteDatas.length; i++) {
SellerTemplateColorListSunModel themeSunModel =
marketingCenterProvider.templeteDatas[i];
images.add(InkWell(
onTap: () {
// _selectTheme(themeDatas[themeColor].urls[index].id);
//跳转到下一页
NavigatorUtil.goInvitationThemeHomePreviewPage(
context, themeSunModel);
},
child: Container(
width: (ScreenUtil().screenWidth - w(32) - w(15)) / 2,
// height: w(390),
margin: EdgeInsets.only(right: i % 2 == 0 ? w(15) : 0),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(r(10)),
border: Border.all(
color: themeType == themeSunModel.id
? MyColours.color_005AA7
: MyColours.color_DBDBDB,
width: themeType == themeSunModel.id ? w(2) : w(1))),
child: Column(
children: [
// VEmptyView(10),
ClipRRect(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(r(8)),
topRight: Radius.circular(r(8))),
child: CachedNetworkImage(
imageUrl: themeSunModel.colors == null ||
themeSunModel.colors.length == 0
? themeSunModel.url
: themeSunModel
.colors[themeColor == null
? 0
: themeSunModel.colors.indexWhere((element) =>
element.colorName ==
themeSunModel.themeColorDefault)]
.url,
width: (ScreenUtil().screenWidth - w(32) - w(15)) / 2,
height: w(348),
fit: BoxFit.fitWidth,
alignment: Alignment.topCenter,
),
),
VEmptyView(20),
Container(
padding:
EdgeInsets.symmetric(vertical: w(7), horizontal: w(3)),
width: double.infinity,
child: Text(
themeSunModel.templateName,
maxLines: 1,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.left,
style: TextStyle(
color: MyColours.color_000000, fontSize: font(14)),
),
)
],
),
)));
}
marketingCenterProvider.templeteDatas.forEach((themeSunModel) {});
return images;
}
@override
Widget build(BuildContext context) {
marketingCenterProvider =
... ... @@ -286,7 +273,7 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
return ExceptionPage(
pageState: model.pageStateThemeHome,
callback: () async {},
emptyMsg: "暂时没有预订信息展示哦",
emptyMsg: "暂时没有信息展示哦",
emptyImg: "empty_search",
showMsg: "加载中,请稍后...",
);
... ... @@ -297,97 +284,318 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
child: SingleChildScrollView(
child: Column(
children: [
VEmptyView(24),
InkWell(
onTap: () {
// DialogUtil.showThemeColorSelectDialogNew(
// context, themeSunModel.colors, callback: (object) {
// print(object);
// setState(() {
// themeColor = object;
// url = themeSunModel
// .colors[themeSunModel.colors.indexWhere(
// (element) => element.colorName == object)]
// .url;
// });
// });
},
child: Padding(
padding: EdgeInsets.only(
left: w(16),
top: w(12),
bottom: w(12),
right: w(12)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'主题颜色选择',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
),
Spacer(),
Text(
themeColor ?? '',
style: TextStyle(
color: themeColor == '当前主题不可用'
? MyColours.color_BFC4D4
: MyColours.color_515151,
fontSize: font(16)),
),
Container(
padding: EdgeInsets.symmetric(
horizontal: w(11), vertical: w(4)),
child: Image.asset(
"assets/arrow_right_new.png",
width: w(9),
height: w(16),
),
)
// RoundButton(
// text: '预览',
// gradientStart: MyColours.color_ffffff,
// gradientEnd: MyColours.color_ffffff,
// borderColor: MyColours.color_438E93,
// textColor: MyColours.color_438E93,
// radius: ScreenUtil().setWidth(22),
// fontSize: 24,
// width: w(72),
// height: ScreenUtil().setWidth(44),
// isBold: true,
// onPressed: () {
// NavigatorUtil.goMarkingPreviewPage(context);
// },
// ),
]))),
Padding(
padding: EdgeInsets.symmetric(horizontal: w(16)),
child: Wrap(
runSpacing: w(15),
// spacing: w(15),
children: imagesWidgets(),
padding: EdgeInsets.only(left: w(16)),
child: MyDivider(double.infinity, w(0.5),
color: MyColours.color_E7E7E7)),
// VEmptyView(24),
InkWell(
onTap: () {},
child: Padding(
padding: EdgeInsets.only(
left: w(16),
top: w(12),
bottom: w(11),
right: w(12)),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
'介绍模块标题样式',
style: TextStyle(
color: MyColours.color_515151,
fontSize: font(16)),
),
Spacer(),
Text(
themeTitle,
style: TextStyle(
color: themeTitle == '当前主题不可用'
? MyColours.color_BFC4D4
: MyColours.color_515151,
fontSize: font(16)),
),
Container(
padding: EdgeInsets.symmetric(
horizontal: w(11), vertical: w(4)),
child: Image.asset(
"assets/arrow_right_new.png",
width: w(9),
height: w(16),
),
)
// RoundButton(
// text: '预览',
// gradientStart: MyColours.color_ffffff,
// gradientEnd: MyColours.color_ffffff,
// borderColor: MyColours.color_438E93,
// textColor: MyColours.color_438E93,
// radius: ScreenUtil().setWidth(22),
// fontSize: 24,
// width: w(72),
// height: ScreenUtil().setWidth(44),
// isBold: true,
// onPressed: () {
// NavigatorUtil.goMarkingPreviewPage(context);
// },
// ),
]))),
Padding(
padding: EdgeInsets.only(left: w(16)),
child: MyDivider(double.infinity, w(0.5),
color: MyColours.color_E7E7E7)),
Container(
width: double.infinity,
alignment: Alignment.centerLeft,
padding: EdgeInsets.only(
left: w(16), top: w(12), bottom: w(11), right: w(16)),
child: Text(
'通知主题选择(左右滑动选择要使用的主题)',
style: TextStyle(
color: MyColours.color_515151, fontSize: font(16)),
)),
VEmptyView(24),
// GridView.builder(
// padding: EdgeInsets.symmetric(horizontal: w(16)),
// controller: controller,
// // padding: EdgeInsets.only(top: ScreenUtil().getAdapterSize(10)),
// shrinkWrap: true,
// itemCount: marketingCenterProvider.templeteDatas.length,
// //SliverGridDelegateWithFixedCrossAxisCount 构建一个横轴固定数量Widget
// gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
// //横轴元素个数
// crossAxisCount: 2,
// //纵轴间距
// mainAxisSpacing: w(15),
// //横轴间距
// crossAxisSpacing: w(15),
// //子组件宽高长度比例
// // childAspectRatio:
// // (ScreenUtil().screenWidth - w(62)) / 2 / 370
// ),
// itemBuilder: (BuildContext context, int index) {
// SellerTemplateColorListSunModel themeSunModel =
// marketingCenterProvider.templeteDatas[index];
// return InkWell(
// onTap: () {
// // _selectTheme(themeDatas[themeColor].urls[index].id);
// //跳转到下一页
// NavigatorUtil.goInvitationThemeHomePreviewPage(
// context, themeSunModel);
// },
// child: Container(
// height: w(385),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(r(10)),
// border: Border.all(
// color: themeType == themeSunModel.id
// ? MyColours.color_005AA7
// : MyColours.color_DBDBDB,
// width: themeType == themeSunModel.id
// ? w(2)
// : w(1))),
// child: Column(
// children: [
// VEmptyView(10),
// CachedNetworkImage(
// imageUrl: themeSunModel.colors == null ||
// themeSunModel.colors.length == 0
// ? themeSunModel.url
// : themeSunModel
// .colors[themeColor == null
// ? 0
// : themeSunModel.colors
// .indexWhere((element) =>
// element.colorName ==
// themeSunModel
// .themeColorDefault)]
// .url,
// width:
// (ScreenUtil().screenWidth - w(62)) / 2,
// height: w(348),
// fit: BoxFit.fitWidth,
// alignment: Alignment.topCenter,
// ),
// VEmptyView(20),
// Container(
// padding: EdgeInsets.symmetric(
// vertical: w(6), horizontal: w(2)),
// width: double.infinity,
// child: Text(
// themeSunModel.templateName,
// maxLines: 1,
// overflow: TextOverflow.ellipsis,
// textAlign: TextAlign.left,
// style: TextStyle(
// color: MyColours.color_000000,
// fontSize: font(14)),
// ),
// )
// ],
// ),
// ));
Padding(
padding: EdgeInsets.only(left: w(16)),
child: MyDivider(double.infinity, w(0.5),
color: MyColours.color_E7E7E7)),
VEmptyView(60),
// Container(
// height: w(300),
// child: PhotoViewGallery.builder(
// scrollPhysics: const BouncingScrollPhysics(),
// builder: (BuildContext context, int index) {
// return PhotoViewGalleryPageOptions(
// imageProvider: NetworkImage(movies[index]),
// );
// },
// scrollDirection: Axis.horizontal,
// itemCount: movies.length,
// backgroundDecoration: BoxDecoration(color: Colors.white),
// pageController: PageController(initialPage: 0),
// onPageChanged: (index) => setState(() {
// // currentIndex = index;
// // if (widget.pageChanged != null) {
// // widget.pageChanged(index);
// // }
// }))),
Container(
height: w(359),
child: new Swiper(
controller:swiperController,
itemBuilder: (BuildContext context, int index) {
SellerTemplateColorListSunModel themeSunModel = marketingCenterProvider.templeteDatas[index];
return new ClipRRect(
borderRadius: BorderRadius.circular(r(10)),
child: CachedNetworkImage(
imageUrl: themeSunModel.colors == null ||
themeSunModel.colors.length == 0
? themeSunModel.url
: themeSunModel
.colors[themeColor == null
? 0
: themeSunModel.colors
.indexWhere((element) =>
element.colorName ==
themeSunModel
.themeColorDefault)]
.url,
// width:
// (ScreenUtil().screenWidth - w(62)) / 2,
// height: w(348),
fit: BoxFit.fitWidth,
alignment: Alignment.topCenter,
));
},
// onTap: (v) {
// // print(v);
// },
onIndexChanged: (index) {
print(index);
// 当前选中的主题
},
itemCount: marketingCenterProvider.templeteDatas.length,
viewportFraction: 0.5,
scale: 0.5,
),
),
// Container(
// // height: w(300),
// height: w(359),
// child: PageView(
// controller: pageController,
// children: List.generate(movies.length, (index) {
// return SlidingCard(
// offset: pageOffset - index,
// movie: movies[index],
// index: index);
// }),
// ),
// )
// Swiper(
// itemBuilder: (BuildContext context,int index){
// return Image.network("http://nosqn.colorcun.com/app/seller-hj-empty.png",fit: BoxFit.fill,);
// },
// itemCount: 3,
// pagination: SwiperPagination(),
// control: SwiperControl(),
// ),
// GestureDetector(
// onScaleUpdate: _onScaleUpdate,
// child: Transform(
// alignment: Alignment.center,
// transform: Matrix4.identity()
// ..translate(_panOffset.dx, _panOffset.dy)
// ..scale(_scale),
// child: Image.network(
// 'http://nosqn.colorcun.com/app/seller-hj-empty.png',
// fit: BoxFit.contain,
// ),
// ),
// ),
// InkWell(
// onTap: () {
// _showPhotoView(context, 0, [url]);
// },
// child: CachedNetworkImage(
// imageUrl: url,
// width: ScreenUtil().screenWidth - w(32),
// fit: BoxFit.fitWidth,
// alignment: Alignment.topCenter,
// )),
],
)))
))),
Container(
padding:
EdgeInsets.symmetric(horizontal: w(24), vertical: w(35)),
child: Row(
children: [
RoundButton(
text: '返回',
width: w(100),
height: w(43),
radius: r(5),
fontSize: 32,
isBold: true,
gradientStart: MyColours.color_ffffff,
gradientEnd: MyColours.color_ffffff,
textColor: MyColours.color_438E93,
borderColor: MyColours.color_438E93,
onPressed: () {
Navigator.pop(context);
},
),
HEmptyView(24),
Expanded(
child: RoundButton(
text: '保存并返回',
height: w(43),
radius: r(5),
isBold: true,
fontSize: 32,
gradientStart: MyColours.color_438E93,
gradientEnd: MyColours.color_438E93,
textColor: MyColours.color_ffffff,
borderColor: MyColours.color_438E93,
onPressed: () async {
//接口成功后刷新并返回前一页
//接口
// Map<String, String> params = {
// 'sid': Provider.of<UserModel>(context, listen: false)
// .user
// .sellerid,
// 'type': themeType,
// 'lite_class': themeColor == null
// ? null
// : themeSunModel
// .colors[themeSunModel.colors.indexWhere(
// (element) =>
// element.colorName == themeColor)]
// .liteClass
// };
// bool success = await marketingCenterProvider
// .setSellerTemplateConf(context, params,
// showLoading: true);
// if (success) {
// Utils.showToast('设置成功');
// //选择当前模版+主题色
// bus.emit('theme_color_type', {
// 'themeColor': themeColor,
// 'themeType': themeType,
// });
// Navigator.pop(context);
// }
},
)),
],
),
)
],
);
}
... ... @@ -395,3 +603,104 @@ class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
);
}
}
class SlidingCard extends StatelessWidget {
final double offset;
final String movie;
final int index;
const SlidingCard({this.offset, this.movie, this.index});
@override
Widget build(BuildContext context) {
int select = 0;
double gauss = math.exp(-(math.pow((offset.abs() - 0.5), 2) / 0.08));
if (Offset(-32 * gauss * offset.sign, 0).dx == -0.0) {
//最中间的图
select = index;
}
return Transform.translate(
offset: Offset(-32 * gauss * offset.sign, 0),
child: InkWell(
onTap: () {
print(gauss);
print(Offset(-32 * gauss * offset.sign, 0));
print(index);
},
child: Card(
margin: EdgeInsets.only(left: 8, right: 8, bottom: 8),
elevation: 8,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(32),
),
child: ClipRRect(
borderRadius: BorderRadius.circular(
r(10),
),
child: Image.network(
'${movie}',
width: select == index ? w(375) : w(179),
height: select == index ? w(359) : w(90),
// height: MediaQuery.of(context).size.height * 0.3,
alignment: Alignment(-offset.abs(), 0),
fit: BoxFit.cover,
),
),
// SizedBox(
// height: 8,
// ),
// Expanded(
// child: Padding(
// padding: const EdgeInsets.all(8.0),
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: <Widget>[
// Text(
// '${movie.name}',
// style:
// TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
// ),
// SizedBox(
// height: 10,
// ),
// Text(
// '上架时间: ${movie.date}',
// style: TextStyle(
// fontSize: 14, fontWeight: FontWeight.normal),
// ),
// Text(
// '${movie.intor}',
// style: TextStyle(
// fontSize: 14,
// fontWeight: FontWeight.normal,
// ),
// ),
// Spacer(),
// Row(
// children: <Widget>[
// SizedBox(width: 16,),
// Text(
// '${movie.price}',
// style: TextStyle(
// fontSize: 18, fontWeight: FontWeight.bold),
// ),
// Spacer(),
// MaterialButton(
// onPressed: () {},
// color: Colors.black,
// child: Text('购买'),
// textColor: Colors.white,
// shape: RoundedRectangleBorder(
// borderRadius: BorderRadius.circular(32),
// ),
// ),
// SizedBox(width: 16,),
// ],
// ),
// ],
// ),
// ),
// ),
)),
);
}
}
... ...
// import 'package:cached_network_image/cached_network_image.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter_screenutil/flutter_screenutil.dart';
// import 'package:one_key/pages/my/marketing_center/theme_model.dart';
// import 'package:one_key/widgets/system_app_bar.dart';
// import 'package:one_key/widgets/v_empty_view.dart';
// import 'package:provider/provider.dart';
// import '../../../models/seller_template_color_list_model.dart';
// import '../../../provider/marketing_center_provider.dart';
// import '../../../provider/user_model.dart';
// import '../../../res/colors.dart';
// import '../../../utils/dialog_util.dart';
// import '../../../utils/event_bus.dart';
// import '../../../utils/screen_util.dart';
// import '../../../utils/utils.dart';
// import '../../../widgets/MyDivider.dart';
// import '../../../widgets/round_button.dart';
// import '../../online_check/photo_view_wiget.dart';
// import 'package:card_swiper/card_swiper.dart';
// import 'dart:convert' as convert;
// /**
// *
// * 邀请函主题选择页面预览
// */
// class InvitationThemeHomePage extends StatefulWidget {
// // final SellerTemplateColorListSunModel themeSunModel;
// InvitationThemeHomePage({Key key}) : super(key: key);
// @override
// _InvitationThemeHomePageState createState() =>
// _InvitationThemeHomePageState();
// }
// class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
// MarketingCenterProvider marketingCenterProvider;
// ScrollController controller = ScrollController();
// //当前店铺选中的颜色和板式
// String themeColor;
// String themeType; //模版类型
// String url;
// String themeTitle = ''; //标题样式
// ThemeModel themeModelCurrunt; //有配色对应的当前页面模版数据
// SellerTemplateColorListSunModel themeSunModel;
// @override
// void initState() {
// super.initState();
// // if (themeSunModel.themeColorDefault != null) {
// // themeColor = themeSunModel.themeColorDefault;
// // url = themeSunModel
// // .colors[themeSunModel.colors
// // .indexWhere((element) => element.colorName == themeColor)]
// // .url;
// // } else {
// // if (themeSunModel.colors.length > 0) {
// // themeColor = themeSunModel.colors[0].colorName;
// // url = themeSunModel.colors[0].url;
// // } else {
// // url = themeSunModel.url;
// // }
// // }
// // themeType = themeSunModel.id;
// }
// // _selectTheme(String id) {
// // List<ThemeSunModel> temp = [];
// // temp.addAll(themeModelCurrunt.urls);
// // temp.addAll(themeDatasno);
// // List<String> tempUrls = temp.map((e) => e.url).toList();
// // // List<String> temp =
// // // themeModel.urls.map((e) => e.url).toList();
// // // print(temp);
// // // List<String> temp =
// // // themeDatasno.map((e) => e.url).toList();
// // print(temp);
// // _showPhotoView(
// // context, temp.indexWhere((element) => element.id == id), tempUrls,
// // (index) {
// // //选中的index
// // themeType = temp[index].id; //当前选中模版的id
// // setState(() {});
// // });
// // }
// double _scale = 1.0;
// double _previousScale = 1.0;
// Offset _panOffset = Offset(0, 0);
// Offset _previousPanOffset = Offset(0, 0);
// void _onScaleUpdate(ScaleUpdateDetails details) {
// setState(() {
// _previousScale = _scale;
// _scale *= details.scale;
// _previousPanOffset = _panOffset;
// _panOffset = _panOffset -
// details.focalPoint -
// _panOffset +
// details.localFocalPoint;
// });
// }
// _showPhotoView(BuildContext context, int index, List<String> 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(
// alignment: Alignment.bottomCenter,
// children: <Widget>[
// PhotoPreview(
// initialIndex: index,
// photoList: imgs,
// isShow: isShow,
// dashName: dashName,
// needMask: false,
// needTap: false,
// callback: (curruntIndex) {
// //选中某个模版
// // callback(curruntIndex);
// },
// ),
// // Positioned(
// // bottom: w(20),
// // child: InkWell(
// // onTap: () {
// // callback(index);
// // },
// // child: Container(
// // padding: EdgeInsets.symmetric(
// // horizontal: w(30), vertical: w(10)),
// // decoration: BoxDecoration(
// // color: MyColours.color_ffffff,
// // borderRadius: BorderRadius.circular(r(30)),
// // ),
// // child: Text(
// // '应用',
// // style: TextStyle(
// // decoration: TextDecoration.none,
// // color: MyColours.color_515151,
// // fontSize: font(16)),
// // ),
// // ),
// // ))
// ],
// );
// return Material(child: child);
// });
// Utils.setBarStatus(true, color: Colors.white);
// }
// @override
// Widget build(BuildContext context) {
// marketingCenterProvider =
// Provider.of<MarketingCenterProvider>(context, listen: true);
// return Scaffold(
// backgroundColor: MyColours.color_ffffff,
// appBar: SystemAppBar('客户通知设置'),
// body: Column(
// children: [
// Expanded(
// child: SingleChildScrollView(
// child: Column(
// children: [
// InkWell(
// onTap: () {
// DialogUtil.showThemeColorSelectDialogNew(
// context, themeSunModel.colors, callback: (object) {
// print(object);
// setState(() {
// themeColor = object;
// url = themeSunModel
// .colors[themeSunModel.colors.indexWhere(
// (element) => element.colorName == object)]
// .url;
// });
// });
// },
// child: Padding(
// padding: EdgeInsets.only(
// left: w(16), top: w(12), bottom: w(12), right: w(24)),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Text(
// '主题颜色选择',
// style: TextStyle(
// color: MyColours.color_515151,
// fontSize: font(16)),
// ),
// Spacer(),
// Text(
// themeColor??'',
// style: TextStyle(
// color: themeColor == '当前主题不可用'
// ? MyColours.color_BFC4D4
// : MyColours.color_515151,
// fontSize: font(16)),
// ),
// Container(
// padding: EdgeInsets.symmetric(
// horizontal: w(11), vertical: w(4)),
// child: Image.asset(
// "assets/arrow_right_new.png",
// width: w(9),
// height: w(16),
// ),
// )
// // RoundButton(
// // text: '预览',
// // gradientStart: MyColours.color_ffffff,
// // gradientEnd: MyColours.color_ffffff,
// // borderColor: MyColours.color_438E93,
// // textColor: MyColours.color_438E93,
// // radius: ScreenUtil().setWidth(22),
// // fontSize: 24,
// // width: w(72),
// // height: ScreenUtil().setWidth(44),
// // isBold: true,
// // onPressed: () {
// // NavigatorUtil.goMarkingPreviewPage(context);
// // },
// // ),
// ]))),
// Padding(
// padding: EdgeInsets.only(left: w(16)),
// child: MyDivider(double.infinity, w(0.5),
// color: MyColours.color_E7E7E7)),
// // VEmptyView(24),
// InkWell(
// onTap: () {},
// child: Padding(
// padding: EdgeInsets.only(
// left: w(16), top: w(12), bottom: w(12), right: w(16)),
// child: Row(
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// children: [
// Text(
// '介绍模块标题样式',
// style: TextStyle(
// color: MyColours.color_515151,
// fontSize: font(16)),
// ),
// Spacer(),
// Text(
// '当前主题不可用',
// style: TextStyle(
// color: themeTitle == '当前主题不可用'
// ? MyColours.color_BFC4D4
// : MyColours.color_515151,
// fontSize: font(16)),
// ),
// Container(
// padding: EdgeInsets.symmetric(
// horizontal: w(11), vertical: w(4)),
// child: Image.asset(
// "assets/arrow_right_new.png",
// width: w(9),
// height: w(16),
// ),
// )
// // RoundButton(
// // text: '预览',
// // gradientStart: MyColours.color_ffffff,
// // gradientEnd: MyColours.color_ffffff,
// // borderColor: MyColours.color_438E93,
// // textColor: MyColours.color_438E93,
// // radius: ScreenUtil().setWidth(22),
// // fontSize: 24,
// // width: w(72),
// // height: ScreenUtil().setWidth(44),
// // isBold: true,
// // onPressed: () {
// // NavigatorUtil.goMarkingPreviewPage(context);
// // },
// // ),
// ]))),
// Padding(
// padding: EdgeInsets.only(left: w(16)),
// child: MyDivider(double.infinity, w(0.5),
// color: MyColours.color_E7E7E7)),
// Container(
// width: double.infinity,
// alignment: Alignment.centerLeft,
// padding: EdgeInsets.only(
// left: w(16), top: w(12), bottom: w(12), right: w(16)),
// child: Text(
// '通知主题选择(左右滑动选择要使用的主题)',
// style: TextStyle(
// color: MyColours.color_515151, fontSize: font(16)),
// )),
// VEmptyView(24),
// Swiper(
// itemBuilder: (BuildContext context,int index){
// return Image.network("http://nosqn.colorcun.com/app/seller-hj-empty.png",fit: BoxFit.fill,);
// },
// itemCount: 3,
// pagination: SwiperPagination(),
// control: SwiperControl(),
// ),
// // GestureDetector(
// // onScaleUpdate: _onScaleUpdate,
// // child: Transform(
// // alignment: Alignment.center,
// // transform: Matrix4.identity()
// // ..translate(_panOffset.dx, _panOffset.dy)
// // ..scale(_scale),
// // child: Image.network(
// // 'http://nosqn.colorcun.com/app/seller-hj-empty.png',
// // fit: BoxFit.contain,
// // ),
// // ),
// // ),
// // InkWell(
// // onTap: () {
// // _showPhotoView(context, 0, [url]);
// // },
// // child: CachedNetworkImage(
// // imageUrl: url,
// // width: ScreenUtil().screenWidth - w(32),
// // fit: BoxFit.fitWidth,
// // alignment: Alignment.topCenter,
// // )),
// ],
// ))),
// Container(
// padding: EdgeInsets.only(
// top: w(12), bottom: w(25), left: w(45), right: w(45)),
// child: RoundButton(
// onPressed: () async {
// //接口成功后刷新并返回前一页
// //接口
// Map<String, String> params = {
// 'sid': Provider.of<UserModel>(context, listen: false)
// .user
// .sellerid,
// 'type': themeType,
// 'lite_class': themeColor == null
// ? null
// : themeSunModel
// .colors[themeSunModel.colors.indexWhere(
// (element) => element.colorName == themeColor)]
// .liteClass
// };
// bool success = await marketingCenterProvider
// .setSellerTemplateConf(context, params,
// showLoading: true);
// if (success) {
// Utils.showToast('设置成功');
// //选择当前模版+主题色
// bus.emit('theme_color_type', {
// 'themeColor': themeColor,
// 'themeType': themeType,
// });
// Navigator.pop(context);
// }
// },
// text: '确定',
// fontSize: 32,
// isBold: true,
// textColor: MyColours.color_F8F9FD,
// height: ScreenUtil().setWidth(43 * 2),
// // width: ScreenUtil().setWidth(130 * 2),
// radius: ScreenUtil().setWidth(10),
// )),
// ],
// ),
// );
// }
// }
// import 'package:cached_network_image/cached_network_image.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter_screenutil/flutter_screenutil.dart';
// import 'package:one_key/models/seller_template_color_list_model.dart';
// import 'package:one_key/pages/my/marketing_center/theme_model.dart';
// import 'package:one_key/route/navigator_util.dart';
// import 'package:one_key/widgets/system_app_bar.dart';
// import 'package:one_key/widgets/v_empty_view.dart';
// import 'package:provider/provider.dart';
// import '../../../constant/state.dart';
// import '../../../provider/marketing_center_provider.dart';
// import '../../../res/colors.dart';
// import '../../../utils/dialog_util.dart';
// import '../../../utils/event_bus.dart';
// import '../../../utils/screen_util.dart';
// import '../../../utils/utils.dart';
// import '../../../widgets/MyDivider.dart';
// import '../../../widgets/page_exception.dart';
// import '../../online_check/photo_view_wiget.dart';
// import 'dart:convert' as convert;
// /**
// *
// * 邀请函主题选择页面
// */
// class InvitationThemeHomePage extends StatefulWidget {
// InvitationThemeHomePage({Key key}) : super(key: key);
// @override
// _InvitationThemeHomePageState createState() =>
// _InvitationThemeHomePageState();
// }
// class _InvitationThemeHomePageState extends State<InvitationThemeHomePage> {
// ScrollController controller = ScrollController();
// MarketingCenterProvider marketingCenterProvider;
// //当前店铺选中的颜色和板式
// String themeColor;
// String themeType = '1'; //模版类型
// // int indexSelectColor = 0; //选中第几个模版 (有配色选中index)
// // int indexSelectNoColor = 0; //选中第几个模版 (无配色选中index)
// // List<ThemeSunModel> marketingCenterProvider.templeteDatas = [];
// // ThemeModel themeModelCurrunt; //有配色对应的当前页面模版数据
// @override
// void initState() {
// super.initState();
// WidgetsBinding.instance.addPostFrameCallback((_) {
// _getThemeData();
// bus.on("theme_color_type", (arg) {
// themeColor = arg['themeColor'];
// themeType = arg['themeType'];
// SellerTemplateColorListSunModel themeSunModel =
// marketingCenterProvider.templeteDatas[marketingCenterProvider
// .templeteDatas
// .indexWhere((element) => element.id == themeType)];
// themeSunModel.themeColorDefault = themeColor;
// bus.emit('theme_color_type_name', {
// 'templateName': themeSunModel.templateName,
// 'url': themeSunModel.colors.length == 0
// ? themeSunModel.url
// : themeSunModel
// .colors[themeSunModel.colors
// .indexWhere((element) => element.colorName == themeColor)]
// .url
// });
// setState(() {});
// });
// });
// }
// @override
// void dispose() {
// bus.off('theme_color_type');
// super.dispose();
// }
// _getThemeData() async {
// Future.wait<bool>(
// [_getSellerTemplateColorList(), getSellerTemplateConf(context)])
// .then((results) async {
// print(results[0]);
// if (results[0] && results[1]) {
// //成功
// marketingCenterProvider.pageStateThemeHome = PageState.Success;
// int index = marketingCenterProvider.templeteDatas.indexWhere(
// (element) =>
// element.id == marketingCenterProvider.markDataModel.type);
// themeType = marketingCenterProvider.templeteDatas[index].id;
// List<ColorListModel> colors =
// marketingCenterProvider.templeteDatas[index].colors;
// themeColor = colors[colors.indexWhere((element) =>
// element.liteClass ==
// marketingCenterProvider.markDataModel.liteClass)]
// .colorName;
// marketingCenterProvider.templeteDatas[index].themeColorDefault =
// themeColor;
// setState(() {});
// } else {
// marketingCenterProvider.pageStateThemeHome =
// PageState.ConnectivityError;
// // if (!results[0]) {
// // //没有优惠券
// // } else {}
// // if (!results[1]) {
// // //没有营销中心数据
// // } else {}
// setState(() {});
// }
// }).catchError((e) {
// print(e);
// });
// }
// Future<bool> getSellerTemplateConf(BuildContext context) async {
// bool success = await marketingCenterProvider.getSellerTemplateConf(context);
// if (success &&
// marketingCenterProvider.markDataModel != null &&
// marketingCenterProvider.markDataModel.type != '') {
// return true;
// } else {
// return false;
// }
// }
// ///获取后台配置的模版数据
// Future<bool> _getSellerTemplateColorList() async {
// bool success =
// await marketingCenterProvider.getSellerTemplateColorList(context);
// if (success) {
// return true;
// }
// return false;
// }
// _showPhotoView(BuildContext context, int index, List<String> imgs,
// CustomCallBack callback,
// {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(
// alignment: Alignment.bottomCenter,
// children: <Widget>[
// PhotoPreview(
// initialIndex: index,
// photoList: imgs,
// isShow: isShow,
// dashName: dashName,
// needMask: false,
// needTap: false,
// callback: (curruntIndex) {
// //选中某个模版
// callback(curruntIndex);
// },
// ),
// // Positioned(
// // bottom: w(20),
// // child: InkWell(
// // onTap: () {
// // callback(index);
// // },
// // child: Container(
// // padding: EdgeInsets.symmetric(
// // horizontal: w(30), vertical: w(10)),
// // decoration: BoxDecoration(
// // color: MyColours.color_ffffff,
// // borderRadius: BorderRadius.circular(r(30)),
// // ),
// // child: Text(
// // '应用',
// // style: TextStyle(
// // decoration: TextDecoration.none,
// // color: MyColours.color_515151,
// // fontSize: font(16)),
// // ),
// // ),
// // ))
// ],
// );
// return Material(child: child);
// });
// Utils.setBarStatus(true, color: Colors.white);
// }
// List<Widget> imagesWidgets() {
// List<Widget> images = [];
// for (int i = 0; i < marketingCenterProvider.templeteDatas.length; i++) {
// SellerTemplateColorListSunModel themeSunModel =
// marketingCenterProvider.templeteDatas[i];
// images.add(InkWell(
// onTap: () {
// // _selectTheme(themeDatas[themeColor].urls[index].id);
// //跳转到下一页
// NavigatorUtil.goInvitationThemeHomePreviewPage(
// context, themeSunModel);
// },
// child: Container(
// width: (ScreenUtil().screenWidth - w(32) - w(15)) / 2,
// // height: w(390),
// margin: EdgeInsets.only(right: i % 2 == 0 ? w(15) : 0),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(r(10)),
// border: Border.all(
// color: themeType == themeSunModel.id
// ? MyColours.color_005AA7
// : MyColours.color_DBDBDB,
// width: themeType == themeSunModel.id ? w(2) : w(1))),
// child: Column(
// children: [
// // VEmptyView(10),
// ClipRRect(
// borderRadius: BorderRadius.only(
// topLeft: Radius.circular(r(8)),
// topRight: Radius.circular(r(8))),
// child: CachedNetworkImage(
// imageUrl: themeSunModel.colors == null ||
// themeSunModel.colors.length == 0
// ? themeSunModel.url
// : themeSunModel
// .colors[themeColor == null
// ? 0
// : themeSunModel.colors.indexWhere((element) =>
// element.colorName ==
// themeSunModel.themeColorDefault)]
// .url,
// width: (ScreenUtil().screenWidth - w(32) - w(15)) / 2,
// height: w(348),
// fit: BoxFit.fitWidth,
// alignment: Alignment.topCenter,
// ),
// ),
// VEmptyView(20),
// Container(
// padding:
// EdgeInsets.symmetric(vertical: w(7), horizontal: w(3)),
// width: double.infinity,
// child: Text(
// themeSunModel.templateName,
// maxLines: 1,
// overflow: TextOverflow.ellipsis,
// textAlign: TextAlign.left,
// style: TextStyle(
// color: MyColours.color_000000, fontSize: font(14)),
// ),
// )
// ],
// ),
// )));
// }
// marketingCenterProvider.templeteDatas.forEach((themeSunModel) {});
// return images;
// }
// @override
// Widget build(BuildContext context) {
// marketingCenterProvider =
// Provider.of<MarketingCenterProvider>(context, listen: true);
// return Scaffold(
// backgroundColor: MyColours.color_ffffff,
// appBar: SystemAppBar('客户通知设置'),
// body: Consumer<MarketingCenterProvider>(builder: (context1, model, _) {
// if (model.pageStateThemeHome != PageState.Success) {
// return ExceptionPage(
// pageState: model.pageStateThemeHome,
// callback: () async {},
// emptyMsg: "暂时没有预订信息展示哦",
// emptyImg: "empty_search",
// showMsg: "加载中,请稍后...",
// );
// } else {
// return Column(
// children: [
// Expanded(
// child: SingleChildScrollView(
// child: Column(
// children: [
// VEmptyView(24),
// Padding(
// padding: EdgeInsets.symmetric(horizontal: w(16)),
// child: Wrap(
// runSpacing: w(15),
// // spacing: w(15),
// children: imagesWidgets(),
// )),
// VEmptyView(24),
// // GridView.builder(
// // padding: EdgeInsets.symmetric(horizontal: w(16)),
// // controller: controller,
// // // padding: EdgeInsets.only(top: ScreenUtil().getAdapterSize(10)),
// // shrinkWrap: true,
// // itemCount: marketingCenterProvider.templeteDatas.length,
// // //SliverGridDelegateWithFixedCrossAxisCount 构建一个横轴固定数量Widget
// // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
// // //横轴元素个数
// // crossAxisCount: 2,
// // //纵轴间距
// // mainAxisSpacing: w(15),
// // //横轴间距
// // crossAxisSpacing: w(15),
// // //子组件宽高长度比例
// // // childAspectRatio:
// // // (ScreenUtil().screenWidth - w(62)) / 2 / 370
// // ),
// // itemBuilder: (BuildContext context, int index) {
// // SellerTemplateColorListSunModel themeSunModel =
// // marketingCenterProvider.templeteDatas[index];
// // return InkWell(
// // onTap: () {
// // // _selectTheme(themeDatas[themeColor].urls[index].id);
// // //跳转到下一页
// // NavigatorUtil.goInvitationThemeHomePreviewPage(
// // context, themeSunModel);
// // },
// // child: Container(
// // height: w(385),
// // decoration: BoxDecoration(
// // borderRadius: BorderRadius.circular(r(10)),
// // border: Border.all(
// // color: themeType == themeSunModel.id
// // ? MyColours.color_005AA7
// // : MyColours.color_DBDBDB,
// // width: themeType == themeSunModel.id
// // ? w(2)
// // : w(1))),
// // child: Column(
// // children: [
// // VEmptyView(10),
// // CachedNetworkImage(
// // imageUrl: themeSunModel.colors == null ||
// // themeSunModel.colors.length == 0
// // ? themeSunModel.url
// // : themeSunModel
// // .colors[themeColor == null
// // ? 0
// // : themeSunModel.colors
// // .indexWhere((element) =>
// // element.colorName ==
// // themeSunModel
// // .themeColorDefault)]
// // .url,
// // width:
// // (ScreenUtil().screenWidth - w(62)) / 2,
// // height: w(348),
// // fit: BoxFit.fitWidth,
// // alignment: Alignment.topCenter,
// // ),
// // VEmptyView(20),
// // Container(
// // padding: EdgeInsets.symmetric(
// // vertical: w(6), horizontal: w(2)),
// // width: double.infinity,
// // child: Text(
// // themeSunModel.templateName,
// // maxLines: 1,
// // overflow: TextOverflow.ellipsis,
// // textAlign: TextAlign.left,
// // style: TextStyle(
// // color: MyColours.color_000000,
// // fontSize: font(14)),
// // ),
// // )
// // ],
// // ),
// // ));
// // }),
// ],
// )))
// ],
// );
// }
// }),
// );
// }
// }
... ...
... ... @@ -141,6 +141,7 @@ class _StoreBaseInfoPageState extends State<StoreBaseInfoPage> {
@override
void dispose() {
EventBus().emit('changeStatusColor');
_uploadImageProvider.mentou = UploadImgModel();
super.dispose();
}
... ...
... ... @@ -107,6 +107,8 @@ class _BaseInfoPageSimState extends State<BaseInfoPageSim> {
@override
void dispose() {
EventBus().emit('changeStatusColor');
_uploadImageProvider.touxiang = UploadImgModel(); //头像
_uploadImageProvider.erweima = UploadImgModel(); //二维码
super.dispose();
}
... ...
... ... @@ -144,6 +144,7 @@ class _BookInfoPageSimState extends State<BookInfoPageSim> {
@override
void dispose() {
_uploadImageProvider.firstImage = UploadImgModel();
_uploadImageProvider.logo = UploadImgModel();
super.dispose();
}
... ...
... ... @@ -141,6 +141,7 @@ class _StoreBaseInfoPageSimState extends State<StoreBaseInfoPageSim> {
@override
void dispose() {
EventBus().emit('changeStatusColor');
_uploadImageProvider.mentou = UploadImgModel();
super.dispose();
}
... ...
... ... @@ -61,6 +61,8 @@ class UploadImageProvider extends ChangeNotifier {
dish.process = 0.01;
}
/// 获取七牛上传token信息
Future<QiniuInfoSunModel> getQiniuInfo(
BuildContext context, Map<String, String> params,
... ...
... ... @@ -226,7 +226,8 @@ import '../pages/my/marketing_center/book_notification/store_introduce_page.dart
import '../pages/my/marketing_center/comments_setting_page.dart';
import '../pages/my/marketing_center/customer_notice_setting_page.dart';
import '../pages/my/marketing_center/invitation_theme_home_page.dart';
import '../pages/my/marketing_center/invitation_theme_home_page_new.dart';
import '../pages/my/marketing_center/invitation_theme_home_preview_page.dart';
import '../pages/my/marketing_center/marketing_center_home_page.dart';
import '../pages/my/marketing_center/order_setting_manager_page.dart';
... ...
... ... @@ -683,6 +683,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.6+1"
flutter_page_indicator:
dependency: transitive
description:
name: flutter_page_indicator
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.3"
flutter_picker:
dependency: "direct main"
description:
... ... @@ -725,6 +732,13 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.5.0"
flutter_swiper:
dependency: "direct main"
description:
name: flutter_swiper
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.1.6"
flutter_test:
dependency: "direct dev"
description: flutter
... ... @@ -1484,6 +1498,13 @@ packages:
url: "https://github.com/TencentCloud/TPNS-Flutter-Plugin.git"
source: git
version: "1.2.6"
transformer_page_view:
dependency: transitive
description:
name: transformer_page_view
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.6"
typed_data:
dependency: transitive
description:
... ...
... ... @@ -144,6 +144,7 @@ dependencies:
# image_picker: ^0.8.5+3
image_picker: ^0.8.6
#多图选择
# photo: ^0.4.8
# photo: 0.5.0-dev.3
... ... @@ -249,6 +250,8 @@ dependencies:
# workmanager: ^0.5.1
# flutter_wxwork: ^0.0.3
card_swiper: ^3.0.1
# flutter_card_swiper: ^6.1.0
flutter_swiper: ^1.1.6
... ...