Commit 8f84f536fc2706bcebf2188c7714bf345bdfb9b4

Authored by wdn127929
1 parent 68c8ce6e

升级更换插件遗留问题(已预订顶端日历显示问题& 微信分享图片大小问题&&正月三十显示问题)

... ... @@ -67,20 +67,20 @@ class _FinanceManageHomePageState extends State<FinanceManageHomePage> {
body: SingleChildScrollView(
child: Column(
children: [
_item('收银资料上传', () {
NavigatorUtil.goEnterpriseInformationUploadPage(context);
}),
_item('微信商户账户开通结果查询', () {}),
_item('支付返券', () {
NavigatorUtil.goPaymentGiftPage(context);
}),
// _item('收银资料上传', () {
// NavigatorUtil.goEnterpriseInformationUploadPage(context);
// }),
// _item('微信商户账户开通结果查询', () {}),
// _item('支付返券', () {
// NavigatorUtil.goPaymentGiftPage(context);
// }),
_item('门店收款码', () {
NavigatorUtil.goPaymentCodePage(context);
}),
_item('交易记录', () {
NavigatorUtil.goTransactionRecordHomePage(context);
}),
_item('提现设置', () {})
// _item('提现设置', () {})
],
),
),
... ...
... ... @@ -72,8 +72,9 @@ class _BirthdaySettingPageState extends State<BirthdaySettingPage> {
customerProvider.sellerGuestData!.birthdayNoticeDay ?? '';
pushMemorialDayC.text =
customerProvider.sellerGuestData!.commemorationDay ?? '';
customerProvider.notifyListeners();
}
customerProvider.notifyListeners();
}
///修改客情配置
... ...
... ... @@ -215,9 +215,8 @@ class CustomerProvider extends ChangeNotifier {
data: params, showLoading: isShowLoading);
if (baseResp == null) return null;
if (baseResp.code == Constant.status_success) {
saiYouYunBirData = SaiYouYunBirthdayModel.fromJson(
baseResp.responseData!)
.data;
saiYouYunBirData =
SaiYouYunBirthdayModel.fromJson(baseResp.responseData!).data;
pageStateBirthday = PageState.Success;
} else {
// if (baseResp != null) {
... ... @@ -555,40 +554,37 @@ class CustomerProvider extends ChangeNotifier {
BaseResp<dynamic> baseResp = await DioUtil().request<dynamic>(
context, Method.post, HttpUrl.get_customer_activity,
data: params, showLoading: false);
if (baseResp == null) return [];
if (baseResp.code == Constant.status_success) {
couponListSelect =
if (baseResp == null) return [];
if (baseResp.code == Constant.status_success) {
couponListSelect =
CouponModel.fromJson(baseResp.responseData as Map<String, dynamic>)
.data!
.cast<CouponSunModel>();
// 屏蔽type==2 的券 我的优惠券
List<CouponSunModel> temp = [];
for (int i = 0; i < couponListSelect!.length; i++) {
if (couponListSelect![i].isType == '2' ||
(couponListSelect![i].isType == '1' &&
couponListSelect![i].isExamine != '1')) {
} else {
temp.add(couponListSelect![i]);
// 屏蔽type==2 的券 我的优惠券
List<CouponSunModel> temp = [];
for (int i = 0; i < couponListSelect!.length; i++) {
if (couponListSelect![i].isType == '2' ||
(couponListSelect![i].isType == '1' &&
couponListSelect![i].isExamine != '1')) {
} else {
temp.add(couponListSelect![i]);
}
}
couponListSelect = temp;
notifyListeners();
} else {
if (baseResp != null) {
Utils.showToast(baseResp.msg ?? "");
}
}
couponListSelect = temp;
notifyListeners();
} else {
if (baseResp != null) {
Utils.showToast(baseResp.msg ?? "");
}
}
return [];
return [];
} catch (error) {
print(error.toString());
if (error is MyError) {
switch (error.type) {}
}
}
}
}
// //我的客情列表------获取筛选里面的活跃度,自定义标签
// getCustomerListWithFilter(BuildContext context) async {
... ... @@ -1708,8 +1704,7 @@ class CustomerProvider extends ChangeNotifier {
* */
///全店客情首页
Future<StoreCustomerHomeSunModel?> getSellerGuestManage(
BuildContext context,
Future<StoreCustomerHomeSunModel?> getSellerGuestManage(BuildContext context,
{isShowLoading = true}) async {
if (isShowLoading) {
pageStateStoreHome = PageState.Loading;
... ... @@ -2140,8 +2135,7 @@ class CustomerProvider extends ChangeNotifier {
}
//商家修改客情配置
Future<bool> setSellerGuest(
BuildContext context, Map<String, String?> params,
Future<bool> setSellerGuest(BuildContext context, Map<String, String?> params,
{bool showLoading = false}) async {
try {
BaseResp<dynamic> baseResp = await DioUtil().request<dynamic>(
... ... @@ -2231,27 +2225,27 @@ class CustomerProvider extends ChangeNotifier {
context, Method.post, HttpUrl.seller_guest_get,
data: params, showLoading: showLoading, selfDismiss: selfDismiss);
if (baseResp != null && baseResp.code == Constant.status_success) {
sellerGuestData = SellerGuestModel.fromJson(
baseResp.responseData!)
.data;
sellerGuestData =
SellerGuestModel.fromJson(baseResp.responseData!).data;
if (sellerGuestData != null) {
isrepair = sellerGuestData!.isAdditional == '1' ? true : false;
isselfphone = sellerGuestData!.isEnterSelf == '1' ? true : false;
pageStateBirthdaySetting = PageState.Success;
return true;
}
pageStateBirthdaySetting = PageState.Success;
return false;
} else {
if (baseResp != null) {
Utils.showToast(baseResp.msg ?? "");
}
return false;
}
} catch (error) {
print(error.toString());
if (error is MyError) {}
notifyListeners();
}
return false;
}
... ... @@ -2317,8 +2311,7 @@ class CustomerProvider extends ChangeNotifier {
}
// 商家获取商家标签
Future<List<CustomerLabelSunModel>?> getLabelBySellerid(
BuildContext context,
Future<List<CustomerLabelSunModel>?> getLabelBySellerid(BuildContext context,
{bool showLoading = false}) async {
Map<String, String?> params = {
"sellerid": Provider.of<UserModel>(context, listen: false).user!.sellerid,
... ...
... ... @@ -56,12 +56,12 @@ import 'dart:typed_data';
typedef BookTimeSetCallback = void Function(bool needChange);
class Utils {
static Future<bool> isImageLargerThan64KB(Uint8List? imageBytes) async {
static Future<bool> isImageLargerThan120KB(Uint8List? imageBytes) async {
if (imageBytes == null) {
return false;
}
var fileSize = imageBytes.lengthInBytes;
return fileSize > 64 * 1024; // 64KB = 64 * 1024 bytes
return fileSize > 120 * 1024; // 64KB = 120 * 1024 bytes
}
static List<CallLogEntry> removeDuplicates(List<CallLogEntry> items) {
... ... @@ -1453,13 +1453,13 @@ class Utils {
Fluwx fluwx = Fluwx();
Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail);
Uint8List? result;
Uint8List? result=pngByte;
if (pngByte != null && await isImageLargerThan64KB(pngByte)) {
if (pngByte != null && await isImageLargerThan120KB(pngByte)) {
Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
result = resultnew == null
? null
: await compressImage(resultnew, mb: 64 / 1024);
: await compressImage(resultnew, mb: 120/ 1024);
}
var model = new WeChatShareMiniProgramModel(
miniProgramType: Constant.wxMiniProgramType,
... ... @@ -1501,12 +1501,12 @@ class Utils {
// Uint8List source = await testComporessList(context, _thumbnail);
Fluwx fluwx = Fluwx();
Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail);
Uint8List? result;
if (pngByte != null && await isImageLargerThan64KB(pngByte)) {
Uint8List? result=pngByte;
if (pngByte != null && await isImageLargerThan120KB(pngByte)) {
Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
result = resultnew == null
? null
: await compressImage(resultnew, mb: 64 / 1024);
: await compressImage(resultnew, mb: 120 / 1024);
}
var model = new WeChatShareMiniProgramModel(
// miniProgramType: , //体验版
... ... @@ -1596,12 +1596,12 @@ class Utils {
// Uint8List source = await testComporessList(context, _thumbnail);
Fluwx fluwx = Fluwx();
Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail);
Uint8List? result;
if (pngByte != null && await isImageLargerThan64KB(pngByte)) {
Uint8List? result=pngByte;
if (pngByte != null && await isImageLargerThan120KB(pngByte)) {
Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
result = resultnew == null
? null
: await compressImage(resultnew, mb: 64 / 1024);
: await compressImage(resultnew, mb: 120 / 1024);
}
var model = new WeChatShareMiniProgramModel(
miniProgramType: Constant.wxMiniProgramType,
... ... @@ -2029,12 +2029,12 @@ class Utils {
String _description = "诚邀您参加储值优惠活动,点击查看详情。";
// Uint8List source = await testComporessList(context, _thumbnail);
Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail);
Uint8List? result;
if (pngByte != null && await isImageLargerThan64KB(pngByte)) {
Uint8List? result=pngByte;
if (pngByte != null && await isImageLargerThan120KB(pngByte)) {
Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
result = resultnew == null
? null
: await compressImage(resultnew, mb: 64 / 1024);
: await compressImage(resultnew, mb: 120 / 1024);
}
//跳转小程序
... ... @@ -2091,12 +2091,12 @@ class Utils {
String _description = "进入查看包间详情,转发同行好友,还可一键导航到饭店";
// Uint8List source = await testComporessList(context, _thumbnail);
Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail);
Uint8List? result;
if (pngByte != null && await isImageLargerThan64KB(pngByte)) {
Uint8List? result = pngByte;
if (pngByte != null && await isImageLargerThan120KB(pngByte)) {
Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
result = resultnew == null
? null
: await compressImage(resultnew, mb: 64 / 1024);
: await compressImage(resultnew, mb: 120 / 1024);
}
//跳转小程序
Fluwx fluwx = Fluwx();
... ... @@ -2197,12 +2197,12 @@ class Utils {
String _description = "进入查看包间详情,转发同行好友,还可一键导航到饭店";
// Uint8List source = await testComporessList(context, _thumbnail);
Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail);
Uint8List? result;
if (pngByte != null && await isImageLargerThan64KB(pngByte)) {
Uint8List? result = pngByte;
if (pngByte != null && await isImageLargerThan120KB(pngByte)) {
Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
result = resultnew == null
? null
: await compressImage(resultnew, mb: 64 / 1024);
: await compressImage(resultnew, mb: 120 / 1024);
}
// print(result!.length/1024);
//跳转小程序
... ... @@ -2264,12 +2264,12 @@ class Utils {
//跳转小程序
Fluwx fluwx = Fluwx();
Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail);
Uint8List? result;
if (pngByte != null && await isImageLargerThan64KB(pngByte)) {
Uint8List? result = pngByte;
if (pngByte != null && await isImageLargerThan120KB(pngByte)) {
Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
result = resultnew == null
? null
: await compressImage(resultnew, mb: 64 / 1024);
: await compressImage(resultnew, mb: 120 / 1024);
}
var model = new WeChatShareMiniProgramModel(
webPageUrl: _webPageUrl,
... ... @@ -3094,17 +3094,17 @@ class Utils {
"pages/customer/detail_owner_invitation_new?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid&paymentId=$depositId";
}
Fluwx fluwx = Fluwx();
Uint8List? result;
if (liteStyle == '0') {
Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail);
if (pngByte != null && await isImageLargerThan64KB(pngByte)) {
Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
result = resultnew == null
? null
: await compressImage(resultnew, mb: 64 / 1024);
}
Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail);
Uint8List? result = pngByte;
// if (liteStyle == '0') {
if (pngByte != null && await isImageLargerThan120KB(pngByte)) {
Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
result = resultnew == null
? null
: await compressImage(resultnew, mb: 120 / 1024);
}
// }
var model = new WeChatShareMiniProgramModel(
webPageUrl: _webPageUrl,
... ... @@ -3200,7 +3200,7 @@ class Utils {
String _thumbnail = sellerImage == null || sellerImage == ''
? 'http://nosqn.colorcun.com/reserve/images/3x/%E6%9A%82%E6%97%A0.png'
: sellerImage;
late Uint8List _thumbnailUint8List;
late Uint8List? _thumbnailUint8List;
print(size(_thumbnail.length));
String dsoltStr = '${ddateHm == null || ddateHm == '' ? '' : ddateHm}';
... ... @@ -3280,15 +3280,15 @@ class Utils {
"pages/customer/detail_owner_invitation_new?id=$rid&hasInvitation=1&hasSellerShare=1&uid=$uid&paymentId=$depositId";
}
Fluwx fluwx = Fluwx();
Uint8List? result;
// Uint8List? result;
if (liteStyle == '0') {
Uint8List? pngByte = await WxSdk.fetchImageAsUint8List(_thumbnail);
if (pngByte != null && await isImageLargerThan64KB(pngByte)) {
_thumbnailUint8List = pngByte;
if (pngByte != null && await isImageLargerThan120KB(pngByte)) {
Uint8List? resultnew = await realComporessList(pngByte); //压缩图片
result = resultnew == null
_thumbnailUint8List= resultnew == null
? null
: await compressImage(resultnew, mb: 64 / 1024);
: await compressImage(resultnew, mb: 120 / 1024);
}
}
// print(_thumbnailUint8List.length/1024);
... ... @@ -3303,7 +3303,7 @@ class Utils {
// miniProgramType: //开发版
// thumbnail: WeChatImage.binary(source)
// thumbnail: WeChatImage.network(_thumbnail)
thumbData: liteStyle == '0' ? result : _thumbnailUint8List);
thumbData: _thumbnailUint8List);
// thumbData: );
... ...