修改报错登录code,判断喊话私聊是否为自己
This commit is contained in:
parent
b1f68e6a35
commit
0fd0d0af9c
@ -126,13 +126,14 @@ class _CirclePageState extends State<CirclePage>
|
||||
),
|
||||
);
|
||||
}
|
||||
if (logic.statistics != null) {
|
||||
if (logic.statistics != null && widgets.isNotEmpty) {
|
||||
widgets.add(Positioned(
|
||||
left: 15.sp * urlList.length,
|
||||
child: circleWidget(logic.statistics!['visit_count'].toString()),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return Container(
|
||||
width: Get.width,
|
||||
padding: EdgeInsets.only(left: 18.sp, right: 18.sp),
|
||||
|
||||
@ -170,13 +170,22 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
}
|
||||
|
||||
void pushMsgPage(Lists bean, String cicleId) async {
|
||||
if (widget.bean.is_limit) {
|
||||
showJoinCiclePiker(cicleId,widget.bean.amount.toString(),widget.bean.oldAmount.toString(),2);
|
||||
|
||||
// if (widget.bean.is_limit) {
|
||||
// showJoinCiclePiker(cicleId,widget.bean.amount.toString(),widget.bean.oldAmount.toString(),2);
|
||||
// return;
|
||||
// }
|
||||
|
||||
var sp = await SharedPreferencesHelper.getInstance();
|
||||
String myUserId = sp.getMyUserId();
|
||||
if (bean.user!.id.toString().contains(myUserId)) {
|
||||
showToast('无法与自己私聊');
|
||||
return;
|
||||
}
|
||||
// if ()
|
||||
|
||||
var data = await DioManager.instance.get(
|
||||
url: "/up-service/callout/$circleId/chat",);
|
||||
url: "/up-service/callout/${bean.id}/chat",);
|
||||
if (data["code"] == 200) {
|
||||
pushChatPage(data['data']['account_id'], bean.user!.nickname!);
|
||||
}
|
||||
@ -523,8 +532,7 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
left: 12.sp * index,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
|
||||
pushOtherPeopleHomePage(element.id.toString());
|
||||
// pushOtherPeopleHomePage(element.id.toString());
|
||||
},
|
||||
child: circleWidget(element.avatar!,element.id.toString(), width: 24),
|
||||
),
|
||||
@ -618,10 +626,10 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// if (widget.bean.is_limit) {
|
||||
// showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
|
||||
// return;
|
||||
// }
|
||||
if (widget.bean.is_limit) {
|
||||
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
|
||||
return;
|
||||
}
|
||||
pushHomePage(lists, lists.id.toString());
|
||||
},
|
||||
child: ClipOval(
|
||||
@ -843,11 +851,6 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
left: 12.sp * index,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
// if (widget.bean.is_limit) {
|
||||
// showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
|
||||
// return;
|
||||
// }
|
||||
// pushOtherPeopleHomePage(element.id.toString());
|
||||
},
|
||||
child: circleWidget(element.avatar!,element.id.toString(), width: 24),
|
||||
),
|
||||
@ -913,10 +916,10 @@ class _InfoListViewState extends State<InfoListView> with AutomaticKeepAliveClie
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
// if (widget.bean.is_limit) {
|
||||
// showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
|
||||
// return;
|
||||
// }
|
||||
if (widget.bean.is_limit) {
|
||||
showJoinCiclePiker(widget.bean.id.toString(),widget.bean.amount.toString(),widget.bean.oldAmount.toString(),1);
|
||||
return;
|
||||
}
|
||||
pushHomePage(
|
||||
lists, widget.bean.id.toString());
|
||||
},
|
||||
|
||||
@ -203,7 +203,7 @@ class DioManager {
|
||||
// json转model
|
||||
String jsonStr = json.encode(response.data);
|
||||
Map<String, dynamic> responseMap = json.decode(jsonStr);
|
||||
if (responseMap["code"] == 5003) {
|
||||
if (responseMap["code"] == 5003 || responseMap["code"] == 30003) {
|
||||
pushLoginPage();
|
||||
}
|
||||
return responseMap;
|
||||
|
||||
@ -52,7 +52,9 @@ class SharedPreferencesHelper {
|
||||
return prefs?.getString(key) ?? '';
|
||||
}
|
||||
|
||||
|
||||
String getMyUserId() {
|
||||
return preferences?.getInt(SharedPreferencesHelper.USERID).toString() ?? '';
|
||||
}
|
||||
|
||||
bool? getBool(String key) {
|
||||
final prefs = preferences;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user