Browse Source

调整vip布局

ios
王子贤 3 months ago
parent
commit
b46099dc9d
1 changed files with 133 additions and 115 deletions
  1. 248
      lib/pages/mine/vip_page.dart

248
lib/pages/mine/vip_page.dart

@ -147,7 +147,7 @@ class _VipPageState extends State<VipPage> {
)
],
),
SizedBox(height: 29.w,),
SizedBox(height: 22.w,),
Text(
"开通 趣恋恋vip 畅享尊贵特权~",
style: TextStyle(
@ -168,14 +168,16 @@ class _VipPageState extends State<VipPage> {
],
),
),
),
Positioned(
top: 260.w,
top: 250.w,
left: 0,
child: Material(
child: Container(
width: 375.w,
height: 821.h - 270.w,
height: 821.h - 270.w - 90.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.vertical(
top: Radius.circular(18.w)
@ -240,7 +242,7 @@ class _VipPageState extends State<VipPage> {
)
],
),
SizedBox(height: 25.w,),
SizedBox(height: 5.w,),
Row(
children: [
Text(
@ -329,126 +331,142 @@ class _VipPageState extends State<VipPage> {
),
),
Row(
children: [
Container(
width: 86.w,
height: 30.w,
padding: EdgeInsets.symmetric(
horizontal: 9.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(30.w)),
border: Border.all(
width: 1,
color: Color.fromRGBO(117, 98, 249, payActive == 0 ? 1 : 0)),
color: payActive == 0 ?
const Color.fromRGBO(117, 98, 249, .07) :
const Color.fromRGBO(247, 247, 247, 1)
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset(
Assets.imagesWechatPay,
width: 17.w,
),
Text(
"微信支付",
style: TextStyle(
fontSize: 11.w,
fontWeight: FontWeight.w500
),
)
],
),
).onTap((){
payActive = 0;
setState(() {
});
}),
Container(
width: 80.w,
height: 30.w,
padding: EdgeInsets.symmetric(
horizontal: 12.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(30.w)),
border: Border.all(
width: 1,
color: Color.fromRGBO(117, 98, 249, payActive == 1 ? 1 : 0)),
color: payActive == 1 ?
const Color.fromRGBO(117, 98, 249, .07) :
const Color.fromRGBO(247, 247, 247, 1)
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset(
Assets.imagesAliPay,
width: 17.w,
),
Text(
"支付宝",
style: TextStyle(
fontSize: 11.w,
fontWeight: FontWeight.w500
),
)
],
],
),
),
),
),
),
),
Positioned(
bottom: 0,
left: 0,
child: Container(
width: 375.w,
height: 90.w,
padding: EdgeInsets.symmetric(
horizontal: 13.w
),
child: Column(
children: [
Row(
children: [
Container(
width: 86.w,
height: 30.w,
padding: EdgeInsets.symmetric(
horizontal: 9.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(30.w)),
border: Border.all(
width: 1,
color: Color.fromRGBO(117, 98, 249, payActive == 0 ? 1 : 0)),
color: payActive == 0 ?
const Color.fromRGBO(117, 98, 249, .07) :
const Color.fromRGBO(247, 247, 247, 1)
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset(
Assets.imagesWechatPay,
width: 17.w,
),
Text(
"微信支付",
style: TextStyle(
fontSize: 11.w,
fontWeight: FontWeight.w500
),
).onTap((){
payActive = 1;
setState(() {
});
}),
)
],
),
SizedBox(height: 10.w,),
Container(
width: 350.w,
height: 45.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(45.w)),
gradient: LinearGradient(
begin: Alignment.centerLeft, // 90deg:
end: Alignment.centerRight,
colors: [
Color.fromRGBO(131, 89, 255, 1), //
Color.fromRGBO(77, 127, 231, 1), //
Color.fromRGBO(61, 138, 224, 1), //
],
stops: [0.0, 0.7753, 1.0], // 0%77.53%100%
).onTap((){
payActive = 0;
setState(() {
});
}),
Container(
width: 80.w,
height: 30.w,
padding: EdgeInsets.symmetric(
horizontal: 12.w
),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(30.w)),
border: Border.all(
width: 1,
color: Color.fromRGBO(117, 98, 249, payActive == 1 ? 1 : 0)),
color: payActive == 1 ?
const Color.fromRGBO(117, 98, 249, .07) :
const Color.fromRGBO(247, 247, 247, 1)
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Image.asset(
Assets.imagesAliPay,
width: 17.w,
),
),
child: Center(
child: Text(
"立即开通",
Text(
"支付宝",
style: TextStyle(
fontSize: 18.w,
color: Colors.white,
fontSize: 11.w,
fontWeight: FontWeight.w500
),
),
),
).onTap(() async {
if(payActive == 1){
var e = await launchUrlString("alipays://platformapi/startapp?appId=20000067&url=https://www.baidu.com");
} else {
fluwx.open(target: MiniProgram(
username: 'gh_9ea8d46add6f',
miniProgramType: WXMiniProgramType.preview,
path:"pages/index/index"
));
}
})
],
),
)
],
),
).onTap((){
payActive = 1;
setState(() {
});
}),
],
),
),
SizedBox(height: 10.w,),
Container(
width: 350.w,
height: 45.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(45.w)),
gradient: LinearGradient(
begin: Alignment.centerLeft, // 90deg:
end: Alignment.centerRight,
colors: [
Color.fromRGBO(131, 89, 255, 1), //
Color.fromRGBO(77, 127, 231, 1), //
Color.fromRGBO(61, 138, 224, 1), //
],
stops: [0.0, 0.7753, 1.0], // 0%77.53%100%
),
),
child: Center(
child: Text(
"立即开通",
style: TextStyle(
fontSize: 18.w,
color: Colors.white,
fontWeight: FontWeight.w500
),
),
),
).onTap(() async {
if(payActive == 1){
var e = await launchUrlString("alipays://platformapi/startapp?appId=20000067&url=https://www.baidu.com");
} else {
fluwx.open(target: MiniProgram(
username: 'gh_9ea8d46add6f',
miniProgramType: WXMiniProgramType.preview,
path:"pages/index/index"
));
}
})
],
),
),
)

Loading…
Cancel
Save