|
...
|
...
|
@@ -9,6 +9,7 @@ import 'package:flutter_statusbarcolor/flutter_statusbarcolor.dart'; |
|
|
|
import 'package:fluttertoast/fluttertoast.dart';
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
import 'package:fluwx/fluwx.dart';
|
|
|
|
import 'package:one_key/pages/login/web_page.dart';
|
|
|
|
import 'package:one_key/provider/user_model.dart';
|
|
|
|
import 'package:one_key/utils/navigator_util.dart';
|
|
|
|
import 'package:one_key/widgets/loading.dart';
|
|
...
|
...
|
@@ -216,19 +217,32 @@ class Utils { |
|
|
|
//分享邀请函
|
|
|
|
static goShareInvicationToWeChat(String rid) async {
|
|
|
|
String _webPageUrl = "http://colorcun.com/";
|
|
|
|
// String _thumbnail =
|
|
|
|
// "https://xt04.colorcun.com/h5/index.html#/?id=163854&hasInvitation=1";
|
|
|
|
|
|
|
|
String _thumbnail =
|
|
|
|
"https://qn.colorcun.com/reserve/images/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_201911151148572.jpg";
|
|
|
|
String _title = "用餐已为您安排,点击查看详情";
|
|
|
|
String _title = "用餐已为您安排";
|
|
|
|
String _userName = "gh_487873d353b3";
|
|
|
|
String _path = "pages/customer/index?id=$rid&hasInvitation=1";
|
|
|
|
String _description = "OneKey";
|
|
|
|
var model = new WeChatShareMiniProgramModel(
|
|
|
|
webPageUrl: _webPageUrl,
|
|
|
|
userName: _userName,
|
|
|
|
title: _title,
|
|
|
|
path: _path,
|
|
|
|
description: _description,
|
|
|
|
thumbnail: WeChatImage.network(_thumbnail));
|
|
|
|
String _description = "进入查看包间详情,转发同行好友,还可一键导航到饭店";
|
|
|
|
//跳转小程序
|
|
|
|
// var model = new WeChatShareMiniProgramModel(
|
|
|
|
// webPageUrl: _webPageUrl,
|
|
|
|
// userName: _userName,
|
|
|
|
// title: _title,
|
|
|
|
// path: _path,
|
|
|
|
// description: _description,
|
|
|
|
// thumbnail: WeChatImage.network(_thumbnail));
|
|
|
|
//分享链接
|
|
|
|
var model = WeChatShareWebPageModel(
|
|
|
|
'https://xt04.colorcun.com/h5/index.html#/?id=$rid&hasInvitation=1',
|
|
|
|
title: _title,
|
|
|
|
description: _description,
|
|
|
|
thumbnail: WeChatImage.network(_thumbnail),
|
|
|
|
scene: WeChatScene.SESSION,
|
|
|
|
);
|
|
|
|
|
|
|
|
bool isSuccess = await shareToWeChat(model);
|
|
|
|
return isSuccess;
|
|
|
|
}
|
...
|
...
|
|