|
|
@@ -27,7 +27,6 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
|
|
|
|
|
|
import 'advertising_page/advertising_page.dart';
|
|
|
import 'bind_alipay_page/bind_alipay_page.dart';
|
|
|
-import 'bind_alipay_page/set_alipay_page.dart';
|
|
|
import 'coupon_page/coupon_page.dart';
|
|
|
import 'my_information_page/my_qr_page.dart';
|
|
|
|
|
|
@@ -45,9 +44,7 @@ class _MinePageState extends State<MinePage> {
|
|
|
setState(() {});
|
|
|
});
|
|
|
EventBus().on('appStoreReview', (arg) {
|
|
|
- setState(() {
|
|
|
-
|
|
|
- });
|
|
|
+ setState(() {});
|
|
|
});
|
|
|
checkIfThereIsAShop();
|
|
|
}
|
|
|
@@ -89,12 +86,13 @@ class _MinePageState extends State<MinePage> {
|
|
|
child: Row(
|
|
|
children: [
|
|
|
GestureDetector(
|
|
|
- onTap:(){
|
|
|
+ onTap: () {
|
|
|
MyTools().toPage(context, MyInformationPage(),
|
|
|
- (then) {
|
|
|
- queryPersonalInformation();
|
|
|
- });
|
|
|
- },behavior: HitTestBehavior.translucent,
|
|
|
+ (then) {
|
|
|
+ queryPersonalInformation();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ behavior: HitTestBehavior.translucent,
|
|
|
child: Container(
|
|
|
margin: EdgeInsets.only(right: 10),
|
|
|
decoration: BoxDecoration(
|
|
|
@@ -124,85 +122,96 @@ class _MinePageState extends State<MinePage> {
|
|
|
Expanded(
|
|
|
child: Container(
|
|
|
height: 60,
|
|
|
- child: Column(children: [
|
|
|
- Row(children: [
|
|
|
- Expanded(
|
|
|
- child: GestureDetector(
|
|
|
- onTap: () {
|
|
|
- MyTools().toPage(
|
|
|
- context, MyInformationPage(),
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ Row(
|
|
|
+ children: [
|
|
|
+ Expanded(
|
|
|
+ child: GestureDetector(
|
|
|
+ onTap: () {
|
|
|
+ MyTools().toPage(
|
|
|
+ context, MyInformationPage(),
|
|
|
(then) {
|
|
|
queryPersonalInformation();
|
|
|
});
|
|
|
- },
|
|
|
- child: Container(
|
|
|
- margin: EdgeInsets.only(right: 10),
|
|
|
- child: Text(
|
|
|
- MyCookie()
|
|
|
- .loginInformation
|
|
|
- .data
|
|
|
- .extra
|
|
|
- .name,
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.white,
|
|
|
- fontSize: 18),
|
|
|
- maxLines: 1,
|
|
|
- overflow: TextOverflow.ellipsis,
|
|
|
- softWrap: true,
|
|
|
+ },
|
|
|
+ child: Container(
|
|
|
+ margin: EdgeInsets.only(right: 10),
|
|
|
+ child: Text(
|
|
|
+ MyCookie()
|
|
|
+ .loginInformation
|
|
|
+ .data
|
|
|
+ .extra
|
|
|
+ .name,
|
|
|
+ style: TextStyle(
|
|
|
+ color: Colors.white,
|
|
|
+ fontSize: 18),
|
|
|
+ maxLines: 1,
|
|
|
+ overflow: TextOverflow.ellipsis,
|
|
|
+ softWrap: true,
|
|
|
+ ),
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
- ),
|
|
|
- ),
|
|
|
- Container(
|
|
|
- margin: EdgeInsets.only(left: 20),
|
|
|
- child: MyViews().myText(
|
|
|
- '¥${MyCookie().userBean.balance}',
|
|
|
- Colors.white,
|
|
|
- 24),
|
|
|
- ),
|
|
|
- ],mainAxisAlignment: MainAxisAlignment.spaceBetween,),
|
|
|
- Row(children: [
|
|
|
- Text(
|
|
|
- 'ID:${MyCookie().getUID()}',
|
|
|
- style: TextStyle(
|
|
|
- color: Colors.white,
|
|
|
- fontSize: 14,
|
|
|
- ),
|
|
|
- maxLines: 1,
|
|
|
- overflow: TextOverflow.ellipsis,
|
|
|
- softWrap: true,
|
|
|
+ Container(
|
|
|
+ margin: EdgeInsets.only(left: 20),
|
|
|
+ child: MyViews().myText(
|
|
|
+ '¥${MyCookie().userBean.balance}',
|
|
|
+ Colors.white,
|
|
|
+ 24),
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ mainAxisAlignment:
|
|
|
+ MainAxisAlignment.spaceBetween,
|
|
|
),
|
|
|
- GestureDetector(
|
|
|
- onTap: () {
|
|
|
- MyTools().toPage(
|
|
|
- context, MyQRPage(), (then) {});
|
|
|
- },
|
|
|
- behavior: HitTestBehavior.translucent,
|
|
|
- child: Container(
|
|
|
- child: Row(
|
|
|
- children: [
|
|
|
- SvgPicture.asset(
|
|
|
- 'images/svg/二维码.svg',
|
|
|
- color: Colors.white,
|
|
|
- ),
|
|
|
- Container(
|
|
|
- width: 20,
|
|
|
- ),
|
|
|
- SvgPicture.asset(
|
|
|
- 'images/svg/箭头.svg',
|
|
|
- color: Colors.white,
|
|
|
- height: 12,
|
|
|
- width: 8,
|
|
|
- )
|
|
|
- ],
|
|
|
+ Row(
|
|
|
+ children: [
|
|
|
+ Text(
|
|
|
+ 'ID:${MyCookie().getUID()}',
|
|
|
+ style: TextStyle(
|
|
|
+ color: Colors.white,
|
|
|
+ fontSize: 14,
|
|
|
+ ),
|
|
|
+ maxLines: 1,
|
|
|
+ overflow: TextOverflow.ellipsis,
|
|
|
+ softWrap: true,
|
|
|
),
|
|
|
- ),
|
|
|
- )
|
|
|
- ],mainAxisAlignment: MainAxisAlignment.spaceBetween,),
|
|
|
- ],mainAxisAlignment: MainAxisAlignment.spaceBetween,),
|
|
|
+ GestureDetector(
|
|
|
+ onTap: () {
|
|
|
+ MyTools().toPage(
|
|
|
+ context, MyQRPage(), (then) {});
|
|
|
+ },
|
|
|
+ behavior: HitTestBehavior.translucent,
|
|
|
+ child: Container(
|
|
|
+ child: Row(
|
|
|
+ children: [
|
|
|
+ SvgPicture.asset(
|
|
|
+ 'images/svg/二维码.svg',
|
|
|
+ color: Colors.white,
|
|
|
+ ),
|
|
|
+ Container(
|
|
|
+ width: 20,
|
|
|
+ ),
|
|
|
+ SvgPicture.asset(
|
|
|
+ 'images/svg/箭头.svg',
|
|
|
+ color: Colors.white,
|
|
|
+ height: 12,
|
|
|
+ width: 8,
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ )
|
|
|
+ ],
|
|
|
+ mainAxisAlignment:
|
|
|
+ MainAxisAlignment.spaceBetween,
|
|
|
+ ),
|
|
|
+ ],
|
|
|
+ mainAxisAlignment:
|
|
|
+ MainAxisAlignment.spaceBetween,
|
|
|
+ ),
|
|
|
),
|
|
|
),
|
|
|
-
|
|
|
],
|
|
|
),
|
|
|
),
|
|
|
@@ -238,27 +247,28 @@ class _MinePageState extends State<MinePage> {
|
|
|
],
|
|
|
),
|
|
|
),
|
|
|
- if(!MyCookie().underReview) GestureDetector(
|
|
|
- onTap: () {
|
|
|
- MyTools().toPage(context, CouponPage(), (then) {
|
|
|
- queryPersonalInformation();
|
|
|
- });
|
|
|
- },
|
|
|
- behavior: HitTestBehavior.translucent,
|
|
|
- child: Column(
|
|
|
- children: [
|
|
|
- SvgPicture.asset('images/svg/优惠券.svg'),
|
|
|
- Container(
|
|
|
- margin: EdgeInsets.only(top: 11),
|
|
|
- child: Text(
|
|
|
- '优惠券',
|
|
|
- style: TextStyle(
|
|
|
- color: MyColors.c333333,
|
|
|
- fontSize: 14),
|
|
|
- ))
|
|
|
- ],
|
|
|
+ if (!MyCookie().underReview)
|
|
|
+ GestureDetector(
|
|
|
+ onTap: () {
|
|
|
+ MyTools().toPage(context, CouponPage(), (then) {
|
|
|
+ queryPersonalInformation();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ behavior: HitTestBehavior.translucent,
|
|
|
+ child: Column(
|
|
|
+ children: [
|
|
|
+ SvgPicture.asset('images/svg/优惠券.svg'),
|
|
|
+ Container(
|
|
|
+ margin: EdgeInsets.only(top: 11),
|
|
|
+ child: Text(
|
|
|
+ '优惠券',
|
|
|
+ style: TextStyle(
|
|
|
+ color: MyColors.c333333,
|
|
|
+ fontSize: 14),
|
|
|
+ ))
|
|
|
+ ],
|
|
|
+ ),
|
|
|
),
|
|
|
- ),
|
|
|
GestureDetector(
|
|
|
onTap: () {
|
|
|
MyTools().toPage(context, MyGoodsPage(), (then) {
|
|
|
@@ -282,14 +292,18 @@ class _MinePageState extends State<MinePage> {
|
|
|
),
|
|
|
GestureDetector(
|
|
|
onTap: () {
|
|
|
- if (MyCookie().userBean.aliPayAccount.isEmpty &&
|
|
|
- MyCookie().userBean.wxOpenid.isEmpty) {
|
|
|
+ if (MyCookie().userBean.aliPayAccount.isEmpty ||
|
|
|
+ MyCookie().userBean.aliPayName.isEmpty) {
|
|
|
MyTools().toPage(context, BindAlipayPage(),
|
|
|
(then) {
|
|
|
if (MyCookie()
|
|
|
- .userBean
|
|
|
- .aliPayAccount
|
|
|
- .isNotEmpty) {
|
|
|
+ .userBean
|
|
|
+ .aliPayAccount
|
|
|
+ .isNotEmpty &&
|
|
|
+ MyCookie()
|
|
|
+ .userBean
|
|
|
+ .aliPayName
|
|
|
+ .isNotEmpty) {
|
|
|
MyTools().toPage(context, WithdrawPage(),
|
|
|
(then) {
|
|
|
queryPersonalInformation();
|
|
|
@@ -330,19 +344,19 @@ class _MinePageState extends State<MinePage> {
|
|
|
queryPersonalInformation();
|
|
|
});
|
|
|
}),
|
|
|
- if(showRe)
|
|
|
- functionItem('images/svg/推荐人.svg', '推荐人', () {
|
|
|
- MyTools().toPage(context, ReferrerPage(), (then) {
|
|
|
- });
|
|
|
- }),
|
|
|
+ if (showRe)
|
|
|
+ functionItem('images/svg/推荐人.svg', '推荐人', () {
|
|
|
+ MyTools().toPage(context, ReferrerPage(), (then) {});
|
|
|
+ }),
|
|
|
functionItem('images/svg/绑定.svg', '提现账号', () {
|
|
|
MyTools().toPage(context, BindAlipayPage(), (then) {
|
|
|
queryPersonalInformation();
|
|
|
});
|
|
|
}),
|
|
|
- if(!MyCookie().underReview)functionItem('images/svg/广告.svg', '广告', () {
|
|
|
- MyTools().toPage(context, AdvertisingPage(), (then) {});
|
|
|
- }),
|
|
|
+ if (!MyCookie().underReview)
|
|
|
+ functionItem('images/svg/广告.svg', '广告', () {
|
|
|
+ MyTools().toPage(context, AdvertisingPage(), (then) {});
|
|
|
+ }),
|
|
|
functionItem('images/svg/处罚.svg', '投诉', () {
|
|
|
MyTools().toPage(context, PunishPage(), (then) {
|
|
|
queryPersonalInformation();
|
|
|
@@ -477,8 +491,8 @@ class _MinePageState extends State<MinePage> {
|
|
|
queryPersonalInformation();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
bool showRe = false;
|
|
|
+
|
|
|
void checkIfThereIsAShop() {
|
|
|
MyDio().query({
|
|
|
"key": "shop_user",
|
|
|
@@ -495,16 +509,16 @@ class _MinePageState extends State<MinePage> {
|
|
|
}, (response, hasError) {
|
|
|
if (!hasError) {
|
|
|
MyShopBeanEntity entity =
|
|
|
- MyShopBeanEntity().fromJson(json.decode(response.data.toString()));
|
|
|
- if(entity.data.data==null||entity.data.data.isEmpty||entity.data.data.length==0){
|
|
|
+ MyShopBeanEntity().fromJson(json.decode(response.data.toString()));
|
|
|
+ if (entity.data.data == null ||
|
|
|
+ entity.data.data.isEmpty ||
|
|
|
+ entity.data.data.length == 0) {
|
|
|
showRe = false;
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
showRe = true;
|
|
|
}
|
|
|
- setState(() {
|
|
|
-
|
|
|
- });
|
|
|
+ setState(() {});
|
|
|
}
|
|
|
- }, (error) { });
|
|
|
+ }, (error) {});
|
|
|
}
|
|
|
}
|