未实名拦截

pull/1/head
张萌 3 years ago
parent 2266db00cf
commit 052302c2a6

@ -563,7 +563,7 @@ class _HomePageState extends State<HomePage>
child: GestureDetector(
onTap: () {
if (LoginUtil.isNotLogin) return;
if (ao.title != '全部应用' && !LoginUtil.haveRealName(ao.title)) return;
// if (ao.title != '全部应用' && !LoginUtil.haveRealName(ao.title)) return;
if (ao.callback == null) {
BotToast.showText(
text: '该功能正在准备上线中,敬请期待', align: Alignment(0, 0.5));

@ -10,11 +10,8 @@ import 'package:sms_autofill/sms_autofill.dart';
import 'package:velocity_x/src/extensions/string_ext.dart';
class InputPayPasswordDialog extends StatefulWidget {
final int balance;
const InputPayPasswordDialog({
Key? key,
required this.balance,
}) : super(key: key);
@override
@ -58,16 +55,7 @@ class _InputPayPasswordDialogState extends State<InputPayPasswordDialog> {
codeLength: 6,
onCodeChanged: (code) async {
if ((code?.length ?? 0) >= 6) {
Get.back();
var base = await NetUtil()
.post(SAASAPI.balance.buyPointsByBalance, params: {
'balance': widget.balance,
'balancePayPwd': code
});
Get.back();
if (!base.success) {
BotToast.showText(text: base.msg);
}
Get.back(result: code!);
}
_currentCode = code;
},

@ -192,8 +192,15 @@ class _PayWayDialogState extends State<PayWayDialog> {
Get.dialog(SetPayPasswordDialog());
} else {
Get.back();
Get.dialog(
InputPayPasswordDialog(balance: widget.amount));
var psd = await Get.dialog(
InputPayPasswordDialog());
await NetUtil().post(
SAASAPI.balance.buyPointsByBalance,
params: {
'balance': widget.amount,
'balancePayPwd': psd
},
showMessage: true);
}
return;
}

@ -138,13 +138,10 @@ class _TabNavigatorState extends State<TabNavigator>
//
Get.offAll(() => OtherLoginPage());
} else {}
if (UserTool.userProvider.userInfoModel?.name == null) {
Get.dialog(CertificationDialog());
} else {
_tabController!.animateTo(2, curve: Curves.easeInOutCubic);
_currentIndex = 2;
setState(() {});
}
},
child: Material(
color: Colors.transparent,

@ -1,3 +1,4 @@
import 'package:aku_new_community/extensions/num_ext.dart';
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/saas_model/task/hall_list_model.dart';
import 'package:aku_new_community/widget/bee_divider.dart';
@ -98,6 +99,7 @@ class HallCard extends StatelessWidget {
),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
head,
24.w.heightBox,
@ -164,6 +166,7 @@ class HallCard extends StatelessWidget {
),
24.w.heightBox,
BeeDivider.horizontal(),
20.hb,
_cardBottom()
],
),

@ -3,6 +3,8 @@ import 'dart:io';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/pages/personal/wallet/input_pay_password_dialog.dart';
import 'package:aku_new_community/pages/personal/wallet/set_pay_password_dialog.dart';
import 'package:aku_new_community/ui/function_and_service/task/task_func.dart';
import 'package:aku_new_community/ui/function_and_service/task/task_map.dart';
import 'package:aku_new_community/ui/function_and_service/task/task_remark_page.dart';
@ -12,6 +14,7 @@ import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/bee_record_voice_widget.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bee_long_button.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:aku_new_community/widget/picker/bee_date_picker.dart';
import 'package:aku_new_community/widget/picker/bee_pick_image_widget.dart';
import 'package:aku_new_community/widget/picker/bee_picker_box.dart';
@ -118,6 +121,21 @@ class _PublishTaskPageState extends State<PublishTaskPage> {
if (!canTap) {
return;
}
var psdCode = '';
if (_rewardType == 1) {
var balance = int.parse(_rewardController.text.trim());
if (balance >
(UserTool.userProvider.userInfoModel!.balance ?? 0)) {
BotToast.showText(text: '余额不足,请前往充值');
} else {
if (!UserTool.userProvider.userInfoModel!.isBalancePayPwd) {
Get.dialog(SetPayPasswordDialog());
} else {
psdCode = await Get.dialog(InputPayPasswordDialog());
}
}
}
var cancel = BotToast.showLoading();
var _voiceUrl;
if (_voiceUri != null) {
@ -159,7 +177,8 @@ class _PublishTaskPageState extends State<PublishTaskPage> {
voiceUrl: _voiceUrl,
imgUrls: imgs,
rewardType: _rewardType,
reward: _rewardController.text);
reward: _rewardController.text,
psd: psdCode);
if (re) {
Get.back();
}

@ -20,6 +20,7 @@ class TaskFunc {
required List<String> imgUrls,
required int rewardType,
required String reward,
required String psd,
}) async {
var base = await NetUtil().post(SAASAPI.task.insert,
params: {
@ -39,6 +40,7 @@ class TaskFunc {
'imgUrls': imgUrls,
'rewardType': rewardType,
'reward': reward,
'balancePayPwd':psd,
},
showMessage: true);
return base.success;

@ -38,7 +38,7 @@ class _AllApplicationPageState extends State<AllApplicationPage> {
? null
: () {
if (LoginUtil.isNotLogin) return;
if (!LoginUtil.haveRealName(object.title)) return;
// if (!LoginUtil.haveRealName(object.title)) return;
if (object.callback == null || !online) {
BotToast.showText(
text: '正在准备上线中,敬请期待', align: Alignment(0, 0.5));

@ -140,11 +140,7 @@ class _MyFamilyPageState extends State<MyFamilyPage>
child: AddHouseButton(
text: '添加房屋',
onTap: () async {
if (UserTool.userProvider.userInfoModel?.name == null) {
await Get.dialog(CertificationDialog());
} else {
Get.to(() => AddHousePage());
}
}),
)
: SizedBox(),

@ -76,11 +76,8 @@ class _MyHousePageState extends State<MyHousePage> {
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 32.w),
child: AddHouseButton(
onTap: () async {
if (UserTool.userProvider.userInfoModel?.name == null) {
await Get.dialog(CertificationDialog());
} else {
Get.to(() => AddHousePage());
}
},
text: '添加房屋',
),

@ -77,7 +77,7 @@ class _BeeSearchState extends State<BeeSearch> {
return MaterialButton(
onPressed: () {
if (LoginUtil.isNotLogin) return;
if (!LoginUtil.haveRealName(e.title)) return;
// if (!LoginUtil.haveRealName(e.title)) return;
if (e.callback == null) {
BotToast.showText(text: '该功能正在准备上线中,敬请期待', align: Alignment(0, 0.5));
} else {

@ -30,16 +30,16 @@ class LoginUtil {
///
static bool get isNotLogin => !isLogin;
static bool haveRealName(String name) {
// if (!name.contains(RegExp('访客邀请|报事报修|建议咨询|生活缴费|物品出门|投诉表扬|我的访客|我的报修|我的缴费')))
// static bool haveRealName(String name) {
// // if (!name.contains(RegExp('访客邀请|报事报修|建议咨询|生活缴费|物品出门|投诉表扬|我的访客|我的报修|我的缴费')))
// // return true;
// final userProvider = Provider.of<UserProvider>(Get.context!, listen: false);
// if (userProvider.userInfoModel!.name == null) {
// Get.dialog(CertificationDialog());
// return false;
// }
// return true;
final userProvider = Provider.of<UserProvider>(Get.context!, listen: false);
if (userProvider.userInfoModel!.name == null) {
Get.dialog(CertificationDialog());
return false;
}
return true;
}
// }
static bool haveRoom(String name) {
// if (!name.contains(RegExp('访客邀请|报事报修|建议咨询|生活缴费|物品出门|投诉表扬|我的访客|我的报修|我的缴费')))

@ -3,10 +3,12 @@ import 'dart:typed_data';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/pages/sign/login/other_login_page.dart';
import 'package:aku_new_community/pages/splash/app_verify_dialog.dart';
import 'package:aku_new_community/provider/user_provider.dart';
import 'package:aku_new_community/utils/developer_util.dart';
import 'package:aku_new_community/utils/network/base_list_model.dart';
import 'package:aku_new_community/utils/network/base_model.dart';
import 'package:aku_new_community/widget/dialog/certification_dialog.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
import 'package:dio/dio.dart';
@ -212,9 +214,10 @@ class NetUtil {
userProvider.logout();
//
Get.offAll(() => OtherLoginPage());
if (userProvider.isLogin) {
BotToast.showText(text: model.msg);
}
if (model.code==10100) {
BotToast.showText(text: '请先实名认证');
Get.dialog(CertificationDialog());
}
}
}

@ -34,7 +34,7 @@ class _ApplicationViewState extends State<ApplicationView> {
padding: EdgeInsets.zero,
onPressed: () {
if (LoginUtil.isNotLogin) return;
if (!LoginUtil.haveRealName(object.title)) return;
// if (!LoginUtil.haveRealName(object.title)) return;
if (object.callback == null) {
BotToast.showText(text: '该功能正在准备上线中,敬请期待', align: Alignment(0, 0.5));
} else {

@ -16,7 +16,7 @@ buildApk() async {
String date = DateUtil.formatDate(DateTime.now(), format: 'yy_MM_dd_HH_mm');
String version = await getVersion();
await runAsync('rmdir', arguments: [ Config.apkDir]);
await runAsync('rmdir', arguments: ['-f', Config.apkDir]);
await runAsync('mkdir', arguments: [ Config.apkDir]);
await runAsync('move', arguments: [
Config.buildPath,

Loading…
Cancel
Save