我的团队成员微信号复制

master
laiiihz 5 years ago
parent 1f9c842a34
commit 206d33605d

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

@ -123,6 +123,7 @@ class _MyGroupPageState extends State<MyGroupPage> {
return SizedBox();
}
return UserGroupCard(
isRecommend: model.isRecommand,
id: model.userId,
name: model.nickname,
groupCount: model.count,

@ -380,6 +380,7 @@ class _UserBenefitSubPageState extends State<UserBenefitSubPage> {
bool hasExtraName = TextUtil.isEmpty(e.remarkName);
return UserGroupCard(
id: e.userId,
isRecommend: false,
shopRole: UserLevelTool.roleLevelEnum(e.roleLevel),
wechatId: e.wechatNo ?? '',
name: '${e.nickname}${hasExtraName ? '' : e.remarkName}',

@ -78,6 +78,13 @@ class _UserGroupCardState extends State<UserGroupCard> {
headImg: widget.headImg,
role: widget.shopRole,
nickName: widget.name,
phone: widget.phone,
wechat: widget.wechatId,
//TODO
comment: '',
//TODO
signDate: DateTime.now(),
diamondDate: DateTime.now(),
)),
child: VxBox(
child: [
@ -102,100 +109,103 @@ class _UserGroupCardState extends State<UserGroupCard> {
width: 12.w,
),
Spacer(),
GestureDetector(
onTap: () async {
bool result = await showDialog(
context: context,
child: NormalContentDialog(
title: '推荐提示',
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
'确定推荐${widget.name}为钻石店铺么 '
.text
.size(15.sp)
.color(Color(0xFF333333))
.center
.make(),
'确认提拔后您将获得被推荐团队销售额提成比例的3%增加到4%'
.text
.center
.size(12.sp)
.color(Color(0xFF666666))
.make(),
],
),
items: ['放弃', '确定'],
listener: (index) async {
switch (index) {
case 0:
Navigator.pop(context, false);
break;
case 1:
GSDialog.of(context)
.showLoadingDialog(context, '推荐中');
await HttpManager.post(
APIV2.userAPI.recommendDiamond,
{'userId': widget.id},
);
GSDialog.of(context).dismiss(context);
Navigator.pop(context, true);
break;
}
},
));
if (result) {
showDialog(
context: context,
child: Center(
child: GestureDetector(
onTap: () => Navigator.pop(context),
child: Material(
color: Colors.transparent,
child: Stack(
children: [
Image.asset(
R.ASSETS_USER_GROUP_RECOMMEND_BG_PNG,
height: 306.w,
width: 344.w,
),
Positioned(
left: 0,
right: 0,
top: 62.w,
child:
'恭喜! ${UserManager.instance.user.info.nickname}'
.text
.white
.size(16.sp)
.make()
.centered(),
),
Positioned(
left: 60.w,
right: 60.w,
top: 111.w,
child: '您从${widget.name}团队销售额获得提成比例将增至4%'
widget.isRecommend ?? false
? GestureDetector(
onTap: () async {
bool result = await showDialog(
context: context,
child: NormalContentDialog(
title: '推荐提示',
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
'确定推荐${widget.name}为钻石店铺么 '
.text
.size(15.sp)
.color(Color(0xFF333333))
.size(16.sp)
.make()
.centered(),
.center
.make(),
'确认提拔后您将获得被推荐团队销售额提成比例的3%增加到4%'
.text
.center
.size(12.sp)
.color(Color(0xFF666666))
.make(),
],
),
items: ['放弃', '确定'],
listener: (index) async {
switch (index) {
case 0:
Navigator.pop(context, false);
break;
case 1:
GSDialog.of(context)
.showLoadingDialog(context, '推荐中');
await HttpManager.post(
APIV2.userAPI.recommendDiamond,
{'userId': widget.id},
);
GSDialog.of(context).dismiss(context);
Navigator.pop(context, true);
break;
}
},
));
if (result) {
showDialog(
context: context,
child: Center(
child: GestureDetector(
onTap: () => Navigator.pop(context),
child: Material(
color: Colors.transparent,
child: Stack(
children: [
Image.asset(
R.ASSETS_USER_GROUP_RECOMMEND_BG_PNG,
height: 306.w,
width: 344.w,
),
Positioned(
left: 0,
right: 0,
top: 62.w,
child:
'恭喜! ${UserManager.instance.user.info.nickname}'
.text
.white
.size(16.sp)
.make()
.centered(),
),
Positioned(
left: 60.w,
right: 60.w,
top: 111.w,
child:
'您从${widget.name}团队销售额获得提成比例将增至4%'
.text
.color(Color(0xFF333333))
.size(16.sp)
.make()
.centered(),
),
],
),
),
],
),
),
),
),
);
}
},
child: Image.asset(
R.ASSETS_USER_USER_RECOMMEND_PNG,
height: 17.w,
),
);
}
},
child: Image.asset(
R.ASSETS_USER_USER_RECOMMEND_PNG,
height: 17.w,
),
),
)
: SizedBox(),
].row(),
onTap: () {},
),

@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:recook/constants/api.dart';
import 'package:recook/constants/api_v2.dart';
import 'package:recook/utils/user_level_tool.dart';
@ -51,7 +52,7 @@ class _UserGroupCardDetailPageState extends State<UserGroupCardDetailPage> {
trailing ?? SizedBox(),
15.wb,
],
);
).material(color: Colors.white);
}
@override
@ -61,18 +62,87 @@ class _UserGroupCardDetailPageState extends State<UserGroupCardDetailPage> {
red: true,
body: ListView(
children: [
_buildTile(
title: '头像',
suffix: ClipRRect(
borderRadius: BorderRadius.circular(22.w),
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_PLACEHOLDER_NEW_1X1_A_PNG,
image: Api.getImgUrl(widget.headImg),
height: 44.w,
width: 44.w,
...[
_buildTile(
title: '头像',
suffix: ClipRRect(
borderRadius: BorderRadius.circular(22.w),
child: FadeInImage.assetNetwork(
placeholder: R.ASSETS_PLACEHOLDER_NEW_1X1_A_PNG,
image: Api.getImgUrl(widget.headImg),
height: 44.w,
width: 44.w,
),
),
),
),
_buildTile(
title: '角色',
suffix: Container(
padding: EdgeInsets.symmetric(horizontal: 6.w, vertical: 4.w),
decoration: BoxDecoration(
color: Color(0xFFF5CA88),
borderRadius: BorderRadius.circular(20.w),
),
child: [
Image.asset(
UserLevelTool.getRoleLevelIcon(widget.role),
width: 12.w,
height: 12.w,
color: Color(0xFFC47F53),
),
UserLevelTool.roleLevelWithEnum(widget.role)
.text
.size(10.sp)
.color(Color(0xFFC47F53))
.make(),
].row(),
),
),
_buildTile(
title: '昵称',
suffix: (widget.nickName ?? '').text.make(),
),
_buildTile(
title: '备注',
suffix: (widget.comment ?? '').text.make(),
),
].sepWidget(
separate: Divider(
height: 1.w,
thickness: 1.w,
color: Color(0xFFE6E6E6),
indent: 15.w,
endIndent: 15.w,
)),
10.hb,
...[
_buildTile(
title: '手机号',
suffix: (widget.phone ?? '').text.make(),
),
_buildTile(
title: '微信号',
suffix: (widget.wechat ?? '').text.make(),
trailing: GestureDetector(
onTap: () {
Clipboard.setData(ClipboardData(text: widget.wechat ?? ''));
GSDialog.of(context).showSuccess(context, '复制成功');
},
child: Image.asset(
R.ASSETS_USER_COPY_PNG,
height: 18.w,
width: 18.w,
),
),
),
].sepWidget(
separate: Divider(
height: 1.w,
thickness: 1.w,
color: Color(0xFFE6E6E6),
indent: 15.w,
endIndent: 15.w,
)),
],
),
);

Loading…
Cancel
Save