Browse Source

登录页邀请来源根据接口开关显示隐藏;

回乡VIP套餐板块,如果没有套餐列表,则隐藏该段板块;
充值页,选择门店来源弹窗高度更改;(原基础加高显示多点列表选择)
回乡钱包,活动余额更改为赠送余额;
new_revision_app
wurong 2 years ago
parent
commit
b61d416d9f
  1. 27
      lib/login/login_store_select.dart
  2. 32
      lib/login/new_login_page.dart
  3. 4
      lib/mine/mine_wallet_page.dart
  4. 2
      lib/mine/recharge_page.dart
  5. 2
      lib/retrofit/min_api.dart
  6. 3
      lib/vip/vip_view/vip_top.dart

27
lib/login/login_store_select.dart

@ -1,18 +1,17 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_appbar.dart';
import '../generated/l10n.dart';
import '../retrofit/data/base_data.dart';
import '../retrofit/data/channels_list.dart';
import '../retrofit/retrofit_api.dart';
import '../utils/flutter_utils.dart';
class LoginStoreSelect extends StatefulWidget {
final Map<String, dynamic> arguments;
LoginStoreSelect({this.arguments});
@override
State<StatefulWidget> createState() {
@ -28,25 +27,7 @@ class _LoginStoreSelect extends State<LoginStoreSelect> {
@override
void initState() {
super.initState();
EasyLoading.show(status: S.current.zhengzaijiazai);
queryChannels();
}
queryChannels() async{
apiService = ApiService(Dio(), context: context);
BaseData<ChannelsList> baseData = await apiService.appChannels().catchError((error) {
print(error.message);
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);
});
if (baseData != null && baseData.isSuccess) {
channelsList = baseData.data;
setState((){});
EasyLoading.dismiss();
} else {
if (baseData?.msg != null)
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
channelsList = widget.arguments["channelsList"];
}
@override

32
lib/login/new_login_page.dart

@ -25,6 +25,7 @@ import 'package:shared_preferences/shared_preferences.dart';
import 'package:sharesdk_plugin/sharesdk_interface.dart';
import '../main.dart';
import '../retrofit/data/channels_list.dart';
class NewLoginPage extends StatefulWidget {
final Map<String, dynamic> arguments;
@ -54,11 +55,36 @@ class _NewLoginPage extends State<NewLoginPage> {
bool isShowLogin = false;
String area = "+86";
String channelName;
ChannelsList channelsList;
@override
void initState() {
super.initState();
isLogin();
queryChannels();
}
queryChannels() async{
SharedPreferences sharedPreferences = await SharedPreferences.getInstance();
if (!sharedPreferences.containsKey("isShowPrivacyPolicy") ||
!sharedPreferences.getBool("isShowPrivacyPolicy")) {
showAlertDialog();
return;
}
apiService = ApiService(Dio(), context: context);
BaseData<ChannelsList> baseData = await apiService.appChannels().catchError((error) {
print(error.message);
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);
});
if (baseData != null && baseData.isSuccess) {
channelsList = baseData.data;
setState((){});
EasyLoading.dismiss();
} else {
if (baseData?.msg != null)
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}
initController() {
@ -596,9 +622,12 @@ class _NewLoginPage extends State<NewLoginPage> {
SizedBox(
height: 30.h,
),
if((channelsList?.isOpen ?? false) == true)
GestureDetector(
onTap: (){
Navigator.of(context).pushNamed('/router/login_store_select').then((value) => {
Navigator.of(context).pushNamed('/router/login_store_select',arguments: {
"channelsList":channelsList,
}).then((value) => {
setState(() {
if (value != null) channelName = value;
})
@ -911,6 +940,7 @@ class _NewLoginPage extends State<NewLoginPage> {
SharesdkPlugin.uploadPrivacyPermissionStatus(
1,
(success) => {
queryChannels(),
Navigator.of(context).pop(),
},
);

4
lib/mine/mine_wallet_page.dart

@ -261,12 +261,12 @@ class _MineWalletPage extends State<MineWalletPage> {
color: Color(0x33FFFCFC),
),
///
////
Row(
children: [
Expanded(
child: Text(
"活动余额",
"赠送余额",
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.semi_bold,

2
lib/mine/recharge_page.dart

@ -723,7 +723,7 @@ class _RechargePage extends State<RechargePage> {
state,
) {
return Container(
height: 321.h,
height: 355.h,
decoration: BoxDecoration(
color: Color(0xFFFAFAFA),
borderRadius: BorderRadius.only(

2
lib/retrofit/min_api.dart

@ -26,7 +26,7 @@ import 'data/shopping_home_config.dart';
part 'min_api.g.dart';
const localBaseUrl = "http://192.168.10.78:8765/app/";///
const localBaseUrl = "http://192.168.10.129:8765/app/";///
// const localBaseUrl = "https://2946-27-19-77-115.jp.ngrok.io/app/";///
const serviceBaseUrl = "https://pos.api.lotus-wallet.com/app/";///线

3
lib/vip/vip_view/vip_top.dart

@ -129,11 +129,12 @@ class _VipTop extends State<VipTop> {
child: Column(
children: [
vipCard(),
if(widget?.vipCardHome?.cards?.length != 0)
SizedBox(
height: 15.h,
),
(!(widget?.vipCardHome?.member?.isVip ?? false))
? vipCardList()
? (widget?.vipCardHome?.cards?.length == 0 ? Container():vipCardList())
: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(

Loading…
Cancel
Save