Commit 9189820352b69c473f317eedd9253542b26aa7ad

Authored by wdn127929
1 parent af8985e9

iOS优惠券分享点不动,新版微信sdk更换变量,128kb 大小的图片放在老的参数里,太大,以前的参数要求32kb

... ... @@ -449,7 +449,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 551;
CURRENT_PROJECT_VERSION = 5522;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
... ... @@ -458,7 +458,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.5.1;
MARKETING_VERSION = 5.5.2;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
... ... @@ -632,7 +632,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 551;
CURRENT_PROJECT_VERSION = 5522;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
... ... @@ -641,7 +641,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.5.1;
MARKETING_VERSION = 5.5.2;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
... ... @@ -658,7 +658,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 551;
CURRENT_PROJECT_VERSION = 5522;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
... ... @@ -667,7 +667,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 5.5.1;
MARKETING_VERSION = 5.5.2;
PRODUCT_BUNDLE_IDENTIFIER = com.naji.reserveLine;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
... ...
... ... @@ -10,10 +10,10 @@ class Constant {
*
* 测试账号变更,已经删除0001 账户 代替为 0019!!!!!!!注意!!!!!!!!!!!!!!
* */
// static const WXMiniProgramType wxMiniProgramType =
// WXMiniProgramType.release; //正式版
static const WXMiniProgramType wxMiniProgramType =
WXMiniProgramType.preview; //体验版
WXMiniProgramType.release; //正式版
// static const WXMiniProgramType wxMiniProgramType =
// WXMiniProgramType.preview; //体验版
// static const WXMiniProgramType wxMiniProgramType =
// WXMiniProgramType.test; //开发版
... ...
... ... @@ -311,7 +311,7 @@ class HomePageState extends State<HomePage> with WidgetsBindingObserver {
}
getSellerVersion() async {
await collectStoreProvider!.getSellerVersion(context, showLoading: false);
await collectStoreProvider?.getSellerVersion(context, showLoading: false);
if (Constant.normalApp) {
_version();
... ...
... ... @@ -338,6 +338,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
height: 1,
fontWeight: FontWeight.bold,
color: MyColours.color_FFEFC5,
fontSize: font(16)),
... ... @@ -356,6 +357,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
height: 1,
color: MyColours.color_FFEFC5,
fontWeight: FontWeight.bold,
fontSize: font(16)),
... ... @@ -397,6 +399,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
height: 1,
fontWeight: FontWeight.bold,
color: MyColours.color_FFEFC5,
fontSize: font(16)),
... ... @@ -420,6 +423,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
height: 1,
color: MyColours.color_FFEFC5,
fontWeight: FontWeight.bold,
fontSize: font(16)),
... ... @@ -477,6 +481,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
height: 1,
fontWeight: FontWeight.bold,
color: MyColours.color_FFEFC5,
fontSize: font(16)),
... ... @@ -501,6 +506,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
overflow:
TextOverflow.ellipsis,
style: TextStyle(
height: 1,
color: MyColours
.color_FFEFC5,
fontWeight:
... ... @@ -549,6 +555,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
height: 1,
color: MyColours.color_FFEFC5,
fontWeight: FontWeight.bold,
fontSize: font(16)),
... ... @@ -606,6 +613,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
textAlign: TextAlign.left,
overflow: TextOverflow.ellipsis,
style: TextStyle(
height: 1,
fontWeight: FontWeight.bold,
color: MyColours.color_FFEFC5,
fontSize: font(16)),
... ... @@ -622,6 +630,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
overflow:
TextOverflow.ellipsis,
style: TextStyle(
height: 1,
color: MyColours
.color_FFEFC5,
fontWeight:
... ... @@ -635,6 +644,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
overflow:
TextOverflow.ellipsis,
style: TextStyle(
height: 1,
// writingMode: TextWritingMode.verticalLr,
color: MyColours
.color_FFEFC5,
... ... @@ -666,6 +676,7 @@ class _MiniprogramSettingPageState extends State<MiniprogramSettingPage> {
overflow:
TextOverflow.ellipsis,
style: TextStyle(
height: 1,
color: MyColours
.color_FFEFC5,
fontWeight:
... ...
... ... @@ -1475,7 +1475,8 @@ class Utils {
title: _title,
path: _path,
description: _description,
thumbData: result
thumbData: Platform.isIOS ? null : result,
hdImageData: result
// thumbnail: WeChatImage.binary(source)
);
bool isShare = await fluwx.share(model);
... ... @@ -1528,7 +1529,8 @@ class Utils {
// thumbnail: WeChatImage.binary(source)
thumbData: result);
thumbData: Platform.isIOS ? null : result,
hdImageData: result);
bool isShare = await fluwx.share(model);
print(isShare);
Loading.hideLoading(context);
... ... @@ -1560,6 +1562,7 @@ class Utils {
String _description = "OneKey";
// Uint8List source = await testComporessList(context, _thumbnail);
Fluwx fluwx = Fluwx();
Uint8List? result = await WxSdk.fetchImageAsUint8List(_thumbnail);
var model = new WeChatShareMiniProgramModel(
// miniProgramType: , //体验版
miniProgramType: Constant.wxMiniProgramType, //正式版
... ... @@ -1573,7 +1576,8 @@ class Utils {
// thumbnail: WeChatImage.binary(source)
thumbData: await WxSdk.fetchImageAsUint8List(_thumbnail));
thumbData: Platform.isIOS ? null : result,
hdImageData: result);
bool isShare = await fluwx.share(model);
print(isShare);
Loading.hideLoading(context);
... ... @@ -1617,7 +1621,8 @@ class Utils {
title: _title,
path: _path,
description: _description,
thumbData: result
thumbData: Platform.isIOS ? null : result,
hdImageData: result
// thumbnail: WeChatImage.binary(source)
);
bool isShare = await fluwx.share(model);
... ... @@ -2056,7 +2061,8 @@ class Utils {
miniProgramType: Constant.wxMiniProgramType, //正式版
// miniProgramType: //开发版
// thumbnail: WeChatImage.binary(source)
thumbData: result
thumbData: Platform.isIOS ? null : result,
hdImageData: result
// thumbnail: WeChatImage.binary(image)
);
//分享链接
... ... @@ -2108,19 +2114,20 @@ class Utils {
//跳转小程序
Fluwx fluwx = Fluwx();
var model = new WeChatShareMiniProgramModel(
webPageUrl: _webPageUrl,
userName: _userName,
title: _title,
path: _path,
// description: 'hhh',
// miniProgramType: , //体验版
miniProgramType: Constant.wxMiniProgramType, //正式版
// miniProgramType: //开发版
// thumbnail: WeChatImage.binary(source)
thumbData: result,
// hdImagePath: WeChatImage.network(_thumbnail), thumbnail: null,
// thumbnail: WeChatImage.binary(image)
);
webPageUrl: _webPageUrl,
userName: _userName,
title: _title,
path: _path,
// description: 'hhh',
// miniProgramType: , //体验版
miniProgramType: Constant.wxMiniProgramType, //正式版
// miniProgramType: //开发版
// thumbnail: WeChatImage.binary(source)
thumbData: Platform.isIOS ? null : result,
hdImageData: result
// hdImagePath: WeChatImage.network(_thumbnail), thumbnail: null,
// thumbnail: WeChatImage.binary(image)
);
//分享链接
// var model = WeChatShareWebPageModel(
// // 'https://xt04.colorcun.com/h5/index.html#/?id=$rid&hasInvitation=1',
... ... @@ -2213,6 +2220,7 @@ class Utils {
}
// print(result!.length/1024);
//跳转小程序
Fluwx fluwx = Fluwx();
var model = new WeChatShareMiniProgramModel(
webPageUrl: _webPageUrl,
... ... @@ -2224,7 +2232,8 @@ class Utils {
miniProgramType: Constant.wxMiniProgramType, //正式版
// miniProgramType: //开发版
// thumbnail: WeChatImage.binary(source)
thumbData: result
thumbData: Platform.isIOS ? null : result,
hdImageData: result
// hdImagePath: WeChatImage.network(_thumbnail), thumbnail: null,
// thumbnail: WeChatImage.binary(image)
);
... ... @@ -2288,7 +2297,8 @@ class Utils {
miniProgramType: Constant.wxMiniProgramType, //正式版
// miniProgramType: //开发版
// thumbnail: WeChatImage.binary(source)
thumbData: result
thumbData: Platform.isIOS ? null : result,
hdImageData: result
// thumbnail: WeChatImage.binary(image)
);
//分享链接
... ... @@ -3151,7 +3161,8 @@ class Utils {
// miniProgramType: //开发版
// thumbnail: WeChatImage.binary(source)
// thumbnail: WeChatImage.network(_thumbnail)
thumbData: result);
thumbData: Platform.isIOS ? null : result,
hdImageData: result);
isSuccess = await fluwx.share(model);
} else {
... ... @@ -3358,7 +3369,9 @@ class Utils {
// miniProgramType: //开发版
// thumbnail: WeChatImage.binary(source)
// thumbnail: WeChatImage.network(_thumbnail)
thumbData: _thumbnailUint8List);
thumbData: Platform.isIOS ? null : _thumbnailUint8List,
hdImageData: _thumbnailUint8List);
// thumbData: );
... ...
... ... @@ -33,10 +33,10 @@ class WxSdk {
static Future init() async {
Fluwx fluwx = Fluwx();
fluwx.registerApi(
appId: "这里写你注册的appid",
appId: "wx4d105e36a36a6139",
doOnAndroid: true,
doOnIOS: true,
universalLink: "这里写你注册的universalLink");
universalLink: "https://xt04.colorcun.com/link/OneKey/");
}
static Future<bool> wxIsInstalled() async {
... ... @@ -68,11 +68,19 @@ class WxSdk {
WeChatShareImageModel model;
if (file != null) {
model = WeChatShareImageModel(
WeChatImageToShare(localImagePath: File(file).path),
title: title,
description: decs,
scene: wxScene);
if (Platform.isIOS) {
model = WeChatShareImageModel(
WeChatImageToShare(uint8List: File(file).readAsBytesSync()),
title: title,
description: decs,
scene: wxScene);
} else {
model = WeChatShareImageModel(
WeChatImageToShare(localImagePath: File(file).path),
title: title,
description: decs,
scene: wxScene);
}
} else if (url != null) {
model = WeChatShareImageModel(
WeChatImageToShare(uint8List: await fetchImageAsUint8List(url)),
... ...