修改发布喊话无法选择圈子问题

This commit is contained in:
yangyuhao 2023-09-07 17:17:59 +08:00
parent 8f6e0c5aab
commit c799e6702e
4 changed files with 31 additions and 19 deletions

View File

@ -54,7 +54,10 @@ class Call_outLogic extends GetxController {
if (myConfigData != null) {
// print(myConfigData.name);
numbers.addAll(myConfigData);
if(numbers.length>0){
circleName = numbers[0].name;
}
SharedPreferencesHelper.getInstance().then((sharedPreferences) {
vip = sharedPreferences.getInt(SharedPreferencesHelper.VIP);
print(vip);

View File

@ -17,6 +17,9 @@ class Select_circleLogic extends GetxController {
for (var entry in entries.asMap().entries) {
MyConfigData bean = MyConfigData(entry.value.key, entry.value.value, false);
if(selectCircle.isEmpty){
arrList.add(bean);
}else{
selectCircle.forEach((element) {
if(entry.value.key==element.id){
bean.isSelect = true;
@ -25,6 +28,8 @@ class Select_circleLogic extends GetxController {
arrList.add(bean);
});
}
}
}else{
interestMap.forEach((key, value) {
MyConfigData bean = MyConfigData(key, value, false);
@ -36,7 +41,7 @@ class Select_circleLogic extends GetxController {
arrList.add(bean);
});
}
print(arrList.length.toString());
update();
}

View File

@ -375,6 +375,17 @@ class MyTabbedScreenState extends State<UserinfoPage>
}
Widget titleTab(UserinfoLogic controller) {
String buttonText = "";
if (controller.isMe) {
if (logic.isShowAlbum) {
buttonText = controller.isEdit ? "完成" : "管理";
} else {
buttonText = "发布喊话";
}
} else {
buttonText = controller.isUrgeStatus ? "已催更" : "催更";
}
return Container(
alignment: Alignment.centerLeft,
padding: EdgeInsets.symmetric(horizontal: 10.sp),
@ -414,7 +425,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
),
logic.isBlack||logic.isDestroy||logic.isBlackBeen?Container(): GestureDetector(
onTap: () {
if(!logic.isShowAlbum){
if(!logic.isShowAlbum&&controller.isMe){
List<MyConfigData> numbers = [];
var data = Get.toNamed(AppRoutes.Call_out, arguments: {'numbers': numbers});
return ;
@ -445,14 +456,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
horizontal: 12.sp,
),
child: Text(
logic.isShowAlbum?
controller.isMe
? controller.isEdit
? "完成"
: "管理"
: controller.isUrgeStatus
? "已催更"
: "催更":"发布喊话",
buttonText,
style: const TextStyle(
color: Colors.white,
fontSize: 12,
@ -523,7 +527,7 @@ class MyTabbedScreenState extends State<UserinfoPage>
? controller.state.imaglist.length+1
: controller.state.imaglist.length ,
itemBuilder: (BuildContext context, int index) {
print("123123123123");
// print("123123123123");
if (controller.isMe ) {
if (index == 0) {
return GestureDetector(

View File

@ -255,7 +255,7 @@ class DioManager {
// String? errorMsg = isNetworkConnected
// ? e.requestOptions.extra["errorMsg"]
// : "网络连接断开,请检查网络设置";
return {'code': 500, 'msg': '加载中${e.message}'};
return {'code': 500, 'msg': '加载中'};
} catch (e) {
//
return {'code': 500, 'msg': '加载中...'};