邀请功能完善
BIN
circle_app/assets/images/mine/add_code_icon.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
BIN
circle_app/assets/images/mine/hb.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
circle_app/assets/images/mine/invite_count_bg.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
circle_app/assets/images/mine/invite_icon.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
circle_app/assets/images/mine/invite_line.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
circle_app/assets/images/mine/invite_right_icon.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
circle_app/assets/images/mine/invite_sys_bg.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
BIN
circle_app/assets/images/mine/invite_title.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
circle_app/assets/images/mine/invite_vip_desc.png
Normal file
|
After Width: | Height: | Size: 556 KiB |
BIN
circle_app/assets/images/mine/qq.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
circle_app/assets/images/mine/share_content_bg.png
Normal file
|
After Width: | Height: | Size: 564 KiB |
BIN
circle_app/assets/images/mine/share_title.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
circle_app/assets/images/mine/wb.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
circle_app/assets/images/mine/wx.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
circle_app/assets/images/mine/wxq.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
@ -141,7 +141,6 @@
|
|||||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||||
596550B3B6FD4574F751EEF4 /* [CP] Embed Pods Frameworks */,
|
596550B3B6FD4574F751EEF4 /* [CP] Embed Pods Frameworks */,
|
||||||
043A78F4D9CB2782E40309BF /* [CP] Copy Pods Resources */,
|
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@ -200,23 +199,6 @@
|
|||||||
/* End PBXResourcesBuildPhase section */
|
/* End PBXResourcesBuildPhase section */
|
||||||
|
|
||||||
/* Begin PBXShellScriptBuildPhase section */
|
/* Begin PBXShellScriptBuildPhase section */
|
||||||
043A78F4D9CB2782E40309BF /* [CP] Copy Pods Resources */ = {
|
|
||||||
isa = PBXShellScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
inputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
|
|
||||||
);
|
|
||||||
name = "[CP] Copy Pods Resources";
|
|
||||||
outputFileListPaths = (
|
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
shellPath = /bin/sh;
|
|
||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
|
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
|
||||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
alwaysOutOfDate = 1;
|
alwaysOutOfDate = 1;
|
||||||
|
|||||||
@ -2,6 +2,8 @@
|
|||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
|
<key>NSPhotoLibraryAddUsageDescription</key>
|
||||||
|
<string>是否同意应用将图片保存到相册中?</string>
|
||||||
<key>LSApplicationQueriesSchemes</key>
|
<key>LSApplicationQueriesSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>weixinULAPI</string>
|
<string>weixinULAPI</string>
|
||||||
@ -62,5 +64,7 @@
|
|||||||
<string>30dc517b609c8aefe297b9ac3eb8dbde</string>
|
<string>30dc517b609c8aefe297b9ac3eb8dbde</string>
|
||||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||||
<false/>
|
<false/>
|
||||||
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@ -1,3 +1,6 @@
|
|||||||
|
import 'package:circle_app/network/api.dart';
|
||||||
|
import 'package:circle_app/network/dio_manager.dart';
|
||||||
|
import 'package:circle_app/util/util.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
@ -5,5 +8,157 @@ import 'state.dart';
|
|||||||
|
|
||||||
class InviteLogic extends GetxController {
|
class InviteLogic extends GetxController {
|
||||||
final InviteState state = InviteState();
|
final InviteState state = InviteState();
|
||||||
|
bool isLoad = true;
|
||||||
TextEditingController codeEditingController = TextEditingController();
|
TextEditingController codeEditingController = TextEditingController();
|
||||||
|
|
||||||
|
Data? homeData;
|
||||||
|
|
||||||
|
List sysData = [];
|
||||||
|
|
||||||
|
|
||||||
|
@override
|
||||||
|
void onInit() {
|
||||||
|
// TODO: implement onInit
|
||||||
|
super.onInit();
|
||||||
|
loadData();
|
||||||
|
}
|
||||||
|
|
||||||
|
void loadData() async {
|
||||||
|
var data = await DioManager.instance.get(url: Api.inviteMainPage);
|
||||||
|
if (data['code'] == 200) {
|
||||||
|
Autogenerated result = Autogenerated.fromJson(data);
|
||||||
|
|
||||||
|
homeData = result.data;
|
||||||
|
|
||||||
|
}
|
||||||
|
var recorddata = await DioManager.instance.get(url: Api.inviteSysRecord);
|
||||||
|
if (recorddata['code'] == 200) {
|
||||||
|
sysData = recorddata['data'];
|
||||||
|
isLoad = false;
|
||||||
|
update();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
addCode(String code) async {
|
||||||
|
|
||||||
|
|
||||||
|
var recorddata = await DioManager.instance.post(url: Api.inviteFillIn,params: {'invite_code':code});
|
||||||
|
if (recorddata['code'] == 200) {
|
||||||
|
showOKToast('填写成功');
|
||||||
|
} else {
|
||||||
|
showOKToast(recorddata['msg']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class Autogenerated {
|
||||||
|
int? code;
|
||||||
|
Data? data;
|
||||||
|
String? msg;
|
||||||
|
|
||||||
|
Autogenerated({this.code, this.data, this.msg});
|
||||||
|
|
||||||
|
Autogenerated.fromJson(Map<String, dynamic> json) {
|
||||||
|
code = json['code'];
|
||||||
|
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
|
||||||
|
msg = json['msg'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['code'] = this.code;
|
||||||
|
if (this.data != null) {
|
||||||
|
data['data'] = this.data!.toJson();
|
||||||
|
}
|
||||||
|
data['msg'] = this.msg;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Data {
|
||||||
|
int? achieveCount;
|
||||||
|
int? achieveRewardDay;
|
||||||
|
int? diffAwardCount;
|
||||||
|
List<InviteAwardConf>? inviteAwardConf;
|
||||||
|
int? inviteAwardCount;
|
||||||
|
String? inviteCode;
|
||||||
|
String? link;
|
||||||
|
int? inviteCount;
|
||||||
|
|
||||||
|
Data(
|
||||||
|
{this.achieveCount,
|
||||||
|
this.achieveRewardDay,
|
||||||
|
this.diffAwardCount,
|
||||||
|
this.inviteAwardConf,
|
||||||
|
this.inviteAwardCount,
|
||||||
|
this.inviteCode,
|
||||||
|
this.link,
|
||||||
|
this.inviteCount});
|
||||||
|
|
||||||
|
Data.fromJson(Map<String, dynamic> json) {
|
||||||
|
achieveCount = json['achieve_count'];
|
||||||
|
achieveRewardDay = json['achieve_reward_day'];
|
||||||
|
diffAwardCount = json['diff_award_count'];
|
||||||
|
if (json['invite_award_conf'] != null) {
|
||||||
|
inviteAwardConf = <InviteAwardConf>[];
|
||||||
|
json['invite_award_conf'].forEach((v) {
|
||||||
|
inviteAwardConf!.add(new InviteAwardConf.fromJson(v));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
inviteAwardCount = json['invite_award_count'];
|
||||||
|
inviteCode = json['invite_code'];
|
||||||
|
link = json['site_link'];
|
||||||
|
inviteCount = json['invite_count'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['achieve_count'] = this.achieveCount;
|
||||||
|
data['achieve_reward_day'] = this.achieveRewardDay;
|
||||||
|
data['diff_award_count'] = this.diffAwardCount;
|
||||||
|
if (this.inviteAwardConf != null) {
|
||||||
|
data['invite_award_conf'] =
|
||||||
|
this.inviteAwardConf!.map((v) => v.toJson()).toList();
|
||||||
|
}
|
||||||
|
data['invite_award_count'] = this.inviteAwardCount;
|
||||||
|
data['invite_code'] = this.inviteCode;
|
||||||
|
data['invite_count'] = this.inviteCount;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class InviteAwardConf {
|
||||||
|
int? achieveId;
|
||||||
|
int? inviteCount;
|
||||||
|
int? isAchieved;
|
||||||
|
double? rebateRate;
|
||||||
|
int? rewardDay;
|
||||||
|
|
||||||
|
InviteAwardConf(
|
||||||
|
{this.achieveId,
|
||||||
|
this.inviteCount,
|
||||||
|
this.isAchieved,
|
||||||
|
this.rebateRate,
|
||||||
|
this.rewardDay});
|
||||||
|
|
||||||
|
InviteAwardConf.fromJson(Map<String, dynamic> json) {
|
||||||
|
achieveId = json['achieve_id'];
|
||||||
|
inviteCount = json['invite_count'];
|
||||||
|
isAchieved = json['is_achieved'];
|
||||||
|
rebateRate = json['rebate_rate'];
|
||||||
|
rewardDay = json['reward_day'];
|
||||||
|
}
|
||||||
|
|
||||||
|
Map<String, dynamic> toJson() {
|
||||||
|
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||||
|
data['achieve_id'] = this.achieveId;
|
||||||
|
data['invite_count'] = this.inviteCount;
|
||||||
|
data['is_achieved'] = this.isAchieved;
|
||||||
|
data['rebate_rate'] = this.rebateRate;
|
||||||
|
data['reward_day'] = this.rewardDay;
|
||||||
|
return data;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
421
circle_app/lib/app/invite/share.dart
Normal file
@ -0,0 +1,421 @@
|
|||||||
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
|
import 'package:circle_app/app/minefragment/logic.dart';
|
||||||
|
import 'package:circle_app/util/util.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/rendering.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:get/get.dart';
|
||||||
|
import 'package:get/get_core/src/get_main.dart';
|
||||||
|
import 'package:image_gallery_saver/image_gallery_saver.dart';
|
||||||
|
import 'dart:ui' as ui;
|
||||||
|
|
||||||
|
import 'package:qr_flutter/qr_flutter.dart';
|
||||||
|
|
||||||
|
class Share extends StatefulWidget {
|
||||||
|
String code;
|
||||||
|
String link;
|
||||||
|
Share(this.code, this.link);
|
||||||
|
|
||||||
|
@override
|
||||||
|
State<Share> createState() => _ShareState();
|
||||||
|
}
|
||||||
|
|
||||||
|
class _ShareState extends State<Share> {
|
||||||
|
GlobalKey _globalKey = GlobalKey();
|
||||||
|
|
||||||
|
MinefragmentLogic logic = Get.find<MinefragmentLogic>();
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
// TODO: add widget build method
|
||||||
|
return Scaffold(
|
||||||
|
backgroundColor: Colors.transparent,
|
||||||
|
body: Container(
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Positioned(
|
||||||
|
top: 100.sp,
|
||||||
|
child: SingleChildScrollView(
|
||||||
|
child: RepaintBoundary(
|
||||||
|
key: _globalKey,
|
||||||
|
child: Container(
|
||||||
|
height: 514.sp,
|
||||||
|
width: Get.width - 40.sp,
|
||||||
|
// margin: EdgeInsets.only(left: 20.sp, right: 20.sp),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
image: DecorationImage(
|
||||||
|
image: AssetImage(getCircleImage("open_vip_bg")),
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: Get.width,
|
||||||
|
height: 65.sp,
|
||||||
|
margin: EdgeInsets.only(left: 15.sp, top: 20.sp),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Center(
|
||||||
|
child: Stack(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
width: 47.sp,
|
||||||
|
height: 47.sp,
|
||||||
|
decoration: const BoxDecoration(
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
gradient: LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFFDD3DF4),
|
||||||
|
Color(0xFF30FFD9)
|
||||||
|
],
|
||||||
|
begin: Alignment.topCenter,
|
||||||
|
end: Alignment.bottomCenter,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 46.sp,
|
||||||
|
height: 46.sp,
|
||||||
|
child: _buildAvatar1(logic),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.only(left: 10.sp),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
_buildNameRow(logic),
|
||||||
|
SizedBox(height: 10.sp),
|
||||||
|
_buildInfoRow(logic),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
getBaseImage("ic_launcher"),
|
||||||
|
width: 80.sp,
|
||||||
|
height: 80.sp,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
// color: Colors.red,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
SizedBox(
|
||||||
|
height: 20.sp,
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
getMineImage('share_title'),
|
||||||
|
height: 22.sp,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.sp,
|
||||||
|
),
|
||||||
|
Image.asset(
|
||||||
|
getMineImage('share_content_bg'),
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
Container(
|
||||||
|
height: 90.sp,
|
||||||
|
// color: Colors.yellow,
|
||||||
|
// width: Get.width-40.sp,
|
||||||
|
margin: EdgeInsets.only(bottom: 15.sp),
|
||||||
|
padding: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
||||||
|
child: Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
// color: Colors.red,
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment:
|
||||||
|
CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
|
// color: Colors.blue,
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
'专属邀请码',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 16.sp),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 8.sp,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
alignment: Alignment.center,
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
left: 10.sp, right: 10.sp),
|
||||||
|
height: 25.sp,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
// color: Color(0xFFDC5BFD),
|
||||||
|
gradient:
|
||||||
|
const LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color(0xFF0DF5F7),
|
||||||
|
Color(0xFFD263FB)
|
||||||
|
],
|
||||||
|
begin:
|
||||||
|
Alignment.centerLeft,
|
||||||
|
end:
|
||||||
|
Alignment.centerRight,
|
||||||
|
),
|
||||||
|
borderRadius:
|
||||||
|
BorderRadius.circular(
|
||||||
|
12.5.sp)),
|
||||||
|
child: Text(
|
||||||
|
widget.code,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 12.sp),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
|
width: Get.width - 200.sp,
|
||||||
|
child: Text(
|
||||||
|
'扫码或长按识别下载APP,认识更多小众圈子里的人,给生活带来更多乐趣~',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12.sp)),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
// Image.asset(getBaseImage("ic_launcher"),width: 80.sp,height: 80.sp,)
|
||||||
|
QrImageView(
|
||||||
|
data: widget.link,
|
||||||
|
padding: EdgeInsets.zero,
|
||||||
|
version: QrVersions.auto,
|
||||||
|
size: 80.sp,
|
||||||
|
gapless: false,
|
||||||
|
backgroundColor: Colors.white,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
Positioned(
|
||||||
|
bottom: 0,
|
||||||
|
child: SafeArea(
|
||||||
|
top: false,
|
||||||
|
child: Container(
|
||||||
|
height: 164.sp,
|
||||||
|
width: Get.width,
|
||||||
|
color: Color(0xFF292247),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Expanded(
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 15.sp, left: 15.sp, right: 15.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Row(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
shareAction('wx', '微信', () {}),
|
||||||
|
shareAction('wxq', '朋友圈', () {}),
|
||||||
|
shareAction('qq', 'QQ', () {
|
||||||
|
copyInviteText(logic.name);
|
||||||
|
}),
|
||||||
|
shareAction('wb', '微博', () {
|
||||||
|
copyInviteText(logic.name);
|
||||||
|
}),
|
||||||
|
shareAction('hb', '保存海报', () {
|
||||||
|
_saveLocalImage();
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)),
|
||||||
|
Container(
|
||||||
|
height: 1.sp,
|
||||||
|
color: Color(0x33FFFFFF),
|
||||||
|
),
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
Get.back();
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
height: 67.sp,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Text(
|
||||||
|
'取消',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white, fontSize: 14.sp),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
)))
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildAvatar1(MinefragmentLogic logic) {
|
||||||
|
return ClipOval(
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
if (logic.userInfoBean != null) {
|
||||||
|
var imgList = <String>[];
|
||||||
|
imgList.add(logic.userInfoBean!.avatar);
|
||||||
|
// Get.toNamed(AppRoutes.Swiper,arguments:imgList);
|
||||||
|
// Get.toNamed(AppRoutes.Swiper, arguments: {
|
||||||
|
// 'imaglist': imgList,
|
||||||
|
// 'index': 0
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: logic.userInfoBean == null
|
||||||
|
? SizedBox(
|
||||||
|
width: 63.sp,
|
||||||
|
height: 63.sp,
|
||||||
|
)
|
||||||
|
: CachedNetworkImage(
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
placeholder: null,
|
||||||
|
imageUrl: logic.avatar,
|
||||||
|
width: 63.sp,
|
||||||
|
height: 63.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildNameRow(MinefragmentLogic logic) {
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(top: 6.sp),
|
||||||
|
child: Row(
|
||||||
|
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
|
children: [
|
||||||
|
Text(
|
||||||
|
logic.name,
|
||||||
|
style: TextStyle(
|
||||||
|
color: const Color.fromRGBO(247, 250, 250, 1.0),
|
||||||
|
fontSize: 16.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
width: 4.sp,
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
borderRadius: BorderRadius.circular(17),
|
||||||
|
gradient: const LinearGradient(
|
||||||
|
colors: [
|
||||||
|
Color.fromRGBO(141, 255, 248, 1.0),
|
||||||
|
Color.fromRGBO(181, 211, 255, 1.0),
|
||||||
|
],
|
||||||
|
begin: Alignment.centerLeft,
|
||||||
|
end: Alignment.centerRight,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
padding: EdgeInsets.only(
|
||||||
|
top: 2.sp, bottom: 2.sp, left: 10.sp, right: 10.sp),
|
||||||
|
child: Text(
|
||||||
|
logic.ageMsg,
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.black,
|
||||||
|
fontSize: 10.sp,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Widget _buildInfoRow(MinefragmentLogic logic) {
|
||||||
|
return Row(
|
||||||
|
children: [
|
||||||
|
Text('邀请您加入',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Colors.white,
|
||||||
|
fontSize: 12.sp,
|
||||||
|
)),
|
||||||
|
Text('【微乐园APP】',
|
||||||
|
style: TextStyle(
|
||||||
|
color: Color(0xFF0DF5F7),
|
||||||
|
fontSize: 12.sp,
|
||||||
|
)),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
shareAction(String img, String name, GestureTapCallback onTap) {
|
||||||
|
return GestureDetector(
|
||||||
|
onTap: onTap,
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Image.asset(
|
||||||
|
getMineImage(img),
|
||||||
|
width: 40.sp,
|
||||||
|
),
|
||||||
|
SizedBox(
|
||||||
|
height: 10.sp,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
name,
|
||||||
|
style: TextStyle(color: Colors.white, fontSize: 12.sp),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
_saveLocalImage() async {
|
||||||
|
RenderRepaintBoundary boundary =
|
||||||
|
_globalKey.currentContext!.findRenderObject() as RenderRepaintBoundary;
|
||||||
|
ui.Image image = await boundary.toImage(pixelRatio: ui.window.devicePixelRatio);
|
||||||
|
ByteData? byteData =
|
||||||
|
await (image.toByteData(format: ui.ImageByteFormat.png));
|
||||||
|
if (byteData != null) {
|
||||||
|
final result =
|
||||||
|
await ImageGallerySaver.saveImage(byteData.buffer.asUint8List());
|
||||||
|
print(result);
|
||||||
|
// isSuccess
|
||||||
|
if (result['isSuccess']) {
|
||||||
|
showOKToast('保存成功');
|
||||||
|
} else {
|
||||||
|
showOKToast('保存失败,请检查相册权限是否开启');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
copyInviteText(
|
||||||
|
String username,
|
||||||
|
) {
|
||||||
|
Clipboard.setData(ClipboardData(
|
||||||
|
text: '【${username}】邀请你加入“微乐园”,邀请码为${widget.code},点击进入${widget.link}'));
|
||||||
|
showOKToast('您已成功复制分享链接,前往对应平台粘贴发送即可~');
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
import 'package:circle_app/app/invite/share.dart';
|
||||||
import 'package:circle_app/app/swiper/view.dart';
|
import 'package:circle_app/app/swiper/view.dart';
|
||||||
import 'package:circle_app/common/Widgets/rich_text.dart';
|
import 'package:circle_app/common/Widgets/rich_text.dart';
|
||||||
import 'package:circle_app/components/my_app_bar.dart';
|
import 'package:circle_app/components/my_app_bar.dart';
|
||||||
@ -14,7 +16,9 @@ class InvitePage extends StatelessWidget {
|
|||||||
InvitePage({Key? key}) : super(key: key);
|
InvitePage({Key? key}) : super(key: key);
|
||||||
|
|
||||||
final logic = Get.find<InviteLogic>();
|
final logic = Get.find<InviteLogic>();
|
||||||
final state = Get.find<InviteLogic>().state;
|
final state = Get
|
||||||
|
.find<InviteLogic>()
|
||||||
|
.state;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
@ -28,31 +32,77 @@ class InvitePage extends StatelessWidget {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
backgroundColor: Colors.transparent,
|
||||||
appBar: MyAppBar(
|
appBar: MyAppBar(
|
||||||
centerTitle: "邀请有奖",
|
centerTitle: "邀请得会员",
|
||||||
actionWdiget: Container(
|
actionWdiget: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
height: 22.sp,
|
height: 22.sp,
|
||||||
width: 62.sp,
|
width: 62.sp,
|
||||||
decoration: BoxDecoration(
|
child: Image.asset(getMineImage('invite_right_icon'),
|
||||||
color: Color(0xffD739EA),
|
|
||||||
borderRadius: BorderRadius.circular(31.sp)),
|
|
||||||
child: Text(
|
|
||||||
'邀请攻略',
|
|
||||||
style: TextStyle(color: Colors.white, fontSize: 11.sp),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
body: SingleChildScrollView(
|
body: GetBuilder<InviteLogic>(builder: (logic) {
|
||||||
|
List<Widget> peopleCountList = [];
|
||||||
|
List<Widget> dayCountList = [];
|
||||||
|
List<TextSpan> allSpan = [];
|
||||||
|
if (logic.isLoad == false) {
|
||||||
|
logic.homeData!.inviteAwardConf!.forEach((element) {
|
||||||
|
peopleCountList.add(peopleCountWidget('${element!.inviteCount! ?? '0'}',(element!.inviteCount! ?? 0) <= logic.homeData!.inviteCount!));
|
||||||
|
|
||||||
|
if ((element.rewardDay! ?? 0) > 365) {
|
||||||
|
dayCountList.add(timeWidget('${(element.rewardDay! / 365).toInt()}年'));
|
||||||
|
} else {
|
||||||
|
dayCountList.add(timeWidget('${element.rewardDay!}天'));
|
||||||
|
}
|
||||||
|
// timeWidget(
|
||||||
|
// '+30天',
|
||||||
|
// ),
|
||||||
|
|
||||||
|
});
|
||||||
|
getTextSpanList(
|
||||||
|
'Tip:您已成功邀请 ${logic.homeData!.inviteCount! ?? 0}位同好,免费获得会员${logic.homeData!.achieveRewardDay! ?? '0'}天, 再邀请${logic.homeData!.diffAwardCount}位同友可领取更多奖励~',
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
12.sp,
|
||||||
|
searchContent: 'Tip:');
|
||||||
|
|
||||||
|
allSpan.addAll(getTextSpanList(
|
||||||
|
'Tip:您已成功邀请',
|
||||||
|
Color(0xFF0DF5F7),
|
||||||
|
12.sp,
|
||||||
|
searchContent: 'Tip:'));
|
||||||
|
allSpan.addAll(getTextSpanList(
|
||||||
|
' ${logic.homeData!.inviteCount! ?? 0} 位同好,',
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
12.sp,
|
||||||
|
searchContent: '${logic.homeData!.inviteCount! ?? 0}'));
|
||||||
|
allSpan.addAll(getTextSpanList(
|
||||||
|
'免费获得会员 ${logic.homeData!.achieveRewardDay! ?? '0'} 天,',
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
12.sp,
|
||||||
|
searchContent: '${logic.homeData!.achieveRewardDay! ?? '0'} '));
|
||||||
|
allSpan.addAll(getTextSpanList(
|
||||||
|
' 再邀请 ${logic.homeData!.diffAwardCount} 位同友可领取更多奖励~',
|
||||||
|
Color(0xFFDC5BFD),
|
||||||
|
12.sp,
|
||||||
|
searchContent: '${logic.homeData!.diffAwardCount}'));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return logic.isLoad ? loaddingWidget(true) : SingleChildScrollView(
|
||||||
child: Column(children: [
|
child: Column(children: [
|
||||||
Container(
|
Container(
|
||||||
height: 203.sp,
|
height: 203.sp,
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
left: 20.sp,
|
left: 20.sp,
|
||||||
right: 20.sp,
|
right: 20.sp,
|
||||||
|
top: 10.sp
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(10.sp),
|
image: DecorationImage(
|
||||||
color: Color(0x1AFFFFFF),
|
image: AssetImage(getCircleImage("pic_bg")),
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
@ -76,76 +126,56 @@ class InvitePage extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
height: 29.sp,
|
|
||||||
width: 76.sp,
|
width: 84.sp,
|
||||||
decoration: BoxDecoration(
|
|
||||||
border: Border.all(
|
child: Image.asset(getMineImage('add_code_icon')),
|
||||||
color: Color(0xffD739EA), width: 1.sp),
|
|
||||||
borderRadius: BorderRadius.circular(14.5.sp)),
|
|
||||||
child: Text(
|
|
||||||
'填码对接',
|
|
||||||
style: TextStyle(
|
|
||||||
color: Color(0xffD739EA), fontSize: 12.sp),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(top: 40.sp),
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(child: Container()),
|
SizedBox(width: 20.sp,),
|
||||||
Semantics(
|
Text(
|
||||||
namesRoute: true,
|
logic.homeData!.inviteCode! ?? '',
|
||||||
header: true,
|
|
||||||
child: ShaderMask(
|
|
||||||
shaderCallback: (Rect bounds) {
|
|
||||||
return const LinearGradient(
|
|
||||||
begin: Alignment(0.0, -1.0),
|
|
||||||
end: Alignment.bottomCenter,
|
|
||||||
colors: [
|
|
||||||
Color(0xff71F3F2),
|
|
||||||
Color(0xffF657FF)
|
|
||||||
],
|
|
||||||
).createShader(Offset.zero & bounds.size);
|
|
||||||
},
|
|
||||||
child: Text(
|
|
||||||
'F2324424',
|
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontSize: 30.sp,
|
fontSize: 30.sp,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
color: Colors.white,
|
color: Color(0xffF657FF)
|
||||||
shadows: [
|
),
|
||||||
Shadow(
|
|
||||||
color: Color(0xffF657FF),
|
|
||||||
offset: Offset(0.0, -1))
|
|
||||||
]),
|
|
||||||
),
|
),
|
||||||
)),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 4.sp,
|
width: 4.sp,
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Clipboard.setData(
|
Clipboard.setData(
|
||||||
ClipboardData(text: '复制到剪切板'));
|
ClipboardData(text: logic.homeData!.inviteCode! ?? ''));
|
||||||
showOKToast('复制成功');
|
showOKToast('复制成功');
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'复制',
|
'复制',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xB3FFFFFF), fontSize: 14.sp),
|
color: Color(0xff0DF5F7),
|
||||||
|
fontSize: 14.sp),
|
||||||
)),
|
)),
|
||||||
Expanded(child: Container())
|
Expanded(child: Container())
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
GestureDetector(
|
||||||
width: 224.sp,
|
onTap: () {
|
||||||
|
shopSharePiker(logic.homeData!.inviteCode! ?? '',(logic.homeData!.link! ?? '') +
|
||||||
|
'?code=${logic.homeData!.inviteCode! ?? ''}');
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 174.sp,
|
||||||
height: 42.sp,
|
height: 42.sp,
|
||||||
margin: EdgeInsets.only(top: 15.sp),
|
margin: EdgeInsets.only(top: 35.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(21.sp),
|
borderRadius: BorderRadius.circular(21.sp),
|
||||||
gradient: const LinearGradient(
|
gradient: const LinearGradient(
|
||||||
@ -158,39 +188,46 @@ class InvitePage extends StatelessWidget {
|
|||||||
child: Text(
|
child: Text(
|
||||||
'立即邀请',
|
'立即邀请',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white,
|
color: Color(0xFF000000),
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w600),
|
fontWeight: FontWeight.w600),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 40.sp,
|
height: 62.sp,
|
||||||
margin: EdgeInsets.only(left: 20.sp, right: 20.sp, top: 30.sp),
|
margin: EdgeInsets.only(
|
||||||
|
left: 20.sp, right: 20.sp, top: 15.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Color(0x1AFFFFFF),
|
image: DecorationImage(
|
||||||
borderRadius: BorderRadius.circular(10.sp)),
|
image: AssetImage(getMineImage("invite_sys_bg")),
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
),
|
||||||
|
),
|
||||||
child: Swiper(
|
child: Swiper(
|
||||||
physics: NeverScrollableScrollPhysics(),
|
physics: NeverScrollableScrollPhysics(),
|
||||||
autoplay: true,
|
autoplay: true,
|
||||||
// controller: 5,
|
// controller: 5,
|
||||||
index: 0,
|
index: 0,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
|
Map data = logic.sysData[index];
|
||||||
return Container(
|
return Container(
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'哟刚说A',
|
data['inviter_name'],
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFFDC5BFD),
|
color: Color(0xff0DF5F7),
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
fontWeight: FontWeight.w500),
|
fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(left: 5.sp, right: 5.sp),
|
margin: EdgeInsets.only(
|
||||||
|
left: 5.sp, right: 5.sp),
|
||||||
child: Text(
|
child: Text(
|
||||||
'邀请',
|
'邀请',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@ -199,9 +236,9 @@ class InvitePage extends StatelessWidget {
|
|||||||
fontWeight: FontWeight.w500),
|
fontWeight: FontWeight.w500),
|
||||||
)),
|
)),
|
||||||
Text(
|
Text(
|
||||||
'扥扥',
|
data['invitee_name'],
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFFDC5BFD),
|
color: Color(0xff0DF5F7),
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
fontWeight: FontWeight.w500),
|
fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
@ -218,28 +255,43 @@ class InvitePage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
itemCount: 5,
|
itemCount: logic.sysData.length,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
height: 203.sp,
|
height: 220.sp,
|
||||||
|
width: Get.width-30.sp,
|
||||||
margin:
|
margin:
|
||||||
EdgeInsets.only(left: 20.sp, right: 20.sp, top: 20.sp),
|
EdgeInsets.only(top: 15.sp),
|
||||||
|
padding: EdgeInsets.only(top: 10.sp,bottom: 10.sp,left: 10.sp,right: 10.sp),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(10.sp),
|
image:DecorationImage(
|
||||||
color: Color(0x1AFFFFFF),
|
image: AssetImage(getMineImage("invite_count_bg")),
|
||||||
|
fit: BoxFit.fill,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
height: 80.sp,
|
margin: EdgeInsets.only(top: 15.sp),
|
||||||
margin: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
alignment: Alignment.center,
|
||||||
|
child: Image.asset(getMineImage('invite_title'),width: 256.sp,),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 10.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Image.asset(getMineImage('invite_line'),width: 328.sp,),
|
||||||
|
),
|
||||||
|
Container(
|
||||||
|
height: 70.sp,
|
||||||
|
margin: EdgeInsets.only(
|
||||||
|
left: 15.sp, right: 15.sp),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'邀请人数',
|
'邀请人数',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFFDC5BFD),
|
color: Color(0xFF0DF5F7),
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
fontWeight: FontWeight.w500),
|
fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
@ -252,19 +304,15 @@ class InvitePage extends StatelessWidget {
|
|||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
left: 61.sp, right: 46.sp),
|
left: 61.sp, right: 46.sp),
|
||||||
height: 2.sp,
|
height: 2.sp,
|
||||||
color: Color(0xFFDC5BFD).withOpacity(0.4),
|
color: Color(0xFF0DF5F7),
|
||||||
),
|
),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(left: 15.sp),
|
margin: EdgeInsets.only(
|
||||||
|
left: 15.sp),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children:peopleCountList,
|
||||||
peopleCountWidget('20', true),
|
|
||||||
peopleCountWidget('50', true),
|
|
||||||
peopleCountWidget('100', true),
|
|
||||||
peopleCountWidget('500', true),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
@ -272,14 +320,15 @@ class InvitePage extends StatelessWidget {
|
|||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
Container(
|
Container(
|
||||||
height: 80.sp,
|
height: 20.sp,
|
||||||
margin: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
margin: EdgeInsets.only(
|
||||||
|
left: 15.sp, right: 15.sp),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'会员时长',
|
'会员时长',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Color(0xFFDC5BFD),
|
color: Color(0xFF0DF5F7),
|
||||||
fontSize: 14.sp,
|
fontSize: 14.sp,
|
||||||
fontWeight: FontWeight.w500),
|
fontWeight: FontWeight.w500),
|
||||||
),
|
),
|
||||||
@ -290,42 +339,34 @@ class InvitePage extends StatelessWidget {
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(
|
margin: EdgeInsets.only(
|
||||||
left: 20.sp, right: 10.sp),
|
left: 25.sp, right: 15.sp),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
MainAxisAlignment.spaceBetween,
|
MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: dayCountList
|
||||||
timeWidget(
|
|
||||||
'+30天',
|
|
||||||
),
|
|
||||||
timeWidget(
|
|
||||||
'+100天',
|
|
||||||
),
|
|
||||||
timeWidget(
|
|
||||||
'+365天',
|
|
||||||
),
|
|
||||||
timeWidget(
|
|
||||||
'+3年',
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
|
Expanded(child: Container()),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(left: 15.sp, right: 15.sp),
|
margin: EdgeInsets.only(
|
||||||
|
left: 15.sp, right: 15.sp,bottom: 20.sp),
|
||||||
child: RichText(
|
child: RichText(
|
||||||
text: TextSpan(
|
text: TextSpan(
|
||||||
children: getTextSpanList(
|
children: allSpan
|
||||||
'Tip:您已成功邀请 19位同好,免费获得会员120天, 再邀请1位同友可领取更多奖励~',
|
|
||||||
Color(0xFFDC5BFD),
|
|
||||||
14.sp,
|
|
||||||
searchContent: 'Tip:'),
|
|
||||||
)))
|
)))
|
||||||
],
|
],
|
||||||
)),
|
)),
|
||||||
|
SafeArea(
|
||||||
|
child: Container(
|
||||||
|
margin: EdgeInsets.only(top: 15.sp),
|
||||||
|
alignment: Alignment.center,
|
||||||
|
child: Image.asset(getMineImage('invite_vip_desc'),width: Get.width-30.sp,),
|
||||||
|
),
|
||||||
|
),
|
||||||
// Container(
|
// Container(
|
||||||
// height: 203.sp,
|
// height: 203.sp,
|
||||||
// margin:
|
// margin:
|
||||||
@ -369,7 +410,8 @@ class InvitePage extends StatelessWidget {
|
|||||||
// itemCount: 5,
|
// itemCount: 5,
|
||||||
// ))
|
// ))
|
||||||
// ])),
|
// ])),
|
||||||
]))));
|
]));
|
||||||
|
})));
|
||||||
}
|
}
|
||||||
|
|
||||||
peopleCountWidget(String count, bool isCheck) {
|
peopleCountWidget(String count, bool isCheck) {
|
||||||
@ -378,10 +420,10 @@ class InvitePage extends StatelessWidget {
|
|||||||
height: 46.sp,
|
height: 46.sp,
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
decoration:
|
decoration:
|
||||||
BoxDecoration(color: Color(0xFFDC5BFD), shape: BoxShape.circle),
|
BoxDecoration(color: isCheck ? Color(0xFF0DF5F7) : Color(0xFF504261), shape: BoxShape.circle),
|
||||||
child: Text(
|
child: Text(
|
||||||
'$count人',
|
'$count人',
|
||||||
style: TextStyle(color: Colors.white, fontSize: 12.sp),
|
style: TextStyle(color:isCheck ? Color(0xFF000000) : Colors.white, fontSize: 12.sp),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -392,6 +434,13 @@ class InvitePage extends StatelessWidget {
|
|||||||
style: TextStyle(color: Colors.white, fontSize: 12.sp),
|
style: TextStyle(color: Colors.white, fontSize: 12.sp),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void shopSharePiker(String code,String link) {
|
||||||
|
Get.bottomSheet(
|
||||||
|
Share(code,link), isScrollControlled: true,
|
||||||
|
enableDrag: false
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void showCodePicker(InviteLogic logic) {
|
void showCodePicker(InviteLogic logic) {
|
||||||
@ -450,7 +499,8 @@ void showCodePicker(InviteLogic logic) {
|
|||||||
),
|
),
|
||||||
Expanded(child: Container()),
|
Expanded(child: Container()),
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(left: 40.sp,right: 40.sp,bottom: 20.sp),
|
margin: EdgeInsets.only(
|
||||||
|
left: 40.sp, right: 40.sp, bottom: 20.sp),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
@ -467,12 +517,20 @@ void showCodePicker(InviteLogic logic) {
|
|||||||
color: Color(0x1AFFFFFF)),
|
color: Color(0x1AFFFFFF)),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'放弃对接',
|
'放弃对接',
|
||||||
style: TextStyle(color: Colors.white, fontSize: 16),
|
style: TextStyle(
|
||||||
|
color: Colors.white, fontSize: 16),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () {},
|
onTap: () {
|
||||||
|
if (logic.codeEditingController.text.isEmpty) {
|
||||||
|
showOKToast('请输入邀请码');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
Get.back();
|
||||||
|
logic.addCode(logic.codeEditingController.text);
|
||||||
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
alignment: Alignment.center,
|
alignment: Alignment.center,
|
||||||
width: 114.sp,
|
width: 114.sp,
|
||||||
@ -488,7 +546,7 @@ void showCodePicker(InviteLogic logic) {
|
|||||||
child: const Text(
|
child: const Text(
|
||||||
'确认对接',
|
'确认对接',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: Colors.white, fontSize: 16),
|
color: Colors.black, fontSize: 16),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -80,7 +80,7 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
|
|
||||||
Widget _circleLiveView(MinefragmentLogic logic) {
|
Widget _circleLiveView(MinefragmentLogic logic) {
|
||||||
return Column(
|
return Column(
|
||||||
children: [_circleItemView(logic), _helpItemView(), _invienItemView(), _setUpItemView()],
|
children: [_circleItemView(logic), _invienItemView(), _helpItemView(),_setUpItemView()],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Image(
|
Image(
|
||||||
image: AssetImage(getHomeImage("mine_help")),
|
image: AssetImage(getMineImage("invite_icon")),
|
||||||
width: 24.sp,
|
width: 24.sp,
|
||||||
height: 24.sp,
|
height: 24.sp,
|
||||||
),
|
),
|
||||||
@ -203,7 +203,7 @@ class MinefragmentPage extends StatelessWidget {
|
|||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
const Text(
|
const Text(
|
||||||
"免费领领会员",
|
"免费领取会员",
|
||||||
style: TextStyle(color: Colors.white60),
|
style: TextStyle(color: Colors.white60),
|
||||||
),
|
),
|
||||||
Image(
|
Image(
|
||||||
|
|||||||
@ -246,4 +246,15 @@ class Api {
|
|||||||
//苹果支付
|
//苹果支付
|
||||||
static const applePayCallBack = 'mall-service/payment/apple/notify';
|
static const applePayCallBack = 'mall-service/payment/apple/notify';
|
||||||
|
|
||||||
|
//邀请好友主页
|
||||||
|
static const inviteMainPage = 'user-service/invite/mainPage';
|
||||||
|
|
||||||
|
//系统随机的邀请记录
|
||||||
|
static const inviteSysRecord = 'user-service/invite/record/rand';
|
||||||
|
|
||||||
|
//填写邀请码
|
||||||
|
static const inviteFillIn = 'user-service/invite/fillin';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -100,8 +100,12 @@ dependencies:
|
|||||||
tencent_chat_push_for_china: ^2.6.2+1
|
tencent_chat_push_for_china: ^2.6.2+1
|
||||||
#苹果内购
|
#苹果内购
|
||||||
in_app_purchase: ^3.0.8
|
in_app_purchase: ^3.0.8
|
||||||
|
#图片保存到相册
|
||||||
|
image_gallery_saver: ^1.7.1
|
||||||
|
#二维码生成
|
||||||
|
qr_flutter: ^4.0.0
|
||||||
#第三方分享平台
|
#第三方分享平台
|
||||||
sharesdk_plugin: ^1.3.6
|
# sharesdk_plugin: 1.3.6
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||